跳轉至

歷史委託列表

地址/openApi/entrust/historyList

接收參數

需要

提交方式: get

範例

curl -d /openApi/entrust/historyList

提交參數

參數名 是否必填 類型 實例 說明
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=部分成交,3=已成交,4=撤銷中,5=部分撤銷,6=已撤銷

返回範例

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
        }
    ]
}