Skip to content

API reference Basics

Errors

Failed requests return an HTTP error status and a JSON body with a stable error.code.

Example
{
  "success": false,
  "error": {
    "code": "invalid_legs",
    "message": "legs[1].expiry must be a date (YYYY-MM-DD)"
  }
}

Branch on error.code. The message is written for people and may change.

Error codes

HTTPCodeMeaning
400invalid_request, invalid_jsonThe body or a parameter is wrong. The message says which.
400invalid_legsA leg is missing a field, or has an invalid type, action, strike, expiry, price or IV.
400invalid_symbolsymbol isn't a ticker.
400invalid_period, invalid_limitSite trends: period must be day, week or month; limit is out of range.
401api_key_requiredThis endpoint needs a key.
401invalid_api_keyThe key doesn't exist or was revoked.
403email_not_verified, payment_requiredFinish setting up your account: confirm your email and add a card.
403ip_not_allowed, user_agent_not_allowedThe key is restricted to other IPs or user agents.
404not_foundNo such endpoint, or no options for that symbol.
404invalid_expiry, option_not_foundNo options expire on that date, or no option at that strike and expiry.
405method_not_allowedWrong HTTP method; the Allow header lists the right ones.
429rate_limitedToo many requests this second or minute. Wait Retry-After seconds.
429quota_exceededFree plan: the daily or monthly quota is used up.
429overage_cap_reachedPaid plan: your monthly overage spending cap is reached.
500internal_errorSomething broke on our side. Retry, and contact us if it continues.
503data_unavailable, calculation_failedMarket data or a calculation wasn't available. Retry shortly, or pass the prices yourself.

Retrying

  • 429: wait for the Retry-After header, in seconds.
  • 500 and 503: retry with exponential backoff (for example 1, 2, then 4 seconds).
  • 4xx otherwise: don't retry; fix the request.