Skip to main content
This document explains API error codes and provides handling recommendations.

Response Format

HTTP API

WebSocket


Error Code Quick Reference


Detailed Descriptions

Authentication Errors (1xxx)

1001 - Invalid or Expired API Key

Causes:
  • Incorrect API Key
  • API Key disabled
  • API Key expired
Solution: Verify API Key or contact admin to confirm status.

1002 - API Key Not Provided

Solution: Add X-API-Key: your_api_key to HTTP headers, or add ?api_key=your_api_key to WebSocket URL.

1003 - IP Not in Whitelist

Cause: Enterprise plan has IP whitelist enabled. Solution: Contact admin to add your IP to whitelist.

1004 - Insufficient Permissions

Cause: Current plan doesn’t support this feature. Solution: Upgrade plan or contact admin.

Parameter Errors (2xxx)

2001 - Invalid Parameters

Solution: Check if request parameters are complete and correctly formatted.

2002 - Symbol Not Found

Solution: Call GET /v1/symbols/available to get available symbols.

2003 - Invalid Time Range

Causes:
  • start_time greater than end_time
  • Invalid time format
  • Time range exceeds limit
Solution: Use Unix millisecond timestamps, ensure start_time < end_time.

2004 - Request Limit Exceeded

Solution: Reduce limit parameter value (typically max 1000).

Rate Limiting Errors (3xxx)

3001 - Rate Limit Exceeded

HTTP response includes Retry-After header indicating wait time in seconds. Solutions:
  • Reduce request frequency
  • Use WebSocket subscriptions instead of polling
  • Upgrade plan for higher quota

3002 - Quota Exhausted

Solution: Wait for quota reset (typically monthly) or upgrade plan.

3003 - Connection Limit Exceeded

Solutions:
  • Call GET /v1/connections to view current connections
  • Call DELETE /v1/connections/:id to close excess connections

3004 - Subscription Limit Exceeded

Solution: Unsubscribe from some channels before subscribing to new ones.

WebSocket Errors (4xxx)

4001 - Unknown Command

Solution: Check cmd field. Supported commands: subscribe, unsubscribe, ping.

4002 - Invalid Message Format

Solution: Ensure valid JSON with required fields.

4003 / 4004 - Subscription Temporarily Unavailable

Solution: Use HTTP API to fetch data.

Service Errors (5xxx)

5000 - Internal Server Error

Solution: Retry later. Contact support if issue persists.

5001 - Data Source Unavailable

Solution: Retry later, typically recovers automatically.

5002 - Service Temporarily Unavailable

Solution: Service may be under maintenance, retry later.

Error Handling Examples

JavaScript

Python


For questions, please contact technical support.