Account · Account and platform
Account usage
/v1/account/usageaccountUsageCounts of the account's own requests per hour or day for the last seven days, from the request log: all keys and projects of the account, every REST call, MCP call, export call and WebSocket upgrade. errors are responses with status 500 and above, client_errors 400 to 499, rate_limited 429. Buckets are aligned to UTC hours or days and empty buckets are present. There are no credits; usage is limited only by the account rate limits (GET /v1/account/limits). meta.coverage.durable is false when the log is held in memory only and resets on a restart.
Example request
curl -sS "https://api.ordermap.si/v1/account/usage" \
-H "Authorization: Bearer $ORDERMAP_API_KEY"const res = await fetch("https://api.ordermap.si/v1/account/usage", {
headers: { Authorization: `Bearer ${process.env.ORDERMAP_API_KEY}` },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data, meta } = await res.json();
console.log(data, meta.coverage);Set ORDERMAP_API_KEY to your key. Replace the dates with a recent trading date.
Parameters
4 parameters, none required.
| Parameter | Type and limits | Description |
|---|---|---|
start_queryoptional | integerunix-msmin 946684800000max 4102444800000 | Start of the range (inclusive). Defaults to 24 hours before end_time for hourly buckets and 7 days for daily buckets; earlier than 7 days back is raised to the retention window. |
end_queryoptional | integerunix-msmin 946684800000max 4102444800000 | End of the range (exclusive). Defaults to now. |
granularityqueryoptional | stringhourdaydefault hour | Bucket size. |
by_queryoptional | booleandefault false | Add the per-route breakdown to every bucket. |
Response
| Status | Meaning | Body |
|---|---|---|
200 | Successful response. | Schema below |
400 | Invalid, unknown or repeated parameters, or an invalid cursor. | Error object |
401 | Missing or invalid API key. | Error object |
403 | The plan, dataset release or account state does not allow this request. | Error object |
429 | Rate limit, burst limit or cooldown; wait Retry-After seconds.Retry-After | Error object |
500 | Internal error. | Error object |
503 | Data temporarily unavailable; retry after Retry-After seconds.Retry-After | Error object |
504 | The request timed out. | Error object |
Authenticated responses carry the X-RateLimit-* headers (see rate limits); 429 and 503 add Retry-After.
200 response body
dataarray<object>required14 fields insidebytes_outintegerrequiredResponse bytes sent (after compression).client_errorsintegerrequiredResponses with status 400 to 499, including rate-limited ones.end_timeintegerunix-msrequiredEnd of the bucket (exclusive). Unix epoch milliseconds (UTC).errorsintegerrequiredResponses with status 500 or above.rate_limitedintegerrequiredResponses with status 429.requestsintegerrequiredRequests received.routesarray<object>Per-route breakdown, most requests first; present when by_route=true and the bucket has requests.6 fields insidebytes_outintegerrequiredResponse bytes sent.client_errorsintegerrequiredResponses with status 400 to 499, including rate-limited ones.errorsintegerrequiredResponses with status 500 or above.rate_limitedintegerrequiredResponses with status 429.requestsintegerrequiredRequests received.routestringrequiredRoute template, for example /v1/options/flow.
start_timeintegerunix-msrequiredStart of the bucket. Unix epoch milliseconds (UTC).
metaobjectrequiredMeta object
Example response
{
"data": [
{
"bytes_out": 5230112,
"client_errors": 3,
"end_time": 1760662800000,
"errors": 0,
"rate_limited": 1,
"requests": 412,
"start_time": 1760659200000
}
],
"meta": {
"as_of": 1760659200123,
"coverage": {
"complete": true
},
"delay_ms": 0,
"delayed": false,
"request_id": "0199f0c2-5a1e-7c3b-9d4e-2b6f8a1c3d5e",
"source": "derived"
}
}Values are illustrative. Missing values are null, never 0.