Skip to content

获取当前委托

描述

获取当前委托(包括未成交和正在成交的委托)

HTTP请求

  • GET /open/api/v2/new_order

请求参数

参数名参数类型是否必须描述
api_keyStringapi管理的key
timeLong当下时间戳
signString经过签名规则产生的字串
pageSizeInteger页面大小,预设10
pageInteger页码,预设1
symbolString币对,例如: btcusdt

请求示例

http
curl 'https://openapi.100ex.com/open/api/v2/new_order?api_key=*********&time=1736303665297&sign=*********&symbol=BTCUSDT&pageSize=&page=&symbol=btcusdt'

返回参数

返回字段字段类型字段说明
countInteger订单数量
resultListList<Object>订单清单
>volumeTypeInteger订单数量类型: 1金额价值, 2基准货币
>sideString买卖方向: BUY, SELL
>total_priceString总价值
>feeDecimal手续费
>clientOrderIdString自定义订单ID
用户没自定义订单ID, clientOrderId 默认为 "0"
>created_atLong建立时间
>deal_priceDecimal已成交金额
>avg_priceString成交均价
>countCoinString计价货币
>sourceInteger订单来源:1web,2app,3api
>typeInteger委托类型:1 限价,2 市价
>side_msgString买卖方向讯息
>volumeString挂单总数量
>priceString限价单挂单价格
>source_msgString订单来源讯息
>status_msgString订单状态讯息
>deal_volumeString成交数量
>fee_coinString手续费币
>idLong订单id
>remain_volumeString未成交数量
>baseCoinString基础币种
>statusInteger订单状态:0 初始,1 新订单,2 完全成交,3 部份成交,4 取消,5 待取消,6 过期

返回示例

json
{
    "code": "0",
    "msg": "suc",
    "data": {
        "count": 1000,
        "resultList": [
            {
                "volumeType": 2,
                "side": "BUY",
                "total_price": "10160.0000000000",
                "fee": 0E-10,
                "clientOrderId": "0",
                "created_at": 1736233063657,
                "deal_price": 0E-16,
                "avg_price": "0.0000000000",
                "countCoin": "USDT",
                "source": 3,
                "type": 1,
                "side_msg": "买入",
                "volume": "0.1000000000",
                "price": "101600.0000000000",
                "source_msg": "API",
                "status_msg": "未成交",
                "deal_volume": "0.0000000000",
                "fee_coin": "BTC",
                "id": 410811372104843264,
                "remain_volume": "0.1000000000",
                "baseCoin": "BTC",
                "status": 0
            }
        ]
    },
    "message": null,
    "traceId": null
}

状态码

状态码说明
0成功
1系统错误
100004请求参数不合法
100005参数签名错误
100007非法IP
100008请求时间过期