接入地址:/ak-api/order/create
請求方式:POST
請求參數格式:application/json
{
"orderType": 1,
"symbolId": 1,
"symbolName": "BTC/USDT",
"delegateType": 1,
"orderDirection": 2,
"quantity": "0.01",
"price": "215"
}
請求參數說明
| 參數名稱 | 數據類型 | 是否必須 | 字典類型 | 描述 |
|---|---|---|---|---|
| delegateType | Int | 是 | DelegateType | 委託類型 |
| orderType | Int | 是 | OrderType | 訂單類型 |
| clientOrderId | String | 否 | 客戶唯一訂單ID(訂單為普通訂單時可用,長度64以內) | |
| orderDirection | Int | 是 | OrderDirection | 買賣方向 |
| symbolName | String | 是 | 幣對名稱 | |
| quantity | String | 是 | 訂單數量 | |
| price | String | 否 | 訂單價格(訂單為限價單時不能為空) | |
| triggerPrice | String | 否 | 觸發價格(訂單為計劃委託單時不能為空) |
響應示例
{
"code": 0,
"data": {
"orderId": "211085511051482742",
"orderType": 1,
"symbolName": "BTC/USDT",
"delegateType": 1,
"orderDirection": 2,
"amount": 2.15,
"quantity": 0.01,
"price": 215,
"dealQuantity": 0,
"dealCommission": 0,
"dealAmount": 0,
"createTime": 1751883321741,
"clientOrderId": "id123456789",
"status": 1
},
"msg": "下單成功"
}
響應參數說明
| 字段名 | 類型 | 枚舉/說明 | 描述 |
|---|---|---|---|
| orderId | String | - | 訂單ID |
| orderType | Int | OrderType | 訂單類型 |
| clientOrderId | String | - | 客戶唯一訂單ID |
| symbolName | String | - | 幣對名稱 |
| delegateType | Int | DelegateType | 訂單委託類型 |
| orderDirection | Int | OrderDirection | 買賣方向 |
| amount | BigDecimal | - | 訂單金額:price × quantity |
| quantity | BigDecimal | - | 數量 |
| price | BigDecimal | - | 價格 |
| dealQuantity | BigDecimal | - | 成交數量 |
| dealCommission | BigDecimal | - | 成交手續費:已成交部分手續費統計 |
| dealAmount | BigDecimal | - | 成交金額 |
| createTime | Long | - | 訂單建立時間(時間戳) |
| status | Int | OrderStatus | 狀態 |
接入地址:/ak-api/order/cancel
請求方式:POST
請求參數格式:application/json
{
"orderIds": [1, 2, 3],
"delegateType": 1,
"symbolName": "BNB/USDT"
}
請求參數說明
| 參數名稱 | 數據類型 | 是否必須 | 字典類型 | 描述 |
|---|---|---|---|---|
| orderIds | List<Long> | 是 | - | 訂單id |
| delegateType | Int | 是 | DelegateType | 委託類型 |
| symbolName | String | 是 | 幣對名稱 |
響應示例
{
"code": 0,
"data": "撤單成功",
"msg": ""
}
響應參數說明
| 參數名稱 | 類型 | 說明 |
|---|---|---|
| code | Int | 0-表示成功 |
| data | String | 操作成功提示語 |
| msg | String | 錯誤描述資訊 |
接入地址:/ak-api/order/cancelByClientOrderId
請求方式:POST
請求參數格式:application/json
{
"clientOrderIds": ["1", "2", "3"],
"delegateType": 1,
"symbolName": "BNB/USDT"
}
請求參數說明
| 參數名稱 | 數據類型 | 是否必須 | 字典類型 | 描述 |
|---|---|---|---|---|
| clientOrderIds | List< String > | 是 | - | 客戶訂單id |
| delegateType | Int | 是 | DelegateType | 委託類型 |
| symbolName | String | 是 | 幣對名稱 |
響應示例
{
"code": 0,
"data": "撤單成功",
"msg": ""
}
響應參數說明
| 參數名稱 | 類型 | 說明 |
|---|---|---|
| code | Int | 0-表示成功 |
| data | String | 操作成功提示語 |
| msg | String | 錯誤描述資訊 |
接入地址:/ak-api/order/cancelAll
請求方式:DELETE
請求參數格式:application/json
| 參數名稱 | 數據類型 | 是否必須 | 字典類型 | 描述 |
|---|---|---|---|---|
| symbolName | String | 是 | 幣對名稱 |
響應示例
{
"code": 0,
"data": "收到撤單請求",
"msg": ""
}
響應參數說明
| 參數名稱 | 類型 | 說明 |
|---|---|---|
| code | Int | 0-表示成功 |
| data | String | 操作成功提示語 |
| msg | String | 錯誤描述資訊 |
接入地址:/ak-api/order/list
請求方式:POST
請求參數格式:application/json
{
"delegateType": 1,
"orderType": 1,
"pageNo": 1,
"pageSize": 10,
}
| 參數名稱 | 數據類型 | 是否必須 | 字典類型 | 描述 |
|---|---|---|---|---|
| symbolName | String | 否 | - | 幣對名稱 |
| orderType | Int | 否 | OrderType | 訂單類型 |
| delegateType | Int | 是 | DelegateType | 委託類型 |
| direction | Int | 否 | OrderDirection | 買賣方向 |
| status | Int | 是 | OrderStatus | 訂單狀態 |
| orderStartTime | Long | 否 | - | 訂單開始時間 |
| orderEndTime | Long | 否 | - | 訂單結束時間 |
| pageNo | Int | 是 | 頁碼 | |
| pageSize | Int | 是 | 每頁大小 |
響應示例
{
"code": 0,
"data": {
"list": [
{
"orderId": "211013881866524278",
"orderType": 1,
"symbolName": "BTC/USDT",
"delegateType": 0,
"orderDirection": 2,
"amount": "2.05000000000000000000",
"quantity": "0.01000000000000000000",
"price": "205.00000000000000000000",
"dealQuantity": "0E-20",
"dealCommission": "0E-20",
"dealAmount": "0E-20",
"createTime": 1751610078000,
"status": 2
}
],
"total": 1
},
"msg": ""
}
響應參數說明
| 參數名稱 | 數據類型 | 字典類型 | 描述 |
|---|---|---|---|
| orderId | String | - | 訂單ID |
| orderType | Int | OrderType | 訂單類型 |
| clientOrderId | String | 客戶唯一訂單ID | |
| symbolName | String | - | 幣對名稱 |
| delegateType | Int | DelegateType | 訂單委託類型 |
| orderDirection | Int | OrderDirection | 買賣方向 |
| amount | BigDecimal | - | 訂單金額:price × quantity |
| quantity | BigDecimal | - | 數量 |
| price | BigDecimal | - | 價格 |
| dealQuantity | BigDecimal | - | 成交數量 |
| dealCommission | BigDecimal | - | 成交手續費:已成交部分手續費統計 |
| dealAmount | BigDecimal | - | 成交金額 |
| createTime | Long | - | 訂單建立時間(時間戳) |
| status | Int | OrderStatus | 訂單狀態 |
接入地址:/ak-api/order/detail
請求方式:POST
請求參數格式:application/json
請求示例
{
"orderId": 44560995817473,
"symbolName": "TRX/USDT"
}
| 參數名稱 | 數據類型 | 是否必須 | 字典類型 | 描述 |
|---|---|---|---|---|
| orderId | Long | 否* | - | 訂單ID,與 clientOrderId 二選一必填 |
| clientOrderId | String | 否* | - | 客戶唯一訂單ID,與 orderId 二選一必填 |
| symbolName | String | 是 | - | 幣對名稱 |
{
"code": 0,
"data": {
"orderType": 1,
"amount": 348.0467988816,
"quantity": 975.24882,
"dealQuantity": 975.24882,
"tickets": [
{
"dealQuantity": 975.24882,
"matchedBySelf": true,
"dealCommission": 9.7524882,
"createTime": 1779177397000,
"dealAmount": 348.0467988816,
"takerOrMaker": 1,
"dealCommissionToken": "TRX",
"dealPrice": 0.35688,
"ticketId": 44560995832833
}
],
"orderId": 44560995817473,
"dealAmount": 348.0467988816,
"clientOrderId": "2056645185290448896",
"dealCommission": 9.7524882,
"createTime": 1779177397000,
"price": 0.35688,
"orderDirection": 1,
"symbolName": "TRX/USDT",
"status": 3
},
"error": false,
"msg": "",
"success": true
}
響應參數說明
| 參數名稱 | 數據類型 | 字典類型 | 描述 |
|---|---|---|---|
| orderId | String | - | 訂單ID |
| clientOrderId | String | 客戶唯一訂單ID | |
| orderType | Int | OrderType | 訂單類型 |
| symbolName | String | - | 幣對名稱 |
| delegateType | Int | DelegateType | 訂單委託類型 |
| orderDirection | Int | OrderDirection | 買賣方向 |
| amount | BigDecimal | - | 訂單金額:price × quantity |
| quantity | BigDecimal | - | 數量 |
| price | BigDecimal | - | 價格 |
| dealQuantity | BigDecimal | - | 成交數量 |
| dealCommission | BigDecimal | - | 成交手續費:已成交部分手續費統計 |
| dealAmount | BigDecimal | - | 成交金額 |
| targetOrderId | Long | - | 觸發生成的普通訂單id |
| triggerPrice | BigDecimal | - | 觸發價格 |
| delegatePrice | BigDecimal | - | 委託價格 |
| delegateQuantity | BigDecimal | - | 委託數量 |
| delegateAmount | BigDecimal | - | 委託金額 |
| createTime | Long | - | 訂單建立時間(時間戳) |
| tickets | List | - | 票據列表 |
| status | Int | OrderStatus | 訂單狀態 |
tickets參數說明
| 參數名稱 | 數據類型 | 字典類型 | 描述 |
|---|---|---|---|
| takerOrMaker | Int | TakerOrMaker | 角色:taker 或 maker |
| ticketId | Long | - | 票據ID |
| dealPrice | BigDecimal | - | 成交價格 |
| dealQuantity | BigDecimal | - | 成交數量 |
| dealAmount | BigDecimal | - | 成交金額 |
| dealCommission | BigDecimal | - | 成交手續費 |
| createTime | Long | - | 建立時間(時間戳) |
接入地址:/ak-api/coin/list
請求方式:GET
請求參數格式:application/json
請求參數說明:無
響應示例
[
{
"symbolName": "BTC/USDT",
"pricePrecision": 2,
"quantityPrecision": 6,
"minTradeAmount": 0.0001,
"tradeAmountPrecision": 2,
"minTradeValue": 10.00,
"depthMergeLevel": "0.1,0.01,0.001",
"adverseSlippage": 0.001,
"positiveSlippage": 0.001,
"marketAdverseSlippage": 0.002,
"marketPositiveSlippage": 0.002
}
]
響應參數說明
| 參數名稱 | 數據類型 | 描述 |
|---|---|---|
| symbolName | String | 幣對符號 |
| pricePrecision | Integer | 價格精度(價格的小數位數) |
| quantityPrecision | Integer | 數量精度(交易數量的小數位數) |
| minTradeAmount | BigDecimal | 最小交易數量 |
| tradeAmountPrecision | Integer | 交易額精度(金額的小數位數) |
| minTradeValue | BigDecimal | 最小交易額 |
| depthMergeLevel | String | 深度合併精度配置,多個精度以逗號分隔(例:0.1,0.01,0.001) |
| adverseSlippage | BigDecimal | 負滑點 |
| positiveSlippage | BigDecimal | 正滑點 |
| marketAdverseSlippage | BigDecimal | 市價單負滑點 |
| marketPositiveSlippage | BigDecimal | 市價單正滑點 |
| 值 | 名稱 | 說明 |
|---|---|---|
| 1 | LIMIT_ORDER | 限價單 |
| 2 | MARKET_ORDER | 市價單 |
| 值 | 名稱 | 說明 |
|---|---|---|
| 1 | NORMAL | 普通委託 |
| 2 | PLAN | 計劃委託 |
| 值 | 名稱 | 說明 |
|---|---|---|
| 1 | BUY | 買入 |
| 2 | SELL | 賣出 |
| 值 | 名稱 | 說明 |
|---|---|---|
| 1 | Delegate | 委託中 |
| 2 | Cancel | 撤單 |
| 3 | Matched | 已撮合 |
| 4 | Change2OrdinaryDelegate | 轉為普通委託訂單 |
| 5 | Canceling | 撤單中 |
| 8 | PartialMatched | 部分撮合 |
| 值 | 名稱 | 說明 |
|---|---|---|
| 1 | Taker | taker |
| 2 | Maker | maker |