HomeDocumentationAPI Reference
Log In
API Reference

(Subaccount Id) Orders

Channel Name Schema

{subaccount_id}.orders

Subscribe to changes in user's orders for a given subaccount ID.

Channel Parameters

subaccount_idintegerrequired
Subaccount ID

Notification Data

channelstringrequired
Subscribed channel name
dataarray of objectsrequired
data[].amountstringrequired
Order amount in units of the base
data[].average_pricestringrequired
Average fill price
data[].cancel_reasonstringrequired
If cancelled, reason behind order cancellation
enum user_requestmmp_triggerinsufficient_marginsigned_max_fee_too_lowcancel_on_disconnectioc_or_market_partial_fillsession_key_deregisteredsubaccount_withdrawncompliancetrigger_failedvalidation_failedalgo_completed
data[].creation_timestampintegerrequired
Creation timestamp (in ms since Unix epoch)
data[].directionstringrequired
Order direction
enum buysell
data[].filled_amountstringrequired
Total filled amount for the order
data[].instrument_namestringrequired
Instrument name
data[].is_transferbooleanrequired
Whether the order was generated through private/transfer_position
data[].labelstringrequired
Optional user-defined label for the order
data[].last_update_timestampintegerrequired
Last update timestamp (in ms since Unix epoch)
data[].limit_pricestringrequired
Limit price in quote currency
data[].max_feestringrequired
Max fee PER contract, denominated in USDC.Max fee must be > 2 x max(taker_fee, maker_fee) x spot_price + extra_fee / amount.If the order crosses the book, it must be >= 2 x max(taker_fee, maker_fee) x spot_price + base_fee / fill_amount + extra_fee / amount.Note, in this calculation, regardless of the account taker / maker fees, the standard taker / maker fees are used.
data[].mmpbooleanrequired
Whether the order is tagged for market maker protections
data[].nonceintegerrequired
Unique nonce defined as (UTC_timestamp in ms)(random_number_up_to_3_digits) (e.g. 1695836058725001, where 001 is the random number)
data[].order_feestringrequired
Order fee paid so far
data[].order_idstringrequired
Order ID
data[].order_statusstringrequired
Order status
enum openfilledcancelledexpireduntriggeredalgo_active
data[].order_typestringrequired
Order type
enum limitmarket
data[].quote_idstring or nullrequired
Quote ID if the trade was executed via RFQ
data[].signaturestringrequired
Ethereum signature of the order
data[].signature_expiry_secintegerrequired
Signature expiry timestamp
data[].signerstringrequired
Owner wallet address or registered session key that signed order
data[].subaccount_idintegerrequired
Subaccount ID
data[].time_in_forcestringrequired
Time in force
enum gtcpost_onlyfokioc
data[].algo_duration_secinteger or null
Total execution window in seconds
data[].algo_num_slicesinteger or null
Number of child executions
data[].algo_slices_completedinteger or null
Number of slices executed so far
data[].algo_typestring or null
Algo order type (twap or vwap)
enum twap
data[].extra_feestring or null
(Optional) Extra fee in USDC added to the total final fee paid by user (must be between 0.000001 and 1,000 USDC).
data[].replaced_order_idstring or null
If replaced, ID of the order that was replaced
data[].signed_limit_pricestring or null
The original limit price that the user signed. Only set when the order was adjusted (i.e., for post-only orders with reject_post_only=false that would have crossed). Used for on-chain submission.
data[].trigger_pricestring or null
(Required for trigger orders) Index or Market price to trigger order at
data[].trigger_price_typestring or null
(Required for trigger orders) Trigger with Index or Mark Price
enum markindex
data[].trigger_reject_messagestring or null
(Required for trigger orders) Error message if error occured during trigger
data[].trigger_typestring or null
(Required for trigger orders) Stop-loss or Take-profit.
enum stoplosstakeprofit

Example

Subscriptions are only available via websockets.

{request_example_javascript}
{request_example_python}

Notification messages on this channel will look like this:

{response_example_json}