API Code Library
Golang connector
A lightweight Golang code library that provides methods for users to directly call the API.
SDKs in various languages:
go : https://github.com/exchangeHubX/open-demo-go
Response Format
All API returns are in JSON format.
Response
{
"code": 200,
"data": {},
"msg": "SUCCESS",
"msgInfo": []
}
Response Codes
HTTP Status
| Code | Description |
|---|---|
| 200 | Request successful |
| 400 | Parameter error |
| 401 | Authentication failed |
| 403 | No permission |
| 404 | Resource not found |
| 429 | Too many requests (rate limited) |
| 500 | Internal server error |
Return Code
| Code | Description |
|---|---|
| 200 | Success |
| 400xx | Parameter validation errors |
| 401xx | Authentication errors |
| 403xx | Permission errors |
| 500xx | Business processing errors |
Message Code
| Code | Description |
|---|---|
| 2000 | Parameter error |
| 2001 | Unauthorized, please log in again |
| 2002 | Forbidden |
| 2003 | Resource not found |
| 2004 | Internal server error, please try again later |
| 3000 | Parameter error |
| 3001 | Unauthorized, please log in again |
| 3002 | Forbidden |
| 3003 | Resource not found |
| 3004 | Internal server error, please try again later |
| 4000 | Trading pair parameter missing or invalid |
| 4001 | Invalid precision parameter |
| 4002 | Invalid limit parameter |
| 4003 | Trading pair does not exist |
| 4100 | Internal server error, please try again later |
| 4101 | Server busy, please try again later |
| 5000 | Internal server error, please try again later |
| 5001 | Invalid parameter |
| 5002 | Resource not found |
| 6000 | Request parameter error |
| 6001 | Request method not allowed |
| 6002 | Missing trading pair parameter |
| 6003 | Missing time period parameter |
| 6004 | Invalid time period |
| 6005 | Invalid start/end time |
| 6006 | Start time and end time must be provided together |
| 6007 | limit cannot be used with start_time/end_time |
| 6008 | Invalid limit parameter |
| 6009 | Missing trading pair list parameter |
| 6010 | Trading pair list is empty |
| 6011 | Trading pair quantity exceeds limit |
| 6100 | Internal server error, please try again later |
| 6101 | K-line data query failed, please try again later |
| 7000 | Parameter error |
| 7001 | Trading pair does not exist |
| 7002 | Internal server error, please try again later |
| 8001 | Unauthorized, please log in again |
| 8002 | No access permission |
| 8003 | Request parameter error |
| 8004 | Resource not found |
| 8005 | Internal server error, please try again later |