WhiteBit Place Margin BBO Order
Version 1.0.0
Place a margin or futures limit order priced from the current best bid or offer. The role semantics match the spot `order_bbo_place` method, and the same limit order comes back reporting `type` `7`.
Channels
Messages
Servers
AsyncAPI Specification
asyncapi: 3.0.0
info:
title: WhiteBit Place Margin BBO Order
version: 1.0.0
description: |
Place a margin or futures limit order priced from the current best bid or offer.
The role semantics match the spot `order_bbo_place` method, and the same limit order comes
back reporting `type` `7`.
x-auth-required: true
x-rate-limits:
connections-per-minute: 1000
order-placements-per-10-seconds: 10000
x-error-codes:
- code: 19
message: market is not margin market
description: "The method was called on a spot-only market. Use the spot `order_*` equivalent there."
- code: 1
message: bbo role must be an integer in range 1..2
description: "The `bbo_role` value is outside `1`–`2`, or is not an integer."
- code: 1
message: wrong flags combination
description: "`post_only` was sent together with `bbo_role: 2`. The taker role cannot be post-only."
- code: 14
message: margin order by taker price
description: "A maker-role margin order would cross the spread."
- code: 12
message: not enough traders
description: "The order book has no quote on the required side, so the order cannot be priced."
- code: 114
message: order's position side does not match user's setting
description: "`position_side` was sent (as non-`BOTH`) without hedge mode enabled, or was omitted or sent as `BOTH` while hedge mode is enabled, or otherwise does not match the account setting."
servers:
production:
host: wss.whitebit.com
protocol: wss
description: WhiteBIT Global Server
eu:
host: api.whitebit.eu
protocol: wss
description: WhiteBIT EU Server
channels:
/ws:
address: /ws
description: Margin and futures BBO order placement channel
messages:
collateralOrderBboPlaceRequest:
$ref: '#/components/messages/collateralOrderBboPlaceRequest'
collateralOrderBboPlaceResponse:
$ref: '#/components/messages/collateralOrderBboPlaceResponse'
operations:
sendCollateralOrderBboPlaceRequest:
action: receive
channel:
$ref: '#/channels/~1ws'
messages:
- $ref: '#/channels/~1ws/messages/collateralOrderBboPlaceRequest'
receiveCollateralOrderBboPlaceResponse:
action: send
channel:
$ref: '#/channels/~1ws'
messages:
- $ref: '#/channels/~1ws/messages/collateralOrderBboPlaceResponse'
components:
messages:
collateralOrderBboPlaceRequest:
name: CollateralOrderBboPlaceRequest
title: Place margin BBO order
summary: Place a margin or futures order priced from the best bid or offer
payload:
$ref: '#/components/schemas/CollateralOrderBboPlaceRequest'
examples:
- name: collateralOrderBboPlaceMakerBuy
summary: |
Place a maker-role buy order with parameters:
- params[0]: order object with market, side, amount, and bbo_role
payload:
id: 500014
method: collateral_order_bbo_place
params:
- market: BTC_PERP
side: buy
amount: "0.001"
bbo_role: 1
stp: "no"
collateralOrderBboPlaceResponse:
name: CollateralOrderBboPlaceResponse
title: Place Margin BBO Order Response
summary: Accepted limit order priced at the best bid
payload:
$ref: '#/components/schemas/CollateralOrderBboPlaceResponse'
examples:
- name: collateralOrderBboPlaceAccepted
summary: Maker role resolved the price to the best bid and set post_only
payload:
id: 500014
result:
id: 2423735887551
market: BTC_PERP
type: 7
side: 2
post_only: true
ioc: false
reduce_only: false
position_side: BOTH
ctime: 1786452692.283438
mtime: 1786452692.283438
price: "64333.38"
amount: "0.001"
left: "0.001"
deal_stock: "0"
deal_money: "0"
deal_fee: "0"
client_order_id: ""
stp: "no"
status: OPEN
error: null
schemas:
CollateralOrderBboPlaceRequest:
type: object
required:
- id
- method
- params
properties:
id:
type: integer
description: Unique request identifier. The response echoes this value.
method:
type: string
const: collateral_order_bbo_place
description: "Method name. Fixed value: `collateral_order_bbo_place`."
params:
type: array
minItems: 1
maxItems: 1
items:
$ref: '#/components/schemas/CollateralOrderBboPlaceParams'
description: Array containing exactly one order parameter object
CollateralOrderBboPlaceParams:
type: object
required:
- market
- side
- amount
- bbo_role
properties:
market:
type: string
description: "Margin or futures market name. A spot-only market is rejected with error `19`."
example: BTC_PERP
side:
type: string
enum: ["buy", "sell"]
description: "Order side. The response reports the side numerically: `1` for sell, `2` for buy."
amount:
type: string
description: "Order size in stock, at the market stock precision."
example: "0.001"
bbo_role:
type: integer
enum: [1, 2]
description: "Pricing role. `1` maker — price at the own-side best and set `post_only`. `2` taker — price at the opposite-side best and cross the spread."
reduce_only:
type: boolean
description: "Restrict the order to shrinking an existing position."
position_side:
type: string
enum: ["BOTH", "LONG", "SHORT"]
description: "Position leg in hedge mode; futures markets only. `BOTH` in one-way mode. Optional at the request layer but functionally required in hedge mode — omitting it, or sending `BOTH`, is rejected with error `114`."
ioc:
type: boolean
description: "Immediate-or-cancel — cancel the unmatched remainder instead of resting it."
client_order_id:
type: string
description: "Custom client order id, echoed on the response. Must be unique among active orders — a collision returns error `43`."
stp:
type: string
enum: ["no", "co", "cn", "cb"]
description: "Self-trade prevention mode: `no`=No Prevention, `co`=Cancel Oldest, `cn`=Cancel Newest, `cb`=Cancel Both. Defaults to `no` when omitted."
CollateralOrderBboPlaceResponse:
type: object
required:
- id
- result
- error
properties:
id:
type: integer
description: Request identifier matching the request
result:
type: object
description: "Accepted order. Returns an ordinary margin limit order reporting `type` `7` — no BBO marker is kept. The `price` field holds the resolved price."
error:
type: "null"
description: Error object (null on success)
Work with this as data
Every AsyncAPI spec here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for asyncapi
4 MCP tools reach this
find_asyncapisBrowse and filter every AsyncAPI spec in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/asyncapis/whitebit-private-collateral-order-bbo-place-asyncapi"
curl "https://apis.io/api/v1/asyncapis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.