post https://api-pro.sim.hashkeydev.com/api/v1/spot/order
Create a single order request to Exchange
When submitting "MARKET" order, the default for "BUY" is cash amount and for "SELL" it's quantity.
If you would like to submit "BUY" in quantity, please change endpoint to "/api/v1.1/spot/order"
Weight: 1
Certain parameters are mandatory depending on the order type
:
Type | Mandatory parameters |
---|---|
LIMIT | quantity, price |
MARKET | quantity |
LIMIT_MAKER | quantity, price |
Request Parameters
api/v1/spot/order request parameters
PARAMETER | TYPE | Req'd | DESCRIPTION |
---|---|---|---|
symbol | STRING | Y | Name of instrument e.g. "BTCUSD", "ETHUSD" |
side | ENUM | Y | BUY or SELL |
type | ENUM | Y | Currently offer 3 order types: - LIMIT - Limit order - MARKET - Market order - LIMIT_MAKER - Maker Limit order |
quantity | DECIMAL | Y | Order amount in units of the instrument. Commonly known as "orderQty" |
price | DECIMAL | C | Required for LIMIT and LIMIT_MAKER order |
newClientOrderId | STRING | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request. | |
timeInForce | ENUM | GTC for Limit order, Limit maker order and IOC for Market order | |
recvWindow | LONG | Recv Window. Default 5000 | |
timestamp | LONG | Y | Timestamp |
api/v1.1/spot/order request parameters
PARAMETER | TYPE | Req'd | DESCRIPTION |
---|---|---|---|
symbol | STRING | Y | Name of instrument e.g. "BTCUSD", "ETHUSD" |
side | ENUM | Y | BUY or SELL |
type | ENUM | Y | Currently offer 3 order types: - LIMIT - Limit order - MARKET - Market order - LIMIT_MAKER - Maker Limit order |
quantity | DECIMAL | C | "Order amount in units of the instrument. Commonly known as "orderQty" *Required if the order type is "MARKET" |
amount | DECIMAL | C | "Cash amount in the units of quote currency. Market order only *Required if the order type is "MARKET" |
price | DECIMAL | C | Required for LIMIT and LIMIT_MAKER order |
newClientOrderId | STRING | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request | |
timeInForce | ENUM | GTC for Limit order, Limit maker order and IOC for Market order | |
recvWindow | LONG | Recv Window. Default 5000 | |
timestamp | LONG | Y | Timestamp |
Response Content
PARAMETER | TYPE | Example values | DESCRIPTION |
---|---|---|---|
accountId | LONG | 1467298646903017216 | Account number |
symbol | STRING | BTCUSD | Trading pair |
symbolName | STRING | BTCUSD | Trading pair name |
clientOrderId | STRING | 1690084460710352 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
orderId | LONG | 1470929500342690304 | System generated order ID. A maximum of 20 characters. |
transactTime | LONG | 1690084460716 | Millisecond timestamp |
price | DECIMAL | 28000 | Price |
origQty | DECIMAL | 0.01 | Quantity |
executedQty | DECIMAL | 0 | Traded Volume |
status | ENUM | NEW | Order status. See Enumeration definition for more details |
timeInForce | ENUM | GTC | Duration of the order before expiring |
type | ENUM | LIMIT | Order type. See enumeration definition for more details |
side | ENUM | BUY | BUY or SELL |
reqAmount | STRING | 0 | Requested Cash amount |
concentration | STRING | Concentration reminder message |