> ## Documentation Index
> Fetch the complete documentation index at: https://sonar-cf3aeac7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# market-details channel

> Receive every trade in up to 100 pools, each with the pool's market data and reserves at that trade.

`market-details` follows a list of pools. For every trade in any of them, it sends the trade together with the pool's market data, re-priced at that trade. Use it for pair pages and pool dashboards.

**Weight:** the number of distinct pools in `pools`. See [Subscription weight](https://sonar-cf3aeac7.mintlify.site/websocket/limits-and-errors.md#subscription-weight).

## Parameters

| Param | Type | Required | Description |
| - | - | - | - |
| `chain` | string | Yes | Chain in `evm:<chainId>` form, for example `"evm:1"`. |
| `pools` | string\[] | Yes | 1 to 100 pool addresses (`0x` plus 40 hex characters) or 32-byte pool ids (`0x` plus 64 hex characters, used by Uniswap V4-style pools). Duplicates are removed after the 100-item check. |
| `maxUpdatesPerMinute` | integer | No | 1 to 600. Samples the subscription: at most this many events per minute **per pool**, no cursors, no resume. See [Sampling](https://sonar-cf3aeac7.mintlify.site/websocket/messages.md#sampling-with-maxupdatesperminute). |

There is no `excludeNoise` and no `token` parameter on this channel.

> [!NOTE]
>
> `pools` must contain pool addresses. Unlike REST [`GET /market/details`](https://sonar-cf3aeac7.mintlify.site/api-reference/market/get-market-details), a token address is not resolved to its best pool. The channel does not check that the pools exist: an address that is not a pool subscribes successfully and never sends events. To find a token's pools, use [`GET /token/markets`](https://sonar-cf3aeac7.mintlify.site/api-reference/token/get-token-markets).

## Which trades you receive

* Every trade in each listed pool. The quote-token rule does not apply.
* Each trade is oriented to the pool's **base token**: `data.token` is the base and `data.tokenVs` is the quote, matching `pairData.baseToken` and `pairData.quoteToken`.

## Event data

`data` is a trade event with one extra field, `pairData`.

**token** `string`

Address of the token the trade is viewed from, lowercase. All `token*` fields describe this token and all `*Vs` fields describe the other side.

**tokenVs** `string`

Address of the other token in the pair, lowercase.

**pair** `string`

Pool address or 32-byte pool id, lowercase.

**poolType** `string | null`

Pool type id, for example `uniswap-v3`.

**date** `number`

Trade time in Unix epoch milliseconds (block time).

**timestamp** `number`

Same value as `date`.

**blockNumber** `number`

Block number of the trade.

**tokenPrice** `number`

USD price of `token` at the time of the trade.

**tokenPriceVs** `number`

USD price of `tokenVs` at the time of the trade.

**tokenAmount** `number`

Amount of `token` traded, adjusted for decimals. Always positive.

**tokenAmountVs** `number`

Amount of `tokenVs` traded, adjusted for decimals. Always positive.

**tokenAmountRaw** `string`

Amount of `token` as a raw integer string in base units. Always positive.

**tokenAmountRawVs** `string`

Amount of `tokenVs` as a raw integer string in base units. Always positive.

**tokenAmountUsd** `number`

USD value of the trade.

**tokenNativePrice** `number`

Price of `token` in the chain's native coin (for example ETH): `tokenPrice` divided by the native coin's USD price at the time of the trade. `0` when the native price is unknown.

**type** `"buy" | "sell"`

Direction from the point of view of `token`. `buy`: `token` left the pool (the trader received `token`). `sell`: `token` entered the pool (the trader gave up `token`).

**operation** `"regular"`

Always `regular`.

**blockchain** `string`

Chain display **name**, for example `Ethereum` or `Base`. This is not a chain id.

**hash** `string`

Transaction hash.

**sender** `string`

Address that initiated the transaction (the trader's wallet), lowercase.

**gasFeesUSD** `number | null`

Gas fee for this trade in USD: the transaction's gas cost, split evenly across the swaps in that transaction. `null` when unknown.

**pairData** `object | null`

The pool's market data, in the same shape as the REST [`GET /market/details`](https://sonar-cf3aeac7.mintlify.site/api-reference/market/get-market-details) response. `null` when it could not be loaded in time (see below).

**pairData fields**

**address** `string`

Pool address (20 bytes) or 32-byte pool id, lowercase.

**chainId** `string`

Chain in `evm:<id>` form, for example `evm:1`.

**blockchain** `string | null`

Chain display name, for example `Ethereum` or `Base`. `null` if the chain has no configuration.

**type** `string`

Pool type id, for example `uniswap-v2`, `uniswap-v3`, `uniswap-v4`, `pancakeswap-infinity-cl`, `clanker-v4` or `fourmeme`. See [Protocols and launchpads](https://sonar-cf3aeac7.mintlify.site/concepts/protocols-and-launchpads.md) and [`GET /protocols`](https://sonar-cf3aeac7.mintlify.site/api-reference/protocols/get-protocols) for the list per chain.

**exchange** `object | null`

Exchange that runs the pool. `null` when it can't be identified.

**properties**

**name** `string`

Exchange display name, for example `Uniswap`.

**logo** `string | null`

Logo URL. `null` when no logo is known.

**factory** `string | null`

Factory contract that created the pool.

**sourceFactory** `string | null`

Originating factory, for example a launchpad factory, when it differs from the DEX factory.

**poolFeePercentage** `number | null`

Swap fee as a **fraction**, not a percentage: `0.003` means a 0.3% fee and `0.0005` means 0.05%. `null` when the fee is unknown.

**deployer** `string | null`

Address that deployed the pool.

**createdAt** `string | null`

Pool creation time, ISO 8601 (UTC).

**bonded** `boolean`

`true` once a launchpad token has completed its bonding curve. `false` for ordinary pools.

**bondingPercentage** `number | null`

Bonding-curve progress on a 0 to 100 scale.

**bondingCurveAddress** `string | null`

Address of the pre-bonding curve pool, for launchpad tokens that graduated to this pool.

**baseToken** `string`

Address of the base token. Prices in this object are prices of the base token.

**quoteToken** `string`

Address of the quote token (the other token in the pool).

**tokenSymbol** `string | null`

Base token symbol.

**tokenName** `string | null`

Base token name.

**priceUSD** `number`

USD price of the base token as implied by this pool. Same value as `base.priceUSD`, or `0` when `base` is `null`.

**priceToken** `number`

Price of one base token in quote-token units. Same value as `base.priceToken`, or `0` when `base` is `null`.

**priceTokenString** `string | null`

Exact pool price of the base token in quote-token units, as a decimal string with **32 fractional digits** (for example `"3512.07000000000000000000000000000000"`). It is computed from the pool's on-chain price and both tokens' decimals. Use it when float precision matters. `null` when it can't be computed, for example when either token's details are unknown.

**liquidityUSD** `number`

Pool liquidity in USD. `0` when the pool has no stats yet.

**marketCapUSD** `number`

Market cap from the pool's stats. `0` when the pool has no stats.

**marketCapDilutedUSD** `number`

Fully diluted market cap from the pool's stats. `0` when the pool has no stats.

**latestTradeDate** `string | null`

Time of the pool's latest trade, ISO 8601 (UTC).

**priceChange\{W}Percentage** `number`

Price change of the pool's base token over window `W`, in percent (`2.5` means +2.5%). `W` is one of `1min`, `5min`, `1h`, `4h`, `6h`, `12h`, `24h`. There is no `15min` price change. `0` when there is no earlier price.

**volume\{W}USD, volumeBuy\{W}USD, volumeSell\{W}USD** `number`

Total, buy and sell volume in USD over window `W`. `W` is one of `1min`, `5min`, `15min`, `1h`, `4h`, `6h`, `12h`, `24h`.

**trades\{W}, buys\{W}, sells\{W}** `number`

Number of trades, buys and sells over window `W`.

**buyers\{W}, sellers\{W}, traders\{W}** `number`

Number of distinct buying, selling and trading wallets over window `W`.

**feesPaid\{W}USD** `number`

Gas fees paid by traders for the pool's trades over window `W`, in USD.

**description** `string | null`

Base token description.

**socials** `object | null`

Base token social links.

**properties**

**twitter** `string | null`

**website** `string | null`

**telegram** `string | null`

**dexscreenerListed** `boolean`

Whether the base token is listed on DEX Screener.

**extraData** `object | null`

Pool-type-specific state, such as `sqrtPriceX96` or `tickSpacing` for concentrated-liquidity pools. Large integers are sent as strings. The keys depend on the pool type and may change, so treat this object as opaque and don't rely on specific keys. `null` when there is nothing to report.

**base** `MarketTokenOutput | null`

Details of the base token. `null` if the token's details are not stored.

**MarketTokenOutput**

**address** `string`

Token address, lowercase.

**chainId** `string`

Chain in `evm:<id>` form.

**name** `string`

**symbol** `string`

**decimals** `number`

**logo** `string | null`

Logo URL.

**assetId** `number | null`

Id of the cross-chain asset this token belongs to. Pass it to [`GET /asset/ohlcv`](https://sonar-cf3aeac7.mintlify.site/api-reference/asset/get-asset-ohlcv) and [`GET /asset/history`](https://sonar-cf3aeac7.mintlify.site/api-reference/asset/get-asset-history).

**deployer** `string | null`

Address that deployed the token.

**source** `string | null`

Launchpad id when the token was launched on a known launchpad, otherwise `null`.

**sourceMetadata** `object | null`

Launchpad display data: `name` (string) and `logo` (string or `null`).

**priceUSD** `number`

USD price. For the base token: `1` if it is a known stablecoin; otherwise the pool price times the quote token's USD price when both are known; otherwise the token's global USD price. For the quote token: its global USD price.

**priceToken** `number`

Price of one unit of this token in units of the other token in the pool. Falls back to the ratio of the two USD prices when the pool price is unavailable, and to `0` when neither is known.

**totalSupply** `string | null`

Total supply as a raw integer string in base units. Divide by `10^decimals` for a display value.

**circulatingSupply** `string | null`

Circulating supply as a raw integer string in base units.

**marketCapUSD** `number`

Token-level market cap. `0` when unknown.

**marketCapDilutedUSD** `number`

Token-level fully diluted market cap. `0` when unknown.

**liquidityUSD** `number`

Token-level liquidity in USD, summed over the token's top pools and counting only the weaker side of each pool. `0` when unknown.

**liquidityMaxUSD** `number`

Like `liquidityUSD`, but counting the full liquidity (both sides) of each of those pools. `0` when unknown.

**approximateReserveToken** `number`

This token's reserve in the pool, adjusted for decimals.

**approximateReserveTokenRaw** `string`

This token's reserve in the pool as a raw integer string in base units.

**approximateReserveUSD** `number`

`approximateReserveToken × priceUSD`.

**quote** `MarketTokenOutput | null`

Details of the quote token, with the same fields as `base`. Here `priceUSD` is the quote token's global USD price and `priceToken` is the price of one quote token in base-token units. `null` if the token's details are not stored.

### How pairData is built

* Market data is built once per block for each pool and reused for every trade in that block. Reserves (`base.approximateReserveToken`, `quote.approximateReserveToken` and their raw values) are as of the end of the block. Windowed stats such as volume and trade counts come from the regularly refreshed pool stats, so they lag slightly behind the live trade.
* Each event re-prices the block's data at the trade:

  | Field | Value |
  | - | - |
  | `priceUSD` | The trade's `tokenPrice` (base token USD price) |
  | `priceToken` | `tokenPrice / tokenPriceVs`, the base price in quote units. Kept from the stored data when `tokenPriceVs` is 0. |
  | `marketCapUSD`, `marketCapDilutedUSD` | Taken from the re-priced `base` token |
  | `latestTradeDate` | The trade's date, as an ISO 8601 string |
  | `base.priceUSD`, `quote.priceUSD` | The trade's `tokenPrice` and `tokenPriceVs` |
  | `base.priceToken`, `quote.priceToken` | `priceToken` and its inverse |
  | `base.approximateReserveUSD`, `quote.approximateReserveUSD` | Reserve amount × the new USD price |
  | `base` / `quote` market caps | Recomputed at the new price: circulating supply (or total supply) × price, set to `0` when implausible for the token's liquidity |

  Other fields, including `priceTokenString`, `liquidityUSD` and the windowed stats, are as built for the block.
* `pairData` is `null` when the pool is not found, the lookup fails, or it takes longer than **2 seconds**. The trade fields are still sent.
* `base` and `quote` can each be `null` when that token's details are not stored.
* Date fields such as `createdAt` and `latestTradeDate` are ISO 8601 strings.

## Example

```json theme={null}
-> {"op":"subscribe","id":"pools","channel":"market-details","params":{"chain":"evm:1","pools":["0x2222222222222222222222222222222222222222"]}}
<- {"type":"subscribed","id":"pools","channel":"market-details","cursor":"23948120-0"}
<- {"type":"event","id":"pools","channel":"market-details","cursor":"23948121-0:7","data":{"token":"0x1111111111111111111111111111111111111111","tokenVs":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","pair":"0x2222222222222222222222222222222222222222","poolType":"uniswap-v2","date":1796292011000,"blockNumber":23948121,"tokenPrice":0.0102,"tokenPriceVs":3412.57,"tokenAmount":250000,"tokenAmountVs":0.747238,"tokenAmountUsd":2550,"tokenNativePrice":0.00000298895,"type":"sell","operation":"regular","blockchain":"Ethereum","hash":"0x4b8e2d7c1a9f3e6b0c5d8a2f7e1b4c9d3a6f0e8b2c5d7a1e4f9b3c6d8a0e2f4b","sender":"0x3333333333333333333333333333333333333333","tokenAmountRaw":"250000000000000000000000","tokenAmountRawVs":"747238000000000000","gasFeesUSD":1.84,"timestamp":1796292011000,"pairData":{"address":"0x2222222222222222222222222222222222222222","chainId":"evm:1","blockchain":"Ethereum","type":"uniswap-v2","exchange":{"name":"Uniswap","logo":null},"factory":"0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f","sourceFactory":null,"poolFeePercentage":0.003,"deployer":null,"createdAt":"2026-10-12T08:31:47.000Z","bonded":false,"bondingPercentage":null,"bondingCurveAddress":null,"baseToken":"0x1111111111111111111111111111111111111111","quoteToken":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","tokenSymbol":"MEME","tokenName":"Example Meme","priceUSD":0.0102,"priceToken":0.00000298895,"priceTokenString":"0.00000298871000000000000000000000","liquidityUSD":250000,"marketCapUSD":10200000,"marketCapDilutedUSD":10200000,"latestTradeDate":"2026-12-03T10:00:11.000Z","priceChange24hPercentage":4.2,"volume24hUSD":1200000,"...":"other window stats","description":null,"socials":{"twitter":null,"website":null,"telegram":null},"dexscreenerListed":false,"extraData":null,"base":{"address":"0x1111111111111111111111111111111111111111","chainId":"evm:1","name":"Example Meme","symbol":"MEME","decimals":18,"logo":null,"assetId":null,"deployer":null,"source":null,"sourceMetadata":null,"priceUSD":0.0102,"priceToken":0.00000298895,"totalSupply":"1000000000000000000000000000","circulatingSupply":null,"marketCapUSD":10200000,"marketCapDilutedUSD":10200000,"liquidityUSD":250000,"liquidityMaxUSD":250000,"approximateReserveToken":12254901.96,"approximateReserveTokenRaw":"12254901960000000000000000","approximateReserveUSD":125000},"quote":{"address":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","chainId":"evm:1","name":"Wrapped Ether","symbol":"WETH","decimals":18,"logo":null,"assetId":null,"deployer":null,"source":null,"sourceMetadata":null,"priceUSD":3412.57,"priceToken":334565.65,"totalSupply":"2900000000000000000000000","circulatingSupply":null,"marketCapUSD":0,"marketCapDilutedUSD":9896453000,"liquidityUSD":0,"liquidityMaxUSD":0,"approximateReserveToken":36.63,"approximateReserveTokenRaw":"36630000000000000000","approximateReserveUSD":125002.44}}}}
```

```javascript Browser theme={null}
const ws = new WebSocket("wss://api.example.com/v1/ws");

ws.onopen = () => ws.send(JSON.stringify({
  op: "subscribe",
  id: "pools",
  channel: "market-details",
  params: {
    chain: "evm:1",
    pools: ["0x2222222222222222222222222222222222222222"],
  },
}));

ws.onmessage = (frame) => {
  const msg = JSON.parse(frame.data);
  if (msg.type !== "event") return;
  const { pair, tokenPrice, pairData } = msg.data;
  console.log(pair, tokenPrice, pairData?.liquidityUSD, pairData?.base?.approximateReserveUSD);
};
```

```python Python (websockets) theme={null}
import asyncio
import json

import websockets

async def main():
    async with websockets.connect("wss://api.example.com/v1/ws") as ws:
        await ws.send(json.dumps({
            "op": "subscribe",
            "id": "pools",
            "channel": "market-details",
            "params": {
                "chain": "evm:1",
                "pools": ["0x2222222222222222222222222222222222222222"],
            },
        }))
        async for raw in ws:
            msg = json.loads(raw)
            if msg["type"] == "event":
                d = msg["data"]
                pair = d["pairData"] or {}
                print(d["pair"], d["tokenPrice"], pair.get("liquidityUSD"))

asyncio.run(main())
```

## Related

* [`GET /market/details`](https://sonar-cf3aeac7.mintlify.site/api-reference/market/get-market-details) and [batch market details](https://sonar-cf3aeac7.mintlify.site/api-reference/market/batch-market-details.md) for the initial snapshot
* [`GET /token/markets`](https://sonar-cf3aeac7.mintlify.site/api-reference/token/get-token-markets) to find a token's pools
* [token-details channel](https://sonar-cf3aeac7.mintlify.site/websocket/channels/token-details.md) to follow tokens instead of pools


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.