Skip to Content
ServicesMarket WebSocket APIConnect

Connect

Open the hosted WebSocket endpoint, pass the bearer API key, and send the first subscribe frame.

Use one bearer-auth WebSocket connection for live market delivery. After the socket opens, send a subscribe frame with at least one supported target and wait for the ready event before reading live updates.

Back to Market WebSocket

Access

  • Surfaces: ws
  • Metering: ws_target_minute
  • Scope: Connection setup · DEX · EVM family primary · Solana (Beta)

Handles

SurfaceLabelValue
wsWebSocket URLwss://gw-aql.tomo.services/v1/market/ws
wsAuth headerAuthorization: Bearer <api_key>
wsFirst actionsubscribe

Availability

The current public target shape uses market_kind: dex. You can omit profile and rely on the default standard flow.

Connect example

wscat -c "wss://gw-aql.tomo.services/v1/market/ws" \ -H "Authorization: Bearer <api_key>"

First subscribe frame

{ "action": "subscribe", "targets": [ { "market_kind": "dex", "target_id": "0xC02aaA39b223FE8D0A0E5C4F27eAD9083C756Cc2", "chain": "ethereum", "event_family": "price", "base_asset": "WETH", "quote_asset": "USDT" } ] }

First ready event

{ "event_type": "SESSION_READY", "session_id": "sess_live_001", "sequence": 1, "target_id": "0xC02aaA39b223FE8D0A0E5C4F27eAD9083C756Cc2", "market_kind": "dex", "chain": "ethereum", "source_id": "mcp_session_runtime", "source_publish_ts": "2026-04-15T08:00:00Z", "gateway_ingest_ts": "2026-04-15T08:00:00.005Z", "gateway_send_ts": "2026-04-15T08:00:00.010Z", "freshness_ms": 10, "payload": { "status": "ready", "accepted_targets": [ "0xC02aaA39b223FE8D0A0E5C4F27eAD9083C756Cc2" ] } }

Request fields

Subscribe frame

FieldTypeRequiredNotes
actionstringRequiredUse `subscribe`.
profilestringOptionalOptional delivery profile. Omit it to use the current default `standard` profile.
targetsarrayRequiredOne or more market targets to stream.

Target fields

FieldTypeRequiredNotes
targets[].market_kindstringRequiredUse `dex` for the public WebSocket target shape.
targets[].target_idstringRequiredToken or market target id.
targets[].chainstringRequiredTarget chain. Prefer the current EVM family such as `ethereum` or `base`; use `solana` only for the separate Beta lane.
targets[].event_familystringRequiredStream family such as `price` or `short_range_ohlcv`.
targets[].base_assetstringOptionalBase asset label shown in the payload.
targets[].quote_assetstringOptionalQuote asset label shown in the payload.
targets[].intervalstringOptionalOHLCV interval such as `1m`.

Response fields

Event envelope

FieldTypeNotes
event_typestringEvent type for the current frame.
session_idstringServer-issued stream id for the current connection.
sequencenumberMonotonic event order for the session.
target_idstringTarget id for the active stream.
market_kindstringMarket family. Public WebSocket uses `dex`.
chainstringTarget chain.
source_idstringSource label for the current event.
source_publish_tsstringSource publish timestamp.
gateway_ingest_tsstringTimestamp when the gateway received the event.
gateway_send_tsstringTimestamp when the gateway sent the event.
freshness_msnumberElapsed time from source publish to gateway send.
payloadobjectEvent-specific payload.

Ready payload

FieldTypeNotes
payload.statusstringReadiness state. The first frame uses `ready`.
payload.accepted_targetsstring[]Targets accepted into the session.
Last updated on