post https://api-glb.sim.hashkeydev.com/api/v1/futures/batchOrders
A maximum of 20 orders at a time, must be same symbol
Weight: 1
Request Parameters
PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
---|---|---|---|---|
orders | LIST | Y | RequestBody parameters | |
recWindow | LONG | 5000 | ||
timestamp | LONG | Y | 1714311403031 | Timestamp |
The batchOrders in RequestBody should fill in the order parameters in list of JSON format
PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
---|---|---|---|---|
symbol | STRING | Y | Name of contract | |
side | ENUM | Y | Side: BUY_OPEN SELL_OPEN BUY_CLOSE SELL_CLOSE | |
type | ENUM | Y | Type: LIMIT | |
quantity | LONG | Y | The number of contracts to buy, e.g. non integers will still treat as 1 | |
price | DECIMAL | Required for (LIMIT & INPUT) orders | Price required for LIMIT & INPUT orders | |
priceType | Y | Price type INPUT and MARKET | ||
timeInForce | The time command (Time in Force) of LIMIT order, the currently supported types are GTC, FOK, IOC, LIMIT_MAKER | |||
clientOrderId | Y | The ID of the order, defined by the user |
Notes:
- For market order, you need to set type to LIMIT and set priceType to MARKET. You can obtain the contract price and quantity precision configuration information at the brokerInfo endpoint.
- If your balance does not meet the margin requirements (initial margin + opening fee + closing fee), there will be an insufficient balance (insufficient balance) error return.
Response
Name | Type | Example | Description |
---|---|---|---|
code | STRING | 0000 | Return code of request |
result | LIST | Create order result list |