HomeDocumentationAPI Reference
Log In
API Reference

Get Open Orders

Method Name

private/get_open_orders

Get all open orders of a subacccount
Required minimum session key permission level is read_only

Parameters

subaccount_id  integer required
Subaccount_id for which to get open orders

Response

id  string or integer required
result  object required
result. subaccount_id  integer required
Subaccount_id for which to get open orders
result. orders  array of objects required
List of open orders
result.orders[]. amount  string required
Order amount in units of the base
result.orders[]. average_price  string required
Average fill price
result.orders[]. cancel_reason  string required
If cancelled, reason behind order cancellation
enum user_request mmp_trigger insufficient_margin signed_max_fee_too_low cancel_on_disconnect ioc_or_market_partial_fill session_key_deregistered subaccount_withdrawn compliance trigger_failed validation_failed algo_completed
result.orders[]. creation_timestamp  integer required
Creation timestamp (in ms since Unix epoch)
result.orders[]. direction  string required
Order direction
enum buy sell
result.orders[]. filled_amount  string required
Total filled amount for the order
result.orders[]. instrument_name  string required
Instrument name
result.orders[]. is_transfer  boolean required
Whether the order was generated through private/transfer_position
result.orders[]. label  string required
Optional user-defined label for the order
result.orders[]. last_update_timestamp  integer required
Last update timestamp (in ms since Unix epoch)
result.orders[]. limit_price  string required
Limit price in quote currency
result.orders[]. max_fee  string required
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.
result.orders[]. mmp  boolean required
Whether the order is tagged for market maker protections
result.orders[]. nonce  integer required
Unique nonce defined as (UTC_timestamp in ms)(random_number_up_to_3_digits) (e.g. 1695836058725001, where 001 is the random number)
result.orders[]. order_fee  string required
Order fee paid so far
result.orders[]. order_id  string required
Order ID
result.orders[]. order_status  string required
Order status
enum open filled cancelled expired untriggered algo_active
result.orders[]. order_type  string required
Order type
enum limit market
result.orders[]. quote_id  string or null required
Quote ID if the trade was executed via RFQ
result.orders[]. signature  string required
Ethereum signature of the order
result.orders[]. signature_expiry_sec  integer required
Signature expiry timestamp
result.orders[]. signer  string required
Owner wallet address or registered session key that signed order
result.orders[]. subaccount_id  integer required
Subaccount ID
result.orders[]. time_in_force  string required
Time in force
enum gtc post_only fok ioc
result.orders[]. algo_duration_sec  integer or null
Total execution window in seconds
result.orders[]. algo_num_slices  integer or null
Number of child executions
result.orders[]. algo_slices_completed  integer or null
Number of slices executed so far
result.orders[]. algo_type  string or null
Algo order type (twap or vwap)
enum twap
result.orders[]. extra_fee  string 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).
result.orders[]. replaced_order_id  string or null
If replaced, ID of the order that was replaced
result.orders[]. signed_limit_price  string 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.
result.orders[]. trigger_price  string or null
(Required for trigger orders) Index or Market price to trigger order at
result.orders[]. trigger_price_type  string or null
(Required for trigger orders) Trigger with Index or Mark Price
enum mark index
result.orders[]. trigger_reject_message  string or null
(Required for trigger orders) Error message if error occured during trigger
result.orders[]. trigger_type  string or null
(Required for trigger orders) Stop-loss or Take-profit.
enum stoploss takeprofit

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}