post https://api-glb.sim.hashkeydev.com/api/v1.1/spot/order
Creates a single order for Spot Trading.
When an order is placed, the required funds from your account will be ringfenced for the duration of the order.
For Future Trading, see Link
New endpoint
- Supports specifying both the cash amount and the quantity for market orders, regardless of whether it's a buy or sell 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
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 quantity in units of the instrument - Limit order: Represents the amount of the base asset you want to buy or sell. For example: BTC/USDT pair, if quantity is 0.5, you're ordering 0.5 BTC - Market order: Represents the amount of the base asset to buy or sell For example: BTC/USDT pair, if quantity is 0.5, you're buying 0.5 BTC worth at the market price |
amount | DECIMAL | C | *Cash amount in the units of quote asset. Market order only - Market order: Represents the amount of the quote asset you want to use for the trade For example: For BTC/USDT pair, if amount = 1000, you are placing a MARKET buy order to purchase BTC using 1000 USDT at the current market price |
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 -"IOC" for Market order -"FOK"for Limit order & Market order | |
recvWindow | LONG | Recv Window. Default 5000 | |
timestamp | LONG | Y | Timestamp |
stpMode | ENUM | C | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKER Default EXPIRE_TAKER if not specified. |
Response Content
PARAMETER | TYPE | Example values | DESCRIPTION |
---|---|---|---|
accountId | LONG | 1467298646903017216 | Account number |
symbol | STRING | BTCUSDT | Trading pair |
symbolName | STRING | BTCUSDT | 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 (up to 20 characters) |
transactTime | LONG | 1690084460716 | Timestamp in milliseconds |
price | DECIMAL | 55000 | 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 |