The Fast API uses JSON-formatted messages for all communication.
Request Format
All requests follow a consistent structure:
Code
| Field | Type | Required | Description |
|---|---|---|---|
id | string | number | Yes | Unique identifier for matching request/response |
method | string | Yes | The method to invoke |
params | object | array | No | Method parameters (varies by method) |
Response Format
Successful responses include the request ID and result:
Code
| Field | Type | Description |
|---|---|---|
id | string | number | Matches the request ID |
status | number | HTTP status code |
result | any | Method-specific response data |
Error Response
Error responses include error details:
Code
| Field | Type | Description |
|---|---|---|
id | string | number | Matches the request ID |
status | number | HTTP status code |
error.code | number | Internal error code |
error.msg | string | Human-readable error message |
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
| -1000 | 500 | Internal server error |
| -1002 | 401 | Authentication required |
| -1003 | 429 | Rate limit exceeded |
| -1013 | 400 | Invalid parameters |
| -1020 | 400 | Unsupported operation |
| -2010 | 400 | Order rejected |
Last modified on

