Introduction
Introduction
You can query currency rates, create orders, and manage them through the CCE API. To use the CCE API, you need to obtain an API key and API password.
Protocol and Format
Protocol : All interfaces use https protocol
Prefix url: /api/v1
Data format: Both request and response data are in JSON format.
Please set the header's Content-Type to application/json.
Encoding format: UTF-8
Notice
1. The HTTP response status codes of the interface are limited to 200, 400, 403 and 500.
2. The response body code rules are as follows: 0 represents success, 1 represents failure, and 2 represents error;Values other than 0, 1, and 2 are considered business failures
Http Status Code
Http Status | Body Code | Title | Describe |
---|---|---|---|
200 | 0 | success | Request processed successfully |
200 | 1 | failed | Request processing failed (see Title description for details) |
500 | 2 | server error | Server abnormality |
400 | 400001 | Invalid header: x-api-key | x-api-key error |
400 | 400002 | Invalid header: x-api-nonce | x-api-nonce error |
400 | 400003 | Invalid header: x-api-timestamp | x-api-timestamp error |
400 | 400004 | Invalid header: x-api-signature | x-api-signature error |
400 | 400009 | Incorrect signature | Incorrect signature |
403 | 700100 | IP disallowed operation | IP disallowed operation |
403 | 701100 | Account is not found | x-api-key is invalid |
API response structure
Successful response
{
"code": 0,// Represents success, non-0 represents failure
"msg": "success",// Response description
"data": "<any value>"
// If the data attribute exists,
//the value must not be null,
//and the data type is usually an array or object
}
Failure response
{
"code": 1,// 0 Represents success, non-0 represents failure
"msg": "Failure Description",// Response description
}
Error response
{
"code": 2,// 0 Represents success, non-0 represents failure
"msg": "Error Description",// Response description
}