历史委托列表
地址/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
}
]
}