Skip to main content

private/get-order-detail

POST 

/private/get-order-detail

Gets detail of a single order by order_id or client_oid.

Request

Body

required
    id int64required

    Request id (echoed in response)

    method stringrequired

    Must be "private/get-order-detail"

    api_key stringrequired

    Your API key (only required for private REST)

    sig stringrequired

    HMAC-SHA256 signature in hex (only required for private REST)

    nonce int64required

    Current timestamp in milliseconds, e.g. "1771761038000".

    params objectrequired
    order_id int64

    Order ID. string format is highly recommended, especially for JavaScript client. If not provided, client_oid must be specified.

    client_oid string

    Client Order ID. If not provided, order_id must be specified.

Success.
Schema
    id int64

    Echoed request id

    method string

    Method invoked

    code int32

    0 = success; non-zero indicates error (reason code).

    result object
    Order object shared by get-order-detail, get-open-orders, get-order-history and advanced variants. reason optional (detail/history). list_id, contingency_type, leg_id, ref_price, ref_price_type optional (advanced OTO/OTOCO only).
    account_id string

    Account ID.

    order_id int64

    Order ID.

    client_oid string

    Client Order ID.

    order_type OrderType (string)

    Possible values: [LIMIT, MARKET, STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT]

    Order type:

    • ➖ LIMIT, MARKET
    • ➖ STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT: Trigger orders
    time_in_force TimeInForce (string)

    Possible values: [GOOD_TILL_CANCEL, IMMEDIATE_OR_CANCEL, FILL_OR_KILL]

    Time in force

    side OrderSide (string)

    Possible values: [BUY, SELL]

    BUY or SELL

    exec_inst ExecInstOrderDetail (string)[]

    Possible values: [POST_ONLY, REDUCE_ONLY, SMART_POST_ONLY, LIQUIDATION, ISOLATED_MARGIN, MARGIN_ORDER]

    Execution instructions.

    quantity decimal

    Quantity specified in the order.

    limit_price decimal

    Limit price specified in the order.

    order_value decimal

    Order value.

    maker_fee_rate decimal

    User's maker fee rate.

    taker_fee_rate decimal

    User's taker fee rate.

    avg_price decimal

    Average price.

    cumulative_quantity decimal

    Cumulative executed quantity.

    cumulative_value decimal

    Cumulative executed value.

    cumulative_fee decimal

    Cumulative executed fee.

    status OrderStatus (string)

    Possible values: [PENDING, NEW, ACTIVE, FILLED, CANCELED, REJECTED, EXPIRED]

    Order status

    update_user_id string

    Updated user.

    order_date string

    Order creation date.

    instrument_name string

    E.g. BTCUSD-PERP.

    fee_instrument_name string

    Currency used for the fees.

    create_time int64

    Order creation timestamp (ms), e.g. "1771761038000".

    create_time_ns int64

    Order creation timestamp (nanosecond), e.g. "1771761038000000000".

    update_time int64

    Order update timestamp (ms), e.g. "1771761038000".

    reason string

    Rejection reason code; present for get-order-detail and get-order-history.

    isolation_id string

    isolation_id of the isolated position the order is tied to (derivatives only).

    isolation_type string

    Possible values: [ISOLATED_MARGIN]

    ISOLATED_MARGIN when isolation_id > 0 (derivatives only).

    list_id int64

    OTO/OTOCO/OCO list id; advanced only.

    contingency_type ContingencyType (string)

    Possible values: [OCO, OTO, OTOCO, SPOT_ATTACH, DERIV_ATTACH]

    Contingency type for advanced orders:

    • ➖ OCO: One-Cancels-the-Other
    • ➖ OTO: One-Triggers-the-Other
    • ➖ OTOCO: One-Triggers-a-One-Cancels-the-Other
    • ➖ SPOT_ATTACH: SpotAttach (TP/SL attached to order for spot instruments)
    • ➖ DERIV_ATTACH: DerivAttach (TP/SL attached to order or position for derivative instruments)
    leg_id string

    Leg id within OTO/OTOCO/OCO; advanced only.

    ref_price decimal

    Trigger reference price (trigger legs only).

    ref_price_type string

    Possible values: [MARK_PRICE, INDEX_PRICE, LAST_PRICE]

    Price source used for ref_price: MARK_PRICE, INDEX_PRICE, or LAST_PRICE (trigger legs only).

    attach_order_id int64

    The order ID this trigger is attached to (for SpotAttach / DerivAttach attach-to-order orders).

    attach_isolation_id string

    Position this trigger is attached to (DerivAttach attach-to-position): > 0 = isolation_id of the isolated position; 0 = cross-margin position.

    exchange_order_id string

    Order ID assigned by the exchange (present once the leg has been accepted).

    reject_reason string

    Rejection reason, if the leg was rejected.

    leverage number

    Leverage specified on the primary leg (derivatives only, when provided).

    isolated_margin_amount decimal

    Isolated margin amount specified on the primary leg (derivatives only, when provided).

    message string

    Present when code !== 0.

    original string

    Present when code !== 0.