Price Service
Off-chain market data — mark prices, symbol metadata, and health — from the chain’s configured price service. HyperEVM uses Enigma, the lowcap price source (config.getChainConfig().priceService.type === "enigma").
The service exposes two access modes, both wrapped by @symmio/trading-core:
- REST reads — one-shot batch fetches for prices, metadata, the symbol catalog, and health. Reach for these on review screens, one-off checks, and pre-trade preflight.
- WebSocket stream —
watchEnigmaPricespushes live tick batches. Use it when the UI needs continuously updating prices (order book, PnL, live trade panels). The endpoint is broadcast-only and one socket is pooled across every subscriber for the same chain.
Endpoint URLs live in the chain config:
const chain = config.getChainConfig();
chain.priceService.url; // REST base URL
chain.priceService.wsUrl; // WebSocket URL (used by watchEnigmaPrices)Each method and type has its own page with the full signature, parameters, return shape, examples, and query options.
Live prices
REST reads
Batch mark prices keyed by symbol address (max 50 per request).
getEnigmaPriceServicePricesByNamesBatch mark prices keyed by market name (max 50 per request).
getEnigmaPriceServiceMetadataRich per-market metadata keyed by symbol address — pair, tokens, USD/native price, liquidity.
getEnigmaPriceServiceSymbolsInfoThe full symbol catalog: every market’s name, status, and address.
getEnigmaPriceServiceHealthService liveness probe for status pages and smoke tests.
Types
A normalized live tick delivered by watchEnigmaPrices.
A single REST mark-price row, returned by the prices reads.
EnigmaMetadataA rich per-market metadata row, returned by the metadata read.
EnigmaSymbolInfoA symbol catalog row, returned by the symbols-info read.
Query options
Each REST read ships a matching …QueryOptions factory and a …QueryKey builder for TanStack Query. See each read’s page for the exact call, and Query options for the shared pattern. Prices tick constantly — cache them with a low staleTime or a refetchInterval, or prefer the WebSocket stream for anything live. watchEnigmaPrices is a subscription, not a query — it has no query options.
Errors
REST failures surface as SymmApiError; the stream surfaces transport/parse issues on onError.
FETCH_ENIGMA_PRICE_SERVICE_PRICES_BY_ADDRESSES_FAILED—getEnigmaPriceServicePricesByAddresses.FETCH_ENIGMA_PRICE_SERVICE_PRICES_BY_NAMES_FAILED—getEnigmaPriceServicePricesByNames.FETCH_ENIGMA_PRICE_SERVICE_METADATA_FAILED—getEnigmaPriceServiceMetadata.FETCH_ENIGMA_PRICE_SERVICE_SYMBOLS_INFO_FAILED—getEnigmaPriceServiceSymbolsInfo.FETCH_ENIGMA_PRICE_SERVICE_HEALTH_FAILED—getEnigmaPriceServiceHealth.PRICES_WS_NOT_CONFIGURED—watchEnigmaPrices, thrown synchronously when the chain has nopriceService.wsUrl.PRICES_SOCKET_ERROR—watchEnigmaPrices, surfaced ononErrorper parse/transport failure; the subscription stays open.
Related
- React price-service hooks —
useEnigmaPrices,useEnigmaPriceServiceMetadata, and the rest of the thin hooks over these actions. - WebSocket streams — pool, reconnect, and the
SocketStatuslifecycle. - Solvers — lowcap markets whose prices come from this feed, not an on-chain book.
- TP/SL — conditional orders that trigger off these prices.