post https://api-glb.sim.hashkeydev.com/api/v1/spot/batchOrders
Create orders in batches up to 20 orders at a time. Currently only support for same symbol
Batch order Frequency Limit Type: Weight: 1
Weight: 1
Sample body string
curl -H "Content-Type:application/json" -H "X-HK-APIKEY: SRQGN9M8Sr87nbfKsaSxm33Y6CmGVtUu9Erz73g9vHFNn36VROOKSaWBQ8OSOtSq" -X POST -d '[
{ "newClientOrderId": "pl12241234567898",
"symbol": "BTCUSDT",
"side": "SELL",
"type": "LIMIT",
"price": 17001,
"quantity": 1
},
{ "newClientOrderId": "pl12241234567899",
"symbol": "BTCUSDT",
"side": "SELL",
"type": "LIMIT",
"price": 17002,
"quantity": 1
} ]' 'https://${host}/api/v1/spot/batchOrders?timestamp=1671880913657&signature=7548b6834613afed3b7d3b0b9bfb0e0b3e3799c46db3ea6b952439fde35cb88f'
Request Parameters
api/v1/spot/order request parameters
PARAMETER | TYPE | Req'd | DESCRIPTION |
---|---|---|---|
symbol | STRING | Y | Name of instrument e.g. "BTCUSDT", "ETHUSDT" |
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. "BTCUSDT", "ETHUSDT" |
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 |
---|---|---|---|
code | INTEGER | 0 | Error code |
result | Object Array | Batch order result | |
- code | INTEGER | 0 | Error code of an order |
- msg | STRING | "Create order failed" | Error code |
- order | Object Array | Order response data | |
order.accountId | LONG | 1467298646903017216 | Account Number |
order.symbol | STRING | BTCUSD | Trading pair |
order.symbolName | STRING | BTCUSD | Trading pair name |
order.clientOrderId | STRING | 123433 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
order.orderId | LONG | 1470929631548869632 | System generated order ID. A maximum of 20 characters. |
order.transactTime | LONG | 1690084476357 | Millisecond timestamp |
order.price | DECIMAL | 28000 | Price |
order.origQty | DECIMAL | 0.01 | Quantity |
order.executedQty | DECIMAL | 0 | Traded Volume |
order.status | ENUM | FILLED | Order status. See Enumeration definition for more details |
order.timeInForce | ENUM | GTC | Duration of the order before expiring |
order.type | ENUM | LIMIT | Order type. See Enumeration definition for more details |
order.side | ENUM | SELL | BUY or SELL |
order.reqAmount | STRING | 0 | Requested Cash amount |
concentration | STRING | Concentration reminder message |