Skip to main content
POST
Creates an order book for one commodity token quoted in one settlement token (stablecoin). Settlement is always on-chain through CommodityCustody, and a custody contract is required. The book cannot be created until the custody contract admits both tokens. See Custody setup. 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
Commodity 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.
string
required
Display name, 1 to 64 characters.
string
required
Display symbol, 1 to 16 characters.
string
required
The commodity custody contract for your network. It must be the commodity flavour: the stock custody contract is refused with INVALID_CONFIG, since it cannot register commodity tokens. Any existing commodity book on your instance carries the right address in its custodyContract field.
string
default:"ON_CHAIN"
Only ON_CHAIN is accepted, and it is the default. There is no off-chain mode on this venue.
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.
boolean
default:"false"
Publish the book so other instances on the same network can import it.
boolean
default:"false"
Pool depth with other books in the same fungibility class. Setting this requires a usable reserve attestation for the token; without one the request is refused rather than silently creating an unpooled book. See Fungibility classes.
boolean
default:"false"
Enforce a reference price band on incoming orders.
string
default:"MANUAL"
MANUAL, STOCK_FEED or EXTERNAL_FEED.
string
HTTPS feed endpoint, up to 2048 characters. Must resolve to a public host.
string
Feed request headers as a JSON string, up to 4096 characters. Host, Cookie and Authorization are dropped.
string
JSON path to the price, or the ticker symbol in STOCK_FEED mode. Up to 256 characters.
string
default:"EVERY_TRADE"
Refresh interval, from EVERY_TRADE to 1DAY.
integer
Band half-width in basis points, 1 to 10000. Without it no band is enforced.
boolean
default:"false"
Refuse orders when the reference is stale.
integer
Staleness window in seconds, 60 to 604800.
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. Unknown keys are rejected.

Response Fields

Returns 201 with the created book.
object

Error Codes