Rate limits
Two rolling budgets per workspace — per minute and per day — with headers on every response so a client can slow down before it is told to.
Budgets
| Account | REST per minute | REST per day | Stream connections | Streamed contests |
|---|---|---|---|---|
| Every account, no charge | 120 | 20,000 | 1 | 25 |
| Individual, paid | 300 | 100,000 | 5 | 500 |
| Individual, high volume | 1,000 | 500,000 | Unlimited | Unlimited |
| Organization, paid | 600 | 200,000 | 10 | 2,000 |
| Organization, custom | 1,200+ | 2,000,000+ | Unlimited | Unlimited |
The budget belongs to the workspace: every key it mints, and the console session, draw from the same pool. A key can be narrowed below its account's budget when it is minted. Your effective numbers are on GET /flow/v1/auth/me under current_key.
/auth/me, /auth/account/*) and AI Connect calls are exempt from the daily budget — BYOK is billed by the provider and managed calls by credits, and a request quota would be a second charge. They are still throttled per minute. Open WebSocket connections consume no REST budget.Stream allowances
WebSocket streaming has its own two allowances, also per workspace: how many connections may be open at once, across every key, and how many distinct contests those connections may watch in total (the same contest on two channels counts once). Every key is additionally capped at 3 concurrent connections, and every channel at 200 contests per connection.
Where streamed contests are capped, a contest-keyed channel (liquidity, contest_state, arbitrage, signal) must name its contest_ids — subscribing to every contest is only open to unlimited allowances.
Over either allowance, the server answers on the socket:
{
"type": "error",
"code": "stream_limit_reached",
"message": "This account may watch 25 contests across its stream connections; 25 already watched. ...",
"limit": { "name": "subscriptions", "max": 25, "in_use": 25 }
}
A refused connection receives the same frame with "name": "connections" and is closed with code 4029. A refused subscribe leaves the connection and its existing subscriptions untouched. Unsubscribing frees allowance immediately.
Headers
Every REST response, including a 429, carries the current state:
X-RateLimit-Limit-Minute: 120
X-RateLimit-Remaining-Minute: 102
X-RateLimit-Reset-Minute: 1745021580 # epoch seconds when the minute window resets
X-RateLimit-Limit-Day: 20000
X-RateLimit-Remaining-Day: 19847
X-RateLimit-Reset-Day: 1745049600
A well-behaved client reads X-RateLimit-Remaining-Minute and slows down before it reaches zero.
Handling 429
Over either budget, the API answers HTTP 429:
{
"error": {
"code": "rate_limit_exceeded",
"message": "Minute rate limit (120) exceeded",
"details": {
"retry_after_seconds": 23,
"window": "minute"
}
}
}
The response also carries a standard Retry-After header with the same value in seconds. Wait that long before retrying; add exponential backoff on top for cascading overload.
Example: backoff
async function flowFetch(path, init = {}) {
const url = `https://api.openmarkets.ai/flow/v1${path}`;
for (let attempt = 0; attempt < 5; attempt++) {
const res = await fetch(url, {
...init,
headers: {
'X-API-Key': process.env.OPENMARKETS_API_KEY,
...init.headers,
},
});
if (res.status !== 429) return res;
const retryAfter = Number(res.headers.get('Retry-After') ?? 1);
await new Promise((r) => setTimeout(r, retryAfter * 1000 * (attempt + 1)));
}
throw new Error('Rate limited after retries');
}
Windows
- Fixed 60-second windows for the minute budget; fixed UTC-midnight windows for the day.
- No bursting across a boundary: at the start of each minute the budget resets to the full limit.
- Need more? Higher budgets come with the plan, or a per-key limit above the plan default on request. Plans are compared in the console.
Streams have their own limits — 200 contests per connection per channel, a 25-second heartbeat — on the Streaming page.