This is the full developer documentation for Chainmetric API # Chainmetric API > Token, wallet and launch data on Ethereum, BNB Chain, Base and Solana, over HTTP and server-sent events. The Chainmetric API answers questions about tokens, wallets and new launches on Ethereum, BNB Chain, Base and Solana. The base URL is `https://api.chainmetric.io`. Every request except the health check and logos needs a key. Get a key at [dashboard.chainmetric.com](https://dashboard.chainmetric.com). ## Start here [Section titled “Start here”](#start-here) * [For AI agents](/agents/): the whole API on one page. * [Authentication](/authentication/): how to send the key. * [Chains and addresses](/chains-and-addresses/): chain ids, address formats and units. * [Errors and retries](/errors/): the error shape and what to do with each status. * [Streams](/streams/): live updates and how to resume them. * [API reference](/api/): every route, built from the OpenAPI spec. * [Mobula-compatible endpoints](/mobula-compatible/): routes for clients that already speak the Mobula API. ## Machine-readable [Section titled “Machine-readable”](#machine-readable) * [/openapi.json](/openapi.json) and [/openapi.yaml](/openapi.yaml): the OpenAPI 3.1 spec. * [/llms.txt](/llms.txt): an index of these docs for language models, with [/llms-full.txt](/llms-full.txt) and [/llms-small.txt](/llms-small.txt). * Every page is also served as Markdown: add `.md` to its path, for example [/agents.md](/agents.md). # For AI agents > Everything an agent needs to call the Chainmetric API, on one page. ## Basics [Section titled “Basics”](#basics) * Base URL: `https://api.chainmetric.io`. * Auth: send `Authorization: `, the bare key. * `Authorization: Bearer ` is refused with `403` at the edge. Do not add `Bearer`. * Chain ids: Ethereum `1`, BNB Chain `56`, Base `8453`, Solana `1399811149`. * EVM addresses: 40 hex characters, lowercase, no `0x`. Solana addresses: base58, case-sensitive. * Every answer is JSON in one envelope; the document is in `data`. * A value that cannot be computed exactly is `null`, never `0`. * The full spec is at [/openapi.json](/openapi.json). Every page is also Markdown at `.md`. ## From question to route [Section titled “From question to route”](#from-question-to-route) | Question | Route | | --------------------------------------------- | ------------------------------------------------------- | | Price, market cap, volume, holders of a token | `GET /v2/token/{chain_id}/{address}/stats` | | Recent buys and sells of a token | `GET /v2/token/{chain_id}/{address}/trades` | | Price history or a chart | `GET /v2/token/{chain_id}/{address}/ohlcv?interval=1h` | | Liquidity added or removed | `GET /v2/token/{chain_id}/{address}/liquidity` | | Top holders of a token | `GET /v2/token/{chain_id}/{address}/positions` | | Who funded a wallet | `GET /v2/wallet/{chain_id}/{address}/funding?hops=root` | | What a wallet holds of one token | `GET /v2/wallet/{chain_id}/{wallet}/position/{token}` | | What launched just now | `GET /v2/pilot/trenches/{chain_id}?view=launches` | | Live trades, resumable | `GET /v2/stream/token/{chain_id}/{address}/replay` | Trades, liquidity and holders answer on EVM chains; Solana support for them is in progress. ## Errors and retries [Section titled “Errors and retries”](#errors-and-retries) * Every error is `{"error": "...", "message": "...", "statusCode": 400}`. * `400`: the request is wrong. Fix it; do not retry unchanged. * `401`: the key is missing, unknown or revoked. `404`: unknown chain, token or resource. * `429`: the key’s rate limit is reached. Back off exponentially and retry. * `503`: busy or catching up. Wait `Retry-After` seconds when sent, then retry. * `500`, `502`, `504`: retry with exponential backoff, at most a few times. ## Streams [Section titled “Streams”](#streams) * `/v2/stream/...` routes are server-sent events: `event:` and `data:` lines, one JSON envelope per event. * Resumable streams send `id:` lines. Reconnect with header `Last-Event-ID: ` to resume. * The trades and liquidity replay streams also start from history with `from_block` or `from_seq`. * A `: keepalive` comment arrives every 20 seconds. ## Three calls [Section titled “Three calls”](#three-calls) ```sh curl -s -H "Authorization: $CHAINMETRIC_KEY" https://api.chainmetric.io/v2/token/1/c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/stats curl -s -H "Authorization: $CHAINMETRIC_KEY" "https://api.chainmetric.io/v2/token/1/c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/trades?limit=3" curl -s -H "Authorization: $CHAINMETRIC_KEY" "https://api.chainmetric.io/v2/pilot/trenches/1399811149?view=curves&limit=3" ``` # Authentication > Send the bare key in the Authorization header; Bearer is refused. Every request needs a key, except `GET /healthz` and `GET /v2/logo/...`. Get a key at [dashboard.chainmetric.com](https://dashboard.chainmetric.com). ## Send the key [Section titled “Send the key”](#send-the-key) Send the key bare in the `Authorization` header: ```sh curl -s -H "Authorization: $CHAINMETRIC_KEY" https://api.chainmetric.io/v2/token/1/c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/stats ``` Do not prefix it with `Bearer`. `Authorization: Bearer ` is refused with `403` at the edge. ## Key errors [Section titled “Key errors”](#key-errors) | Status | `error` | Meaning | | ------ | ---------------------------- | ------------------------------------------------------------------------------ | | `401` | `api key missing` | No `Authorization` header was sent. | | `401` | `api key unknown` | The key does not exist. | | `401` | `api key revoked` | The key was revoked. Get a new one in the dashboard. | | `403` | | The request was refused at the edge, for example because of a `Bearer` prefix. | | `429` | `api key rate limit reached` | The key’s request rate limit is reached. | The rate limit is set per key. A `429` carries no `Retry-After` header: back off exponentially and retry. ## Browsers [Section titled “Browsers”](#browsers) The API answers cross-origin requests from any origin. It allows the `Authorization`, `Content-Type` and `Last-Event-ID` request headers. Do not ship a key in public browser code: anyone can read it there. # Chains and addresses > Which chain ids the API takes in the path, and how addresses are written in requests and answers. ## Chain ids [Section titled “Chain ids”](#chain-ids) Every native route takes the chain’s numeric id in the path as `{chain_id}`. | Chain | `chain_id` | Address format | | --------- | ------------ | -------------- | | Ethereum | `1` | hex | | BNB Chain | `56` | hex | | Base | `8453` | hex | | Solana | `1399811149` | base58 | The [Mobula-compatible endpoints](/mobula-compatible/) spell chains differently, for example `evm:1` and `solana`. ## EVM addresses [Section titled “EVM addresses”](#evm-addresses) An EVM address is 40 hex characters. Answers write it in lowercase without the `0x` prefix, for example `c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`. Requests accept the same form. Transaction ids are 64 hex characters, lowercase, without `0x`. Some pool ids are 64 hex characters, because some exchanges identify a pool by a 32-byte id rather than by a contract address. ## Solana addresses [Section titled “Solana addresses”](#solana-addresses) A Solana address is base58, for example `So11111111111111111111111111111111111111112`. Base58 is case-sensitive: send it exactly as the chain writes it. ## Amounts and times [Section titled “Amounts and times”](#amounts-and-times) Fields ending in `_usd` are US dollars. Fields ending in `_pct` are percentages, so `2.5` means 2.5 %. Fields ending in `_us` are Unix time in microseconds. Fields ending in `_raw`, and `balance` in holder lists, are integers in the token’s smallest unit, written as strings so no precision is lost. Other token amounts are decimal numbers already divided by the token’s decimals. # Errors and retries > The one error shape every route uses, and what to do with each status code. ## Error shape [Section titled “Error shape”](#error-shape) Every error answer is JSON with three fields: ```json {"error": "blockchain: unknown chain: \"ethereum\"", "message": "blockchain: unknown chain: \"ethereum\"", "statusCode": 400} ``` `error` and `message` carry the same text. For a `4xx` status the text says what was wrong with the request. For a `5xx` status the text is usually only the status name, for example `Service Unavailable`. ## What to do [Section titled “What to do”](#what-to-do) | Status | Meaning | Action | | ------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | `400` | The request is malformed: a bad address, an unknown chain, or a bad parameter value. | Fix the request. Do not retry unchanged. | | `401` | The key is missing, unknown or revoked. | Send `Authorization: `. | | `403` | Refused at the edge, for example `Bearer `. | Send the bare key. | | `404` | The chain is not served, or the token or resource is not known. | Check the chain id and address. | | `410` | A stream’s `from_seq` is no longer held. | Resume with `from_block`. | | `429` | The key’s rate limit is reached. | Back off exponentially, then retry. | | `500` | A read failed. | Retry with exponential backoff, a few times at most. | | `501` | The requested option is not served yet, for example a holder sort other than `balance`. | Use a served option. | | `502` | The logo store failed. | Retry later. | | `503` | Busy, catching up, or starting. | Wait the `Retry-After` header’s seconds when sent (5 or 10), then retry. | | `504` | A read ran past its time limit. | Retry later, or narrow the request with `pool` or a smaller `limit`. | ## Empty is not an error [Section titled “Empty is not an error”](#empty-is-not-an-error) A known token with no activity answers `200` with zeros, `null` values or empty lists. A `pool` that does not belong to the token answers `200` with an empty list. A value that cannot be computed exactly is `null`, never `0`. ## Solana [Section titled “Solana”](#solana) On 2026-11-30, trades and liquidity answered `500` on Solana, and holders answered `503`. Those routes serve EVM chains; Solana support for them is in progress. Stats, candles and launches answered `200` on Solana. # Mobula-compatible endpoints > Routes that answer in the shape of the Mobula API, for clients that already speak it. These routes accept Mobula-style requests and answer in the Mobula response shape. Use them only if your client already speaks that API. New integrations should use the native routes in the [API reference](/api/). Every route here needs the same `Authorization: ` header as the native routes. ## Chain spelling [Section titled “Chain spelling”](#chain-spelling) The `blockchain` parameter (and `chainId` where a route accepts it) takes an exact id. Chain names such as `ethereum` are refused with `400` and the message `unknown chain`. The match is exact: no lowercasing and no trimming. | Chain | Accepted values | | --------- | --------------------------- | | Ethereum | `evm:1` or `1` | | BNB Chain | `evm:56` or `56` | | Base | `evm:8453` or `8453` | | Solana | `solana:solana` or `solana` | On these routes Solana is `solana`, not `1399811149`. `/v2/fast-search` is the one exception to exact matching: it lowercases its chain list and strips spaces. ## Addresses [Section titled “Addresses”](#addresses) An EVM address is 40 hex characters. The `0x` prefix is optional and case is ignored. Answers spell EVM addresses as lowercase hex. A Solana address is base58 and case-sensitive. The zero address is refused where a wallet or token is required. ## Token routes [Section titled “Token routes”](#token-routes) | Route | Parameters | Answer | | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `GET /v2/token/details` | `blockchain` (or `chainId`), `address` (required) | Price, supply, volume and holder figures for one token. Marked `partial`. | | `POST /v2/token/details` | Body: a JSON array of `{blockchain, address, currencies?}`, at most 50 items and 64 KiB. Query `currencies=EUR,...`, at most 8 codes. | `{payload: [...], partial: true}` with one entry per item, or `null` for an item that has no answer. The all-time high and low fields are `null`. | | `GET /v2/token/security` | `blockchain` (required, no `chainId` fallback), `address` | Security flags and buy and sell taxes. Answers `503` with `Retry-After` when busy. | | `GET /v2/token/markets` | `blockchain`, `address`; `pairToken` (comma list, up to 10); `sortBy` (only `liquidityUSD`); `limit` (default 10, max 100) | `{data, totalCount, partial: true}`: the token’s pools by 24 h volume. | | `GET /v2/token/trades-enriched` | `blockchain`, `address` (token or pool); `sortOrder` `asc` or `desc` (default `desc`); `type` (comma list of `buy`, `sell`, `deposit`, `withdrawal`); `pool`; `cursor` (with `asc` only); `limit` (default 10, max 500); `offset` (`offset + limit` at most 5000); `fromDate`, `toDate` (Unix seconds, Unix milliseconds or RFC 3339); `label` (only `dev`); `swapRecipients`, `transactionSenderAddresses` (up to 10 each); `route=true` | Trades with wallet and pool context, plus `hasMore`. `swapTypes`, `minAmountUSD` and `maxAmountUSD` answer `400`. | | `GET /v2/token/holder-positions` | `blockchain`, `address`; `limit` (default 100, max 250); `offset`; `includeNativeBalance=true` | The top holders with their positions. `label` and `walletAddresses` answer `400`. | | `GET /v2/token/trader-positions` | Same as holder-positions | The top traders by realized PnL, in the holder-positions shape, plus `built` and `asOfBlock`. | | `GET /v2/token/dev-history` | `blockchain` (required), `address`; `limit` (default and max 200) | Other tokens created by the token’s deployer. | | `GET /v2/token/ohlcv-history` | `chainId`, `address` (both required); `period` (default `5m`; one of `1s 5s 15s 30s 1m 5m 15m 30m 1h 4h 6h 12h 1d 1w`); `amount` (default 500, max 2000); `to` (Unix ms) | `{data: [{t, o, h, l, c, v}]}`: USD candles of the token’s busiest pool, oldest first. | ## Market (pool) routes [Section titled “Market (pool) routes”](#market-pool-routes) | Route | Parameters | Answer | | ------------------------------ | -------------------------------------------------------- | -------------------------------------------------------------------- | | `GET /v2/market/details` | `blockchain`, `address` (a pool) | `{data, partial: true}` for one pool. An unknown pool answers `404`. | | `GET /v2/market/ohlcv-history` | Same as `/v2/token/ohlcv-history`, with `address` a pool | USD candles for that one pool. An unknown pool answers `404`. | ## Wallet routes [Section titled “Wallet routes”](#wallet-routes) | Route | Parameters | Answer | | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `GET /v2/wallet/analysis` | `chainIds` (or `blockchains`, or `chainId`; a comma list, chains are merged); `wallet` (required); `period` `1d`, `7d`, `30d` or `90d` (default `7d`), or `from` and `to` in ms (window at most 90 days); `includeNetworkBreakdown` | Trading statistics for the wallet over the window. PnL fields are `null` for now. | | `GET /v2/wallet/trades` | `blockchains` (or `chainIds`; exactly one chain); `wallet`; `from`, `to` in ms (window at most 30 days, default the last 30 days); `limit` (default 50, max 100); `cursor`; `order` (only `asc`); `swapRecipients`; `transactionSenderAddresses` (EVM only). With `tokenAddress`: `order` `asc` or `desc` (default `desc`) and `offset` (`offset + limit` at most 5000), no cursor. | `data` (trades, oldest first), `pagination: {hasMore, nextCursor}` and `partial`. More than 20,000 trades for one token answers `422`. | ## Search and metadata [Section titled “Search and metadata”](#search-and-metadata) | Route | Parameters | Answer | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | `GET /v2/fast-search` | `input` (required, 1 to 1024 bytes); `filters` (JSON, for example `{"blockchains":"evm:1,solana"}`; default every searchable chain); `sortBy` `volume24h`, `marketCap` or `liquidity` (default: relevance) | Matching tokens. Marked `partial`. | | `GET /system-metadata` | `chainId` (optional, default all chains); `factories=false` leaves out factories | The list of known DEX factories and launchpads per chain. A known chain that is not served answers an empty list. | ## Pulse [Section titled “Pulse”](#pulse) `POST /v2/pulse` answers token lists for a launch-tracking view. The body is `{subscriptionId, compressed, maxUpdatesPerMinute, coalesce, views: [...]}` with up to 10 views. Each view is `{name, model, chainId: [...], limit, offset, addressToExclude, filters, sortBy, sortOrder, includeTokens}`. `model` is one of `new`, `bonding` or `bonded`. The answer is `{"data": {"": {"data": [cards]}}}`. It answers `503` while the launch feed is starting. For the same data in the native shape, use [`GET /v2/pilot/trenches/{chain_id}`](/api/operations/get-trenches/). ## WebSocket [Section titled “WebSocket”](#websocket) `GET /v2/mobula/ws` upgrades to a WebSocket. Messages are JSON text frames of the form `{"type": ..., "payload": ...}`. | `type` | `payload` | | --------------- | -------------------------------------------------------------------------- | | `ohlcv` | `{asset or address, chainId, period, subscriptionId, maxUpdatesPerMinute}` | | `token-details` | `{tokens: [{blockchain, address}], subscriptionId, maxUpdatesPerMinute}` | | `stream` | Trades: `{chainIds, events, filters, subscriptionId}` | | `holders` | `{tokens, sortBy, includeNativeBalance, subscriptionId}` | | `pulse-v2` | The same body as `POST /v2/pulse` | | `pulse-pause` | `{action: "pause" or "unpause", views: [...]}` | | `unsubscribe` | `{subscriptionId, type?, viewName?, tokens?}` | Send `{"event":"ping"}` to get `{"event":"pong"}`. A subscription is confirmed with `{"event":"subscribed", ...}`. An error arrives as `{"event":"error","message": ...}`. The socket answers `503` when no live feed is attached. # Streams > Live updates over server-sent events, and how to resume a stream after a disconnect. Routes under `/v2/stream/` are server-sent event (SSE) streams. Each event has an `event:` line and a `data:` line holding one JSON object. Most `data` objects are the same envelope the REST routes answer with. A `: keepalive` comment line arrives every 20 seconds. Send the key in the `Authorization` header, as on every other route. ## The streams [Section titled “The streams”](#the-streams) | Stream | Events | Resume | | ------------------------------------------------------------ | ------------------------------------------------- | ----------------------------------------- | | `GET /v2/stream/token/{chain_id}/{address}/replay` | `attached`, then one `frame` per trade | `Last-Event-ID`, `from_block`, `from_seq` | | `GET /v2/stream/token/{chain_id}/{address}/liquidity/replay` | `attached`, then one `frame` per liquidity change | `Last-Event-ID`, `from_block`, `from_seq` | | `GET /v2/stream/pilot/trenches/{chain_id}` | `snapshot`, then `card`, `update`, `remove` | `Last-Event-ID` | | `GET /v2/stream/token/{chain_id}/{address}/ohlcv?interval=` | `attached`, then one `frame` per changed candle | none | | `GET /v2/stream/token/{chain_id}/{address}` | `attached`, then one `frame` per trade | none | The plain token stream may be closed at the public edge. Use `/replay` for trades: it carries the same trades and can resume. ## Resume [Section titled “Resume”](#resume) Resumable streams send an `id:` line with their events. Keep the last `id` you received. On reconnect, send it in the `Last-Event-ID` header. The stream then sends what you missed and continues live. Browser `EventSource` clients do this on their own. The replay streams can also start from history: * `from_block=` starts at a block height (a slot on Solana). * `from_seq=` starts after a stream sequence. * Send at most one of them. `Last-Event-ID` wins over both. * Without any of them, the stream is live only. * A `from_seq` that is no longer held answers `410`; resume with `from_block`. The launches stream resumes with `Last-Event-ID` only. An id it no longer holds gets a fresh `snapshot` instead of an error. ```sh curl -N -H "Authorization: $CHAINMETRIC_KEY" -H "Last-Event-ID: 26527763.112.450.0" \ https://api.chainmetric.io/v2/stream/token/1/c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/replay ``` ## Fast and safe data [Section titled “Fast and safe data”](#fast-and-safe-data) A frame’s `lane` is `fast` when it was published as soon as its block was seen. The same data is published again with `lane` `safe` once the block is final, and replaces the fast copy. `commitment` says how settled a frame is: `processed` (Solana fast), `confirmed` (EVM fast) or `finalized`. A frame that a chain reorganisation withdrew arrives again with `revoked: true`. If you want final data only, keep frames whose `commitment` is `finalized`. ## Launch events [Section titled “Launch events”](#launch-events) The launches stream’s `snapshot` is `{"views": {"new": [...], "curves": [...], "graduated": [...], "pairs": [...]}}`. The stream calls the launches view `new`; the REST route calls it `launches`. `card` and `update` carry `{views, card}`. `remove` carries `{views, pool}`. ## When a stream is full [Section titled “When a stream is full”](#when-a-stream-is-full) A stream that has no free slot answers `503` with `Retry-After: 5`. Wait that long and reconnect. # Chainmetric API Version 2.0.0. Base URL: `https://api.chainmetric.io`. The Chainmetric API answers questions about tokens, wallets and new launches on Ethereum, BNB Chain, Base and Solana. Every native data route takes the chain id and an address in the path. Every answer is JSON in one envelope: `kind`, `chain_id`, `address`, `lane`, `commitment`, `seq`, `updated_us` and `data`. Live updates use server-sent events on `/v2/stream/...` routes, in the same envelope. Send the key bare in the `Authorization` header: `Authorization: `. A `Bearer ` header is refused with `403`. The whole spec: [/openapi.json](/openapi.json), [/openapi.yaml](/openapi.yaml). # Token stats `GET /v2/token/{chain_id}/{address}/stats` Operation id: `get-token-stats` Returns one token's current price, market cap, supply, volume, trade counts, price change and holder make-up in one document. Use it to answer "what is this token worth right now and how active is it". Windowed fields exist for 1m, 5m, 15m, 1h, 4h, 6h, 12h and 24h, for example `price_change_1h_pct`, `trades_24h` and `buys_5m`. A value that cannot be computed exactly is `null`, never `0`. There is no stream of this document; poll it. For live trades, use `GET /v2/stream/token/{chain_id}/{address}/replay`. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | ## Responses ### 200 The token's stats document. Example `weth` (application/json): ```json ``` Example `solana` (application/json): ```json ``` ### 400 ### 401 ### 404 ### 429 ### 503 # Token trades `GET /v2/token/{chain_id}/{address}/trades` Operation id: `get-token-trades` Returns the latest swaps in one token, newest first by default, optionally in one pool. Use it to answer "who bought or sold this token recently, at what price". Each trade carries the wallet (`maker`), pool, exchange, side, amounts, USD value, block and transaction id. Page forward in time with `sortOrder=asc` and `cursor`. EVM chains; Solana support in progress. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `type` | query | string | no | Comma-separated row types to keep: `buy`, `sell`, `deposit`, `withdrawal`. Default all. Example: `buy,sell`. | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `limit` | query | integer | no | Rows per page. Larger values are clamped to 200. Example: `50`. | ## Responses ### 200 A page of trades. Example `weth` (application/json): ```json ``` ### 400 ### 401 ### 404 ### 429 ### 500 ### 503 # Token price candles (OHLCV) `GET /v2/token/{chain_id}/{address}/ohlcv` Operation id: `get-token-ohlcv` Returns price candles for one token at one interval, oldest first. Use it to draw a price chart or to read the price at a past time. Without `pool`, the series follows the token's main pool. A candle exists only for a bucket that had at least one trade; empty buckets are not filled. To page back in time, send an earlier `to`. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `interval` | query | string | no | Candle width. Example: `1h`. | | `undefined` | undefined | object | no | undefined | | `from` | query | integer (int64) | no | Earliest bucket start, Unix microseconds. Example: `1795887600000000`. | | `to` | query | integer (int64) | no | Latest bucket start, Unix microseconds, inclusive. Example: `1796037600000000`. | | `limit` | query | integer | no | Candles per answer. Example: `500`. | ## Responses ### 200 The candles. Example `weth` (application/json): ```json ``` Example `solana` (application/json): ```json ``` ### 400 ### 401 ### 429 ### 503 # Token liquidity changes `GET /v2/token/{chain_id}/{address}/liquidity` Operation id: `get-token-liquidity` Returns liquidity adds and removes in the token's pools, newest first by default. Use it to answer "who added or pulled liquidity for this token, and how much". Each row carries the provider, pool, both token amounts and their USD value. EVM chains; Solana support in progress. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `type` | query | string | no | Comma-separated kinds to keep. Default all. Example: `deposit,withdrawal`. | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `limit` | query | integer | no | Rows per page. Example: `50`. | ## Responses ### 200 A page of liquidity changes. Example `weth` (application/json): ```json ``` ### 400 ### 401 ### 429 ### 500 ### 503 ### 504 # Token holders `GET /v2/token/{chain_id}/{address}/positions` Operation id: `get-token-positions` Returns the wallets that hold one token, ranked by balance, largest first. Use it to answer "who are the top holders of this token and what share do they hold". Each row carries the wallet, rank, raw balance and percentage of supply. `total_count` is the number of holders. EVM chains; Solana support in progress. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `sort` | query | string | no | Ranking. Only `balance` is served today; `realized_pnl` and `last_position_pnl` answer `501`. Example: `balance`. | | `limit` | query | integer | no | Rows per page. Larger values are clamped to 250. Example: `10`. | | `offset` | query | integer | no | Rows to skip. Example: `0`. | ## Responses ### 200 A page of holders. Example `weth` (application/json): ```json ``` ### 400 ### 401 ### 404 ### 429 ### 501 The requested ranking is not served yet. ### 503 # Wallet funding `GET /v2/wallet/{chain_id}/{address}/funding` Operation id: `get-wallet-funding` Returns who sent funds to a wallet and whom it sent funds to, and can walk back through the funders. Use it to answer "who funded this wallet" or "which wallets share a funding source". With `hops=1` the answer is pages of transfers in and out, newest first. With `hops` of 2 or more, or `root`, the answer is a graph of `nodes` and `edges` walked backwards. A walk stops at 10 hops or 500 addresses and then sets `truncated`. Only final blocks are included, so a transfer appears once its block is final. `uncovered` lists block ranges not yet indexed; an empty result inside them does not mean there were no transfers. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `direction` | query | string | no | Which transfers to return. A walk (`hops` above 1) only goes backwards, so `out` needs `hops=1`. Example: `in`. | | `tokens` | query | string | no | `quote` covers the native currency and the chain's quote tokens. `all` covers every token. Example: `quote`. | | `hops` | query | string | no | `1` for direct transfers, a number from 2 to 10, or `root` to walk back to the original funders. Example: `root`. | | `limit` | query | integer | no | Transfers per direction per page, with `hops=1` only. Larger values are clamped to 1000. Example: `100`. | | `undefined` | undefined | object | no | undefined | ## Responses ### 200 The wallet's funding. ### 400 ### 401 ### 429 ### 503 # Wallet position in a token `GET /v2/wallet/{chain_id}/{wallet}/position/{token}` Operation id: `get-wallet-position` Returns one wallet's position in one token: balance, its USD value, share of supply, buy and sell counts and volumes, and labels. Use it to answer "how much of this token does this wallet hold, and how has it traded it". A value that cannot be computed is `null`. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `wallet` | path | string | yes | The wallet. EVM is 40 lowercase hex characters without `0x`; Solana is base58. Example: `4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8`. | | `token` | path | string | yes | The token. Same format as `wallet`. Example: `c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`. | ## Responses ### 200 The position. ### 400 ### 401 ### 404 ### 429 ### 503 ### 504 # New launches (trenches) `GET /v2/pilot/trenches/{chain_id}` Operation id: `get-trenches` Returns cards for tokens launching on a chain right now, one view at a time. Use it to answer "what launched in the last minutes", "which bonding curves are about to graduate" or "what just graduated". `launches` lists new token deploys, `curves` lists bonding curves with their fill in `progress`, `graduated` lists tokens that left their curve, and `pairs` lists new pools. Each card carries the token, pool, exchange, launchpad, creator, holder make-up and market figures. For a live feed of the same cards, use `GET /v2/stream/pilot/trenches/{chain_id}`. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `view` | query | string | yes | Which list to return. Example: `launches`. | | `limit` | query | integer | no | Cards to return. Larger values are clamped to 100. Example: `20`. | ## Responses ### 200 The view's cards. Example `ethereum-launches` (application/json): ```json ``` Example `solana-curves` (application/json): ```json ``` ### 400 ### 401 ### 404 ### 429 ### 503 # Stream live token trades `GET /v2/stream/token/{chain_id}/{address}` Operation id: `stream-token-live` Opens a server-sent event stream of one token's trades as they happen, with no history and no resume. Use `GET /v2/stream/token/{chain_id}/{address}/replay` instead when you need to resume after a disconnect or start from a past block. The first event is `attached`; every later `frame` event is a `token_trades` envelope. This route may be closed at the public edge; `/replay` carries the same trades. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | ## Responses ### 200 ### 400 ### 401 ### 429 ### 503 # Stream token candles `GET /v2/stream/token/{chain_id}/{address}/ohlcv` Operation id: `stream-token-ohlcv` Opens a server-sent event stream of one token's candles at one interval. Use it to keep a live chart without polling `GET /v2/token/{chain_id}/{address}/ohlcv`. The first event is `attached`; every later `frame` event is an envelope holding one candle in `data.candles`. The current candle is sent again each time it changes, until its bucket closes. This stream has no resume: after a reconnect, read the missed candles from `GET /v2/token/{chain_id}/{address}/ohlcv`. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `interval` | query | string | no | Candle width. Example: `1m`. | | `undefined` | undefined | object | no | undefined | ## Responses ### 200 ### 400 ### 401 ### 429 ### 503 # Stream token trades `GET /v2/stream/token/{chain_id}/{address}/replay` Operation id: `stream-token-trades` Opens a server-sent event stream of one token's trades. Use it to follow every swap in a token as it happens. Each event is one trade in the shape of `GET /v2/token/{chain_id}/{address}/trades`. A trade withdrawn by a chain reorganisation arrives again with `revoked: true`. The first event is `attached`; every later `frame` event is an envelope holding one trade. Start from history with `from_block` or `from_seq`; without either the stream is live only. Reconnect with `Last-Event-ID` to receive the trades you missed; it wins over `from_block` and `from_seq`. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | ## Responses ### 200 ### 400 ### 401 ### 410 ### 429 ### 503 # Stream token liquidity changes `GET /v2/stream/token/{chain_id}/{address}/liquidity/replay` Operation id: `stream-token-liquidity` Opens a server-sent event stream of liquidity adds and removes in one token's pools. Each event is one change in the shape of `GET /v2/token/{chain_id}/{address}/liquidity`. A change withdrawn by a chain reorganisation arrives again with `revoked: true` and null amounts. Events, start parameters and resume work as on the trades replay stream. Reconnect with `Last-Event-ID` to receive the changes you missed. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | | `undefined` | undefined | object | no | undefined | ## Responses ### 200 ### 400 ### 401 ### 410 ### 429 ### 503 # Stream new launches `GET /v2/stream/pilot/trenches/{chain_id}` Operation id: `stream-trenches` Opens a server-sent event stream of launch cards for one chain, across all views. Use it for a live launch feed instead of polling `GET /v2/pilot/trenches/{chain_id}`. The first event is `snapshot`: `{views: {new, curves, graduated, pairs}}`, each a list of cards. The stream calls the launches view `new`, where the REST route calls it `launches`. Later events are `card` (a new card, `{views, card}`), `update` (a changed card, `{views, card}`) and `remove` (`{views, pool}`). Reconnect with `Last-Event-ID` to resume after the last event you received; an expired id gets a fresh `snapshot`. Base URL: `https://api.chainmetric.io`. Send `Authorization: ` (the bare key, no `Bearer`). ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `undefined` | undefined | object | no | undefined | | `limit` | query | integer | no | Cards per view. Larger values are clamped to 100. Example: `50`. | | `undefined` | undefined | object | no | undefined | ## Responses ### 200 ### 400 ### 401 ### 404 ### 429 ### 503 # Token logo image `GET /v2/logo/{hash}/{version}/{file}` Operation id: `get-logo` Returns a token logo as a WebP image. Use the URL found in the `logo` field of other answers; do not build it yourself. No key is needed. The answer is cached as immutable for one year. Base URL: `https://api.chainmetric.io`. No key needed. ## Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `hash` | path | string | yes | 64 hex characters. Example: `fa61792e6c9284787a342ad3196fa5b11970f1ed663bfeaf736c94003c26b2cd`. | | `version` | path | string | yes | `v` followed by 1 to 3 digits. Example: `v1`. | | `file` | path | string | yes | The image edge in pixels followed by `.webp`. Example: `256.webp`. | ## Responses ### 200 The image. ### 400 ### 404 ### 502 The image store failed. Retry later. # Health check `GET /healthz` Operation id: `get-health` Returns `{"status":"ok"}` when the API is up. No key is needed. Use it to check reachability before other calls. Base URL: `https://api.chainmetric.io`. No key needed. ## Responses ### 200 The API is up. Example `ok` (application/json): ```json ```