Quickstart
A key, one call, one stream. About a minute, and nothing here needs approval.
1. Create a key
Console → API keysSign in to the console and create a key on the API keys page. Every plan, including Free, gets a key that reads prices and places practice orders; real money needs one linked to a venue account (see Connect). The key looks like om_exec_live_… — the prefix names the key type and the environment.
2. See tonight's game
GET /flow/v1/public/live-sample (no key needed) returns whichever open contest the most venues are quoting right now — the same one the console's front door shows. Take its contest_id and read its aggregated liquidity on your own key — every bettable outcome, every venue:
curl https://api.openmarkets.ai/flow/v1/contests/{contest_id}/liquidity \
-H "X-API-Key: om_exec_live_..."
The response:
{
"data": [
{
"position": "home",
"title": "Kansas City to win",
"price": 0.57,
"available": 5400,
"liquidity_hash": "kalshi:ct_9f2a...:mk_ml:side_home:var_0"
}
],
"meta": { "timestamp": "2026-09-28T00:04:00Z", "api_version": "v1" }
}
Each position carries a per-venue best price, the size available at it, and a consensus price. The full shape is in the REST reference; how to lay positions out into books is in Market model & books.
3. Place a practice order
Every key can place practice orders — mode: "paper", play money, graded when the game ends. Same request with mode: "real" once a venue is linked.
curl https://api.openmarkets.ai/flow/v1/auth/orders/buy \
-H "X-API-Key: om_exec_live_..." \
-H "Content-Type: application/json" \
-d '{
"orders": [{
"liquidity_hash": "kalshi:ct_9f2a...:mk_ml:side_home:var_0",
"amount": 10,
"max_price": 0.57,
"mode": "paper"
}]
}'
See Trading for order types, multi-leg requests and error codes.
4. Add Sign in with OpenMarkets
One button gives your app's users a key scoped to what they approve — no password, no venue login, ever in your code. See Sign in with OpenMarkets for registering an app and reading the consent result.
5. Stream live updates
stream:realtimeOpen a WebSocket and subscribe to the contests you care about. You receive a liquidity.update whenever any venue's price or size changes.
import WebSocket from 'ws';
const ws = new WebSocket(
'wss://api.openmarkets.ai/flow/v1/stream?api_key=om_exec_live_...'
);
ws.on('open', () => {
ws.send(JSON.stringify({
action: 'subscribe',
channel: 'liquidity',
contest_ids: ['ct_abc123'],
}));
});
ws.on('message', (data) => {
const msg = JSON.parse(data.toString());
if (msg.type === 'liquidity.update') {
console.log(msg.contest_id, msg.changed_entries);
}
});