Appearance
Place stop limit order
POST
/v2/orders/stop/limit
Create a new Stop Loss Limit or Take Profit Limit order.
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.
| Parameter | Description |
|---|---|
| side (required) | BUY or SELL |
| quantity (required) | Amount in Base Currency must be provided. |
| price (required) | The Limit Price in Quote Currency at which the BUY or SELL order will be placed. |
| pair (required) | Any pair that supports stop limit orders. Please see Public/Order Types. |
| stopPrice (required) | The target price for the trade to trigger. Cannot be equal to last traded price. |
| type (required) | Can be TAKE_PROFIT_LIMIT or STOP_LOSS_LIMIT. |
| customerOrderId (optional) | Alphanumeric value. Must be unique across all open orders. |
| timeInForce (optional) | Can be GTC, FOK or IOC. Default value is GTC. |
When an order fails during the order placement process you can expect to receive an orderId, code and message in the response body.
Notes
-
customerOrderId:
Optional field for tracking orders using your internal system. It supports alphanumeric characters and dashes ("-"), with a 50-character limit. Special characters are not allowed. ThecustomerOrderIdmust be unique across all open orders for a given account. Reusing an id from an active order will prevent the new order from being placed (use the order status API to check an order's status). -
allowMargin:
Set totruefor margin/leverage trades. Only subaccounts can trade on margin, and each must be enabled individually via the account/status API. -
timeInForce:
Defines how long an order remains active:GTC(Good Till Cancelled): Remains active until fully filled or explicitly cancelled.FOK(Fill or Kill): Must be fully filled immediately or cancelled entirely. No partial fills.IOC(Immediate or Cancel): Fills as much as possible immediately; any unfilled portion is cancelled.
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": "BUY",
"quantity": "0.00016",
"price": "645055",
"pair": "BTCUSDT",
"customerOrderId": "556789",
"timeInForce": "GTC",
"stopPrice": "36000",
"type": "STOP_LOSS_LIMIT"
}
Responses
Stop limit order created successfully
application/json
JSON
{
"id": "95603118-2f14-4da3-93c4-2b8c25850d8d"
}