Skip to main content
POST
/
api
/
v4
/
order
/
collateral
/
trigger-market
Collateral Trigger Market Order
curl --request POST \
  --url https://whitebit.com/api/v4/order/collateral/trigger-market \
  --header 'Content-Type: application/json' \
  --header 'X-TXC-APIKEY: <api-key>' \
  --header 'X-TXC-PAYLOAD: <api-key>' \
  --header 'X-TXC-SIGNATURE: <api-key>' \
  --data '
{
  "market": "BTC_USDT",
  "side": "buy",
  "amount": "0.01",
  "activation_price": "40000",
  "client_order_id": "order1987111",
  "reduceOnly": false,
  "request": "{{request}}",
  "nonce": "{{nonce}}"
}
'
{
  "order_id": 4180284841,
  "client_order_id": "order1987111",
  "market": "BTC_USDT",
  "side": "sell",
  "type": "stop market",
  "timestamp": 1595792396.165973,
  "deal_money": "0",
  "deal_stock": "0",
  "amount": "0.001",
  "left": "0.001",
  "deal_fee": "0",
  "activation_price": "40000",
  "status": "FILLED",
  "stp": "no",
  "oto": {
    "otoId": 29457221,
    "stopLoss": "50000",
    "takeProfit": "30000"
  },
  "positionSide": "LONG",
  "reduceOnly": false
}
The reduceOnly parameter documented on this page is coming soon. The documentation is published in advance for integration planning. The parameter is not yet accepted by the API. See Reduce-only orders for details.

Authorizations

X-TXC-APIKEY
string
header
required

The public WhiteBIT API key.

X-TXC-PAYLOAD
string
header
required

Base64-encoded JSON request body.

X-TXC-SIGNATURE
string
header
required

HMAC-SHA512 signature of the payload, hex-encoded. Computed as hex(HMAC-SHA512(payload, api_secret)).

Body

application/json
market
string
required

Available margin market. Example: BTC_USDT

Example:

"BTC_USDT"

side
enum<string>
required

Order direction. Use buy to open or increase a long position and sell to open or increase a short position.

Available options:
buy,
sell
Example:

"buy"

amount
string
required

Amount of stock currency to buy or sell. Minimum and step values are market-dependent — query the market info endpoint for constraints.

Example:

"0.01"

activation_price
string
required

Trigger price in money currency. The trigger market order activates when the market price reaches the specified value.

Example:

"40000"

request
string
required
Example:

"{{request}}"

nonce
string
required
Example:

"{{nonce}}"

client_order_id
string

Custom order identifier. Must be unique and contain only letters, numbers, dashes, dots, or underscores.

Example:

"order1987111"

stopLoss
string

Stop loss price.

When provided, the system creates an OTO order with a stop loss condition.

Example:

"50000"

takeProfit
string

Take profit price.

When provided, the system creates an OTO order with a take profit condition.

Example:

"30000"

positionSide
enum<string>

Defines the position direction when hedge mode is enabled. See positionSide

Available options:
LONG,
SHORT,
BOTH
Example:

"LONG"

reduceOnly
boolean
default:false

When true, the order can only reduce or close an existing position — the order cannot increase the position or open a new one. If the order amount exceeds the current position size, the system reduces the order to match. The API returns error code 116 if no open position exists or the order side matches the position direction. See reduce-only.

Example:

false

Response

Successful response - trigger market order created

order_id
integer

Unique order identifier

Example:

4180284841

client_order_id
string

Custom client order identifier. Empty string if not specified

Example:

"order1987111"

market
string

Market name

Example:

"BTC_USDT"

side
enum<string>

Order side

Available options:
buy,
sell
Example:

"sell"

type
string

Order type

Example:

"stop market"

timestamp
number

Unix timestamp in seconds (UTC) of order creation, with microsecond precision.

Example:

1595792396.165973

deal_money
string

Amount in money currency that is finished

Example:

"0"

deal_stock
string

Amount in stock currency that is finished

Example:

"0"

amount
string

Order amount

Example:

"0.001"

left
string

Remaining amount that must be finished

Example:

"0.001"

deal_fee
string

Fee in money that is paid when order is finished

Example:

"0"

activation_price
string

Price at which the stop market order activates

Example:

"40000"

status
enum<string>

Order status. NEW — accepted, not yet matched. FILLED — fully executed. PARTIALLY_FILLED — partially executed, remainder still active. CANCELLED — canceled before full execution.

Available options:
NEW,
FILLED,
PARTIALLY_FILLED,
CANCELLED
Example:

"FILLED"

stp
string

Self trade prevention mode

Example:

"no"

oto
object

OTO order data when stopLoss or takeProfit is specified

positionSide
enum<string>

Position side

Available options:
LONG,
SHORT,
BOTH
Example:

"LONG"

reduceOnly
boolean

Reduce-only flag

Example:

false