Skip to Content
Symmio Trading-SDK — the SDK surface for builders on Arbitrum
CoreOrderbookOrderbookSource

OrderbookSource

The SDK’s depth boundary, and the counterpart of CandleSource. Every consumer of a book needs the same three things — symbol metadata, a snapshot, and a live subscription — so that is what a source provides.

import type { OrderbookSource } from "@symmio/trading-core";

Hooks and the aggregation helpers are written against this interface, never against a specific venue. Implement it and everything downstream works unchanged.

Unlike most SDK actions, a source is not derived from Config. A reference exchange is not a SYMMIO chain deployment, and which venue’s depth to show is your choice. Construct one and pass it in explicitly.

Fields

idstring

Stable identifier, used to scope query keys (e.g. "binance:usd-m-futures"). Two sources must never share one.

priceBasisOrderbookPriceBasis

What the prices represent: "reference-exchange", "dex-pool", or "solver-mark". Surfaced deliberately — a third-party venue’s depth is not what a SYMMIO trade executes against.

supportedLimitsreadonly number[]

Depths the venue accepts for a snapshot, ascending. A venue taking a free-form limit reports its maximum as the single largest entry; one taking an enum reports every allowed value.

defaultLimitnumber

Depth used when a caller does not pass limit.

Methods

getSymbol(marketName: string) => Promise<OrderbookSymbol | undefined>

Resolve symbol metadata, or undefined when the source does not carry this market. This is the source’s own answer to “do you have this market”, and the check to run before rendering.

getOrderbook(parameters: GetOrderbookParameters) => Promise<Orderbook>

Fetch a point-in-time snapshot. See getOrderbook.

watchOrderbook(parameters: WatchOrderbookParameters) => Unwatchoptional

Subscribe to a continuously synchronized book. Absent when the source has no realtime feed, in which case a consumer polls getOrderbook. See watchOrderbook.

OrderbookSymbol

What getSymbol resolves — everything a ladder needs before it can render.

marketNamestring

Market name as SYMMIO names it.

sourceSymbolstring

The same instrument in the source’s own namespace.

baseAssetstring

Base asset (e.g. "BTC"), for a size column header.

quoteAssetstring

Quote asset (e.g. "USDT"), for a price column header.

pricePrecisionnumber

Decimal places prices should be rendered at.

sizePrecisionnumber

Decimal places sizes should be rendered at.

tickSizenumber

Smallest price increment the venue allows — the finest grouping a ladder can offer, and the base of the ladder suggestOrderbookTickSizes builds.

Last updated on