Skip to main content
POST
Submits an order on behalf of one of your customers. This is the working order path for stock trading. The order matches in the same engine as every other venue, but the transfer behind a fill moves ledger entries rather than tokens, so nothing needs to be signed. Orders are keyed by customerRef, not by wallet. The customer needs no address, no key and no on-chain identity; they need a balance in your instance’s custody ledger for the token being sold or the token being spent. The book must belong to your instance and must settle off chain, otherwise the request is refused with WRONG_SETTLEMENT_MODE.

Authentication

Authenticates with an instance API key. Does not require the Trading service entitlement.

How the balance is committed

Before the order is created, the amount it could consume is locked in the ledger: the base quantity for a sell, the quote notional for a buy. A market buy locks against the submitted price of zero, so market buys are only meaningful when the book has depth to price against. If the order does not rest, whether it filled, was killed or was cancelled, the unconsumed remainder is unlocked immediately. If anything fails while the order is being created, the whole lock is released and the in-memory book is reloaded from the database, so a failure never leaves a customer’s balance stranded. Fills settle in the background: each trade unlocks and moves both legs between the two customer references. A settlement failure is recorded on the trade rather than reversing the match.

Body Parameters

string
required
Target book. Must be yours and settle off chain.
string
required
Your reference for the customer placing the order, 1 to 256 characters. This is the key the ledger balance is held under, and the key you use to read the customer’s orders and trades back.
string
required
BUY or SELL.
string
required
LIMIT or MARKET. A LIMIT order requires price.
string
Limit price in order book units, as a digit-only string.
string
required
Base quantity in order book units, as a digit-only string. Must sit between the book’s minOrderSize and maxOrderSize.
string
default:"GTC"
GTC rests until filled or cancelled. IOC fills what it can and cancels the rest. FOK must fill entirely.

Response Fields

Returns 201.
object
Both tokens on the pair must be registered in your instance’s custody ledger. An unregistered token is refused with TOKEN_NOT_REGISTERED before any balance is touched.

Error Codes