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
協議 : 所有接口均使用 https 協議
Prefix url: /api/v1
數據格式:請求和響應數據均為 JSON 格式。
請將標頭的 Content-Type 設置為 application/json。
編碼格式:UTF-8
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 響應結構
成功響應
{
"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
}
失敗響應
{
"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
}