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: Your 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

An immediate or cancel order (IOC) is an order that attempts to execute all or part immediately and then cancels any unfilled portion of the order. Variables: 'true' / 'false' Example: 'false'.

bboRole
enum<integer>

When you activate the BBO option when placing Limit orders, the system automatically selects the best market prices for executing these orders in one of two ways. Variables: 1 - Queue Method / 2 - Counterparty Method. You can use 2 method 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

Retail Price Improvement (RPI) order: Order type designed to offer better prices to retail users. It is post-only and can match only with orders from the Web or Mobile App. RPI orders can be placed only by the designated Market Makers. Example: true

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 that you pay if order is finished

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

RPI order flag - indicates whether Retail Price Improvement was enabled for this order

Example:

true