# Aggregated Blockchain Data API Developer Documentation

## 1. Overview

- Base URL: `http://0xrouter.app`
- Method: `GET`
- Authentication header: `X-My-Token`
- Response format: `JSON`

Every request must include:

```http
X-My-Token: <your_token>
```

Notes:

- Array parameters in this document are passed as comma-separated strings, e.g. `chains=ethereum,bsc,polygon`
- Object parameters in this document are passed as JSON strings, e.g. `filterLimits={"tokens":10}`
- This service always requires `X-My-Token`, even when an individual upstream endpoint would otherwise allow anonymous access
- For non-admin tokens, the `limit` query parameter on aggregated blockchain data endpoints is forwarded to the upstream at most as `100`; admin tokens are not subject to this cap

## 2. Billing and open endpoint groups

### 2.1 Billing

- Endpoints are no longer billed per group or per individual endpoint
- Every request that finally returns `200 OK` is billed by the size of the returned JSON text
- Default unit: every `50KB` of returned text counts as `1` point, rounded up
- Examples: `1KB` returned counts as `1` point, `51KB` counts as `2` points, `120KB` counts as `3` points
- Only final `200 OK` responses are charged; auth failures, parameter errors, upstream failures, and `auth required but not present` are not charged

### 2.2 Rate limits

- Default server-side limit is `300` requests per token per minute
- Concurrent requests are supported; concurrent requests share the same `300/min` limit on a token
- For sensitive upstream endpoints such as `transfers`, `swaps`, `counterparties/*`, `token/top_flow`, and `token/volume`, we still recommend pacing at most `1` request per second

### 2.3 Open endpoint groups

The groups below are only "the set of endpoints you can reach"; they are not separate billing tiers. Every successful request is still billed by the returned JSON size.

| Group | Description |
| :--- | :--- |
| `/chaindata/balances/*` | Address and entity balance snapshots |
| `/chaindata/chains` | Supported chain list |
| `/chaindata/counterparties/*` | Counterparty volume aggregations |
| `/chaindata/flow/*` | Address and entity historical fund flow |
| `/chaindata/history/*` | Address and entity historical USD snapshots |
| `/chaindata/intelligence/*` | Address, entity, contract, and token intelligence |
| `/chaindata/loans/*` | Address and entity lending positions |
| `/chaindata/marketdata/*` | Market index and aggregate data |
| `/chaindata/networks/*` | Per-chain status and historical market data |
| `/chaindata/polymarket/*` | Polymarket on-chain activity data |
| `/chaindata/portfolio/*` | Address and entity portfolio time series |
| `/chaindata/solana/*` | Solana summary queries |
| `/chaindata/swaps` | DEX trade-by-trade stream |
| `/chaindata/token/*` | Token market, flow, and holder data |
| `/chaindata/transfers` | Transfer fact stream |
| `/chaindata/tx/*` | Single transaction details |
| `/chaindata/volume/*` | Address and entity transfer-volume snapshots |

### 2.4 Endpoint catalog (alphabetical)

The catalog below is sorted alphabetically by endpoint group. The account-balance endpoints in section 3 are this site's management endpoints and are listed separately.

#### Balances

- `GET /chaindata/balances/address/{address}`
- `GET /chaindata/balances/entity/{entity}`
- `GET /chaindata/balances/solana/subaccounts/address/{addresses}`
- `GET /chaindata/balances/solana/subaccounts/entity/{entities}`

#### Chains

- `GET /chaindata/chains`

#### Counterparties

- `GET /chaindata/counterparties/address/{address}`
- `GET /chaindata/counterparties/entity/{entity}`

#### Flow

- `GET /chaindata/flow/address/{address}`
- `GET /chaindata/flow/entity/{entity}`

#### History

- `GET /chaindata/history/address/{address}`
- `GET /chaindata/history/entity/{entity}`

#### Intelligence

- `GET /chaindata/intelligence/address/{address}`
- `GET /chaindata/intelligence/address/{address}/all`
- `GET /chaindata/intelligence/address_enriched/{address}`
- `GET /chaindata/intelligence/address_enriched/{address}/all`
- `GET /chaindata/intelligence/contract/{chain}/{address}`
- `GET /chaindata/intelligence/entity/{entity}`
- `GET /chaindata/intelligence/entity/{entity}/summary`
- `GET /chaindata/intelligence/entity_balance_changes`
- `GET /chaindata/intelligence/entity_predictions/{entity}`
- `GET /chaindata/intelligence/entity_types`
- `GET /chaindata/intelligence/search`
- `GET /chaindata/intelligence/token/{chain}/{address}`

#### Loans

- `GET /chaindata/loans/address/{address}`
- `GET /chaindata/loans/entity/{entity}`

#### Marketdata

- `GET /chaindata/marketdata/altcoin_index`

#### Networks

- `GET /chaindata/networks/history/{chain}`
- `GET /chaindata/networks/status`

#### Polymarket

- `GET /chaindata/polymarket/activity`
- `GET /chaindata/polymarket/event-positions/{conditionId}`
- `GET /chaindata/polymarket/events`
- `GET /chaindata/polymarket/events/{eventId}`
- `GET /chaindata/polymarket/leaderboard`
- `GET /chaindata/polymarket/order-book/{conditionId}`
- `GET /chaindata/polymarket/pnl/chart`
- `GET /chaindata/polymarket/positions/{addr}`
- `GET /chaindata/polymarket/prices`
- `GET /chaindata/polymarket/stats`
- `GET /chaindata/polymarket/top-events`
- `GET /chaindata/polymarket/top-events/{eventId}/breakdown`
- `GET /chaindata/polymarket/top-holders/{conditionId}`
- `GET /chaindata/polymarket/wallet/{addr}/prediction-history`
- `GET /chaindata/polymarket/wallet/{addr}/summary/balance`
- `GET /chaindata/polymarket/wallet/{addr}/summary/biggest-win`
- `GET /chaindata/polymarket/wallet/{addr}/summary/pnl`
- `GET /chaindata/polymarket/wallet/{addr}/summary/portfolio`
- `GET /chaindata/polymarket/wallet/{addr}/summary/stats`

#### Portfolio

- `GET /chaindata/portfolio/address/{address}`
- `GET /chaindata/portfolio/entity/{entity}`
- `GET /chaindata/portfolio/timeSeries/address/{address}`
- `GET /chaindata/portfolio/timeSeries/entity/{entity}`

#### Solana

- `GET /chaindata/solana/summary/{address}`

#### Swaps

- `GET /chaindata/swaps`

#### Token

- `GET /chaindata/token/addresses/{id}`
- `GET /chaindata/token/arkham_exchange_tokens`
- `GET /chaindata/token/balance/{chain}/{address}`
- `GET /chaindata/token/balance/{id}`
- `GET /chaindata/token/holders/{chain}/{address}`
- `GET /chaindata/token/holders/{id}`
- `GET /chaindata/token/market/{id}`
- `GET /chaindata/token/price/history/{chain}/{address}`
- `GET /chaindata/token/price/history/{id}`
- `GET /chaindata/token/price_change/{id}`
- `GET /chaindata/token/top`
- `GET /chaindata/token/top_flow/{chain}/{address}`
- `GET /chaindata/token/top_flow/{id}`
- `GET /chaindata/token/trending`
- `GET /chaindata/token/trending/{id}`
- `GET /chaindata/token/volume/{chain}/{address}`
- `GET /chaindata/token/volume/{id}`

#### Transfers

- `GET /chaindata/transfers`
- `GET /chaindata/transfers/histogram/simple`
- `GET /chaindata/transfers/tx/{hash}`

#### Tx

- `GET /chaindata/tx/{tx_hash}`

#### Volume

- `GET /chaindata/volume/address/{address}`
- `GET /chaindata/volume/entity/{entity}`

## 3. Account balance endpoints

### 3.1 `GET /account/balance`

Returns the balance overview, block status, and rate-limit configuration of the current token across all platforms.

### Path Parameters

None.

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/account/balance" \
  -H "X-My-Token: your_token"
```

### 3.2 `GET /account/balance/{platform}`

Returns balance, block status, and rate-limit configuration for the specified platform.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `platform` | `string` | **[required]** Platform name. Currently `chaindata` is supported |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/account/balance/chaindata" \
  -H "X-My-Token: your_token"
```

## 4. Intelligence endpoints

### 4.1 `GET /chaindata/intelligence/address/{address}`

Returns base intelligence for an address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Wallet address, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `groupByEntity` | `string` | **[optional]** Whether to aggregate by entity, common value `true` |

### 4.2 `GET /chaindata/intelligence/address_enriched/{address}`

Returns enriched intelligence for an address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Wallet address, e.g. `0x123...` |

### Query Parameters

None.

### 4.3 `GET /chaindata/intelligence/address_enriched/{address}/all`

Returns multi-chain enriched intelligence for the given address. By default the response includes tags, entity predictions, and cluster IDs. Each enrichment can be toggled off via query parameters.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Address to query across chains, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `includeTags` | `string` | **[optional]** Whether to include address tags. Typically defaults to `true` |
| `includeEntityPredictions` | `string` | **[optional]** Whether to include entity predictions. Typically defaults to `true` |
| `includeClusters` | `string` | **[optional]** Whether to include cluster IDs. Typically defaults to `true` |

### Example

```bash
curl "http://0xrouter.app/chaindata/intelligence/address_enriched/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/all?includeTags=true&includeEntityPredictions=true&includeClusters=true" \
  -H "X-My-Token: your_token"
```

### 4.4 `GET /chaindata/intelligence/address/{address}/all`

Returns multi-chain intelligence for the given address. The address is queried on every supported chain whose address format matches.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Address to query across chains, e.g. `0x123...` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/intelligence/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/all" \
  -H "X-My-Token: your_token"
```

### 4.5 `GET /chaindata/intelligence/entity/{entity}`

Returns top-level information for an entity, including tags, social links, and base metadata.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/intelligence/entity/binance" \
  -H "X-My-Token: your_token"
```

### 4.6 `GET /chaindata/intelligence/entity/{entity}/summary`

Returns summary information for the specified entity, including:

- Distinct address count
- Total cross-chain USD balance
- Total transfer USD volume
- First and last transfer timestamps

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/intelligence/entity/binance/summary" \
  -H "X-My-Token: your_token"
```

### 4.7 `GET /chaindata/intelligence/entity_predictions/{entity}`

Returns the predicted address list for an entity — up to roughly `1000` rows, typically sorted by USD balance.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/intelligence/entity_predictions/binance" \
  -H "X-My-Token: your_token"
```

### 4.8 `GET /chaindata/intelligence/entity_types`

Returns the full entity-type catalog (e.g. `exchange`, `fund`, `token`). Use this list to drive entity-type filters on other intelligence endpoints.

### Path Parameters

None.

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/intelligence/entity_types" \
  -H "X-My-Token: your_token"
```

### 4.9 `GET /chaindata/intelligence/entity_balance_changes`

Returns an entity-level balance-change leaderboard. Useful for spotting accumulation or distribution.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc` |
| `entityTypes` | `string` | **[optional]** Entity type list, comma-separated, e.g. `exchange,fund` |
| `entityIds` | `string` | **[optional]** Entity ID list, comma-separated, e.g. `binance,coinbase` |
| `entityTags` | `string` | **[optional]** Entity tags to include, comma-separated |
| `negatedEntityTags` | `string` | **[optional]** Entity tags to exclude, comma-separated |
| `pricingIds` | `string` | **[optional]** CoinGecko pricing ID list, comma-separated, e.g. `bitcoin,ethereum` |
| `orderBy` | `string` | **[optional]** Sort field. One of `balanceUsd`, `balanceUsdChange`, `balanceUsdPctChange`, `balanceUnit`, `balanceUnitChange`, `balanceUnitPctChange` |
| `orderDir` | `string` | **[optional]** Sort direction. One of `asc` or `desc` |
| `balanceMin` | `integer` | **[optional]** Minimum USD balance filter |
| `balanceMax` | `integer` | **[optional]** Maximum USD balance filter |
| `interval` | `string` | **[optional]** Time interval. One of `7d`, `14d`, `30d` |
| `limit` | `integer` | **[optional]** Rows to return. Non-admin maximum is `100` |
| `offset` | `integer` | **[optional]** Pagination offset |

### 4.10 `GET /chaindata/intelligence/contract/{chain}/{address}`

Returns base information for a contract on the chain.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chain` | `string` | **[required]** Chain name, e.g. `ethereum` |
| `address` | `string` | **[required]** Contract address, e.g. `0x123...` |

### Query Parameters

None.

### 4.11 `GET /chaindata/intelligence/token/{chain}/{address}`

Returns base information for a token on the chain.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chain` | `string` | **[required]** Chain name, e.g. `ethereum` |
| `address` | `string` | **[required]** Token contract address, e.g. `0x123...` |

### Query Parameters

None.

### 4.12 `GET /chaindata/intelligence/search`

Full-text search across addresses, entities, tokens, and Solana pools, ranked by relevance.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `query` | `string` | **[required]** Search keyword, e.g. `binance`, `bitcoin`, `abc123` |
| `filterLimits` | `string` | **[optional]** JSON string specifying the max result count per category. Each category cap is `50`; the default is typically `5` per category |
| `filterOffsets` | `string` | **[optional]** JSON string specifying the pagination offset per category. Default is typically `0` |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/intelligence/search" \
  -H "X-My-Token: your_token" \
  --data-urlencode "query=binance" \
  --data-urlencode "filterLimits={\"tokens\":10}" \
  --data-urlencode "filterOffsets={\"tokens\":0}"
```

## 5. Asset and fund flow endpoints

### 5.1 `GET /chaindata/balances/address/{address}`

Returns the balance snapshot for an address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Wallet address, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `cheap` | `string` | **[optional]** Whether to use lightweight mode. Common value `true` |

### 5.2 `GET /chaindata/balances/entity/{entity}`

Returns the balance snapshot for an entity.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `cheap` | `string` | **[optional]** Whether to use lightweight mode. Common value `true` |

### 5.3 `GET /chaindata/loans/address/{address}`

Returns the lending position overview for an address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Wallet address, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### 5.4 `GET /chaindata/loans/entity/{entity}`

Returns the lending position overview for an entity.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### 5.5 `GET /chaindata/flow/address/{address}`

Returns historical USD inflow, outflow, and cumulative totals for an address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Wallet address, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/flow/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.6 `GET /chaindata/flow/entity/{entity}`

Returns historical USD inflow, outflow, and cumulative totals for an entity.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/flow/entity/binance?chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.7 `GET /chaindata/portfolio/timeSeries/address/{address}`

Returns the daily-granularity holding time series for the address on the specified token.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Wallet address, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `pricingId` | `string` | **[optional]** CoinGecko pricing ID, e.g. `bitcoin` |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/portfolio/timeSeries/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?pricingId=bitcoin&chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.8 `GET /chaindata/portfolio/timeSeries/entity/{entity}`

Returns the daily-granularity holding time series for the entity on the specified token.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `pricingId` | `string` | **[optional]** CoinGecko pricing ID, e.g. `bitcoin` |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/portfolio/timeSeries/entity/binance?pricingId=bitcoin&chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.9 `GET /chaindata/counterparties/address/{address}`

Returns counterparty volume aggregations for an address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Wallet address, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |
| `flow` | `string` | **[optional]** Direction. One of `in`, `out`, `self`, `all` |
| `tokens` | `string` | **[optional]** Token list, comma-separated, e.g. `ethereum,usd-coin` |
| `timeGte` | `string` | **[optional]** Start time, e.g. `2024-01-01T00:00:00Z` |
| `timeLte` | `string` | **[optional]** End time, e.g. `2024-01-01T00:00:00Z` |
| `timeLast` | `string` | **[optional]** Relative time range, e.g. `24h` |
| `usdGte` | `string` | **[optional]** Minimum USD volume, e.g. `100.23` |
| `limit` | `integer` | **[optional]** Rows to return, e.g. `10`. Non-admin maximum is `100` |
| `tags` | `string` | **[optional]** Counterparty tag list, comma-separated, e.g. `whale,kol` |

### Example

```bash
curl "http://0xrouter.app/chaindata/counterparties/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?chains=ethereum,bsc,polygon&flow=all&tokens=ethereum,usd-coin&timeLast=24h&usdGte=100.23&limit=10&tags=whale,kol" \
  -H "X-My-Token: your_token"
```

### 5.10 `GET /chaindata/counterparties/entity/{entity}`

Returns counterparty volume aggregations for an entity.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |
| `flow` | `string` | **[optional]** Direction. One of `in`, `out`, `self`, `all` |
| `tokens` | `string` | **[optional]** Token list, comma-separated, e.g. `ethereum,usd-coin` |
| `timeGte` | `string` | **[optional]** Start time, e.g. `2024-01-01T00:00:00Z` |
| `timeLte` | `string` | **[optional]** End time, e.g. `2024-01-01T00:00:00Z` |
| `timeLast` | `string` | **[optional]** Relative time range, e.g. `24h` |
| `usdGte` | `string` | **[optional]** Minimum USD volume, e.g. `100.23` |
| `limit` | `integer` | **[optional]** Rows to return, e.g. `10`. Non-admin maximum is `100` |
| `tags` | `string` | **[optional]** Counterparty tag list, comma-separated, e.g. `whale,kol` |

### Example

```bash
curl "http://0xrouter.app/chaindata/counterparties/entity/binance?chains=ethereum,bsc,polygon&flow=all&tokens=ethereum,usd-coin&timeLast=24h&usdGte=100.23&limit=10&tags=whale,kol" \
  -H "X-My-Token: your_token"
```

### 5.11 `GET /chaindata/transfers`

Returns the transfer fact stream with rich filtering.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `base` | `string` | **[optional]** Base address or entity, e.g. `0x123abc` or `binance` |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc` |
| `flow` | `string` | **[optional]** Direction. One of `in`, `out`, `self`, `all` |
| `from` | `string` | **[optional]** From-side filter. Supports addresses, entities, `type:cex`, `deposit:binance`, etc. |
| `to` | `string` | **[optional]** To-side filter. Supports addresses, entities, `type:cex`, `deposit:binance`, etc. |
| `counterparties` | `string` | **[optional]** Strict counterparty list, comma-separated |
| `tokens` | `string` | **[optional]** Token list, comma-separated, e.g. `ethereum,usd-coin` |
| `timeGte` | `string` | **[optional]** Start time, e.g. `2024-01-01T00:00:00Z` |
| `timeLte` | `string` | **[optional]** End time, e.g. `2024-01-01T00:00:00Z` |
| `timeLast` | `string` | **[optional]** Relative time range, e.g. `24h` |
| `valueGte` | `string` | **[optional]** Minimum raw token amount, e.g. `100.23` |
| `valueLte` | `string` | **[optional]** Maximum raw token amount, e.g. `100.23` |
| `usdGte` | `string` | **[optional]** Minimum USD amount, e.g. `100.23` |
| `usdLte` | `string` | **[optional]** Maximum USD amount, e.g. `100.23` |
| `sortKey` | `string` | **[optional]** Sort field. One of `time`, `value`, `usd` |
| `sortDir` | `string` | **[optional]** Sort direction. One of `asc` or `desc` |
| `limit` | `integer` | **[optional]** Rows to return. Default `50`. Non-admin maximum is `100` |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0` |

### Example

```bash
curl "http://0xrouter.app/chaindata/transfers?base=0xF995842f754A03220352e523d73CE9F4809Ab0EE&chains=ethereum,bsc&flow=all&tokens=ethereum,usd-coin&counterparties=binance&timeLast=24h&usdGte=100.23&sortKey=time&sortDir=desc&limit=10&offset=0" \
  -H "X-My-Token: your_token"
```

### 5.12 `GET /chaindata/transfers/tx/{hash}`

Returns every native and token transfer carried by a specific transaction hash.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `hash` | `string` | **[required]** Transaction hash, e.g. `0xabc123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `transferType` | `string` | **[required]** Transfer type. One of `external`, `internal`, `token` |
| `chain` | `string` | **[required]** Chain name. One of `ethereum`, `polygon`, `bsc`, `optimism`, `avalanche`, `arbitrum_one`, `base`, `bitcoin`, `tron`, `flare`, `solana`, `ton`, `dogecoin`, `zcash` |

### Example

```bash
curl "http://0xrouter.app/chaindata/transfers/tx/0xabc123?chain=ethereum&transferType=token" \
  -H "X-My-Token: your_token"
```

### 5.13 `GET /chaindata/swaps`

Returns DEX trade-by-trade data with rich filtering.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `base` | `string` | **[required]** Base address or entity participating in the swap, e.g. `0x123abc` or `binance`. Empty `base` typically returns no rows |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |
| `flow` | `string` | **[optional]** Direction relative to `base`. One of `in`, `out`, `self`, `all` |
| `from` | `string` | **[optional]** Sender filter, addresses or entities, comma-separated |
| `to` | `string` | **[optional]** Receiver filter, addresses or entities, comma-separated |
| `tokens` | `string` | **[optional]** Token list, comma-separated. Tokens must appear in `token0` or `token1` |
| `timeGte` | `string` | **[optional]** Start time, e.g. `2024-01-01T00:00:00Z` |
| `timeLte` | `string` | **[optional]** End time, e.g. `2024-01-01T00:00:00Z` |
| `timeLast` | `string` | **[optional]** Relative time range, e.g. `24h`, `7d` |
| `value0Gte` | `string` | **[optional]** Minimum on-chain `token0` amount, e.g. `1000000000000000000` |
| `value0Lte` | `string` | **[optional]** Maximum on-chain `token0` amount, e.g. `1000000000000000000` |
| `value1Gte` | `string` | **[optional]** Minimum on-chain `token1` amount, e.g. `1000000000000000000` |
| `value1Lte` | `string` | **[optional]** Maximum on-chain `token1` amount, e.g. `1000000000000000000` |
| `usdGte` | `string` | **[optional]** Minimum historical USD amount, e.g. `1000` |
| `usdLte` | `string` | **[optional]** Maximum historical USD amount, e.g. `100000` |
| `sortKey` | `string` | **[optional]** Sort field. One of `time`, `value`, `usd` |
| `sortDir` | `string` | **[optional]** Sort direction. One of `asc` or `desc` |
| `limit` | `integer` | **[optional]** Rows to return. Default `20`. Non-admin maximum is `100` |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0` |
| `counterparties` | `string` | **[optional]** Strict counterparty list, comma-separated, e.g. `binance` |
| `senders` | `string` | **[optional]** Sender address list, comma-separated |
| `receivers` | `string` | **[optional]** Receiver address list, comma-separated |
| `protocols` | `string` | **[optional]** Protocol / DEX address or entity ID, comma-separated, e.g. `uniswap` |

### Example

```bash
curl "http://0xrouter.app/chaindata/swaps?base=0xF995842f754A03220352e523d73CE9F4809Ab0EE&chains=ethereum,bsc&flow=all&tokens=ethereum,usd-coin&timeLast=24h&usdGte=1000&sortKey=time&sortDir=desc&limit=20&offset=0&protocols=uniswap" \
  -H "X-My-Token: your_token"
```

### 5.14 `GET /chaindata/tx/{tx_hash}`

Returns the details of a single transaction.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `tx_hash` | `string` | **[required]** Transaction hash, e.g. `0xabc...` |

### Query Parameters

None.

### 5.15 `GET /chaindata/solana/summary/{address}`

Returns Solana address summary information.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Solana address, e.g. `7TNnXUm...` |

### Query Parameters

None.

### 5.16 `GET /chaindata/volume/address/{address}`

Returns the transfer-volume snapshot for the address, broken down by chain.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Wallet address, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/volume/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.17 `GET /chaindata/volume/entity/{entity}`

Returns the transfer-volume snapshot for the entity, broken down by chain.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/volume/entity/binance?chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.18 `GET /chaindata/history/address/{address}`

Returns the historical USD snapshot for the address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Wallet address, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/history/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.19 `GET /chaindata/history/entity/{entity}`

Returns the historical USD snapshot for the entity.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID, e.g. `binance` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/history/entity/binance?chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.20 `GET /chaindata/marketdata/altcoin_index`

Returns the current Altcoin Index, used to gauge altcoin performance versus Bitcoin.

### Path Parameters

None.

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/marketdata/altcoin_index" \
  -H "X-My-Token: your_token"
```

### 5.21 `GET /chaindata/balances/solana/subaccounts/address/{addresses}`

Returns sub-account balances for the specified Solana addresses, including token balances held inside staking, lending, and other sub-accounts.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `addresses` | `string` | **[required]** Comma-separated Solana address list, e.g. `abc123,def456` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `pricingID` | `string` | **[required]** CoinGecko pricing ID, e.g. `solana` |
| `limit` | `string` | **[optional]** Maximum number of sub-account balance rows to return. Default `1000`. Non-admin maximum is `100` |

### Example

```bash
curl "http://0xrouter.app/chaindata/balances/solana/subaccounts/address/9xQeWvG816bUx9EPfEZ74tPjzN6E4tqjBzQ7m8vDkP5S?pricingID=solana&limit=1000" \
  -H "X-My-Token: your_token"
```

### 5.22 `GET /chaindata/balances/solana/subaccounts/entity/{entities}`

Returns sub-account balances for the specified Solana entities, including token balances held inside staking, lending, and other sub-accounts.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entities` | `string` | **[required]** Comma-separated entity ID list, e.g. `binance,coinbase` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `pricingID` | `string` | **[required]** CoinGecko pricing ID, e.g. `solana` |
| `limit` | `string` | **[optional]** Maximum number of sub-account balance rows to return. Default `1000`. Non-admin maximum is `100` |

### Example

```bash
curl "http://0xrouter.app/chaindata/balances/solana/subaccounts/entity/binance,coinbase?pricingID=solana&limit=1000" \
  -H "X-My-Token: your_token"
```

### 5.23 `GET /chaindata/chains`

Returns the currently supported chains. The response is typically a simple array of chain identifiers.

### Path Parameters

None.

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/chains" \
  -H "X-My-Token: your_token"
```

### 5.24 `GET /chaindata/networks/history/{chain}`

Returns historical market data for the native token of a specific chain — typically a time series including price, volume, and market cap.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chain` | `string` | **[required]** Chain identifier. One of `ethereum`, `polygon`, `bsc`, `optimism`, `avalanche`, `arbitrum_one`, `base`, `bitcoin`, `tron`, `flare`, `solana`, `ton`, `dogecoin`, `zcash` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/networks/history/ethereum" \
  -H "X-My-Token: your_token"
```

### 5.26 `GET /chaindata/networks/status`

Returns the current status of every supported chain, including price, 24h change, volume, market cap, latest block, total transfer count, and gas / fee details.

### Path Parameters

None.

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/networks/status" \
  -H "X-My-Token: your_token"
```

### 5.27 `GET /chaindata/portfolio/address/{address}`

Returns the historical portfolio snapshot for the specified address across chains.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Address whose historical portfolio is queried, e.g. `0x123...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `time` | `string` | **[optional]** Millisecond Unix timestamp. Truncated to UTC start-of-day |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/portfolio/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?time=1714521600000&chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.28 `GET /chaindata/portfolio/entity/{entity}`

Returns the historical portfolio snapshot for the specified entity across chains.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entity` | `string` | **[required]** Entity ID whose historical portfolio is queried, e.g. `binance` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `time` | `string` | **[optional]** Millisecond Unix timestamp. Truncated to UTC start-of-day |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/portfolio/entity/binance?time=1714521600000&chains=ethereum,bsc,polygon" \
  -H "X-My-Token: your_token"
```

### 5.31 `GET /chaindata/transfers/histogram/simple`

Returns the lightweight transfer histogram, well suited for low-overhead aggregation.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `base` | `string` | **[optional]** Base address or entity, comma-separated, e.g. `binance,!wintermute` |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |
| `flow` | `string` | **[optional]** Direction. One of `in`, `out`, `self`, `all` |
| `from` | `string` | **[optional]** From-side filter. Supports addresses, entities, `type:cex`, `deposit:binance`, etc. |
| `to` | `string` | **[optional]** To-side filter. Supports addresses, entities, `type:cex`, `deposit:binance`, etc. |
| `counterparties` | `string` | **[optional]** Strict counterparty list, comma-separated |
| `tokens` | `string` | **[optional]** Token list, comma-separated, e.g. `ethereum,0xA0b8...` |
| `timeGte` | `string` | **[optional]** Start time, e.g. `2024-01-01T00:00:00Z` |
| `timeLte` | `string` | **[optional]** End time, e.g. `2024-01-01T00:00:00Z` |
| `timeLast` | `string` | **[optional]** Relative time range, e.g. `24h` |
| `valueGte` | `string` | **[optional]** Minimum raw token amount, e.g. `100.23` |
| `valueLte` | `string` | **[optional]** Maximum raw token amount, e.g. `100.23` |
| `usdGte` | `string` | **[optional]** Minimum USD amount, e.g. `100.23` |
| `usdLte` | `string` | **[optional]** Maximum USD amount, e.g. `100.23` |
| `sortKey` | `string` | **[optional]** Sort field. One of `time`, `value`, `usd` |
| `sortDir` | `string` | **[optional]** Sort direction. One of `asc` or `desc` |
| `limit` | `integer` | **[optional]** Rows to return, e.g. `10`. Non-admin maximum is `100` |
| `offset` | `integer` | **[optional]** Pagination offset, e.g. `0` |

### Example

```bash
curl "http://0xrouter.app/chaindata/transfers/histogram/simple?base=binance&flow=in&timeLast=24h" \
  -H "X-My-Token: your_token"
```

## 6. Token endpoints

### 6.1 `GET /chaindata/token/market/{id}`

Returns the current market data for the token.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | `string` | **[required]** CoinGecko pricing ID, e.g. `usd-coin` |

### Query Parameters

None.

### 6.2 `GET /chaindata/token/addresses/{id}`

Returns the chain-and-contract-address mapping for the token across every chain it lives on.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | `string` | **[required]** CoinGecko pricing ID, e.g. `usd-coin` |

### Query Parameters

None.

### 6.3 `GET /chaindata/token/arkham_exchange_tokens`

Returns the exchange-token mapping.

### Path Parameters

None.

### Query Parameters

None.

### 6.4 `GET /chaindata/token/trending`

Returns the current trending-token list across chains.

### Path Parameters

None.

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/token/trending" \
  -H "X-My-Token: your_token"
```

### 6.5 `GET /chaindata/token/top_flow/{id}`

Returns the top inflow / outflow for the specified token.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | `string` | **[required]** CoinGecko pricing ID, e.g. `bitcoin` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `timeLast` | `string` | **[optional]** Relative time range, e.g. `24h` |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### 6.6 `GET /chaindata/token/volume/{id}`

Returns aggregated volume data for the specified token.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | `string` | **[required]** CoinGecko pricing ID, e.g. `bitcoin` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `timeLast` | `string` | **[optional]** Relative time range, e.g. `24h` |
| `granularity` | `string` | **[optional]** Time granularity, e.g. `1h` |

### 6.7 `GET /chaindata/token/price/history/{id}`

Returns the historical price series for the specified token.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | `string` | **[required]** CoinGecko pricing ID, e.g. `usd-coin` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `daily` | `string` | **[optional]** When `true`, returns daily candles. Otherwise returns hourly data |

### 6.8 `GET /chaindata/token/holders/{id}`

Returns the token holder structure by pricing ID.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | `string` | **[required]** CoinGecko pricing ID, e.g. `usd-coin` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `groupByEntity` | `string` | **[optional]** When `true`, aggregates by entity instead of by address |
| `limit` | `integer` | **[optional]** Rows to return. Default `100`, maximum `100` (non-admin tokens are also capped at `100`) |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0`. Note that `offset + limit <= 1000` |

### Example

```bash
curl "http://0xrouter.app/chaindata/token/holders/usd-coin?groupByEntity=true&limit=100&offset=0" \
  -H "X-My-Token: your_token"
```

### 6.9 `GET /chaindata/token/holders/{chain}/{address}`

Returns the token holder structure by chain and contract address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chain` | `string` | **[required]** Chain name, e.g. `ethereum`, `bsc`, `polygon`, `solana` |
| `address` | `string` | **[required]** Token contract address, e.g. `0xA0b8...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `groupByEntity` | `string` | **[optional]** When `true`, aggregates by entity instead of by address |
| `limit` | `integer` | **[optional]** Rows to return. Default `100`, maximum `100` (non-admin tokens are also capped at `100`) |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0`. Note that `offset + limit <= 1000` |

### 6.10 `GET /chaindata/token/balance/{chain}/{address}`

Returns the aggregated token balance by chain and contract address. Can be queried by entity or address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chain` | `string` | **[required]** Chain where the token lives. One of `ethereum`, `polygon`, `bsc`, `optimism`, `avalanche`, `arbitrum_one`, `base`, `bitcoin`, `tron`, `flare`, `solana`, `ton`, `dogecoin`, `zcash` |
| `address` | `string` | **[required]** Token contract address, e.g. `0xA0b8...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entityID` | `string` | **[optional]** Entity ID whose balance is queried. At least one of `entityID` or `address` must be provided. e.g. `binance` |
| `address` | `string` | **[optional]** Address list whose balance is queried, comma-separated. At least one of `entityID` or `address` must be provided |

### Example

```bash
curl "http://0xrouter.app/chaindata/token/balance/ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?entityID=binance" \
  -H "X-My-Token: your_token"
```

### 6.11 `GET /chaindata/token/balance/{id}`

Returns the aggregated token balance by CoinGecko pricing ID. Can be queried by entity or address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | `string` | **[required]** CoinGecko pricing ID, e.g. `usd-coin` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `entityID` | `string` | **[optional]** Entity ID whose balance is queried. At least one of `entityID` or `address` must be provided. e.g. `binance` |
| `address` | `string` | **[optional]** Address list whose balance is queried, comma-separated. At least one of `entityID` or `address` must be provided |

### Example

```bash
curl "http://0xrouter.app/chaindata/token/balance/usd-coin?entityID=binance" \
  -H "X-My-Token: your_token"
```

### 6.12 `GET /chaindata/token/price/history/{chain}/{address}`

Returns the historical price series for a token by chain and contract address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chain` | `string` | **[required]** Chain where the token lives. One of `ethereum`, `polygon`, `bsc`, `optimism`, `avalanche`, `arbitrum_one`, `base`, `bitcoin`, `tron`, `flare`, `solana`, `ton`, `dogecoin`, `zcash` |
| `address` | `string` | **[required]** Token contract address, e.g. `0xA0b8...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `daily` | `string` | **[optional]** When `true`, returns daily candles. Otherwise returns hourly data |

### Example

```bash
curl "http://0xrouter.app/chaindata/token/price/history/ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?daily=true" \
  -H "X-My-Token: your_token"
```

### 6.13 `GET /chaindata/token/price_change/{id}`

Returns the price change of the specified token since a past timestamp, including absolute and percentage values.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | `string` | **[required]** CoinGecko pricing ID, e.g. `usd-coin` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `pastTime` | `string` | **[required]** RFC3339 timestamp, e.g. `2025-01-01T00:00:00Z` |

### Example

```bash
curl "http://0xrouter.app/chaindata/token/price_change/usd-coin?pastTime=2025-01-01T00:00:00Z" \
  -H "X-My-Token: your_token"
```

### 6.14 `GET /chaindata/token/top`

Returns the token activity ranking, sorted by volume, inflow, outflow, netflow, or other metrics.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `timeframe` | `string` | **[optional]** Aggregation time range. One of `1h`, `6h`, `12h`, `24h`, `7d` |
| `orderByAgg` | `string` | **[optional]** Sort metric. One of `volume`, `inflow`, `outflow`, `volumeDex`, `volumeCex`, `inflowDex`, `inflowCex`, `outflowDex`, `outflowCex`, `netflowDex`, `netflowCex`, `netflow`, `netflowVolumeRatio`, `netflowVolumeRatioDex`, `netflowVolumeRatioCex`, `price` |
| `orderByDesc` | `boolean` | **[optional]** Whether to sort descending. Common value `true` |
| `orderByPercent` | `boolean` | **[optional]** Whether to sort by percentage change. Common value `true` |
| `from` | `string` | **[optional]** Pagination start position |
| `size` | `string` | **[optional]** Rows per page |
| `minVolume` | `string` | **[optional]** Minimum USD volume filter |
| `maxVolume` | `string` | **[optional]** Maximum USD volume filter |
| `minMarketCap` | `string` | **[optional]** Minimum USD market cap filter |
| `maxMarketCap` | `string` | **[optional]** Maximum USD market cap filter |
| `numReferencePeriods` | `string` | **[optional]** Number of comparison reference periods. Accepts `auto` |
| `tokenIds` | `string` | **[optional]** CoinGecko token ID list, comma-separated |
| `chains` | `string` | **[optional]** Chain list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/token/top?timeframe=24h&orderByAgg=volume&orderByDesc=true&size=20&chains=ethereum,bsc" \
  -H "X-My-Token: your_token"
```

### 6.15 `GET /chaindata/token/top_flow/{chain}/{address}`

Returns top-flow data for a token by chain and contract address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chain` | `string` | **[required]** Chain where the token lives. One of `ethereum`, `polygon`, `bsc`, `optimism`, `avalanche`, `arbitrum_one`, `base`, `bitcoin`, `tron`, `flare`, `solana`, `ton`, `dogecoin`, `zcash` |
| `address` | `string` | **[required]** Token contract address, e.g. `0xA0b8...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `timeLast` | `string` | **[optional]** Relative time range, e.g. `24h` |
| `chains` | `string` | **[optional]** Additional chain filter list, comma-separated, e.g. `ethereum,bsc,polygon` |

### Example

```bash
curl "http://0xrouter.app/chaindata/token/top_flow/ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?timeLast=24h&chains=ethereum,bsc" \
  -H "X-My-Token: your_token"
```

### 6.16 `GET /chaindata/token/trending/{id}`

Returns the trending detail for a single token.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `id` | `string` | **[required]** CoinGecko pricing ID, e.g. `usd-coin` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/token/trending/usd-coin" \
  -H "X-My-Token: your_token"
```

### 6.17 `GET /chaindata/token/volume/{chain}/{address}`

Returns aggregated volume data for a token by chain and contract address.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `chain` | `string` | **[required]** Chain where the token lives. One of `ethereum`, `polygon`, `bsc`, `optimism`, `avalanche`, `arbitrum_one`, `base`, `bitcoin`, `tron`, `flare`, `solana`, `ton`, `dogecoin`, `zcash` |
| `address` | `string` | **[required]** Token contract address, e.g. `0xA0b8...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `timeLast` | `string` | **[optional]** Relative time range, e.g. `24h` |
| `granularity` | `string` | **[optional]** Time granularity, e.g. `1h` |

### Example

```bash
curl "http://0xrouter.app/chaindata/token/volume/ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?timeLast=24h&granularity=1h" \
  -H "X-My-Token: your_token"
```

## 7. Polymarket endpoints

### 7.1 `GET /chaindata/polymarket/activity`

Returns Polymarket on-chain activity entries (trade, split, merge, convert) in reverse chronological order. Filter by user address, market, outcome token, USD notional, trade price, share size, action, event type, and buy/sell direction.

All query parameters are optional. Array parameters (`userAddresses`, `tokenAddresses`, `actions`) are passed as comma-separated strings.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `userAddresses` | `string` | **[optional]** Polymarket trader address list, comma-separated, e.g. `abc123,def456` |
| `conditionID` | `string` | **[optional]** Polymarket market `conditionID`, e.g. `abc123` |
| `tokenAddresses` | `string` | **[optional]** Polymarket outcome token contract address list, comma-separated |
| `minUsd` | `integer` | **[optional]** Minimum USD notional filter, integer |
| `maxUsd` | `integer` | **[optional]** Maximum USD notional filter, integer |
| `minPrice` | `string` | **[optional]** Minimum trade price filter (USD per share), float, e.g. `1.23` |
| `maxPrice` | `string` | **[optional]** Maximum trade price filter (USD per share), float, e.g. `1.23` |
| `minSize` | `integer` | **[optional]** Minimum outcome-share size filter, integer |
| `maxSize` | `integer` | **[optional]** Maximum outcome-share size filter, integer |
| `actions` | `string` | **[optional]** Action list, comma-separated, e.g. `buy` |
| `eventType` | `string` | **[optional]** Event type. One of `trade`, `split`, `merge`, `convert` |
| `direction` | `string` | **[optional]** Trade direction. One of `buy`, `sell` |
| `startTime` | `integer` | **[optional]** Start time, Unix timestamp |
| `endTime` | `integer` | **[optional]** End time, Unix timestamp |
| `limit` | `integer` | **[optional]** Rows to return. Default `50`, max `500`. Non-admin tokens are still capped at `100` |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0` |
| `fastPagination` | `string` | **[optional]** Fast pagination mode. When `true`, the upstream only counts enough results to determine whether another page exists |
| `sortBy` | `string` | **[optional]** Sort field. One of `time` (default), `size` (outcome shares), `price` (cents per share), `usd` (USD notional) |
| `sortOrder` | `string` | **[optional]** Sort direction. One of `asc` or `desc`. Default `desc` |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/activity" \
  -H "X-My-Token: your_token" \
  --data-urlencode "eventType=trade" \
  --data-urlencode "direction=buy" \
  --data-urlencode "minUsd=1000" \
  --data-urlencode "sortBy=time" \
  --data-urlencode "sortOrder=desc" \
  --data-urlencode "limit=50" \
  --data-urlencode "offset=0"
```

### 7.2 `GET /chaindata/polymarket/event-positions/{conditionId}`

Returns event positions for a single Polymarket market identified by `conditionId`, including holder address, outcome token, position shares, position USD value, and PnL.

The path parameter `conditionId` is required; query parameters are optional. Array parameters (`tokenAddresses`, `userAddresses`) are passed as comma-separated strings. When `tokenAddresses` is provided, it overrides the outcome tokens derived from `conditionId`.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `conditionId` | `string` | **[required]** Polymarket market `conditionID`, e.g. `abc123` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `tokenAddresses` | `string` | **[optional]** Outcome token contract address list, comma-separated. Overrides the outcome tokens derived from `conditionId` when provided |
| `userAddresses` | `string` | **[optional]** Polymarket trader address list, comma-separated |
| `outcome` | `integer` | **[optional]** Outcome token. `0` for Yes token, `1` for No token |
| `minShares` | `integer` | **[optional]** Minimum position-share filter, integer |
| `maxShares` | `integer` | **[optional]** Maximum position-share filter, integer |
| `minValue` | `integer` | **[optional]** Minimum position USD value filter, integer |
| `maxValue` | `integer` | **[optional]** Maximum position USD value filter, integer |
| `minPnl` | `integer` | **[optional]** Minimum position PnL filter, integer |
| `maxPnl` | `integer` | **[optional]** Maximum position PnL filter, integer |
| `sortBy` | `string` | **[optional]** Sort field. One of `pnl` (default), `shares` (position shares), `value` (position USD value) |
| `sortOrder` | `string` | **[optional]** Sort direction. One of `asc` or `desc`. Default `desc` |
| `limit` | `integer` | **[optional]** Rows to return. Default `50`, max `1000`. Non-admin tokens are still capped at `100` |
| `offset` | `integer` | **[optional]** Pagination offset |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/event-positions/abc123" \
  -H "X-My-Token: your_token" \
  --data-urlencode "outcome=0" \
  --data-urlencode "minValue=1000" \
  --data-urlencode "sortBy=pnl" \
  --data-urlencode "sortOrder=desc" \
  --data-urlencode "limit=50" \
  --data-urlencode "offset=0"
```

### 7.3 `GET /chaindata/polymarket/events`

Returns Polymarket events including event title, tags, end time, creation time, volume, and closed/ended flags. Filter by tag, keyword, or active state.

All query parameters are optional. `tag` / `excludeTag` match lowercase Polymarket tags case-insensitively. `active=true` returns only events that are neither closed nor ended. `sortBy` defaults to `volume`; when `tag` is provided the default switches to `endDate`.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `tag` | `string` | **[optional]** Event tag filter. Matches lowercase Polymarket tags case-insensitively |
| `excludeTag` | `string` | **[optional]** Exclude events carrying this tag (case-insensitive) |
| `active` | `string` | **[optional]** Only return active events (not closed and not ended). One of `true` or `false` |
| `search` | `string` | **[optional]** Full-text search keyword on event title |
| `sortBy` | `string` | **[optional]** Sort field. One of `volume`, `endDate`, `createdAt`. Default: `volume` when no `tag`, `endDate` when `tag` is set |
| `order` | `string` | **[optional]** Sort direction. One of `asc` or `desc`. Default `desc` |
| `limit` | `integer` | **[optional]** Rows to return. Range `1-100`. Default `50`. Upstream cap is `100`, so admin and non-admin tokens behave identically |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0` |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/events" \
  -H "X-My-Token: your_token" \
  --data-urlencode "active=true" \
  --data-urlencode "sortBy=volume" \
  --data-urlencode "order=desc" \
  --data-urlencode "limit=50" \
  --data-urlencode "offset=0"
```

### 7.4 `GET /chaindata/polymarket/events/{eventId}`

Returns the full detail of a single Polymarket event identified by its numeric `eventId`, including event title, tags, market list, volume, and start/end timestamps.

The path parameter `eventId` is required and must be an integer. No query parameters are accepted.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `eventId` | `integer` | **[required]** Polymarket event ID, integer, e.g. `1` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/polymarket/events/12345" \
  -H "X-My-Token: your_token"
```

### 7.5 `GET /chaindata/polymarket/leaderboard`

Returns the Polymarket trader leaderboard ranked by trading metrics (PnL, volume, etc.). Filter by time period and sort direction. Pass an optional address to also receive that user's rank.

All query parameters are optional.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `period` | `string` | **[optional]** Time period. One of `1d` (default), `1w`, `1m`, `all` |
| `order` | `string` | **[optional]** Sort direction. `desc` returns top traders (default); `asc` returns bottom traders |
| `limit` | `integer` | **[optional]** Rows to return. Range `1-200`. Default `100`. Non-admin tokens are still capped at `100`; admin tokens can request up to `200` |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0` |
| `address` | `string` | **[optional]** Optional trader address. When provided, the response also returns this user's rank |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/leaderboard" \
  -H "X-My-Token: your_token" \
  --data-urlencode "period=1d" \
  --data-urlencode "order=desc" \
  --data-urlencode "limit=100" \
  --data-urlencode "offset=0"
```

### 7.6 `GET /chaindata/polymarket/order-book/{conditionId}`

Returns the order book for a Polymarket market identified by `conditionId`.

The path parameter `conditionId` is required; no query parameters are accepted.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `conditionId` | `string` | **[required]** Polymarket market `conditionID`, e.g. `abc123` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/polymarket/order-book/abc123" \
  -H "X-My-Token: your_token"
```

### 7.7 `GET /chaindata/polymarket/pnl/chart`

Returns the PnL time series for a Polymarket trader address. Filter by market and time range. `userAddress` is required; the other query parameters are optional.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `userAddress` | `string` | **[required]** Polymarket trader address (0x + 40 hex chars), e.g. `0x123abc...` |
| `conditionID` | `string` | **[optional]** Market `conditionID` (0x-prefixed bytes32 hex). When provided, PnL is aggregated across that market's outcome tokens; otherwise portfolio-level PnL is returned |
| `period` | `string` | **[optional]** Time period. One of `24h`, `7d`, `30d` (default), `all`. `period=all` is portfolio-only and cannot be combined with `startTime`/`endTime` |
| `startTime` | `integer` | **[optional]** Start time, Unix timestamp in seconds. Not supported with `period=all` |
| `endTime` | `integer` | **[optional]** End time, Unix timestamp in seconds |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/pnl/chart" \
  -H "X-My-Token: your_token" \
  --data-urlencode "userAddress=0x123abc..." \
  --data-urlencode "period=30d"
```

### 7.8 `GET /chaindata/polymarket/positions/{addr}`

Returns the open Polymarket positions for a trader address, including outcome token, position shares, position USD value, PnL, and trade count.

The path parameter `addr` is required; query parameters are optional.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `addr` | `string` | **[required]** Polymarket trader address (0x + 40 hex chars), e.g. `0x123abc...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `sortBy` | `string` | **[optional]** Sort field. One of `trades` (default), `shares` (position shares), `value` (position USD value), `pnl` (PnL) |
| `sortOrder` | `string` | **[optional]** Sort direction. One of `asc` or `desc`. Default `desc` |
| `limit` | `integer` | **[optional]** Rows to return. Range `1-1000`. Default `50`. Non-admin tokens are still capped at `100`; admin tokens can request up to `1000` |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0` |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/positions/0x123abc..." \
  -H "X-My-Token: your_token" \
  --data-urlencode "sortBy=pnl" \
  --data-urlencode "sortOrder=desc" \
  --data-urlencode "limit=50" \
  --data-urlencode "offset=0"
```

### 7.9 `GET /chaindata/polymarket/prices`

Returns the historical price time series for a Polymarket outcome token. At least one of `tokenAddress` or `conditionID` must be provided; passing only `conditionID` returns prices for the first outcome (`outcome_index=0`) token.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `tokenAddress` | `string` | **[optional]** Polymarket outcome token contract address (0x-prefixed hex). At least one of `tokenAddress` or `conditionID` is required |
| `conditionID` | `string` | **[optional]** Market `conditionID` (0x-prefixed bytes32 hex). Returns prices for the first outcome (`outcome_index=0`) token. At least one of `tokenAddress` or `conditionID` is required |
| `interval` | `string` | **[optional]** Data interval. One of `1m`, `1h` (default), `1d`, `auto` |
| `range` | `string` | **[optional]** Window selector anchored on the token's last bucket. One of `1d`, `1w`, `1m`, `all`. Overrides `startTime`, `endTime`, and `interval` |
| `startTime` | `integer` | **[optional]** Start time, Unix timestamp in seconds |
| `endTime` | `integer` | **[optional]** End time, Unix timestamp in seconds |
| `limit` | `integer` | **[optional]** Number of price points to return. Range `1-7500`. Default `500`. Non-admin tokens are still capped at `100`; admin tokens can request up to `7500` |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/prices" \
  -H "X-My-Token: your_token" \
  --data-urlencode "conditionID=0xabc123..." \
  --data-urlencode "interval=1h" \
  --data-urlencode "range=1w" \
  --data-urlencode "limit=500"
```

### 7.10 `GET /chaindata/polymarket/stats`

Returns global Polymarket statistics. No query parameters are accepted.

### Path Parameters

None.

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/polymarket/stats" \
  -H "X-My-Token: your_token"
```

### 7.11 `GET /chaindata/polymarket/top-events`

Returns the Polymarket top-events leaderboard. All query parameters are optional.

### Path Parameters

None.

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `period` | `string` | **[optional]** Time period. One of `1d` (default), `1w`, `1m`, `all` |
| `order` | `string` | **[optional]** Sort direction. `desc` returns top wins (default); `asc` returns top losses |
| `limit` | `integer` | **[optional]** Rows to return. Range `1-200`. Default `100`. Non-admin tokens are still capped at `100`; admin tokens can request up to `200` |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0` |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/top-events" \
  -H "X-My-Token: your_token" \
  --data-urlencode "period=1d" \
  --data-urlencode "order=desc" \
  --data-urlencode "limit=100" \
  --data-urlencode "offset=0"
```

### 7.12 `GET /chaindata/polymarket/top-events/{eventId}/breakdown`

Returns the per-trader breakdown for a Polymarket top-event identified by its numeric `eventId`. Both query parameters `address` and `period` are required.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `eventId` | `integer` | **[required]** Polymarket event ID (gamma event ID), integer, e.g. `1` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `address` | `string` | **[required]** Polymarket trader address (0x + 40 hex chars) |
| `period` | `string` | **[required]** Time period. One of `1d`, `1w`, `1m`, `all` |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/top-events/1/breakdown" \
  -H "X-My-Token: your_token" \
  --data-urlencode "address=0x123abc..." \
  --data-urlencode "period=1d"
```

### 7.13 `GET /chaindata/polymarket/top-holders/{conditionId}`

Returns the top holders of a Polymarket market identified by `conditionId`.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `conditionId` | `string` | **[required]** Polymarket market `conditionID`, e.g. `abc123` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `limit` | `integer` | **[optional]** Rows to return. Range `1-200`. Default `100`. Non-admin tokens are still capped at `100`; admin tokens can request up to `200` |
| `outcome` | `integer` | **[optional]** Outcome token. `0` for Yes token, `1` for No token. Omit to return holders of all outcome tokens |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/top-holders/abc123" \
  -H "X-My-Token: your_token" \
  --data-urlencode "limit=100" \
  --data-urlencode "outcome=0"
```

### 7.14 `GET /chaindata/polymarket/wallet/{addr}/prediction-history`

Returns the prediction history for a single Polymarket trader, with rich filtering and sorting options. The path parameter `addr` is required; query parameters are optional.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `addr` | `string` | **[required]** Polymarket trader address (0x + 40 hex chars), e.g. `0x123abc...` |

### Query Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `limit` | `integer` | **[optional]** Rows per page. Range `1-100`. Default `20` |
| `offset` | `integer` | **[optional]** Pagination offset. Default `0` |
| `sort` | `string` | **[optional]** Sort field. One of `value`, `volume`, `currentPrice`, `trades`, `pnl` (default), `shares`, `buyUsd`, `avgBuy`, `sellUsd`, `avgSell` |
| `order` | `string` | **[optional]** Sort direction. One of `asc` or `desc`. Default `desc` |
| `conditionID` | `string` | **[optional]** Market `conditionID` filter; only returns positions for that conditionID |
| `search` | `string` | **[optional]** Search keyword. Matches market question, group title, event title, or `conditionID` |
| `minTrades` | `integer` | **[optional]** Minimum trade count filter, integer |
| `maxTrades` | `integer` | **[optional]** Maximum trade count filter, integer |
| `minVolume` | `integer` | **[optional]** Minimum total volume filter (USD integer) |
| `maxVolume` | `integer` | **[optional]** Maximum total volume filter (USD integer) |
| `minValue` | `integer` | **[optional]** Minimum current held USD value filter, integer |
| `maxValue` | `integer` | **[optional]** Maximum current held USD value filter, integer |
| `minCurrentPrice` | `string` | **[optional]** Minimum current price filter (0-1 fraction) |
| `maxCurrentPrice` | `string` | **[optional]** Maximum current price filter (0-1 fraction) |
| `minPnl` | `integer` | **[optional]** Minimum PnL filter (USD integer, can be negative) |
| `maxPnl` | `integer` | **[optional]** Maximum PnL filter (USD integer, can be negative) |
| `minTotalBuyUsdc` | `integer` | **[optional]** Minimum total buy amount filter (USD integer) |
| `maxTotalBuyUsdc` | `integer` | **[optional]** Maximum total buy amount filter (USD integer) |
| `minAvgBuyPrice` | `string` | **[optional]** Minimum average buy price filter (0-1 fraction) |
| `maxAvgBuyPrice` | `string` | **[optional]** Maximum average buy price filter (0-1 fraction) |
| `minTotalSellUsdc` | `integer` | **[optional]** Minimum total sell amount filter (USD integer) |
| `maxTotalSellUsdc` | `integer` | **[optional]** Maximum total sell amount filter (USD integer) |
| `minAvgSellPrice` | `string` | **[optional]** Minimum average sell price filter (0-1 fraction) |
| `maxAvgSellPrice` | `string` | **[optional]** Maximum average sell price filter (0-1 fraction) |
| `minSharesHeld` | `integer` | **[optional]** Minimum remaining shares held filter, integer |
| `maxSharesHeld` | `integer` | **[optional]** Maximum remaining shares held filter, integer |
| `status` | `string` | **[optional]** Position state filter. One of `open` (active) or `closed` |

### Example

```bash
curl --get "http://0xrouter.app/chaindata/polymarket/wallet/0x123abc.../prediction-history" \
  -H "X-My-Token: your_token" \
  --data-urlencode "sort=pnl" \
  --data-urlencode "order=desc" \
  --data-urlencode "status=open" \
  --data-urlencode "limit=20" \
  --data-urlencode "offset=0"
```

### 7.15 `GET /chaindata/polymarket/wallet/{addr}/summary/balance`

Returns the wallet balance summary for a single Polymarket trader. The path parameter `addr` is required; no query parameters are accepted.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `addr` | `string` | **[required]** Polymarket trader address (0x + 40 hex chars), e.g. `0x123abc...` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/polymarket/wallet/0x123abc.../summary/balance" \
  -H "X-My-Token: your_token"
```

### 7.16 `GET /chaindata/polymarket/wallet/{addr}/summary/biggest-win`

Returns the biggest single-prediction win summary for a single Polymarket trader. The path parameter `addr` is required; no query parameters are accepted.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `addr` | `string` | **[required]** Polymarket trader address (0x + 40 hex chars), e.g. `0x123abc...` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/polymarket/wallet/0x123abc.../summary/biggest-win" \
  -H "X-My-Token: your_token"
```

### 7.17 `GET /chaindata/polymarket/wallet/{addr}/summary/pnl`

Returns the cumulative PnL summary for a single Polymarket trader. The path parameter `addr` is required; no query parameters are accepted.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `addr` | `string` | **[required]** Polymarket trader address (0x + 40 hex chars), e.g. `0x123abc...` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/polymarket/wallet/0x123abc.../summary/pnl" \
  -H "X-My-Token: your_token"
```

### 7.18 `GET /chaindata/polymarket/wallet/{addr}/summary/portfolio`

Returns the portfolio summary for a single Polymarket trader. The path parameter `addr` is required; no query parameters are accepted.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `addr` | `string` | **[required]** Polymarket trader address (0x + 40 hex chars), e.g. `0x123abc...` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/polymarket/wallet/0x123abc.../summary/portfolio" \
  -H "X-My-Token: your_token"
```

### 7.19 `GET /chaindata/polymarket/wallet/{addr}/summary/stats`

Returns the overall stats summary for a single Polymarket trader. The path parameter `addr` is required; no query parameters are accepted.

### Path Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| `addr` | `string` | **[required]** Polymarket trader address (0x + 40 hex chars), e.g. `0x123abc...` |

### Query Parameters

None.

### Example

```bash
curl "http://0xrouter.app/chaindata/polymarket/wallet/0x123abc.../summary/stats" \
  -H "X-My-Token: your_token"
```

## 8. Python examples

The repo's [demo.py](/C:/Users/Administrator/Desktop/zhongzhuan/demo.py) ships a unified call wrapper. Common helpers, listed in alphabetical order:

- `get_token_balance`
- `get_solana_address_subaccount_balances`
- `get_solana_entity_subaccount_balances`
- `get_supported_chains`
- `get_address_counterparties`
- `get_entity_counterparties`
- `get_address_flow`
- `get_entity_flow`
- `get_address_history`
- `get_entity_history`
- `get_entity_balance_changes`
- `get_entity_intelligence`
- `get_entity_predictions`
- `get_entity_types`
- `get_entity_summary`
- `get_all_address_intelligence`
- `get_all_address_intelligence_enriched`
- `get_intelligence_search`
- `get_address_loans`
- `get_entity_loans`
- `get_altcoin_index`
- `get_network_history`
- `get_network_status`
- `get_address_portfolio`
- `get_entity_portfolio`
- `get_address_portfolio_time_series`
- `get_entity_portfolio_time_series`
- `get_swaps`
- `get_token_addresses`
- `get_arkham_exchange_tokens`
- `get_token_balance_by_chain_address`
- `get_token_balance_by_id`
- `get_top_tokens`
- `get_top_token_holders_by_chain_address`
- `get_top_token_holders_by_id`
- `get_token_market_data`
- `get_token_price_change`
- `get_token_price_history_by_chain_address`
- `get_token_price_history`
- `get_top_token_flow_by_chain_address`
- `get_top_token_flow_by_pricing_id`
- `get_trending_token_by_id`
- `get_trending_tokens`
- `get_token_volume_by_chain_address`
- `get_token_volume`
- `get_transfers`
- `get_transfers_histogram`
- `get_transfers_histogram_simple`
- `get_transfers_for_transaction`
- `get_address_volume`
- `get_entity_volume`

Minimal example:

```python
from demo import (
    SERVER_IP,
    MY_TOKEN,
    DEFAULT_ADDRESS,
    get_token_balance,
    get_entity_summary,
    get_transfers,
)

get_token_balance(SERVER_IP, "chaindata", MY_TOKEN)
get_entity_summary(SERVER_IP, "binance", MY_TOKEN)
get_transfers(
    SERVER_IP,
    MY_TOKEN,
    base=DEFAULT_ADDRESS,
    flow="all",
    usd_gte="1",
    sort_key="time",
    sort_dir="desc",
    limit=10,
    offset=0,
)
```

## 9. Status codes

| Code | Meaning | Charged |
| :--- | :--- | :--- |
| `200` | Request succeeded | Yes |
| `400` | Group not allowed or upstream parameter error | No |
| `401` | Token missing | No |
| `402` | Insufficient balance | No |
| `403` | IP banned, invalid token, or token banned | No |
| `429` | Token rate limit triggered | No |
| `502` | Proxy retry still failed | No |
| `503` | All proxy nodes are cooling down | No |

## 10. Risk control and integration advice

Recommended integration order:

1. First call `/account/balance/chaindata` or `balances/address` to verify the token is usable
2. Then call lightweight queries such as `intelligence/address` or `entity/{entity}/summary`
3. Finally integrate heavier endpoints such as `counterparties/*`, `transfers`, and `token/holders`
