Errors and limits
What a failed request looks like, every error code the API returns, and the rate limit.
Errors
A failed request gets an HTTP status and a body like this:
{
"error": {
"code": "invalid_input",
"message": "drawdown_limit: cannot be more than account_size"
}
}
code is stable: check it in your code. message is for people, and may change.
401 Unauthorized
missing_key: noAuthorization: Bearer …header.invalid_key: the key is mistyped, revoked or expired, or the account is suspended.
403 Forbidden
read_only_key: a read-only key tried to change something. Use a read & write key.
404 Not Found
not_found: no such account (or it isn't yours), day or payout.
409 Conflict
account_archived: the account is archived. Restore it first (PATCHwith"archived": false).account_limit: you have 100 live accounts. Archive one first.account_limit_total: you have 1,000 accounts, archived ones included.needs_handle: sharing needs a public profile handle. Choose one on the site.
400 and 422
invalid_json(400): the body isn't JSON.invalid_input(422): a field is missing or wrong. The message names the field when it can.firm_unavailable(422): thatfirm_idisn't on our approved list.
429 Too Many Requests
rate_limited: slow down (see below).
500
internal_error: something went wrong on our side. Try again; if it keeps happening, let us know.
Rate limit
Each key can make 120 requests a minute. Past that you get 429 rate_limited with a Retry-After: 60 header; wait and try again. Requests that fail count too.
If you sync many accounts, read them all with one GET /accounts rather than one request per account.
Limits on your data
- 100 live accounts, open or closed, and 1,000 in all with archived ones.
- One balance per account per day; logging a day again replaces it.
- Dates can't be before 2000, or in the future. Because dates are in your own time zone, tomorrow's date (in UTC) is accepted: somewhere it already is.
- Amounts: account sizes and payouts up to $10,000,000; balances up to $100,000,000; at most two decimals.
- 20 active API keys per member, and 1,000 in all with revoked ones.