Place Order
Places an order to be triggered if a provided price criteria is met.
Rate limits
A max of 100 pending trigger orders per subaccount
Request
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
product_id | number | Yes | Id of spot / perp product for which to place order. Use All products query to retrieve all valid product ids. |
order | object | Yes | Order object, see Signing section for details on each order field. |
signature | string | Yes | Hex string representing hash of the signed order. See Signing section for more details. |
trigger | object | Yes | Trigger criteria could be any of:
|
digest | string | No | Hex string representing a hash of the order. |
spot_leverage | boolean | No | Indicates whether leverage should be used; when set to |
id | number | No | An optional id that when provided is returned as part of |
Note:
- price_above
: Order is triggered if the indicated price is above the oracle price.
- price_below
: Order is triggered if the indicated price is below the oracle price.
- last_price_above
: Order is triggered if the indicated price is above the last trade price.
- last_price_below
: Order is triggered if the indicated price is below the last trade price.
Order Nonce
Note: The first most significant bit must be set, this is used to identify a trigger order from a regular one. See order nonce for more details.
To compute a nonce for a trigger order with a random integer of 1000
, and a discard time 50 ms from now, we can do the following:
Response
Success
Failure
Last updated