HomeDocumentationAPI Reference
Log In
API Reference

Order Quote

Method Name

public/order_quote

Equivalent of private/order_quote RPC, but without the need for authentication.

Parameters

amount  string required
Order amount in units of the base

direction  string required
Order direction
enum buy sell

instrument_name  string required
Instrument name

limit_price  string required
Limit price in quote currency.
This field is still required for market orders because it is a component of the signature. However, market orders will not leave a resting order in the book in case of a partial fill.

max_fee  string required
Max fee per unit of volume, denominated in units of the quote currency (usually USDC).Order will be rejected if the supplied max fee is below the estimated fee for this order.

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).Note, using a random number beyond 3 digits will cause JSON serialization to fail.

signature  string required
Ethereum signature of the order

signature_expiry_sec  integer required
Unix timestamp in seconds. Order signature becomes invalid after this time, and the system will cancel the order.Expiry MUST be at least 5 min from now.

signer  string required
Owner wallet address or registered session key that signed order

subaccount_id  integer required
Subaccount ID

is_atomic_signing  boolean
Used by vaults to determine whether the signature is an EIP-1271 signature.

label  string
Optional user-defined label for the order

mmp  boolean
Whether the order is tagged for market maker protections (default false)

order_type  string
Order type:
- limit: limit order (default)
- market: market order, note that limit_price is still required for market orders, but unfilled order portion will be marked as cancelled

enum limit market

reduce_only  boolean
If true, the order will not be able to increase position's size (default false). If the order amount exceeds available position size, the order will be filled up to the position size and the remainder will be cancelled. This flag is only supported for market orders or non-resting limit orders (IOC or FOK)

referral_code  string
Optional referral code for the order

reject_timestamp  integer
UTC timestamp in ms, if provided the matching engine will reject the order with an error if reject_timestamp < server_time. Note that the timestamp must be consistent with the server time: use public/get_time method to obtain current server time.

time_in_force  string
Time in force behaviour:
- gtc: good til cancelled (default)
- post_only: a limit order that will be rejected if it crosses any order in the book, i.e. acts as a taker order
- fok: fill or kill, will be rejected if it is not fully filled
- ioc: immediate or cancel, fill at best bid/ask (market) or at limit price (limit), the unfilled portion is cancelled
Note that the order will still expire on the signature_expiry_sec timestamp.

enum gtc post_only fok ioc

trigger_price  string
(Required for trigger orders) "index" or "mark" price to trigger order at

trigger_price_type  string
(Required for trigger orders) Trigger with "mark" price as "index" price type not supported yet.
enum mark index

trigger_type  string
(Required for trigger orders) "stoploss" or "takeprofit"
enum stoploss takeprofit

Response

id  string or integer required

result  object required

result. estimated_fee  string required
An estimate for how much the user will actually pay in fees for the order ($ for the whole trade).

result. estimated_fill_amount  string required
(Returns 0 for trigger orders) An estimate the amount that will be instantly crossed upon order submission.

result. estimated_fill_price  string required
(Returns 0 for trigger orders) An estimate for the average fill price of the order.

result. estimated_order_status  string required
An estimate for the order status after submission. Fully filled orders will be marked as filled, unfilled and partially filled limit orders will be marked as open and partially filled market / IOC orders will be marked as cancelled.
enum open filled cancelled expired untriggered

result. estimated_realized_pnl  string required
(Returns 0 for trigger orders) An estimate for the realized PnL of the order. For orders with an estimated cancelled status this only includes PnL of the filled amount.

result. estimated_realized_pnl_excl_fees  string required
(Returns 0 for trigger orders) An estimate for the realized PnL of the order with cost basis calculated without considering fees. For orders with an estimated cancelled status this only includes PnL of the filled amount.

result. invalid_reason  string or null required
Reason for the order being invalid, if any.
enum Account is currently under maintenance margin requirements, trading is frozen. This order would cause account to fall under maintenance margin requirements. Insufficient buying power, only a single risk-reducing open order is allowed. Insufficient buying power, consider reducing order size. Insufficient buying power, consider reducing order size or canceling other orders. Consider canceling other limit orders or using IOC, FOK, or market orders. This order is risk-reducing, but if filled with other open orders, buying power might be insufficient. Insufficient buying power.

result. is_valid  boolean required
True if order is expected to pass margin requirements.

result. max_amount  string or null required
Estimated maximum order amount.

result. post_initial_margin  string required
(Returns 0 for trigger orders) User's hypothetical margin balance if the order or trade were to get accepted. For maker orders (limit and not IOC/FOK) this also includes the margin locked for other outstanding orders.

result. post_liquidation_price  string or null required
Subaccounts's liquidation price if the order were to be fully filled.

result. pre_initial_margin  string required
(Returns 0 for trigger orders) User's initial margin balance before the order or trade. For maker orders (limit and not IOC/FOK) this also includes the margin locked for other outstanding orders.

result. suggested_max_fee  string required
Recommended value for max_fee of the order (per contract).

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}