Market Data Push
Overview
Market data push uses WebSocket V2 subscription endpoint, supporting real-time market data push of chain-denominated prices including router_quote and router_price.
Connection Information
Connection Endpoint: wss://{host}/ws/v2/stream
Description: WebSocket V2 subscription endpoint, supporting multiple data type subscriptions
Authentication: Institution credentials (API Key + Signature), passed via api_key, timestamp, and signature fields in each message. See WebSocket Authentication
Subscription Request
To subscribe to a router stream, send a JSON message in the following format:
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"method": "market",
"action": "subscribe",
"params": {
"type": "router_quote",
"chain_id": 97,
"tickers": ["AAPLs@usex"]
},
"api_key": "<your-api-key>",
"timestamp": "1703123456789",
"signature": "<computed-signature>"
}Note:
chain_idsits insideparams, so it is covered by the signature.
Parameter Description
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Request unique identifier, recommended to use UUID |
| method | string | Yes | Fixed value market |
| action | string | Yes | subscribe or unsubscribe |
| params | object | Yes | Subscription parameters |
| params.type | string | Yes | Data type: router_quote, router_price |
| params.chain_id | int | Yes | Blockchain network ID. The pushed price is denominated in this chain's settlement asset |
| params.tickers | array | Yes | List of tickers to subscribe |
| api_key | string | Yes | Institution API key |
| timestamp | string | Yes | Unix timestamp in milliseconds |
| signature | string | Yes | Request signature. Set as empty string placeholder during signature calculation |
See the Instant Swap API Overview for the chain IDs and stablecoin addresses currently supported.
Tickers Format
- Format:
symbol@market - Market: Market code. See
Marketenum type description - Example:
AAPLs@usex
Data Push
Router Quote Data Push
When subscribing to router_quote, you will receive orderbook data push in the following format:
{
"type": "router_quote",
"data": {
"symbol": "AAPLs",
"market": "usex",
"time": "2025-09-25 10:10:23.394",
"ask": [
{ "price": 714.98 }
],
"bid": [
{ "price": 706.42 }
]
}
}| Field | Type | Description |
|---|---|---|
| type | string | Fixed as "router_quote" |
| data | object | Orderbook data |
| data.symbol | string | Ticker code |
| data.market | string | Market code. See Market enum type description |
| data.time | string | Orderbook data time |
| data.ask | object[] | Ask list, sorted by price in ascending order. Each entry carries price only |
| data.ask[].price | decimal | Ask price, in the settlement asset of the given chain_id |
| data.bid | object[] | Bid list, sorted by price in descending order. Each entry carries price only |
| data.bid[].price | decimal | Bid price, in the settlement asset of the given chain_id |
Push Frequency: Real-time push.
Router Price Data Push
When subscribing to router_price, you will receive price data push in the following format:
{
"type": "router_price",
"data": {
"symbol": "AAPLs",
"time": "2025-05-30 15:58:17",
"session": "trading",
"price": 497.51
}
}| Field | Type | Description |
|---|---|---|
| type | string | Fixed as "router_price" |
| data | object | Router price data |
| data.symbol | string | Ticker code |
| data.time | string | Current market data time |
| data.session | string | Trading session (trading, pre_market, after_market, etc.) |
| data.price | decimal | Latest price, in the settlement asset of the given chain_id |
Push Frequency: Real-time push, immediately when quote changes.
Unsubscription
Router streams are unsubscribed with their own type:
{
"id": "550e8400-e29b-41d4-a716-446655440003",
"method": "market",
"action": "unsubscribe",
"params": {
"type": "router_price",
"chain_id": 97,
"tickers": ["AAPLs@usex"]
},
"api_key": "<your-api-key>",
"timestamp": "1703123456789",
"signature": "<computed-signature>"
}Note:
chain_idis required for router streams on both subscribe and unsubscribe.
The response format is the same as for the base streams — see Server Response.
Error Handling
In addition to the common WebSocket errors:
| Error Message | Cause | Solution |
|---|---|---|
chain_id is required for router_quote/router_price | Router stream request sent without chain_id | Include a valid chain_id in params |
For the shared error messages (Invalid JSON format, Invalid params, Invalid or missing authentication header(s), Subscription limit reached, etc.), see Error Handling.
Notes
- Multiple subscription messages can be sent on the same connection, each incrementally adding subscriptions.
- All subscriptions are automatically cleaned up when the connection drops.
- Tickers with invalid format or unrecognized market are silently skipped.