Create order
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 login section of this document.
If you are affiliated with the Brine organization, please ensure that you add the organization_key and api_key to the request body in both the nonce and create endpoints. This field is entirely optional. To obtain these keys, please reach out to Brine at support@brine.fi.
New order nonce
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.
Endpoint
Request Headers
Request Body
market
STRING
YES
ord_type
STRING
YES
allowed values [limit, market]
price
FLOAT
OPTIONAL
It is required for creating limit order
side
STRING
YES
allowed values [buy, sell]
volume
FLOAT
YES
Example
Response
New 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.
Endpoint
Request Headers
Request Body
msg_hash
STRING
YES
signature (both r & s)
STRING
YES
nonce
INTEGER
YES
To sign the msg hash obtained after accessing the nonce API, use the NodeJs SDK signMsgHash function.
After successfully generating the signature, you may send it together with additional parameters to create the order, as shown below.
Example
Response
Last updated