Skip to main content
A trading application needs both submission and observation. The contract SDK and Relay handle actions; the data services provide market lists, books, histories, balances, and order updates.

Choose the source

Follow Reading Market Data and Following Account Activity for the sequence and recovery rules.

SDK compatibility

See Installation for decoder support and Exchange WebSocket for binary frame layouts. REST can be consumed with your application’s HTTP client. Preserve integer strings and use bigint for arithmetic rather than binary floating point.

Convert at the display boundary

Divide order prices by market pricePrecision, order quantities by sizePrecision, and token balances by the token’s decimal scale. Some summary fields use x18 units; follow each endpoint’s field description. These domains are not interchangeable. For WETH/USDC in the documented deployment, price 25000000 at precision 10000 is 2,500 USDC/WETH; quantity 1000000000 at size precision 10000000000 is 0.1 WETH; USDC balance 250000000 at six decimals is 250 USDC. Read current metadata rather than hardcoding these scales. The balances API’s total is available plus order-reserved balance. Passive inventory must be added from position data when displaying a portfolio-wide total.