Account
Your plan, your credits, and how far back you can read
Account tells you your plan, how many credits you have left, and the first date you can read. Check it before a big pull, or before asking for an old date. It's free.
curl
curl "https://api.tickerdb.com/v1/account" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"tier": "plus",
"tier_full": "plus",
"plan": "Plus",
"email": "dev@example.com",
"limits": {
"monthly_requests": 200000,
"overage_enabled": true,
"search_results": 250,
"history_start": "2023-11-11"
},
"usage": {
"monthly_requests_used": 142,
"monthly_requests_remaining": 199858,
"credit_balance": 0
},
"scheduled_tier": null,
"scheduled_change_at": null
}
Account answers even when you're out of credits. The burst limit still applies. Every response from the API also carries your usage in its headers (see Rate Limits).
Before a big pull
- Enough credits? You can spend
monthly_requests_remaining, and after thatcredit_balanceifoverage_enabledistrue. - Far enough back?
history_startis the first date you can read. An earlier date returns403 tier_restricted.
What each plan includes is in Rate Limits.
Response fields
| Field | Type | Description |
|---|---|---|
plan | string | Your plan's name: Free, Plus, Pro or Commercial |
tier | string | free, plus or pro. Commercial shows pro |
tier_full | string | Like tier, but Commercial shows business |
email | string | The account's email |
scheduled_tier, scheduled_change_at | string | null | A plan change waiting for the end of your billing period, and when it happens. null when there's none |
limits
| Field | Type | Description |
|---|---|---|
monthly_requests | integer | Credits included each month |
overage_enabled | boolean | Whether requests go on after the monthly credits, paid from credit_balance |
search_results | integer | The most rows one search returns |
history_start | string | The first date you can read |
usage
| Field | Type | Description |
|---|---|---|
monthly_requests_used | integer | Credits used this month |
monthly_requests_remaining | integer | Monthly credits left. 0 once they're used up |
credit_balance | integer | Credits you've bought or been given. They're spent after the monthly credits, and don't expire |
Errors
| Status | error.type | Cause | What to do |
|---|---|---|---|
400 | invalid_parameter | A query parameter. Account takes none. | Send it without parameters. |
503 | rate_limit_unavailable | Usage can't be read right now. | Try again in a few seconds. |
Authentication and rate-limit errors are on Authentication and Errors & Caching.