Skip to main content
POST
/
orderbooks
/
stocks
/
api
/
offchain
/
order-books
{
  "tokenAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "quoteTokenAddress": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
  "name": "ACME Corp / EURC (OTC)",
  "symbol": "ACME/EURC",
  "minOrderSize": "1000000000000000000",
  "makerFeeBps": 5,
  "takerFeeBps": 15,
  "tokenType": "STOCK_TOKEN",
  "stockTokenId": "acme-corp-001"
}
{
  "success": true,
  "data": {
    "id": "ob_offchain_001",
    "tokenAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "quoteTokenAddress": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "name": "ACME Corp / EURC (OTC)",
    "symbol": "ACME/EURC",
    "status": "ACTIVE",
    "settlementMode": "OFF_CHAIN",
    "makerFeeBps": 5,
    "takerFeeBps": 15
  },
  "metadata": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2025-01-15T10:30:00.000Z",
    "instanceId": "inst_abc"
  }
}
Creates an order book that uses off-chain settlement. Off-chain books are designed for custodial models where the institution manages token transfers outside the protocol’s on-chain settlement layer. Off-chain order books do not support custody contracts or cross-instance imports. Users are identified by a customerRef string rather than an EVM wallet address.

Authentication

Requires an instance API key with the trading service enabled.

Request Body

tokenAddress
string
required
EVM address of the base token. Must match 0x[a-fA-F0-9]{40}.
quoteTokenAddress
string
required
EVM address of the quote token. Must match 0x[a-fA-F0-9]{40}.
name
string
required
Display name of the order book. 1-64 characters.
symbol
string
required
Short symbol for the trading pair. 1-16 characters.
minOrderSize
string
Minimum order size in base units (wei). Numeric string.
maxOrderSize
string
Maximum order size in base units (wei). Numeric string.
tickSize
string
Minimum price increment in quote token base units. Numeric string.
makerFeeBps
integer
Fee charged to makers in basis points. 0-1000.
takerFeeBps
integer
Fee charged to takers in basis points. 0-1000.
tokenType
string
Type of the base token. One of LIGHT_TOKEN or STOCK_TOKEN.
stockTokenId
string
Reference ID for stock tokens. Max 100 characters.
{
  "tokenAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "quoteTokenAddress": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
  "name": "ACME Corp / EURC (OTC)",
  "symbol": "ACME/EURC",
  "minOrderSize": "1000000000000000000",
  "makerFeeBps": 5,
  "takerFeeBps": 15,
  "tokenType": "STOCK_TOKEN",
  "stockTokenId": "acme-corp-001"
}
{
  "success": true,
  "data": {
    "id": "ob_offchain_001",
    "tokenAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "quoteTokenAddress": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "name": "ACME Corp / EURC (OTC)",
    "symbol": "ACME/EURC",
    "status": "ACTIVE",
    "settlementMode": "OFF_CHAIN",
    "makerFeeBps": 5,
    "takerFeeBps": 15
  },
  "metadata": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2025-01-15T10:30:00.000Z",
    "instanceId": "inst_abc"
  }
}

Error Codes

CodeStatusDescription
ORDER_BOOK_EXISTS409An order book for this token pair already exists
INVALID_CONFIG400Invalid order book configuration
INVALID_PAIR400Invalid token pair
TOKEN_NOT_REGISTERED400One or both tokens are not registered
VALIDATION_ERROR400Request body failed schema validation