Place an order

WebSocket message — Needs an API key that belongs to a user and has the write scope.

Fields and checks are those of REST's POST /api/trading/orders, plus the
matching engine's price collar. id is chosen by you (required, at most
64 bytes) and echoed on the reply, which is order_ack or error with the
same id. The id is not a duplicate check: the same command sent twice
places two orders.

order_ack means queued, like REST's 201. The order's user_order events
carry the same request_id. An order the engine refuses after the ack
(for example a post_only order that would cross) arrives as a
user_order event with status rejected, a reason and an empty
order_id, before or after the ack. Limits and refusals are under
Placing and cancelling orders in the overview.

Market orders. price is still required (above 0, within the pair's
price decimals), but it is not a limit: the order fills at the resting
orders' prices and any unfilled part is canceled. As on REST, the price
is used by the checks before the order is queued: a market buy needs
quantity × price of quote balance, so send a realistic price (for
example the best ask), not a placeholder like 1. There is no IOC or
other time-in-force setting; a limit order rests until filled, canceled
or its expires_at.

INTERNAL_ERROR with message Failed to create order request means the
order was not placed, except in the rare case of a database connection
failing at the moment of the save (as with a 500 from REST); if you need
to be certain, check your open orders.

{"type":"place_order","id":"c-1","symbol":"CC/USDCx","side":"buy","quantity":10,"price":0.15}
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required
Allowed:
string
required
length ≤ 64

Chosen by you, at most 64 bytes; echoed on the reply. Not stored, and not a duplicate check.

string
required

Trading pair, any case, e.g. CC/USDCx

string
enum
required
Allowed:
number
required

Base quantity, at most 10 decimals (fewer if the pair says so)

number
required

Limit price, at most the pair's price decimals

string
enum
Defaults to limit
Allowed:
string
enum
Allowed:
date-time

RFC 3339; must be in the future

Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json