Market Data V1
The current Polaris Market Data contract.
market_data.v1 is the current customer-facing market-data contract.
Stable market-data feed names:
swapsliquidity_bookquote_surfacedepth
Within V1, additive optional fields are allowed when existing clients can safely ignore them.
Breaking changes require a new major contract. Breaking changes include:
- removing a field;
- changing units;
- changing feed names;
- changing filter semantics in a way existing clients cannot safely ignore;
- changing enum meanings.
WebSocket JSON and gRPC protobuf share the same logical contract.
Trade Amounts
swaps uses one token quantity shape for both base and quote:
type TokenQuantity = {
mint: string;
symbol: string;
decimals: number;
amount: string; // raw smallest-unit integer, Solana RPC style
ui_amount: number; // normalized display amount
ui_amount_string: string; // exact normalized display amount
};The raw amount is encoded as a string for JavaScript safety. price is a
number in quote units per one base unit.
swaps is fully enriched or omitted. V1 does not expose decoder provenance,
metadata_status, or raw in_* / out_* fields.