Quickstart

From zero to your first trade in a few minutes.

1. Create an API key

Sign in to Inkle, open Settings > API Keys, and create a key. Choose the read scope for market data or add trade to place orders. The raw key (ik_live_…) is shown once, so store it somewhere safe.

2. Read a market (no auth)

bash
curl https://api.inklemarket.com/v1/usdi/market?status=open&limit=5

Every response is wrapped in an envelope; your payload is under data:

json
{ "status": "SUCCESS", "data": { "items": [ … ], "count": 112 } }

3. Place a trade with your key

bash
curl -X POST https://api.inklemarket.com/v1/usdi/market/<id>/bet \
  -H "X-Inkle-Api-Key: ik_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "outcomeIndex": 0, "stake": 5 }'

4. Or use the SDK

bash
npm install @inkle/sdk
ts
import { InkleClient } from "@inkle/sdk";

const inkle = new InkleClient({ apiKey: process.env.INKLE_API_KEY });

const { items } = await inkle.markets.list({ status: "open" });
await inkle.usdi.bet(items[0].id, { outcomeIndex: 0, stake: 5 });

Continue with the SDK guide or the full API reference.