Appearance
Place market order
POST
/v2/orders/market
Create a new market order. Market orders are executed immediately at current market prices. When you receive a 201 Created response with an id, it means that the order has been successfully placed. You can use the Order Status REST API or WebSocket API to receive the status of this order.
Required parameters: side (BUY/SELL), either baseAmount or quoteAmount (but not both), pair (currency pair).
Amount specification: Either baseAmount or quoteAmount must be provided. If quoteAmount is specified for a SELL order, your account will be credited with quoteAmount minus taker fees. If baseAmount is specified for a BUY order, your account will be credited with baseAmount minus taker fees. If baseAmount is provided, it will be truncated to baseDecimalPlaces of the currency pair.
Optional parameters: timeInForce (FOK/IOC, default IOC), customerOrderId (alphanumeric value for tracking, must be unique across all open orders), allowMargin (true/false for margin/leverage trades, default false), reduceOnly (true/false for orders that should only reduce a position, default false).
Notes: The customerOrderId supports alphanumeric characters with a 50-character limit (no special characters). Market orders are charged the Taker fee. Fee currency depends on trade side (charged in the currency you receive). timeInForce for market orders can be FOK (Fill or Kill) or IOC (Immediate or Cancel). If not specified, IOC is used by default.
When placement fails synchronously, the endpoint returns 201 Created with {orderId, code, message} instead of {id}. Check the response body structure to distinguish success from failure.
Authorizations
apiKey
Your API key
Type
API Key (header: X-VALR-API-KEY)
apiSignature
HMAC SHA512 signature of the request (see Authentication section)
Type
API Key (header: X-VALR-SIGNATURE)
apiTimestamp
Request timestamp in milliseconds
Type
API Key (header: X-VALR-TIMESTAMP)
Request Body
application/json
JSON
{
"side": "SELL",
"baseAmount": "0.100000",
"pair": "BTCUSDT",
"customerOrderId": "1234",
"allowMargin": "false",
"timeInForce": "FOK"
}
Responses
Market order created successfully
application/json
JSON
{
"id": "fd7c947c-9022-4457-a1a8-2ecc7e3d5518"
}