Sub Order Trade

Real-time push updates on individual trade executions for sub-orders generated by algo strategies. Each time a sub-order is filled (in full or partially), a message is pushed on the SUB_TRADE channel. Pushed automatically after login — no explicit subscription required.


Push Message

{
  "channel": "SUB_TRADE",
  "instId": "BINANCE_PERP_ETH_USDT",
  "data": {
    "transactionId": "1735613056931000",
    "portfolioId": "1730798094087000",
    "orderId": "1735613056910000",
    "algoOrderId": "674712518659",
    "clientOrderId": "2024123110441600",
    "sym": "BINANCE_PERP_ETH_USDT",
    "exchangeType": "BINANCE",
    "businessType": "PERP",
    "price": "3343.02",
    "quantity": "0.01",
    "tradingFee": "0.01170057",
    "tradingFeeCoin": "USDT",
    "side": "BUY",
    "rpnl": "0",
    "createAt": "1735613056931",
    "execType": "TAKER"
  }
}
FieldTypeDescription
channelStringAlways SUB_TRADE.
instIdStringTrading pair identifier.
dataObjectTrade execution details.
> transactionIdStringUnique transaction ID for this trade.
> portfolioIdStringPortfolio ID the trade belongs to.
> orderIdStringSub-order ID that generated this trade.
> algoOrderIdStringParent algo order ID.
> clientOrderIdStringYour own order ID, if provided.
> symStringTrading pair.
> exchangeTypeStringExchange: BINANCE or OKX.
> businessTypeStringSPOT, PERP, or MARGIN.
> priceStringExecution price.
> quantityStringQuantity filled in this trade. OKX: number of contracts. Binance: coin amount.
> tradingFeeStringFee charged for this trade. Positive = taker fee. Negative = maker rebate.
> tradingFeeCoinStringCurrency the fee was charged in.
> sideStringBUY or SELL.
> rpnlStringRealized profit/loss from this trade.
> createAtStringTrade execution timestamp in milliseconds.
> execTypeStringTAKER or MAKER.