Skip to content

GET /v1/usage

GET /v1/usage

Returns the current month’s usage for the authenticated customer. Useful for in-app dashboards, alerting, and capacity planning.

This endpoint is itself rate-limited but does not count against your monthly quota.

Request

GET /v1/usage HTTP/1.1
Host: api.oneapi.finance
Authorization: Bearer oa_live_<your_key>

Query parameters

ParamTypeRequiredNotes
periodenumnocurrent_month (default) | last_month | last_24h.
byenumnokey | endpoint. Default: omit, return overall.

Response

{
"period": "current_month",
"period_start": "2026-05-01T00:00:00Z",
"period_end": "2026-06-01T00:00:00Z",
"plan": "indie",
"monthly_quota": 100000,
"monthly_used": 14823,
"monthly_remaining": 85177,
"per_minute_quota": 60,
"by_key": [
{
"key_prefix": "oa_live_a1b2c3",
"name": "production-web",
"calls": 12500,
"last_used_at": "2026-05-04T20:15:33Z"
},
{
"key_prefix": "oa_live_d4e5f6",
"name": "scheduled-jobs",
"calls": 2323,
"last_used_at": "2026-05-04T18:00:00Z"
}
],
"by_endpoint": [
{ "endpoint": "/v1/quote", "calls": 9100, "cache_hit_rate": 0.74 },
{ "endpoint": "/v1/time_series", "calls": 4200, "cache_hit_rate": 0.61 },
{ "endpoint": "/v1/statistics", "calls": 1100, "cache_hit_rate": 0.92 },
{ "endpoint": "/v1/symbol_search", "calls": 423, "cache_hit_rate": 0.0 }
]
}

Field reference

FieldTypeNotes
periodstringEcho of the requested period.
period_startstringISO 8601 UTC. Inclusive.
period_endstringISO 8601 UTC. Exclusive.
planstringCurrent plan: free | indie | pro | business | custom.
monthly_quotaintegerTotal calls allowed in this period.
monthly_usedintegerSuccessful (2xx) calls so far.
monthly_remainingintegermonthly_quota - monthly_used.
per_minute_quotaintegerBurst limit per key.
by_keyarray | nullPresent when by=key.
by_endpointarray | nullPresent when by=endpoint.

cache_hit_rate is the fraction of your calls to that endpoint that we served from our internal cache rather than fetching from upstream. A high cache hit rate is good — it means you are paying for calls we did not have to make.

Examples

Terminal window
curl -H "Authorization: Bearer oa_live_..." \
"https://api.oneapi.finance/v1/usage?by=endpoint"

Errors

StatuscodeWhen
401unauthenticatedMissing or invalid API key.
429rate_limitBurst limit. The minute bucket is the same as for any other endpoint.

See also