Messages
Trades
OnchainTrade
Real-time onchain DEX trade updates by pool address
WSS
Notes
- Streams real-time trade/swap updates for pools by network and pool address.
- Returns transaction type (buy/sell), tx hash, token amounts, volume, and price data.
- Lookup format:
network_id:pool_address(e.g.bsc:0x172fcd41e0913e95784454622d1c3724f546f849). - Find supported network IDs via Networks List.
- Use Top Pools by Token Address to find the most liquid pool address.
- Fields may return
nullwhen data is unavailable. Ensure your application handles null values.
Update Frequency:
As fast as ~0.1 seconds for actively traded pools.
As fast as ~0.1 seconds for actively traded pools.
Data Payload
| Key | Field | Type | Description | Example |
|---|---|---|---|---|
c | channel_type | string | Channel type subscribed to. | G2 |
n | network_id | string | Blockchain network identifier. | bsc |
pa | pool_address | string | Pool contract address. | 0x172fcd41e0913e95784454622d1c3724f546f849 |
tx | tx_hash | string | Transaction hash. | 0x743b271e...5adf698 |
ty | type | string | Trade type (b = buy, s = sell). | b |
to | token_amount | number | Base token amount. | 0.037 |
toq | quote_token_amount | number | Quote token amount. | 0.0000626 |
vo | volume_in_usd | number | Trade volume in USD. | 0.037 |
pc | price_in_native_currency | number | Token price in network native currency. | 0.0017 |
pu | price_in_usd | number | Token price in USD. | 0.999 |
t | last_updated_at | integer | UNIX timestamp in milliseconds. | 1780840929000 |
1. Establish Connection
2. Subscribe to OnchainTrade
Input:3. Stream Trade Data
Input:Output keys may appear in any order.
4. Unsubscribe
Unsubscribe from a specific pool:Messages

