跳到主要内容

订单

描述

当订单发生下单、订单撤单等事件时,推送消息。

推送频率

Real Time

订阅频道

orders

请求参数

参数是否必填类型描述
eventString事件类型:subscribe, unsubscribe
channelArrayorders
symbolsArray交易对列表

请求响应

参数类型描述
eventString事件类型:subscribe, unsubscribe
channelStringorders
symbolsArray交易对列表
messageString错误消息

推送数据

参数类型描述
channelStringorders
dataArrayThe subscribed data
> symbolString交易对
> sideString枚举值:BUY, SELL
> typeString订单类型;枚举:MARKET, LIMIT, LIMIT_MAKER
> mgnModeString枚举:ISOLATED, CROSS, CASH
> timeInForceString枚举:FOK, IOC, GTC
> clOrdIdString客户端订单id
> szString委托数量或者委托张数
> pxString仅当限价单的时候有效
> reduceOnlyBoolean只适用于合约;只减仓标识
> posSideString只适用于合约;枚举:BOTHLONGSHORT;默认 BOTH 在双向持仓模式下;
> ordIdString订单编号
> roleStringEnumerate: MAKER, TAKER
> stateString订单状态;枚举:
  • NEW
  • PARTIAL_FILLED
  • FILLED
  • PARTIAL_CANCELED
  • CANCELED
> cancelReasonStringEnumerate:
  • USER_CANCEL_ORDER_ACTION
  • LIMIT_MAKER_ORDER_INCORRECT_PRICE_CONDITION
  • LIMIT_MATCH_IOC_OR_FOK_ORDER_PRICE_CANNOT_MATCH
  • LIMIT_MATCH_FOK_ORDER_MAKER_INSUFFICIENT_AVAILABLE_QUANTITY
  • LIMIT_MATCH_IOC_ORDER_CANNOT_FILLED
  • LIMIT_MATCH_ORDER_TAKER_SELF_TRADE
  • MARKET_ORDER_NO_OTHER_SIDE_ORDER
  • INVALID_PARAM_WHEN_PLACE_ORDER
  • INVALID_ORDER_TYPE_WHEN_PLACE_ORDER
  • INVALID_SEQUENCE_PLACE_ORDER_AFTER_CANCEL_SAME_ORDER
  • MATCH_SYMBOL_TRADE_LIMIT_NOT_EXIST
  • EXCEED_SLIPPAGE_TOLERANCE
  • OUT_OF_RANGE_LIMIT_PRICE
  • NO_MARGIN_QUANTITY_GREAT_THAN_POSITION
  • LIMIT_MATCH_ORDER_ONLY_SELF_TRADE
  • FL_CANCEL_ORDER_ACTION
  • RISK_CANCEL_ORDER_ACTION
  • SYS_CANCEL_ORDER_ACTION
> sourceString订单来源
> avgPxString平均成交价格
> execQtyString累计成交数量
> execAmtString累计成交金额
> feeCcyString手续费币种名称
> feeAmtString累计手续费数量
> deductCcyString手续费抵扣币种名称
> deductAmtString累计手续费抵扣数量
> cTimeLong订单创建时间, UTC时间戳(毫秒)
> uTimeLong订单更新时间, UTC时间戳(毫秒)
> tsLong推送的时间(毫秒)

请求示例

{
"event": "subscribe",
"channel": ["orders"],
"symbols": ["BTC_USDT_PERP"]
}

推送示例

{
"channel": "orders",
"data": [
{
"symbol": "BTC_USDT_PERP",
"side": "BUY",
"type": "LIMIT",
"mgnMode": "CROSS",
"timeInForce": "GTC",
"clOrdId": "polo353849510130364416",
"sz": "1",
"px": "64999",
"reduceOnly": false,
"posSide": "BOTH",
"ordId": "353849510130364416",
"state": "NEW",
"source": "WEB",
"avgPx": "0",
"execQty": "0",
"execAmt": "0",
"feeCcy": "",
"feeAmt": "0",
"deductCcy": "",
"deductAmt": "0",
"cTime": 1725330697421,
"uTime": 1725330697421
}
]
}