Skip to content

订单 - 一次性批量发单,同时撤回指定订单V2

描述

一次性批量发单,同时撤回指定订单

HTTP请求

  • POST /open/api/mass_replaceV2

请求参数

参数名参数类型是否必须描述
api_keyStringapi管理的key
timeLong当下时间戳
signString经过签名规则产生的字串
symbolString币对,如"BTCUSDT"
mass_placeList<Object>订单阵列,长度需要<=100
>mass_place.volumeInteger订单数量
>mass_place.priceDecimal订单价格(市价单不需要填)
>mass_place.sideString买卖方向: BUY, SELL
>mass_place.typeInteger订单类型: 1限价委托, 2市价委托
>mass_place.volumeTypeInteger订单数量类型: 1总价值数量, 2基准货币数量。若side=sell || type=1,则volumeType=2。default=1
>mass_place.clientOrderIdString自定义订单ID
mass_cancelList订单id阵列,长度需要<=1000

请求示例

http
curl -X POST 'https://openapi.100ex.com/open/api/mass_replaceV2' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'api_key=*********&time=1736303665297&sign=*********&symbol=BTCUSDT&symbol=BTCUSDT&mass_place=[{"price":80000,"side":"BUY","type":1,"volume":0.00003,"volumeType":1},{"price":"80100","side":"BUY","type":1,"volume":0.00004,"volumeType":1,"clientOrderId":"newclient00001"},{"price":"80200","side":"BUY","type":1,"volume":0.00005,"volumeType":1,"clientOrderId":"newclient00002"}]&mass_cancel=[410821764591910912,410811372104843264]'

返回参数

返回字段字段类型字段说明
mass_cancelList订单id阵列
mass_placeList订单阵列。依照订单建立结果的状态码分类
>mass_place.order_idList订单id
>mass_place.idPricesString成功订单数组信息

返回示例

json
{
    "code": "0",
    "msg": "suc",
    "data": {
        "mass_cancel": [
            {}
        ],
        "mass_place": [
            {
                "msg": "suc",
                "code": "0",
                "idPrices": "[{\"side\":\"BUY\",\"price\":\"80000\",\"clientOrderId\":\"0\",\"id\":\"443431993804324864\"},{\"side\":\"BUY\",\"price\":\"80100\",\"clientOrderId\":\"newclient00001\",\"id\":\"443431993804324865\"},{\"side\":\"BUY\",\"price\":\"0\",\"clientOrderId\":\"newclient00002\",\"id\":\"443431993804324866\"}]",
                "order_id": [
                    443431993804324864,
                    443431993804324865,
                    443431993804324866
                ]
            }
        ]
    },
    "message": null,
    "traceId": null
}

状态码

状态码说明
0成功
1系统错误
2参数错误
3用户交易被冻结
5下单失败
9交易被冻结
31价格或者金额小于最小值
35禁止下单
100004请求参数不合法
100005参数签名错误
100007非法IP
100008请求时间过期
10062价格或数量精度超过最大限制
10063数量小于最小值
101151当前币对有未完结爆仓单!
210015现货批量取消超过最大上限
210006该用户不在open-api白名单中
210014现货批量下单超过最大上限