API Reference

Algo Order Update

User data stream.

Response

Algo order data:

{
    "channel": "ALGO_ORDER",
    "instId": "OKX_PERP_ORBS_USDT",
    "data": {
        "portfolioId": "1730798094087000",
        "algoOrderId": "672807256066",
        "algoOrderType": "TPSL",
        "clientOrderId": "2024123110135900",
        "sym": "OKX_PERP_ORBS_USDT",
        "exchangeType": "OKX",
        "businessType": "PERP",
        "side": "BUY",
        "limitPrice": "0",
        "orderQty": "1",
        "positionSide": "LONG",
        "reduceOnly": False,
        "orderState": "NEW",
        "reason": "",
        "executedQty": "0",
        "executedAmount": "0",
        "executedAvgPrice": "0",
        "createAt": "1735611239669",
        "updateAt": "1735611239669",
        "conditionType": "OCO",
        "conditionalTriggerPrice": "0",
        "conditionalTriggerPriceType": "LAST_PRICE",
        "conditionalPrice": "0",
        "tpTriggerPrice": "0.01",
        "tpTriggerType": "LAST_PRICE",
        "tpPrice": "0.03",
        "slTriggerPrice": "0.05",
        "slTriggerType": "LAST_PRICE",
        "slPrice": "0.04"
    }
}
FieldTyperemark
channelStringChannel name: ALGO_ORDER
dataObjectData
>portfolioIdStringPortfolio ID
> algoOrderIdStringAlgo order id
>algoOrderTypeStringAlgo order types: TPSL, ATTACHED_TPSL
>clientOrderIdStringCustomer defined order ID
>symStringTrading unique identifier, example: BINANCE_SPOT_BTC_USDT, BINANCE_PERP_BTC_USDT
If you want to know other trading unique identifiers, please go to the introduction page.
>exchangeTypeStringExchange type(BINANCE, OKX)
>businessTypeStringBusiness type(SPOT, PERP)
>sideStringSide(BUY,SELL)
>limitPriceStringOrder price
>orderQtyStringOrder quantity, note: trading unit of OKX is the number of contracts/ trading unit of Binance is the number of coin
Note: The trading unit on OKX is measured in the number of contracts, while the trading unit on Binance is measured in the number of coins.
>positionSideStringPosition side, NONE/LONG/SHORT, default NONE. NONE stands for one-way mode.
>reduceOnlyStringReduce position orders only, must "true" or "false"
>orderStateStringOrder state(
PENDING_NEW,
NEW,
PROCESSING,
PENDING_CANCEL,
CANCEL_REJECT,
CANCELLED,
COMPLETED,
REJECTED,
FAILED,
EXPIRED)
>reasonStringFail reason
>executedQtyStringTransaction quantity
Note: The trading unit on OKX is measured in the number of contracts, while the trading unit on Binance is measured in the number of coins.
>executedAmountStringTransaction amount
>executedAvgPriceStringAverage transaction price
>createAtStringCreate time
>updateAtStringUpdate time
>conditionTypeStringCONDITIONAL, OCO, ENTIRE_CLOSE_POSITION, PARTIAL_CLOSE_POSITION
>conditionalTriggerPriceStringConditional Order Trigger Price
>conditionalTriggerPriceTypeStringConditional Order Trigger Price Type:
LAST_PRICE, MARK_PRICE
>conditionalPriceStringLimit Price After Triggering Conditional Order ;
0 Indicates Market Price.
>tpTriggerPriceStringTake-profit trigger price.
>tpTriggerTypeStringTake-profit trigger price type
LAST_PRICE, MARK_PRICE
The default is LAST_PRICE
>tpPriceStringTake-profit order price.
>slTriggerPriceStringStop-loss trigger price.
>slTriggerTypeStringStop-loss trigger price type
LAST_PRICE, MARK_PRICE
The default is LAST_PRICE
>slPriceStringStop-loss order price.