Create buy stock market order
Place a buy market order specifying the exact quantity of the base asset to receive via the V4 API.
Authorizations
The public WhiteBIT API key.
Base64-encoded JSON request body.
HMAC-SHA512 signature of the payload, hex-encoded. Computed as hex(HMAC-SHA512(payload, api_secret)).
Body
Trading pair. Format: BASE_QUOTE (e.g., BTC_USDT). Query GET /api/v4/public/markets for available markets.
"BTC_USDT"
Order side. Allowed values: buy, sell.
buy, sell "buy"
Order quantity in base (stock) currency for both buy and sell sides. To place a market order specifying the quote (money) currency amount instead, use POST /api/v4/order/market. Minimum and maximum values are market-dependent. Query GET /api/v4/public/markets for minAmount, minTotal, maxTotal.
"0.001"
"{{request}}"
1594297865000
Custom client order identifier. Uniqueness is enforced only among the account's open (pending) orders on the same market — once a previous order is filled or canceled, the same identifier can be reused, including on the same market. Contains only letters, numbers, dashes, dots, or underscores.
"order1987111"
Self-trade prevention mode. Allowed values: no (self-trades allowed), cb (cancel both the new and the existing order), cn (cancel the new order, keep the existing), co (cancel the existing order, place the new one). Default: no.
Legacy values cancel_both, cancel_new, cancel_old are deprecated: the API accepts the legacy values with identical behavior until a deprecation deadline is announced, then rejects the legacy values. Responses always return the abbreviated form, regardless of which variant the request used.
no, cb, cn, co "no"
Response
Order created successfully
Unique identifier assigned to the order by the matching engine.
4180284841
Custom client order identifier supplied in the request. Returns an empty string when not specified.
"order1987111"
Trading pair for the order. Format: BASE_QUOTE (e.g., BTC_USDT).
"BTC_USDT"
Order side. Possible values: buy, sell.
"buy"
Order type. Possible values: limit, market, stock market, stop limit, stop market.
"limit"
Unix timestamp in seconds (UTC) of order creation, with microsecond precision.
1595792396.165973
Filled amount in quote currency. Returns "0" while the order remains unfilled.
"0"
Filled amount in base currency. Returns "0" while the order remains unfilled.
"0"
Order quantity in base currency for limit and stop-limit orders, or in quote currency for buy market orders.
"0.01"
Remaining unfilled quantity. Equals amount for new orders and "0" for fully filled orders.
"0.001"
Cumulative trading fee charged for filled portions, denominated in the fee asset.
"0"
Limit price per unit in quote currency. Returns "0" for market orders.
"40000"
Post-only flag. When true, the order executes only as a maker order and is rejected if it would match immediately. Default: false.
false
Immediate-or-cancel flag. When true, the order executes available quantity immediately and cancels the unfilled remainder. Default: false.
false
Order lifecycle status. NEW — accepted, not yet matched. FILLED — fully executed. CANCELED — canceled before execution. PARTIAL_FILLED — partially executed, remainder still active. PARTIAL_CANCELED — partially filled, remainder canceled. CANCELED_TAKER_BAND — partially filled up to the taker band limit, remainder canceled to protect against excessive order book slippage. AUTO_CANCELED_REDUCE_ONLY — pending reduce-only order auto-canceled because the associated position was closed. AUTO_CANCELED_LIQUIDATION — pending order auto-canceled because the associated position was force-liquidated. CANCELED_STP — order canceled by Self-Trade Prevention.
"FILLED"
Self-trade prevention mode applied to the order. Possible values: no, cb, cn, co. The response always returns the abbreviated form, even when the request used a legacy value. Default: no.
"no"
Position side (for collateral orders)
"LONG"
Indicates Retail Price Improvement (RPI) mode for the order.
true
Retail-source taker flag. The field is present only when the order was placed with retail=true. See Retail flag.
true
Reduce-only flag. When true, the order can only reduce or close an existing position. See reduce-only.
false
Activation status of the stop order. 0 = not yet triggered (waiting for the activation_price condition to be met). 1 = triggered (the stop condition has been met and the order is now active).
0
Trigger condition for the stop order. Response-only — not accepted in the request body, and cannot be overridden. Derived from side:
side = buy→gte. The order activates when the market price rises to or aboveactivation_price.side = sell→lte. The order activates when the market price falls to or belowactivation_price.
lte, gte "lte"
The trigger price for the stop order. Always equals the activation_price value submitted in the request.
"40000"