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.
Access
- Surfaces:
ws - Metering:
ws_target_minute - Scope:
Connection setup · DEX · EVM family primary · Solana (Beta)
Handles
| Surface | Label | Value |
|---|---|---|
ws | WebSocket URL | wss://gw-aql.tomo.services/v1/market/ws |
ws | Auth header | Authorization: Bearer <api_key> |
ws | First action | subscribe |
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
| Field | Type | Required | Notes |
|---|---|---|---|
action | string | Required | Use `subscribe`. |
profile | string | Optional | Optional delivery profile. Omit it to use the current default `standard` profile. |
targets | array | Required | One or more market targets to stream. |
Target fields
| Field | Type | Required | Notes |
|---|---|---|---|
targets[].market_kind | string | Required | Use `dex` for the public WebSocket target shape. |
targets[].target_id | string | Required | Token or market target id. |
targets[].chain | string | Required | Target chain. Prefer the current EVM family such as `ethereum` or `base`; use `solana` only for the separate Beta lane. |
targets[].event_family | string | Required | Stream family such as `price` or `short_range_ohlcv`. |
targets[].base_asset | string | Optional | Base asset label shown in the payload. |
targets[].quote_asset | string | Optional | Quote asset label shown in the payload. |
targets[].interval | string | Optional | OHLCV interval such as `1m`. |
Response fields
Event envelope
| Field | Type | Notes |
|---|---|---|
event_type | string | Event type for the current frame. |
session_id | string | Server-issued stream id for the current connection. |
sequence | number | Monotonic event order for the session. |
target_id | string | Target id for the active stream. |
market_kind | string | Market family. Public WebSocket uses `dex`. |
chain | string | Target chain. |
source_id | string | Source label for the current event. |
source_publish_ts | string | Source publish timestamp. |
gateway_ingest_ts | string | Timestamp when the gateway received the event. |
gateway_send_ts | string | Timestamp when the gateway sent the event. |
freshness_ms | number | Elapsed time from source publish to gateway send. |
payload | object | Event-specific payload. |
Ready payload
| Field | Type | Notes |
|---|---|---|
payload.status | string | Readiness state. The first frame uses `ready`. |
payload.accepted_targets | string[] | Targets accepted into the session. |
Related pages
Last updated on