Error Code Reference
When a REST request or WebSocket operation fails, TickQuote returns a stable numeric code and a message string that your client can branch on.
- Envelope
- code/message/data
- Machine code
- code + message
- Recovery
- Explicit
Error Response Format
REST errors use the same code/message/data envelope as successful responses. WebSocket errors use type=error with code and message.
{
"code": 42901,
"message": "market_rate_limited",
"data": null
}Error Code Reference
0
success
Solution: Handle explicitly in the client and avoid blind retries.
40001
invalid_market_ticker
Solution: Handle explicitly in the client and avoid blind retries.
40001
invalid_market_subscription
Solution: Handle explicitly in the client and avoid blind retries.
40002
invalid_market_timeframe
Solution: Handle explicitly in the client and avoid blind retries.
40003
invalid_market_time_range
Solution: Handle explicitly in the client and avoid blind retries.
40101
unauthorized
Solution: Rotate or refresh credentials before retry.
40301
market_access_denied
Solution: Handle explicitly in the client and avoid blind retries.
42901
market_rate_limited
Solution: Retry with bounded backoff.
50301
market_service_unavailable
Solution: Retry with bounded backoff.
50302
market_data_not_ready
Solution: Retry with bounded backoff.
Error Handling Best Practices
Check code before reading data.
For REST, code 0 means success. Any non-zero code should be handled before your client reads data.
Use numeric codes for branching.
Messages are useful for logs, but retry, re-authentication, and entitlement handling should branch on code.
Implement exponential backoff for 429 and 5xx errors.
Wait increasingly longer between retry attempts.
Validate ticker and timeframe input.
Reject slash symbols and unsupported timeframes in your client before sending high-volume requests.
Error Handling Example
if (payload.code !== 0) {
console.error(payload.code, payload.message)
throw new Error(payload.message)
}Need Help?
If you're encountering persistent errors or need help debugging your integration, review the authentication rules and dashboard token status first.