Create order
Last updated
Was this helpful?
Last updated
Was this helpful?
To place an order, grab the nonce and msg hash from the nonce api orders/nonce/ and provide them to the create order api /orders/create/.
Note: You will need to include the JWT Auth token to request headers to access this endpoint. To get the JWT Auth Token, refer the section of this document.
Before creating a new order, you’d be required to obtain a nonce and a msg hash by making use of this endpoint. Please note that this is a Private 🔒 route which means it needs to be authorized by the account initiating this request.
market
STRING
YES
ord_type
STRING
YES
allowed values: [limit, market, stop_limit, limit_maker(post-only order) ].
To place a post-only order, send limit_maker as the order type.
price
FLOAT
OPTIONAL
It is required for creating limit order
side
STRING
YES
allowed values [buy, sell]
volume
FLOAT
YES
stop_price
FLOAT
OPTIONAL
It is required for creating stop limit order
Create a new order. (Private 🔒)
Before creating a new order, you’d be required to obtain a nonce by making use of this endpoint. Please note that this is a Private 🔒 route which means it needs to be authorized by the account initiating this request.
msg_hash
STRING
YES
signature (both r & s)
STRING
YES
nonce
INTEGER
YES
After successfully generating the signature, you may send it together with additional parameters to create the order, as shown below.
To sign the msg hash obtained after accessing the nonce API, use the function.