Skip to main content

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

注意事項

1. 接口的 HTTP 響應狀態碼僅限於 200、400、403 和 500。

2. 業務狀態碼規則如下:0 表示成功,1 表示失敗,2 表示錯誤;除 0、1、2 之外的值均視為業務失敗。

Http Status Code
Http StatusBody CodeTitleDescribe
2000successRequest processed successfully
2001failedRequest processing failed (see Title description for details)
5002server errorServer abnormality
400400001Invalid header: x-api-keyx-api-key error
400400002Invalid header: x-api-noncex-api-nonce error
400400003Invalid header: x-api-timestamp x-api-timestamp error
400400004Invalid header: x-api-signaturex-api-signature error
400400009Incorrect signatureIncorrect signature
403700100IP disallowed operation IP disallowed operation
403701100Account is not foundx-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
}