Skip to main content
POST
Submits an order to an on-chain stock book. Orders on off-chain books go to Submit Off-Chain Order instead, and this endpoint refuses them with WRONG_SETTLEMENT_MODE.
On-chain execution is not currently available for stock books. Locking a balance in StockCustody needs a signature from the custody settlement operator, and Trusset holds no key to produce one, so this endpoint answers 409 ONCHAIN_SETTLEMENT_UNAVAILABLE for every stock book. The refusal happens before any lock row is written, so nothing is stranded.Move the book to off-chain settlement with Update Order Book and trade it there, or use External Securities Trading, where the trader’s own EIP-712 signature authorizes the movement and no operator key is needed.
The endpoint is documented here because the book-level checks in front of that refusal are real, and because the request shape is the one the venue will accept when an operator-signed lock path returns.

Idempotency

Accepts an optional Idempotency-Key header. A repeat with the same key and body replays the original response with Idempotent-Replay: true; the same key with a different body returns 409 IDEMPOTENCY_MISMATCH. See Idempotency.

Body Parameters

string
required
Target order book. Must be a book your instance owns or has imported.
string
required
Wallet placing the order.
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. Required for LIMIT, ignored for MARKET.
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 immediately and cancels the rest. FOK must fill entirely or is cancelled.
boolean
default:"false"
Reject the order rather than let it take. Checked against the whole eligible peer set, so a post-only order that would cross a pooled book is refused with POST_ONLY_WOULD_CROSS.
string
default:"NONE"
What happens when this order would match the same trading account. NONE allows it, CANCEL_TAKER drops the incoming order, CANCEL_MAKER drops the resting one, CANCEL_BOTH drops both. An unrecognised value falls back to NONE.
string
Optional signature over message, verified against userAddress. Up to 256 characters.
string
The signed payload. Only checked when signature is also present. Up to 512 characters.

Response Fields

This is the shape the endpoint returns once execution is available. It answers 201.
object

Error Codes

These are the refusals the endpoint can currently return. The checks that price, size and balance an order are behind the settlement refusal, so they are not reachable today. When execution returns, the order-level refusals will be those the other venues already raise: ORDER_TOO_SMALL, ORDER_TOO_LARGE, PRICE_REQUIRED, INVALID_QUANTITY, INVALID_PRICE, PRICE_OUTSIDE_BAND, INSUFFICIENT_CUSTODY_BALANCE, POST_ONLY_WOULD_CROSS, MM_CONFIG_VIOLATION, NO_LIQUIDITY, INVALID_SIGNATURE, PRICE_REF_STALE and PRICE_REF_UNAVAILABLE.