Place an Order
Submit a spot order to the market.
/api/v1/orderWeight: 1TRADEPlace a spot order. A MARKET order fills immediately at the best available price; a LIMIT order rests on the book until it fills at your price or better.
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | STRING | Yes | The trading pair, e.g. BTCUSDT |
| side | ENUM | Yes | BUY or SELL |
| type | ENUM | Yes | LIMIT or MARKET |
| quantity | DECIMAL | Yes* | Amount of base asset. Required for LIMIT and for MARKET SELL |
| quoteOrderQty | DECIMAL | Yes* | For a MARKET BUY, spend this much quote asset instead of quantity |
| price | DECIMAL | Yes* | Required for LIMIT orders |
| timeInForce | ENUM | Yes* | For LIMIT: GTC, IOC or FOK. Required for LIMIT |
| clientOrderId | STRING | No | Your own unique id for the order; echoed back and used to query it |
| timestamp | LONG | Yes | Request time in ms |
timeInForce controls a LIMIT order's lifetime: GTC (good til cancelled) rests until filled or cancelled, IOC (immediate or cancel) fills what it can now and cancels the rest, FOK (fill or kill) fills fully at once or not at all.
/api/v1/order/testWeight: 1TRADEValidate an order without sending it to the matching engine. Same parameters as above; a successful test returns an empty object.