Our goal is to make API errors easy to parse, understand, and react to. Error responses that correspond to this standard will always be in JSON and have an error
key with a snake_case error.type
field that is machine-readable. There will also often be a human-readable description of the error in English on the error.message
field. There may be additional fields on this error
object as well to provide even greater detail about the error. For example:
{
"error": {
"type": "invalid_request",
"message": "One or more of your request body parameters were invalid",
"requestErrors": [
{
"code": "invalid_type",
"expected": "number",
"received": "undefined",
"path": [
"startTime"
],
"message": "Required"
}
]
}
}
Error Type | HTTP Code |
---|---|
invalid_request | 400 |
unauthorized_access | 401 |
api_permission_denied | 403 |
rate_limit_exceeded | 429 |
internal_error | 500 |
asset_not_found | 400 |
asset_type_not_supported | 400 |
asset_permission_denied | 403 |
earnings_not_found | 404 |
market_permission_denied | 403 |
resource_not_found | 404 |