HomeDocumentationAPI Reference
Log In
API Reference

Order

Create a new order. Required minimum session key permission level is admin

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer | null
Defaults to null

Total execution window in seconds (required for algo orders)

integer | null
Defaults to null

Number of child executions to split the order into (required for algo orders)

string | null
enum
Defaults to null

Algo order type (twap). Cannot be combined with trigger fields.

Allowed:
string
required

Order amount in units of the base

string | null

Client that submitted the order

string
enum
required

Order direction

Allowed:
string
Defaults to 0

Extra fee in USDC added to the total final fee paid by user and directly sent to client / builder (must be between 0.000001 and 1000 USDC). The referral_code field must also be filled out. See Builder Fee page in docs for more info.

string
required

Instrument name

boolean | null
Defaults to false

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

string

Optional user-defined label for the order

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.

string
required

Max fee PER contract, denominated in USDC.
For resting orders (maker orders), max_fee must be > 2 x max(taker_fee, maker_fee) x spot_price + extra_fee / amount.For crossing orders (taker order), max_fee must be > maker max_fee + base_fee / fill_amount.
Note, in this calculation, regardless of the custom account taker / maker fees, the standard taker / maker fees are used.
The max(limit_price, index_price) is used to calculate the notional volume.

boolean
Defaults to false

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

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.

string
enum
Defaults to limit

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

Allowed:
boolean
Defaults to false

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)

string

Optional referral code for the order

boolean
Defaults to true

If true (default), post-only orders that would cross the book are rejected. If false, the limit price is adjusted to be 1 tick away from the BBO instead of rejecting.

integer
Defaults to 9223372036854776000

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.

string
required

Ethereum signature of the order

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.

string
required

Owner wallet address or registered session key that signed order

integer
required

Subaccount ID

string
enum
Defaults to gtc

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.

Allowed:
string | null
Defaults to null

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

string | null
enum
Defaults to null

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

Allowed:
string | null
enum
Defaults to null

(Required for trigger orders) "stoploss" or "takeprofit"

Allowed:
Response

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json