Spot · Trading

Place a spot order (v200 — JSON result)

Changed on

Identical to the route above in what it does and what it accepts. The difference is the answer: this one always returns HTTP 200 carrying a result envelope, so a rejection arrives as succeeded: false with an error code rather than as a 400. Prefer it for new integrations — one response shape to parse instead of two.

post/api/v200/orders

Request

  • Base URL
    https://api.binibit.com
  • URL
    https://api.binibit.com/api/v200/orders
  • Auth
    none declared

Headers

Your API key, verbatim. Create one at https://azbit.com/dashboard/settings/api-settings.

Signature of THIS request — lower-case hex of HMAC-SHA256 over publicKey + fullUrl + body, keyed with your private key. It changes with every request, so it cannot be set once and reused. Full algorithm and code samples are at the top of this page.

Request body

sidestring nullable

"buy" or "sell"

currencyPairCodestring required

Currency pair for order

amountnumber double

Amount in base currency

pricenumber double

Price specifies how much of QuoteCurrency you want to exchange for 1 unit of BaseCurrency

clientOrderIdstring nullable

Optional client-assigned order id, up to 36 characters of [A-Za-z0-9._-]. Echoed back on this order everywhere it appears, filterable on /api/user/orders, and — the point of it — reserved for 48 hours for your account.

Resending the same id inside that window SUCCEEDS and answers with the id of the order that already exists; a second order is never created. That is the contract a retry after a lost response is built on: repeat the request unchanged and you get back the order you may or may not have placed. The order id is derived deterministically from (your user id, clientOrderId), which is what makes the retry land on the same order. A repeat amends nothing: the price and amount you resend are ignored and the original order comes back untouched, fills included. Use a fresh id for a new order.

postOnlyboolean

Maker-only. An order that would take liquidity on arrival is rejected instead of executed, so a quote can never cross the book. Ignored for market orders.

selfTradePreventioninteger

What to do when this order would trade against another order of the same account: 0 = match (default, unchanged behaviour), 1 = cancel this order, 2 = cancel the resting order, 3 = cancel both.

Example request

{
  "side": "buy",
  "currencyPairCode": "BTC_USDT",
  "amount": 0.001,
  "price": 45000,
  "clientOrderId": "mm1-BTC_USDT-0001"
}

Response

OK

succeededboolean
errorsstring[] nullable
logicErrorstring nullable
errorsStringstring nullable

Changes