當前委託列表
地址/openApi/entrust/currentList
接收參數
需要
提交方式: GET
範例
curl -d /openApi/entrust/currentList
提交參數
參數名 | 是否必填 | 類型 | 範例 | 說明 |
---|---|---|---|---|
symbol | 否 | string | 交易對(當前交易對必傳,全部交易對不傳) | |
from | 否 | int | 122 | 查詢起始order_sn |
direct | 否 | string | prev | 查詢方向(預設 prev),prev 向前,時間(或 ID)倒序;next 向後,時間(或 ID)正序)。(舉例一列數:1,2,3,4,5。from=4,prev有3,2,1;next只有5) |
limit | 否 | int | 20 | 分頁返回的結果集數量,默認為20,最大為100(具體參見分頁處的描述) |
返回參數
參數名 | 是否必填 | 類型 | 示例 | 說明 |
---|---|---|---|---|
errno | 是 | int | 0 | 狀態碼 |
errmsg | 是 | success | success | 狀態信息 |
result | 是 | list | 見示例 | 列表 |
result 參數說明
參數名 | 是否必有 | 類型 | 示例 | 說明 |
---|---|---|---|---|
order_id | 是 | integer | 訂單id | |
order_sn | 是 | string | 訂單編號 | |
symbol | 是 | string | 交易對 | |
ctime | 是 | string | 委託時間 | |
type | 是 | int | 1 | 委託類型:1=市價,2=限價 |
side | 是 | string | buy | 委託方向:buy/sell |
price | 是 | String | 價格:市價(type=1)時為0 | |
number | 是 | String | 3.12 | 委託數量:市價買入(type=1,side=buy)時為0 |
total_price | 是 | String | 委托總額:市價賣出(type=1,side=sell)時為0 | |
deal_number | 是 | String | 已成交數量 | |
deal_price | 是 | String | 已成交均價 | |
status | 是 | int | 1 | 狀態:1=掛單中,2=部分成交,4=撤銷中 |
返回範例
JSON
{
"errno":0,
"errmsg":"success",
"result":[
{
"order_id":121,
"order_sn":"BL123456789987523",
"symbol":"MCO-BTC",
"ctime":"2018-10-02 10:33:33",
"type":"2",
"side":"buy",
"price":"0.123456",
"number":"1.0000",
"total_price":"0.123456",
"deal_number":"0.00000",
"deal_price":"0.00000",
"status":1
},
{
"order_id":122,
"order_sn":"SL123456789987523",
"symbol":"MCO-BTC",
"ctime":"2018-10-02 10:33:33",
"type":"2",
"side":"sell",
"price":"0.123456",
"number":"1.0000",
"total_price":"0.123456",
"deal_number":"0.00000",
"deal_price":"0.00000",
"status":1
},
{
"order_id":123,
"order_sn":"BM123456789987523",
"symbol":"MCO-BTC",
"ctime":"2018-10-02 10:33:33",
"type":"1",
"side":"buy",
"price":"0",
"number":"0",
"total_price":"1",
"deal_number":"0.00000",
"deal_price":"0.00000",
"status":1
},
{
"order_id":124,
"order_sn":"SM123456789987523",
"symbol":"MCO-BTC",
"ctime":"2018-10-02 10:33:33",
"type":"1",
"side":"sell",
"price":"0",
"number":"1.0000",
"total_price":"0",
"deal_number":"0.00000",
"deal_price":"0.00000",
"status":1
}
]
}