跳转至

当前委托列表

地址/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
        }
    ]
}