Response Envelope
Every HFT REST response — successful or not — uses the same wrapper:
{
"retCode": 0,
"retMsg": "OK",
"result": { ... },
"retExtInfo": {},
"time": 1756460688504
}
| Field | Type | Description |
|---|---|---|
retCode | integer | 0 indicates success. Any non-zero value indicates an error — see retMsg. |
retMsg | string | Human-readable status message. "OK" on success. |
result | object | The actual response payload. Shape depends on the endpoint. |
retExtInfo | object | Reserved for additional metadata. Often empty. |
time | integer | Server time when the response was generated (Unix ms). |
Success vs error
Success
{
"retCode": 0,
"retMsg": "OK",
"result": {
"orderId": "1234567890",
"orderLinkId": "my-order-1"
},
"retExtInfo": {},
"time": 1756460688504
}
Error
{
"retCode": 10001,
"retMsg": "Invalid parameter",
"result": {},
"retExtInfo": {},
"time": 1756460688504
}
Always check retCode === 0 before reading result. HTTP status 200 only means the request reached the server; it does not mean it succeeded.
Pagination
List endpoints (/v5/order/realtime, /v5/execution/list, /v5/position/list) return a paginated list inside result:
{
"result": {
"category": "linear",
"list": [ /* array of items */ ],
"nextPageCursor": "abc123..."
}
}
Pass the value of nextPageCursor as the cursor query parameter on the next call to fetch the next page. When nextPageCursor is empty or missing, you've reached the end.