Skip to main content
POST
Creates an order book for one base token quoted in one settlement token (stablecoin). The book is created off-chain by default, which is the mode orders execute in. See Settlement modes. One instance may hold a single open book per pair. If an ACTIVE or PAUSED book already quotes this pair, the request returns ORDER_BOOK_EXISTS; a CLOSED book does not block a new one.

Body Parameters

string
required
Base token contract. Lower-cased before storage.
string
required
Settlement token contract. A well-known USDC address is normalised to your network’s USDC. Must differ from tokenAddress, otherwise INVALID_PAIR.
string
required
Display name, 1 to 64 characters.
string
required
Display symbol, 1 to 16 characters.
string
default:"OFF_CHAIN"
OFF_CHAIN or ON_CHAIN. ON_CHAIN requires custodyContract and a custody contract that already admits both tokens. OFF_CHAIN must not carry a custodyContract, and forces allowImport to false.
string
default:"LIGHT_TOKEN"
STOCK_TOKEN or LIGHT_TOKEN. Set STOCK_TOKEN for a Trusset stock token. The stock reads on this surface are filtered to STOCK_TOKEN, so a book left at the default will not appear in List Order Books.
string
StockCustody address for an on-chain book. Required when settlementMode is ON_CHAIN, refused otherwise.
string
Your Trusset stock token record ID, linking the book to an issuance. Up to 100 characters.
string
Declared ISIN, exactly 12 alphanumeric characters. Only checked on an on-chain STOCK_TOKEN book, where it must equal the ISIN the token reports on chain, otherwise ISIN_MISMATCH. The stored value always comes from the chain, never from this field.
string
default:"0"
Smallest accepted quantity, in order book units.
string
Largest accepted quantity, in order book units. Omit for no ceiling.
string
default:"1"
Price increment, in order book units.
integer
default:"0"
Maker fee in basis points, 0 to 1000.
integer
default:"0"
Taker fee in basis points, 0 to 1000.
integer
Fee applied in place of makerFeeBps when the resting side is a market maker account, −1000 to 1000. A negative value pays the market maker for providing liquidity.
boolean
default:"false"
Publish the book so other instances on the same network can import it. On-chain books only.
string
default:"CONTINUOUS"
CONTINUOUS, PERIODIC_AUCTION or HYBRID. See Trading modes.
integer
Auction batch length, 30 to 3600 seconds.
integer
Spread in basis points that flips a HYBRID book into auctions. 1 to 10000, and required above zero when tradingMode is HYBRID.
boolean
default:"true"
Whether orders left unfilled by an auction roll into the next batch instead of being cancelled.
boolean
default:"false"
Enforce a reference price band on incoming orders.
string
default:"MANUAL"
MANUAL, STOCK_FEED or EXTERNAL_FEED.
string
HTTPS endpoint for EXTERNAL_FEED, up to 2048 characters. Must resolve to a public host.
string
JSON object of request headers for the feed, as a string, up to 4096 characters. Host, Cookie and Authorization are dropped.
string
Dot-separated JSON path to the price in an EXTERNAL_FEED response, or the ticker symbol in STOCK_FEED mode. Up to 256 characters.
string
default:"EVERY_TRADE"
How often the reference is refreshed. One of EVERY_TRADE, 1MIN, 5MIN, 10MIN, 30MIN, 1HOUR, 6HOUR, 12HOUR, 1DAY.
integer
Half-width of the accepted band in basis points, 1 to 10000. Without it no band is enforced.
boolean
default:"false"
Refuse orders when the reference is stale, instead of serving the last known price.
integer
Seconds before a reference counts as stale, 60 to 604800. Defaults to three enforcement intervals, or 300 when enforcement is EVERY_TRADE.
integer
Reference move in basis points that pauses the book, 10 to 10000.
object
Hashes of the custody transactions you signed after a CUSTODY_SETUP_REQUIRED refusal, keyed by the step key. Unknown keys are rejected.

Custody setup

An on-chain book only exists once StockCustody admits both tokens and the stock token allow-lists the custody contract. Those calls are role-gated on chain, so this endpoint never signs them. It reads what is outstanding and refuses with 409 CUSTODY_SETUP_REQUIRED, writing no database row and returning the unsigned transactions in error.setup.steps. requiredSigner is read from the contract’s own admin(), so you always know which account must send each step; requiredRole names the role instead where no single address answers. Sign what you can, then repeat the same POST with those hashes in custodySetupTxs. Each hash is receipt-verified before the prerequisite is re-read from the chain, and the fresh read is the authority, so a step signed by a different wallet in another session still counts and re-posting is always safe.

Response Fields

Returns 201 with the created book.
object

Error Codes