Skip to main content
POST
/
api
/
v4
/
order
/
new
Create Limit Order
curl --request POST \
  --url https://whitebit.com/api/v4/order/new \
  --header 'Content-Type: application/json' \
  --header 'X-TXC-APIKEY: <api-key>' \
  --data '
{
  "market": "BTC_USDT",
  "side": "buy",
  "amount": "0.001",
  "price": "9800",
  "request": "<string>",
  "nonce": "<string>",
  "clientOrderId": "<string>",
  "postOnly": false,
  "ioc": false,
  "bboRole": 1,
  "stp": "no",
  "rpi": true
}
'
{
  "orderId": 123,
  "clientOrderId": "<string>",
  "market": "<string>",
  "side": "<string>",
  "type": "<string>",
  "timestamp": 123,
  "dealMoney": "<string>",
  "dealStock": "<string>",
  "amount": "<string>",
  "left": "<string>",
  "dealFee": "<string>",
  "price": "<string>",
  "postOnly": true,
  "ioc": true,
  "status": "<string>",
  "stp": "<string>",
  "positionSide": "<string>",
  "rpi": true
}

Authorizations

X-TXC-APIKEY
string
header
required

API Key authentication for private endpoints.

Required headers:

  • X-TXC-APIKEY: API key
  • X-TXC-PAYLOAD: Base64 encoded JSON payload
  • X-TXC-SIGNATURE: HMAC SHA512 signature

Body

application/json
market
string
required

Available market. Example: BTC_USDT

Example:

"BTC_USDT"

side
enum<string>
required

Order type. Variables: 'buy' / 'sell' Example: 'buy'

Available options:
buy,
sell
amount
string
required

Amount of stock currency to buy or sell. Example: '0.001' or 0.001

Example:

"0.001"

price
string
required

Price in money currency. Example: '9800' or 9800

Example:

"9800"

request
string
required
nonce
string
required
clientOrderId
string

Identifier should be unique and contain letters, dashes, numbers, dots or underscores. The identifier must be unique.

postOnly
boolean
default:false

Orders are guaranteed to be the maker order when executed. Variables: 'true' / 'false' Example: 'false'.

ioc
boolean
default:false

Immediate-or-cancel (IOC) executes all or part of an order immediately and cancels any unfilled portion.

IOC does not support rpi=true because RPI uses post-only behavior by design. The API returns error code 37 when a request sets both ioc=true and rpi=true.

Refer to Order Parameter Rules for unsupported parameter combinations.

bboRole
enum<integer>

When the BBO option is activated for Limit orders, the system selects the best market prices for execution. Variables: 1 - Queue Method / 2 - Counterparty Method. Use method 2 with ioc flag. Example: 2.

Available options:
1,
2
stp
enum<string>
default:no

Self trade prevention mode. Variables: 'no' / 'cancel_both' / 'cancel_new' / 'cancel_old'. Example: 'no'.

Available options:
no,
cancel_both,
cancel_new,
cancel_old
rpi
boolean

Enables Retail Price Improvement (RPI) mode.

RPI orders use post-only behavior by design. An RPI order does not support ioc=true. The API returns error code 37 when a request sets both rpi=true and ioc=true. RPI orders do not appear in public order book feeds (depth, bookTicker). RPI orders are visible only in private active orders and in the exchange UI order book (web/mobile). RPI executions may apply custom fees or rebates, especially when trading via sub-accounts. Use Query Market Fee / Query All Market Fees to verify effective fees.

Refer to Order Parameter Rules for unsupported parameter combinations.

Example:

true

Response

Order created successfully

orderId
integer

Order ID

clientOrderId
string

Custom client order ID; empty string if not specified

market
string

Deal market

side
string

Order side

type
string

Order type

timestamp
number

Timestamp of order creation

dealMoney
string

If order finished - amount in money currency that is finished

dealStock
string

If order finished - amount in stock currency that is finished

amount
string

Amount

left
string

If order not finished - rest of the amount that must be finished

dealFee
string

Fee in money currency when order is filled

price
string

Price

postOnly
boolean

PostOnly flag

ioc
boolean

IOC flag

status
string

Order status

stp
string

Self trade prevention mode

positionSide
string

Position side (for collateral orders)

rpi
boolean

Indicates Retail Price Improvement (RPI) mode for the order.

Example:

true