GET /v1/usage
usage
GET /v1/usage
Per-API-key usage for the calling tenant and tier
Input parameters
| Parameter |
In |
Type |
Default |
Nullable |
Description |
| end |
query |
|
|
No |
Window end (YYYY-MM-DD). Defaults to today. |
| start |
query |
|
|
No |
Window start (YYYY-MM-DD). Defaults to 7 days ago. |
Request headers
| Header |
Required |
Description |
X-API-Key |
Required |
Your API key, sent on every request. |
X-Correlation-ID |
Optional |
Request ID for tracing. If omitted, the server assigns one and returns it in the X-Correlation-ID response header. |
Response 200 OK
application/json
{
"start_date": "2026-07-15",
"end_date": "2026-07-21",
"keys": [
{
"key_id": "abc123def456",
"key_name": "production-key",
"tier": "self_serve",
"tenant_id": "discord-123456789012345678",
"tenant_name": "example-trader",
"total_used": 3500,
"quota_remaining": 175500,
"daily": [
{
"date": "2026-07-15",
"used": 710,
"remaining": 178290
},
{
"date": "2026-07-16",
"used": 655,
"remaining": 177635
},
{
"date": "2026-07-17",
"used": 802,
"remaining": 176833
},
{
"date": "2026-07-18",
"used": 0,
"remaining": 176833
},
{
"date": "2026-07-19",
"used": 0,
"remaining": 176833
},
{
"date": "2026-07-20",
"used": 693,
"remaining": 176140
},
{
"date": "2026-07-21",
"used": 640,
"remaining": 175500
}
]
}
]
}
Schema of the response body
{
"properties": {
"start_date": {
"type": "string",
"title": "Start Date",
"description": "Window start (YYYY-MM-DD)."
},
"end_date": {
"type": "string",
"title": "End Date",
"description": "Window end (YYYY-MM-DD)."
},
"keys": {
"items": {
"$ref": "#/components/schemas/KeyUsage"
},
"type": "array",
"title": "Keys",
"description": "Per-key usage, busiest first."
}
},
"type": "object",
"required": [
"start_date",
"end_date"
],
"title": "UsageReportResponse",
"description": "Per-API-key usage over a date window for the caller's tenant and tier."
}
| Name |
Description |
Schema |
| X-Correlation-ID |
Request ID for tracing: the value you sent in X-Correlation-ID, or one the server generated. Returned on every response the API produces; some edge errors (e.g. rate limiting) may omit it. |
string |
Schemas
DailyUsage
| Name |
Type |
Description |
| date |
string |
Day (YYYY-MM-DD). |
| remaining |
integer |
Quota remaining after that day. |
| used |
integer |
Requests consumed that day. |
ErrorResponse
| Name |
Type |
Description |
| command_name |
|
Command the request mapped to (e.g. 'centab') |
| error_code |
string |
Consumer-facing 7000000-family error code |
| error_message |
string |
Generic, source-agnostic error message |
| status |
string |
Always 'failed' for an error body |
| target |
|
Offending request field for 7000000 (e.g. 'ticker') |
KeyUsage
| Name |
Type |
Description |
| daily |
Array<DailyUsage> |
Per-day breakdown. |
| key_id |
string |
ID of the API key. A label, not part of the API key: only the sk_ value goes in X-API-Key. |
| key_name |
string |
Friendly key name (empty if unresolved). A label, not part of the API key: only the sk_ value goes in X-API-Key. |
| quota_remaining |
integer |
Quota remaining at end of window. |
| tenant_id |
string |
Owning tenant ID (empty if not tenant-bound). A label, not part of the API key: only the sk_ value goes in X-API-Key. |
| tenant_name |
string |
Owning tenant display name (empty if not tenant-bound). |
| tier |
string |
Usage-plan tier the key belongs to. |
| total_used |
integer |
Total requests over the window. |
UsageReportResponse
| Name |
Type |
Description |
| end_date |
string |
Window end (YYYY-MM-DD). |
| keys |
Array<KeyUsage> |
Per-key usage, busiest first. |
| start_date |
string |
Window start (YYYY-MM-DD). |
Errors
| HTTP |
Meaning |
Body |
400 |
The usage date range is invalid. Check start and end (YYYY-MM-DD) and the allowed window. |
ErrorResponse |
401 |
Your API key is missing or invalid. Please check the X-API-Key header. |
ErrorResponse |
403 |
This data isn't included in your current plan. |
ErrorResponse |
404 |
We don't have data for that ticker. Double-check the symbol. |
ErrorResponse |
422 |
We couldn't prepare this data right now. Please try again shortly. |
ErrorResponse |
500 |
Something went wrong on our end. Try again, or contact support if it persists. |
ErrorResponse |
502 |
Usage data couldn't be retrieved right now. Please try again shortly. |
ErrorResponse |
503 |
The service is briefly unavailable. Please try again in a moment. |
ErrorResponse |
504 |
This request took too long. Please try again. |
ErrorResponse |
Request example
Replace any YOUR_... query values before sending.
curl --request GET "https://api.gammaedge.us/v1/usage" \
--header "X-API-Key: $GAMMAEDGE_API_KEY"
See error handling and rate limits for retry guidance.