# Introduction

Nansen API offers programmatic access to high-quality onchain data and advanced blockchain analytics across numerous networks. The API aims to equip users with the necessary data to gain a competitive edge, identify opportunities, perform due diligence, and make informed decisions within the dynamic crypto market. It effectively translates the complexity of raw blockchain data into actionable intelligence, accessible through a structured API interface.

#### Key Capabilities <a href="#key-capabilities" id="key-capabilities"></a>

* **Proprietary Data Labeling:** Nansen applies unique, human-readable labels to hundreds of millions of blockchain addresses. These labels identify specific entities such as exchanges, funds, market makers, notable individual investors that allows users to understand who is behind onchain activities, providing crucial context that raw, pseudonymous data lacks. Accessing this labelled data via the API is a core component of Nansen's offering.
* **Unique Datasets and Insights:** The API provides access to data points and analytics not readily available elsewhere, such as Smart Money analytics.
* **Comprehensive Multi-Chain Coverage:** The API consolidates data from multiple blockchain networks, allowing users to track assets and activities across different ecosystems through a single integration point.

These features collectively enable the API to deliver not just data, but contextualized intelligence, transforming raw onchain events into a clearer picture of market dynamics and participant behavior.

***

### Quick Links

| Need               | Go To                                                                                    |
| ------------------ | ---------------------------------------------------------------------------------------- |
| API authentication | [/getting-started/authentication](https://docs.nansen.ai/getting-started/authentication) |
| Rate limits        | [/getting-started/rate-limits](https://docs.nansen.ai/getting-started/rate-limits)       |
| Error handling     | [/getting-started/error-handling](https://docs.nansen.ai/getting-started/error-handling) |
| Supported chains   | [/reference/chains](https://docs.nansen.ai/reference/chains)                             |
| Filter types       | [/reference/filters](https://docs.nansen.ai/reference/filters)                           |
| AI Agent Access    | [/getting-started/agents](https://docs.nansen.ai/getting-started/agents)                 |

#### API Endpoints

| Category           | Path                                                                      |
| ------------------ | ------------------------------------------------------------------------- |
| Overview           | [/api/overview](https://docs.nansen.ai/api/overview)                      |
| Smart Money        | [/api/smart-money](https://docs.nansen.ai/api/smart-money)                |
| Profiler           | [/api/profiler](https://docs.nansen.ai/api/profiler)                      |
| Token Screener     | [/api/token-god-mode](https://docs.nansen.ai/api/token-god-mode)          |
| Portfolio          | [/api/portfolio](https://docs.nansen.ai/api/portfolio)                    |
| Points             | [/api/points](https://docs.nansen.ai/api/points)                          |
| Hyperliquid        | [/api/hyperliquid](https://docs.nansen.ai/api/hyperliquid)                |
| Agent              | [/api/v1/agent](https://docs.nansen.ai/api/agent)                         |
| Prediction Markets | [/api/v1/prediction-market](https://docs.nansen.ai/api/prediction-market) |

#### MCP

| Category          | Path                                                     |
| ----------------- | -------------------------------------------------------- |
| Connecting To MCP | [/mcp/connecting](https://docs.nansen.ai/mcp/connecting) |
| Supported Tools   | [/mcp/tools](https://docs.nansen.ai/mcp/tools)           |

#### Guides

| Tutorial                   | Path                                                                               |
| -------------------------- | ---------------------------------------------------------------------------------- |
| Use case Templates         | [/guides/templates](https://docs.nansen.ai/guides/templates)                       |
| Data Redistribution Guides | [/guides/redistribution-guide](https://docs.nansen.ai/guides/redistribution-guide) |


# Getting Started

Welcome to the Nansen API. This guide will help you get up and running quickly.

### Prerequisites

* A Nansen account with API access
* An API key from your [Nansen Dashboard](https://app.nansen.ai) or through [Agent Setup Link](https://app.nansen.ai/auth/agent-setup)

### Quick Start

#### 1. Set Up Authentication

All API requests require your API key in the `apikey` header:

```bash
curl -X POST 'https://api.nansen.ai/api/v1/smart-money/holdings' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -d '{"chains": ["ethereum"]}'
```

#### 2. Make Your First Request

```python
import httpx

response = httpx.post(
    "https://api.nansen.ai/api/v1/smart-money/holdings",
    headers={
        "Content-Type": "application/json",
        "apikey": "YOUR_API_KEY"
    },
    json={
        "chains": ["ethereum"],
        "pagination": {"page": 1, "per_page": 10}
    }
)

print(response.json())
```

#### 3. Understand the Response

```json
{
  "data": [
    {
      "chain": "ethereum",
      "token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
      "token_symbol": "PEPE",
      "value_usd": 15000000.50,
      "holders_count": 1250,
      "balance_24h_percent_change": 5.25
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "is_last_page": false
  }
}
```

### Next Steps

* Authentication - Detailed auth setup
* Rate Limits - Understand API limits
* Credits System - How credits work
* Pagination - Handle large datasets
* Error Handling - Handle errors gracefully
* Best Practices - Optimize your integration


# Authentication

### Overview

The Nansen API uses API key authentication. All requests must include your API key in the `apikey` header.

### Getting Your API Key

1. Log in to your [Nansen Account](https://app.nansen.ai/auth/agent-setup)
2. Generate a new API key

### Using Your API Key

#### Header Format

```
apikey: YOUR_API_KEY
```

#### curl Example

```bash
curl -X POST 'https://api.nansen.ai/api/v1/smart-money/holdings' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -d '{"chains": ["ethereum"]}'
```

#### Python Example

```python
import httpx

headers = {
    "Content-Type": "application/json",
    "apikey": "YOUR_API_KEY"
}

response = httpx.post(
    "https://api.nansen.ai/api/v1/smart-money/holdings",
    headers=headers,
    json={"chains": ["ethereum"]}
)
```

#### Python with Environment Variable

```python
import os
import httpx

API_KEY = os.environ.get("NANSEN_API_KEY")

headers = {
    "Content-Type": "application/json",
    "apikey": API_KEY
}

response = httpx.post(
    "https://api.nansen.ai/api/v1/smart-money/holdings",
    headers=headers,
    json={"chains": ["ethereum"]}
)
```

### Authentication Errors

#### 401 Unauthorized

Returned when the API key is missing or invalid:

```json
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}
```

**Solutions:**

* Verify your API key is correct
* Ensure the header name is `apikey` (lowercase)
* Check that the key hasn't been revoked

#### 403 Forbidden

Returned when the API key doesn't have permission for the requested resource:

```json
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Insufficient permissions for this endpoint"
  }
}
```

**Solutions:**

* Verify your subscription tier includes access to this endpoint
* Contact support to upgrade your plan

### Key Management

If your key is compromised:

1. Immediately revoke it in your dashboard
2. Generate a new key
3. Update all applications using the old key


# AI Agent Access

Connect your AI agent to Nansen's blockchain data API in under a minute.

### Get Started

[**Setup URL**](https://app.nansen.ai/auth/agent-setup)

1\. Your agent will ask you to visit the setup page

2\. Sign in with your Nansen account &#x20;

3\. Copy the message shown

4\. Paste it back to your agent

\
Your agent saves the key and handles everything else automatically.

<br>


# Rate Limits

### Overview

The Nansen API implements rate limiting to ensure fair usage and system stability. Rate limits are applied per API key and vary by subscription tier.

**Rate Limits:**&#x20;

The current rate limits are 20 **requests per second** and **300 requests per minute**.

**Exceeding Rate Limits:**&#x20;

If you exceed the defined rate limits, the API will return an error response. You should expect a **429 Too Many Requests** HTTP status code.&#x20;


# Credits & Pricing Guide

Welcome to our updated API pricing and credit system. We’ve made it easier to get started, scale up, and pay only for what you need.

## Available API Plans

We offer two main API plans to fit your needs:

<table><thead><tr><th>Plan</th><th>Credits Included</th><th width="109.5078125">Top Ups</th><th>Intended Use</th></tr></thead><tbody><tr><td>Pro</td><td>1,000 Starter Credits<br>(one time grant)</td><td>✅</td><td>Professional, production, and high volume integrations</td></tr><tr><td>Free</td><td>1000 Trial Credits<br>(one time grant)</td><td>✅</td><td>Brief experimentation and testing; comes at 10x credit consumption</td></tr></tbody></table>

{% hint style="warning" %}
**Free plan: 10× credit cost.** API calls on the free plan consume **10× more credits** than on any paid plan. If you're building anything beyond light testing, upgrade before you exhaust your credits.
{% endhint %}

For more information on plan features, visit [our pricing page](https://app.nansen.ai/account/switch-plans).

### Pro Plan Details

* Subscription: $49/month (annual) or $69/month (monthly)
* Starter Credits: Get 1,000 credits to start building before making your first purchase
* Flexi-Credits: Purchase as many credits as you want. (Here's a [purchase guide](https://docs.nansen.ai/about/credits-and-pricing-guide#endpoint-credit-cost))
* Expiry: Credits expire 1 year from purchase&#x20;

### Free Plan Details

* 1000 one-time credits to try the API
* Ability to purchase credits
* API credits are consumed much faster than Pro plan

<details>

<summary>List of Available Endpoints in Free Tier</summary>

Free plan users have access to the following endpoints:

* `/v1/profiler/address/transactions`
* `/v1/profiler/address/current-balance`
* `/v1/profiler/address/historical-balances`
* `/v1/profiler/address/counterparties`
* `/v1/profiler/address/related-wallets`
* `/v1/tgm/flows`
* `/v1/tgm/who-bought-sold`
* `/v1/tgm/dex-trades`
* `/v1/tgm/transfers`
* `/v1/tgm/holders`
* `/v1/portfolio/defi-holdings`
* `/v1/transaction-with-token-transfer-lookup`
* `/v1/token-screener`

</details>

## What Your Budget Gets You?

{% hint style="info" %}
You can also use [this Credit Purchase Calculator](https://docs.google.com/spreadsheets/d/15P3HFSZUq_XnSKRalqe26-N9MT59wIdH0N8STxZuRos/edit?usp=sharing) to easily plan your API budget.
{% endhint %}

Quickly compare what each credit package unlocks across our main API features.&#x20;

<table><thead><tr><th width="126.66015625">Budget</th><th width="133.6328125">Credits</th><th>What it gets you</th></tr></thead><tbody><tr><td>$100</td><td>100K</td><td>100K balance/pnl/txn checks<br>or<br>20K Smart Money calls<br>or<br>200 label lookups</td></tr><tr><td>$500</td><td>500K</td><td>500K balance/pnl/txn checks<br>or<br>100K Smart Money calls<br>or<br>1000 label lookups</td></tr><tr><td>$1000</td><td>1M</td><td>1M balance/pnl/txn checks<br>or<br>200K Smart Money calls<br>or<br>2000 label lookups</td></tr></tbody></table>

## Endpoint Credit Cost

Credit costs are structured to reflect the value of the data you’re accessing. Foundational data is inexpensive to encourage frequent use, while our proprietary, alpha-generating data costs more.

{% hint style="info" %}
Note: Free tier consumes 10x more credits than Pro. (1 credit on Pro = 10 credits on free)
{% endhint %}

<table><thead><tr><th width="427.9609375" valign="top">Endpoint</th><th valign="top">Credit Cost per Call (Pro)</th></tr></thead><tbody><tr><td valign="top">profiler/address/current-balances</td><td valign="top">1</td></tr><tr><td valign="top">profiler/address/historical-balances</td><td valign="top">1</td></tr><tr><td valign="top">profiler/perp-positions</td><td valign="top">1</td></tr><tr><td valign="top">profiler/address/transactions</td><td valign="top">1</td></tr><tr><td valign="top">profiler/perp-trades</td><td valign="top">1</td></tr><tr><td valign="top">profiler/address/related-wallets</td><td valign="top">1</td></tr><tr><td valign="top">profiler/pnl-summary</td><td valign="top">1</td></tr><tr><td valign="top">profiler/pnl</td><td valign="top">1</td></tr><tr><td valign="top">tgm/token-screener</td><td valign="top">1</td></tr><tr><td valign="top">tgm/perp-screener</td><td valign="top">1</td></tr><tr><td valign="top">tgm/transfers</td><td valign="top">1</td></tr><tr><td valign="top">tgm/dcas</td><td valign="top">1</td></tr><tr><td valign="top">tgm/flow-intel</td><td valign="top">1</td></tr><tr><td valign="top">tgm/who-bought-sold</td><td valign="top">1</td></tr><tr><td valign="top">tgm/dex-trades</td><td valign="top">1</td></tr><tr><td valign="top">portfolio/defi-holdings</td><td valign="top">1</td></tr><tr><td valign="top">tgm/token-information</td><td valign="top">1</td></tr><tr><td valign="top">tgm/token-ohlcv</td><td valign="top">1</td></tr><tr><td valign="top">tgm/flows</td><td valign="top">1</td></tr><tr><td valign="top">tgm/indicators</td><td valign="top">5</td></tr><tr><td valign="top">All Smart Money endpoints (/inflows, /holdings, /dex-trades, etc.)</td><td valign="top">5</td></tr><tr><td valign="top">profiler/perp-leaderboard</td><td valign="top">5</td></tr><tr><td valign="top">profiler/address/counterparties</td><td valign="top">5</td></tr><tr><td valign="top">tgm/perp-positions</td><td valign="top">5/150 (premium labels)</td></tr><tr><td valign="top">tgm/perp-pnl-leaderboard</td><td valign="top">5/150 (premium labels)</td></tr><tr><td valign="top">tgm/holders</td><td valign="top">5/150 (premium labels)</td></tr><tr><td valign="top">tgm/pnl-leaderboard</td><td valign="top">5/150 (premium labels)</td></tr><tr><td valign="top">Label endpoints</td><td valign="top">Common Labels: 100 <br>Premium Labels: 500</td></tr><tr><td valign="top">Agent Endpoint</td><td valign="top">Fast Mode: 200<br>Expert Mode: 750</td></tr><tr><td valign="top">prediction-market/categories</td><td valign="top">1</td></tr><tr><td valign="top">prediction-market/market-screener</td><td valign="top">1</td></tr><tr><td valign="top">prediction-market/event-screener</td><td valign="top">1</td></tr><tr><td valign="top">prediction-market/ohlcv</td><td valign="top">1</td></tr><tr><td valign="top">prediction-market/orderbook</td><td valign="top">1</td></tr><tr><td valign="top">prediction-market/trades-by-market</td><td valign="top">1</td></tr><tr><td valign="top">prediction-market/trades-by-address</td><td valign="top">1</td></tr><tr><td valign="top">prediction-market/pnl-by-address</td><td valign="top">1</td></tr><tr><td valign="top">prediction-market/address-summary</td><td valign="top">1</td></tr><tr><td valign="top">/prediction-market/top-holders</td><td valign="top">5</td></tr><tr><td valign="top">prediction-market/pnl-by-market</td><td valign="top">5</td></tr><tr><td valign="top">prediction-market/position-detail</td><td valign="top">5</td></tr></tbody></table>

## FAQs

**What happens if I run out of credits?**&#x20;

You can purchase additional credit blocks at any time to ensure your service is not interrupted.&#x20;

**Are there higher tiers or enterprise plans?**&#x20;

No, the Pro plan is designed to meet most needs. However, if you are making a bulk credit purchase over $10,000, please reach out to our sales team to discuss a custom solution.

**How do I track my credit usage?**

You can track your credit usage by visiting this link: <https://app.nansen.ai/api?tab=usage-analytics>


# Error Handling

API responses are delivered in JSON format. The client applications must parse this JSON to extract the required data. Equally important is handling the HTTP status code returned with each response to determine success or failure.

**Common HTTP Status Codes:**

<table data-header-hidden><thead><tr><th width="112.921875" valign="top">Status Code</th><th valign="top">Meaning</th><th valign="top">What to Do</th></tr></thead><tbody><tr><td valign="top">400</td><td valign="top">Bad Request: Malformed request, invalid parameters or format</td><td valign="top">Check your request syntax and parameters</td></tr><tr><td valign="top">401</td><td valign="top">Unauthorized: Authentication failed (missing, invalid, or expired token)</td><td valign="top">Obtain or refresh your API Key</td></tr><tr><td valign="top">402</td><td valign="top">x402: Payment Required</td><td valign="top">Please make the payment for API request and try again</td></tr><tr><td valign="top">403</td><td valign="top">Forbidden: Auth succeeded, but no permission for resource</td><td valign="top">Ensure your account has access rights</td></tr><tr><td valign="top">404</td><td valign="top">Not Found: Resource or endpoint does not exist</td><td valign="top">Verify the endpoint path and resource identifiers</td></tr><tr><td valign="top">422</td><td valign="top">Unprocessable Content</td><td valign="top">Please verify your parameters</td></tr><tr><td valign="top">429</td><td valign="top">Too Many Requests: Rate limit exceeded</td><td valign="top">Slow down requests; respect rate limits</td></tr><tr><td valign="top">500</td><td valign="top">Internal Server Error: Unexpected server issue</td><td valign="top">Try again later; contact support if persistent</td></tr><tr><td valign="top">504</td><td valign="top">Gateway Timeout: Backend server did not respond in time</td><td valign="top">Retry after a short wait; check for heavy queries</td></tr></tbody></table>

<br>


# Agentic Payments

Call the Nansen API without an account, subscription, or API key. Pay per request in USDC and get data back.

Agentic payments let machines: AI agents, scripts, bots access Nansen data on demand, settling each call on-chain. No provisioning, no key management, no long-lived credentials. Sign a payment, make the request, get the response.

Nansen supports two agentic payment rails on the same `/api/v1/*` endpoints:

* **x402:** The open HTTP payment standard. USDC on Base or Solana. Broad client-side tooling and SDK support. Best for agents already operating on Base or Solana.
* **MPP on Tempo:** Machine Payments Protocol settlement on Tempo mainnet. Sub-cent per-call pricing. Best for agents already settling on Tempo or optimising for per-call cost.

Both rails hit the same endpoints and return identical response bodies. An agent can mix and match x402 for some calls, MPP for others.

### Supported endpoints

All Pro-tier endpoints accept agentic payments, except:

* `/api/v1/labels/*` — Pro subscription only (proprietary entity data).

Pricing is tiered by endpoint:

| Tier        | Price      | Examples                                                              |
| ----------- | ---------- | --------------------------------------------------------------------- |
| Basic       | $0.01/call | Token Screener, Wallet Balances, Transactions, PnL, DEX Trades, Flows |
| Premium     | $0.05/call | Counterparties, Holders, PnL Leaderboard, Perp Leaderboard            |
| Smart Money | $0.05/call | SM Net Flow, SM Inflows, SM Holdings, SM DEX Trades                   |

The full endpoint list and tier breakdown is on the [x402](https://claude.ai/chat/x402#pricing) page. MPP uses the same tiers and prices.

### Discovery

Fetch `/.well-known/x402` to see every priced endpoint, its cost, and which payment protocols it supports:

```bash
curl -s https://api.nansen.ai/.well-known/x402 | jq
```

The `paymentProtocols` field lists the rails available for each endpoint (`x402`, `mpp`, or both).


# MPP (Tempo)

Pay-per-call access to the Nansen API using USDC on Tempo, via the Machine Payments Protocol (MPP). Any `/api/v1/*` endpoint that supports pay-per-call can be invoked anonymously by signing a Tempo payment instead of presenting an API key — no account, no subscription, no bearer token.

MPP is one of two agentic payment rails supported by Nansen; the other is x402. The same endpoints accept both.

### When to use MPP

* Agents or machines that need ad-hoc access to a handful of calls without provisioning an API key.
* Integrations that already settle on Tempo and want sub-cent per-call pricing on the same rail.
* Environments where storing a long-lived API key is undesirable.

### Quick start

Install the Tempo CLI and log in to a funded mainnet wallet:

```bash
curl -fsSL https://tempo.xyz/install | bash
tempo wallet login
tempo wallet whoami          # expect "ready": true
```

Then call any priced endpoint with `Authorization: Payment`:

```bash
tempo request -X POST https://api.nansen.ai/api/v1/tgm/indicators \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Payment' \
  --json '{"chain":"ethereum","token_address":"0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"}'
```

The CLI handles the challenge/sign/retry loop for you. On success you get the endpoint's JSON response plus a `Payment-Receipt` header.

### How it works

```
  Client                              Nansen API
    |                                     |
    |  POST /api/v1/...                   |
    |  Authorization: Payment             |
    |  (no signed credential yet)         |
    |------------------------------------>|
    |                                     |
    |   402 Payment Required              |
    |   WWW-Authenticate: Payment ...     |
    |<------------------------------------|
    |                                     |
    |  Sign challenge with Tempo wallet   |
    |                                     |
    |  POST /api/v1/...                   |
    |  Authorization: Payment <signed>    |
    |------------------------------------>|
    |                                     |
    |   200 OK                            |
    |   Payment-Receipt: <base64>         |
    |<------------------------------------|
```

1. Client sends the request with `Authorization: Payment`.
2. Server returns `402 Payment Required` with a `WWW-Authenticate: Payment` header advertising a fresh challenge (amount, currency, chain, recipient, expiry).
3. Client signs the challenge with a wallet funded on Tempo mainnet.
4. Client retries the same request with the signed credential.
5. Server verifies the on-chain settlement, runs the endpoint, and returns the response plus a `Payment-Receipt` header referencing the tx hash.

### Discovery

Fetch `/.well-known/x402` to see every priced endpoint and its cost, along with which payment protocols are advertised:

```bash
curl -s https://api.nansen.ai/.well-known/x402 | jq
```

Look for `paymentProtocols` containing `"mpp"` to confirm the rail is live.

### Troubleshooting

**I signed the challenge but still got 402.** Challenges expire \~30 seconds after issue. If your signing + retry takes longer, the server issues a fresh challenge in the next 402. Sign that one instead.

**402 says my signature is invalid.** Check that your wallet is on Tempo mainnet (`chainId 4217`), not a testnet. Testnet signatures are rejected by the prod API.

**I got 200 but no `Payment-Receipt` header.** The response went through a proxy that stripped it. Confirm `Access-Control-Expose-Headers` includes `Payment-Receipt` on the response — if so, adjust your client to read exposed headers explicitly (relevant for browsers reading cross-origin responses).

**`Payment-Receipt.status` is not `success`.** The payment was accepted but the downstream endpoint failed. Re-examine the HTTP status and body — your wallet was charged, but you may need to retry against a different payload.

**Insufficient balance.** Fund your Tempo mainnet wallet via `tempo wallet fund` (which walks you through bridges: LayerZero/Stargate, Squid, Relay, Across, Bungee).

### Limits and known behaviour

* **Per-call latency.** MPP settlement adds roughly one Tempo block-time to each request. For latency-sensitive workloads, an API key is faster.
* **No session reuse yet.** Each request signs a fresh challenge; there is no open-channel / prefunded-session mode today.
* **Idempotency across pods.** Replaying an identical signed challenge is guarded in-memory per pod. Under extremely high concurrency, a replay across pods is theoretically possible; the on-chain settlement layer still prevents double-charging. Please report any anomalies.


# x402 Payments

### Overview

x402 enables pay-per-call access to the Nansen API using cryptocurrency. No subscription or API key required. Send a request, pay with USDC on EVM (Base) or Solana, and get data back.

### How It Works

x402 is an open HTTP payment protocol. When you make a request to a supported endpoint without an API key, the server returns a `402 Payment Required` response with payment instructions. Your client pays the specified amount in USDC, then retries the request with a payment receipt.

#### Request Flow

```
1. Client sends request (no API key)
2. Server returns 402 with payment details
3. Client pays USDC on Base or Solana
4. Client retries with payment receipt in header
5. Server verifies payment and returns data
```

#### Example

```bash
# 1. Initial request returns 402 with payment instructions
curl -X POST 'https://api.nansen.ai/api/v1/smart-money/holdings' \
  -H 'Content-Type: application/json' \
  -d '{"chains": ["ethereum"]}'

# Response: 402 Payment Required
# Headers include payment details (amount, recipient, network)
```

With an x402-compatible client, payment and retry happen automatically:

```python
from x402.client import x402_client

client = x402_client(wallet="YOUR_WALLET")

response = client.post(
    "https://api.nansen.ai/api/v1/smart-money/holdings",
    json={"chains": ["ethereum"]}
)
# Payment handled automatically — response contains data
```

### Pricing

All Pro-tier endpoints are available via x402 (except labels endpoint). Pricing is based on endpoint tier.

| Tier            | Price Per Call | Endpoints                                                                       |
| --------------- | -------------- | ------------------------------------------------------------------------------- |
| **Basic**       | $0.01          | Token Screener, Wallet Balances, Transactions, PnL, DEX Trades, Flows, and more |
| **Premium**     | $0.05          | Counterparties, Holders, PnL Leaderboard, Perp Leaderboard                      |
| **Smart Money** | $0.05          | SM Net Flow, SM Inflows, SM Holdings, SM DEX Trades                             |

#### Basic Endpoints — $0.01/call

| Endpoint            | Path                                           |
| ------------------- | ---------------------------------------------- |
| Current Balances    | `/api/v1/profiler/address/current-balance`     |
| Historical Balances | `/api/v1/profiler/address/historical-balances` |
| Perp Positions      | `/api/v1/profiler/perp-positions`              |
| Transactions        | `/api/v1/profiler/address/transactions`        |
| Perp Trades         | `/api/v1/profiler/perp-trades`                 |
| Related Wallets     | `/api/v1/profiler/address/related-wallets`     |
| PnL Summary         | `/api/v1/profiler/address/pnl-summary`         |
| PnL                 | `/api/v1/profiler/address/pnl`                 |
| Token Screener      | `/api/v1/token-screener`                       |
| Perp Screener       | `/api/v1/perp-screener`                        |
| Transfers           | `/api/v1/tgm/transfers`                        |
| DCAs                | `/api/v1/tgm/jup-dca`                          |
| Flow Intel          | `/api/v1/tgm/flow-intelligence`                |
| Who Bought/Sold     | `/api/v1/tgm/who-bought-sold`                  |
| DEX Trades          | `/api/v1/tgm/dex-trades`                       |
| DeFi Holdings       | `/api/v1/portfolio/defi-holdings`              |
| Flows               | `/api/v1/tgm/flows`                            |

#### Premium Endpoints — $0.05/call

| Endpoint             | Path                                      |
| -------------------- | ----------------------------------------- |
| Counterparties       | `/api/v1/profiler/address/counterparties` |
| Holders              | `/api/v1/tgm/holders`                     |
| PnL Leaderboard      | `/api/v1/tgm/pnl-leaderboard`             |
| Perp PnL Leaderboard | `/api/v1/tgm/perp-pnl-leaderboard`        |
| Perp Leaderboard     | `/api/v1/perp-leaderboard`                |

#### Smart Money Endpoints — $0.05/call

| Endpoint               | Path                             |
| ---------------------- | -------------------------------- |
| Net Flow               | `/api/v1/smart-money/netflow`    |
| Holdings               | `/api/v1/smart-money/holdings`   |
| DEX Trades             | `/api/v1/smart-money/dex-trades` |
| All other SM endpoints | `/api/v1/smart-money/*`          |

#### Excluded Endpoints

* `/api/v1/labels/*`; these require a Pro subscription due to the proprietary nature of Nansen's entity classification data.
* `/api/v1/portfolio/defi-holdings`

### Payment Details

| Parameter       | Value                                       |
| --------------- | ------------------------------------------- |
| **Network**     | Base & Solana                               |
| **Currency**    | USDC                                        |
| **Settlement**  | Instant (onchain verification)              |
| **Facilitator** | <p>Base: Coinbase CDP <br>Solana: Payai</p> |

### Rate Limits

x402 requests have separate rate limits from API key authenticated requests.

| Limit                   | Value       |
| ----------------------- | ----------- |
| Per second (per wallet) | 5 requests  |
| Per minute (per wallet) | 60 requests |

If you exceed rate limits, you'll receive a `429 Too Many Requests` response. Payments are not charged for rate-limited requests.

### FAQ

**Q: Do I need a Nansen account?** No. x402 is fully permissionless. You only need a wallet with USDC on Base or Solana.

**Q: What happens if payment fails?** You'll receive a `402 Payment Required` response again. No data is returned until payment succeeds.

**Q: Can I use x402 and an API key together?** If you include a valid API key, it takes precedence and no x402 payment is required.

**Q: Which networks are supported for payment?** Currently Base and Solana. More networks may be added in the future.

**Q: Is there a minimum balance required?** No minimum. You just need enough USDC to cover the call price plus gas fees (typically < $0.01).


# Make Your First API Call

Welcome! In the next 2 minutes, you’ll make your first API call and unlock real-time blockchain insights.

### **Step 1: Get your API key**

* Log in at Nansen [(Click here)](https://app.nansen.ai/api)
* Navigate to the API tab in the left sidebar.
* Click **Create API Key** (See screenshot below for where to find this button)
* Copy your API Key&#x20;

<figure><img src="/files/To8Q3qjrG3JKUHa2kuiN" alt=""><figcaption></figcaption></figure>

### **Step 2: Run this cURL Command**

```bash
curl -L \
  --request POST \
  --url 'https://api.nansen.ai/api/v1/token-screener' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "chains": [
      "ethereum",
      "solana",
      "base"
    ],
    "date": {
      "from": "2025-01-01T00:00:00Z",
      "to": "2025-01-31T23:59:59Z"
    },
    "pagination": {
      "page": 1,
      "per_page": 10
    },
    "filters": {
      "only_smart_money": true,
      "token_age_days": {
        "max": 365,
        "min": 1
      }
    },
    "order_by": [
      {
        "field": "chain",
        "direction": "ASC"
      }
    ]
  }'
```

### Step 3: Now try this in API Explorer

* Click on Test It button on the API codeblock below
* Paste your API Key under the value section (As shown in the screenshot)<br>

  <figure><img src="/files/IVbx7oKBgADczcp59Co7" alt=""><figcaption></figcaption></figure>
* Click on "Send" or press CMD + Enter.

## Get Token Screener Data

> Discover and screen tokens across multiple blockchains with advanced filtering capabilities. This endpoint helps identify trending tokens, new launches, and smart money movements by combining metrics like volume, liquidity, market cap, and trading activity.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Which tokens are experiencing significant smart money activity across different chains?\*\*\
> 2\. \*\*How do market metrics (price, volume, liquidity) correlate with holder behavior and smart money movements?\*\*\
> 3\. \*\*What tokens show strong fundamentals in terms of holder distribution and trading patterns?\*\*\
> 4\. \*\*Which emerging tokens are attracting fresh wallet inflows while maintaining healthy smart money participation?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TokenScreenerRequest":{"properties":{"chains":{"items":{"$ref":"#/components/schemas/TokenScreenerChain"},"type":"array","maxItems":5,"minItems":1,"title":"Chains","description":"List of blockchain chains to filter by"},"timeframe":{"anyOf":[{"$ref":"#/components/schemas/TokenScreenerTimeframe"}],"description":"**Required** (unless using deprecated 'date' parameter).\n\nTime window for token screening data.\n\nAvailable timeframes and their data characteristics:\n- 5m: Last 5 minutes (minute-level granularity, 2-hour retention)\n- 10m: Last 10 minutes (minute-level granularity, 2-hour retention)\n- 1h: Last 1 hour (minute-level granularity, 2-hour retention)\n- 6h: Last 6 hours (hourly granularity, 2-day retention)\n- 24h: Last 24 hours (hourly granularity, 2-day retention)\n- 7d: Last 7 days (daily granularity, 2-month retention)\n- 30d: Last 30 days (daily granularity, 2-month retention)\n\nCannot be used together with 'date'."},"date":{"anyOf":[{"$ref":"#/components/schemas/DateRange"}],"description":"**DEPRECATED**: Use 'timeframe' instead for better reliability and performance.\n\nRequired only if 'timeframe' is not provided.\n\nCustom date range for the token screener. The granularity is automatically determined from the date range:\n- ≤ 1 hour: minute-level data (limited to last 2 hours)\n- > 1 hour to 1 day: hourly data (limited to last 2 days)\n- > 1 day: daily data (limited to last 2 months)\n\nCannot be used together with 'timeframe'.","deprecated":true},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TokenScreenerFilters"}],"description":"Additional filters to apply"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TokenScreenerSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"buy_volume\", \"direction\": \"DESC\"}] - Sort by buy volume descending\n- [{\"field\": \"price_change\", \"direction\": \"DESC\"}] - Sort by price change descending"}},"additionalProperties":false,"type":"object","required":["chains"],"title":"TokenScreenerRequest","description":"Request model for Token Screener endpoint.\n\nEither 'timeframe' (recommended) or 'date' (deprecated) must be provided."},"TokenScreenerChain":{"type":"string","enum":["arbitrum","avalanche","base","bitcoin","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TokenScreenerChain","description":"Chains supported for Token Screener endpoint."},"TokenScreenerTimeframe":{"type":"string","enum":["5m","10m","1h","6h","24h","7d","30d"],"title":"TokenScreenerTimeframe","description":"Token screener timeframe options.\n\nDefines the time window for token screening data.\nEach timeframe corresponds to different data granularity and retention periods.\nMatches the timeframe options in the Superapp token-screener widget."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TokenScreenerFilters":{"properties":{"token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Address","description":"Token address or symbol filter"},"token_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Symbol","description":"Token symbol filter"},"only_smart_money":{"anyOf":[{"type":"boolean"}],"title":"Only Smart Money","description":"Deprecated: use trader_type instead. Whether to only include smart money tokens","deprecated":true},"trader_type":{"anyOf":[{"$ref":"#/components/schemas/TraderType"}],"description":"Filter by trader type. Overrides only_smart_money when provided."},"sectors":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Sectors","description":"Token sectors to include"},"exclude_sectors":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Exclude Sectors","description":"Token sectors to exclude"},"token_age_days":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token age range filter in days"},"market_cap_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Market cap range filter"},"liquidity":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Liquidity range filter"},"price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Current price range filter in USD"},"price_change":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Price change percentage range filter"},"fdv":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Fully Diluted Valuation range filter"},"fdv_mc_ratio":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"FDV to Market Cap ratio range filter"},"nof_buyers":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of unique buyers range filter"},"nof_traders":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of unique traders range filter"},"nof_sellers":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of unique sellers range filter"},"nof_buys":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of buy transactions range filter"},"nof_sells":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of sell transactions range filter"},"buy_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Buy volume range filter in USD"},"sell_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Sell volume range filter in USD"},"volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total trading volume range filter in USD"},"netflow":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Net flow range filter in USD"},"inflow_fdv_ratio":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Inflow to FDV ratio range filter"},"outflow_fdv_ratio":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Outflow to FDV ratio range filter"},"include_stablecoins":{"type":"boolean","title":"Include Stablecoins","description":"Whether to include stablecoins in token screener results. Default true preserves current behavior. Set to false to exclude USDC, USDT, DAI, and other major stablecoins.","default":true},"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels"}},"additionalProperties":false,"type":"object","title":"TokenScreenerFilters","description":"Filters for token screener endpoints.\n\nThese filters control which tokens are included in the screening\nresults based on various criteria."},"TraderType":{"type":"string","enum":["all","sm","whale","public_figure"],"title":"TraderType","description":"Trader type filter for token screener."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"SortOrder_TokenScreenerSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TokenScreenerSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TokenScreenerSortField]"},"TokenScreenerSortField":{"type":"string","enum":["chain","token_address","token_symbol","market_cap_usd","volume","liquidity","nof_traders","nof_buyers","nof_sellers","nof_buys","nof_sells","price_change","price_usd","netflow","buy_volume","sell_volume"],"title":"TokenScreenerSortField","description":"Enum for sortable fields in token screener."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TokenScreenerResponse":{"properties":{"data":{"items":{"anyOf":[{"$ref":"#/components/schemas/TokenScreenerDataDefault"},{"$ref":"#/components/schemas/TokenScreenerDataSmartMoneyDefault"},{"$ref":"#/components/schemas/TokenScreenerDataNonDefault"}]},"type":"array","title":"Data","description":"List of token screening results"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TokenScreenerResponse","description":"Response model for token screener endpoint."},"TokenScreenerDataDefault":{"properties":{"chain":{"type":"string","title":"Chain","description":"The blockchain network on which the token is deployed."},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_symbol":{"type":"string","title":"Token Symbol","description":"The symbol of the token."},"token_age_days":{"anyOf":[{"type":"number"}],"title":"Token Age Days","description":"Number of days since token deployment."},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market capitalization in USD."},"liquidity":{"anyOf":[{"type":"number"}],"title":"Liquidity","description":"Total on-chain liquidity in USD."},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Price of the token"},"price_change":{"anyOf":[{"type":"number"}],"title":"Price Change","description":"Price change percentage from the previous period."},"fdv":{"anyOf":[{"type":"number"}],"title":"Fdv","description":"Fully Diluted Valuation in USD."},"fdv_mc_ratio":{"anyOf":[{"type":"number"}],"title":"Fdv Mc Ratio","description":"Ratio of Fully Diluted Valuation to Market Cap."},"buy_volume":{"anyOf":[{"type":"number"}],"title":"Buy Volume","description":"Total buy volume in USD."},"inflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Inflow Fdv Ratio","description":"Ratio of inflow to Fully Diluted Valuation."},"outflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Outflow Fdv Ratio","description":"Ratio of outflow to Fully Diluted Valuation."},"sell_volume":{"anyOf":[{"type":"number"}],"title":"Sell Volume","description":"Total sell volume in USD."},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Total trading volume in USD."},"netflow":{"anyOf":[{"type":"number"}],"title":"Netflow","description":"Net flow (buy_volume - sell_volume) in USD."}},"type":"object","required":["chain","token_address","token_symbol"],"title":"TokenScreenerDataDefault","description":"Data model for token screener results with non-default query (excludes trader-related columns)."},"TokenScreenerDataSmartMoneyDefault":{"properties":{"chain":{"type":"string","title":"Chain","description":"The blockchain network on which the token is deployed."},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_symbol":{"type":"string","title":"Token Symbol","description":"The symbol of the token."},"token_age_days":{"anyOf":[{"type":"number"}],"title":"Token Age Days","description":"Number of days since token deployment."},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market capitalization in USD."},"liquidity":{"anyOf":[{"type":"number"}],"title":"Liquidity","description":"Total on-chain liquidity in USD."},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Price of the token"},"price_change":{"anyOf":[{"type":"number"}],"title":"Price Change","description":"Price change percentage from the previous period."},"fdv":{"anyOf":[{"type":"number"}],"title":"Fdv","description":"Fully Diluted Valuation in USD."},"fdv_mc_ratio":{"anyOf":[{"type":"number"}],"title":"Fdv Mc Ratio","description":"Ratio of Fully Diluted Valuation to Market Cap."},"nof_traders":{"anyOf":[{"type":"integer"}],"title":"Nof Traders","description":"Total number of unique traders."},"buy_volume":{"anyOf":[{"type":"number"}],"title":"Buy Volume","description":"Total buy volume in USD."},"inflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Inflow Fdv Ratio","description":"Ratio of inflow to Fully Diluted Valuation."},"outflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Outflow Fdv Ratio","description":"Ratio of outflow to Fully Diluted Valuation."},"sell_volume":{"anyOf":[{"type":"number"}],"title":"Sell Volume","description":"Total sell volume in USD."},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Total trading volume in USD."},"netflow":{"anyOf":[{"type":"number"}],"title":"Netflow","description":"Net flow (buy_volume - sell_volume) in USD."}},"type":"object","required":["chain","token_address","token_symbol"],"title":"TokenScreenerDataSmartMoneyDefault","description":"Data model for smart money token screener with default query.\n\nIncludes nof_traders but excludes other trader-related columns\n(nof_buyers, nof_sellers, nof_buys, nof_sells)."},"TokenScreenerDataNonDefault":{"properties":{"chain":{"type":"string","title":"Chain","description":"The blockchain network on which the token is deployed."},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_symbol":{"type":"string","title":"Token Symbol","description":"The symbol of the token."},"token_age_days":{"anyOf":[{"type":"number"}],"title":"Token Age Days","description":"Number of days since token deployment."},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market capitalization in USD."},"liquidity":{"anyOf":[{"type":"number"}],"title":"Liquidity","description":"Total on-chain liquidity in USD."},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Price of the token"},"price_change":{"anyOf":[{"type":"number"}],"title":"Price Change","description":"Price change percentage from the previous period."},"fdv":{"anyOf":[{"type":"number"}],"title":"Fdv","description":"Fully Diluted Valuation in USD."},"fdv_mc_ratio":{"anyOf":[{"type":"number"}],"title":"Fdv Mc Ratio","description":"Ratio of Fully Diluted Valuation to Market Cap."},"nof_buyers":{"anyOf":[{"type":"integer"}],"title":"Nof Buyers","description":"Number of unique buyers."},"nof_traders":{"anyOf":[{"type":"integer"}],"title":"Nof Traders","description":"Total number of unique traders."},"nof_sellers":{"anyOf":[{"type":"integer"}],"title":"Nof Sellers","description":"Number of unique sellers."},"nof_buys":{"anyOf":[{"type":"integer"}],"title":"Nof Buys","description":"Total number of buy transactions."},"nof_sells":{"anyOf":[{"type":"integer"}],"title":"Nof Sells","description":"Total number of sell transactions."},"buy_volume":{"anyOf":[{"type":"number"}],"title":"Buy Volume","description":"Total buy volume in USD."},"inflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Inflow Fdv Ratio","description":"Ratio of inflow to Fully Diluted Valuation."},"outflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Outflow Fdv Ratio","description":"Ratio of outflow to Fully Diluted Valuation."},"sell_volume":{"anyOf":[{"type":"number"}],"title":"Sell Volume","description":"Total sell volume in USD."},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Total trading volume in USD."},"netflow":{"anyOf":[{"type":"number"}],"title":"Netflow","description":"Net flow (buy_volume - sell_volume) in USD."}},"type":"object","required":["chain","token_address","token_symbol"],"title":"TokenScreenerDataNonDefault","description":"Data model for token screener results with non-default query (includes all columns)."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/token-screener":{"post":{"tags":["Token Screener"],"summary":"Get Token Screener Data","description":"Discover and screen tokens across multiple blockchains with advanced filtering capabilities. This endpoint helps identify trending tokens, new launches, and smart money movements by combining metrics like volume, liquidity, market cap, and trading activity.\n\n**What it helps to answer:**\n\n1. **Which tokens are experiencing significant smart money activity across different chains?**\n2. **How do market metrics (price, volume, liquidity) correlate with holder behavior and smart money movements?**\n3. **What tokens show strong fundamentals in terms of holder distribution and trading patterns?**\n4. **Which emerging tokens are attracting fresh wallet inflows while maintaining healthy smart money participation?**","operationId":"get_token_screener_api_v1_token_screener_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenScreenerRequest"}}},"required":true},"responses":{"200":{"description":"Token screening data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenScreenerResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```

### Next Steps

1. **Checkout these Usecase Templates**

{% content-ref url="/pages/sZ42YbN487lUkqjRYobp" %}
[Use case Templates](/guides/templates)
{% endcontent-ref %}

2. **Checkout all the available endpoints**

{% content-ref url="/pages/ULb0CMVkxzlnFoWOFf6K" %}
[Smart Money](/api/smart-money)
{% endcontent-ref %}

{% content-ref url="/pages/8aOjJs2bpUhoO4SDqcWN" %}
[Token God Mode](/api/token-god-mode)
{% endcontent-ref %}

{% content-ref url="/pages/PnT1uPG4TtdjDFCJAVHV" %}
[Profiler](/api/profiler)
{% endcontent-ref %}

{% content-ref url="/pages/UofenUf9aGszprYk2DzY" %}
[Portfolio](/api/portfolio)
{% endcontent-ref %}


# Reference

This section explains the key concepts and terminology used throughout the Nansen API.

### Guides

* Supported Chains - Blockchains supported by the API
* Address Formats - Address formats for each chain type
* Smart Money Labels - Understanding smart money classifications
* Filter Types - Available filter types and usage
* Sorting - How to sort API results

### Quick Reference

#### Chains

The API supports 37 blockchains:

| Type    | Examples                                         |
| ------- | ------------------------------------------------ |
| EVM     | Ethereum, Arbitrum, Base, BNB, Polygon, Optimism |
| Non-EVM | Solana, Bitcoin, TON, Tron, Starknet, SUI        |

#### Smart Money Labels

| Label                     | Description                     |
| ------------------------- | ------------------------------- |
| Fund                      | Institutional investment funds  |
| Smart Trader              | Historically profitable traders |
| 30D/90D/180D Smart Trader | Time-based performance labels   |

#### Common Filters

| Filter Type   | Example                       |
| ------------- | ----------------------------- |
| Numeric Range | `{"min": 1000, "max": 50000}` |
| Integer Range | `{"min": 10, "max": 100}`     |
| Address List  | `["0x...", "0x..."]`          |
| Label List    | `["Fund", "Smart Trader"]`    |

#### Sort Order

```json
{
  "order_by": [
    {"field": "value_usd", "direction": "DESC"}
  ]
}
```


# Supported Chains

### Overview

The Nansen API supports 37 blockchain networks across EVM and non-EVM ecosystems. Chain support varies by endpoint.

### EVM Chains

EVM-compatible chains use the standard Ethereum address format (`0x` + 40 hex characters).

| Chain     | Value       | Description           |
| --------- | ----------- | --------------------- |
| Ethereum  | `ethereum`  | Main Ethereum network |
| Arbitrum  | `arbitrum`  | Arbitrum One L2       |
| Avalanche | `avalanche` | Avalanche C-Chain     |
| Base      | `base`      | Coinbase L2           |
| Bitlayer  | `bitlayer`  | Bitcoin L2            |
| BNB Chain | `bnb`       | BNB Smart Chain       |
| Celo      | `celo`      | Celo network          |
| Chiliz    | `chiliz`    | Chiliz Chain          |
| Gravity   | `gravity`   | Gravity network       |
| HyperEVM  | `hyperevm`  | Hyperliquid EVM       |
| IOTA EVM  | `iotaevm`   | IOTA EVM              |
| Linea     | `linea`     | Linea L2              |
| Mantle    | `mantle`    | Mantle L2             |
| Monad     | `monad`     | Monad network         |
| Optimism  | `optimism`  | Optimism L2           |
| Plasma    | `plasma`    | Plasma network        |
| Polygon   | `polygon`   | Polygon PoS           |
| Ronin     | `ronin`     | Ronin sidechain       |
| Scroll    | `scroll`    | Scroll L2             |
| Sei       | `sei`       | Sei EVM               |
| Sonic     | `sonic`     | Sonic network         |
| Unichain  | `unichain`  | Uniswap L2            |
| Viction   | `viction`   | Viction (TomoChain)   |
| zkSync    | `zksync`    | zkSync Era            |

### Non-EVM Chains

Non-EVM chains have unique address formats. See Address Formats for details.

| Chain       | Value         | Description                       |
| ----------- | ------------- | --------------------------------- |
| Algorand    | `algorand`    | Algorand network                  |
| Aptos       | `aptos`       | Aptos network                     |
| Bitcoin     | `bitcoin`     | Bitcoin network                   |
| Hyperliquid | `hyperliquid` | Hyperliquid DEX (perpetuals only) |
| NEAR        | `near`        | NEAR Protocol                     |
| Solana      | `solana`      | Solana network                    |
| Stacks      | `stacks`      | Stacks (Bitcoin L2)               |
| Starknet    | `starknet`    | Starknet L2                       |
| Stellar     | `stellar`     | Stellar network                   |
| SUI         | `sui`         | SUI network                       |
| TON         | `ton`         | The Open Network                  |
| Tron        | `tron`        | Tron network                      |

### Using the "all" Chain

Some endpoints support `"all"` to query across all supported chains:

```json
{
  "chains": ["all"]
}
```

This expands to all chains supported by that specific endpoint.

### Chain Support by Endpoint

Not all chains are available on all endpoints. Here's the support matrix:

#### Smart Money Endpoints

| Chain     | Netflow | DEX Trades | Holdings | Historical |
| --------- | ------- | ---------- | -------- | ---------- |
| ethereum  | Yes     | Yes        | Yes      | Yes        |
| solana    | Yes     | Yes        | Yes      | Yes        |
| base      | Yes     | Yes        | Yes      | Yes        |
| bnb       | Yes     | Yes        | Yes      | Yes        |
| arbitrum  | Yes     | Yes        | Yes      | No         |
| polygon   | Yes     | Yes        | Yes      | No         |
| avalanche | Yes     | Yes        | Yes      | No         |
| optimism  | Yes     | Yes        | Yes      | No         |

#### Token God Mode Endpoints

| Chain    | Flows | Transfers | Holders | PnL |
| -------- | ----- | --------- | ------- | --- |
| ethereum | Yes   | Yes       | Yes     | Yes |
| solana   | Yes   | Yes       | Yes     | Yes |
| base     | Yes   | Yes       | Yes     | Yes |
| bnb      | Yes   | Yes       | Yes     | Yes |
| arbitrum | Yes   | Yes       | Yes     | Yes |
| ton      | Yes   | Yes       | Yes     | No  |
| tron     | Yes   | Yes       | Yes     | No  |

#### Profiler Endpoints

| Chain    | Balance | Transactions | PnL | Related |
| -------- | ------- | ------------ | --- | ------- |
| ethereum | Yes     | Yes          | Yes | Yes     |
| solana   | Yes     | Yes          | Yes | Yes     |
| bitcoin  | Yes     | Yes          | No  | No      |
| ton      | Yes     | Yes          | No  | Yes     |
| tron     | Yes     | Yes          | No  | Yes     |

### Examples

#### Single Chain Query

```json
{
  "chains": ["ethereum"]
}
```

#### Multi-Chain Query

```json
{
  "chains": ["ethereum", "solana", "base"]
}
```

#### All Chains Query

```json
{
  "chains": ["all"]
}
```

### Chain-Specific Considerations

#### Solana

* Uses base58 addresses
* Transaction lookup not supported
* Full support for Smart Money and TGM

#### Bitcoin

* Limited endpoint support (Profiler only)
* Supports P2PKH, P2SH, and Bech32 addresses
* No Smart Money or TGM support

#### TON

* Uses EQ.../UQ... address format
* Addresses are automatically normalized
* No PnL endpoints

#### Hyperliquid

* Perpetuals platform only
* Used for perp-specific endpoints
* No standard token endpoints


# Filter Types

### Overview

Filters allow you to narrow down API results to specific criteria. Each endpoint supports different filters based on the data it returns.

### Filter Types

#### NumericRangeFilter

Filter numeric values (floats) with optional min/max bounds.

**Schema:**

```json
{
  "min": 1000.0,
  "max": 50000.0
}
```

**Fields:**

| Field | Type  | Description               |
| ----- | ----- | ------------------------- |
| `min` | float | Minimum value (inclusive) |
| `max` | float | Maximum value (inclusive) |

**Examples:**

```json
// Minimum only
{"min": 1000000}

// Maximum only
{"max": 50000}

// Range
{"min": 1000, "max": 1000000}

// Negative values allowed
{"min": -10.5, "max": 100.75}
```

**Common Uses:**

* `value_usd` - Filter by USD value
* `price_usd` - Filter by price
* `market_cap_usd` - Filter by market cap
* `volume_24h_usd` - Filter by volume

#### IntegerRangeFilter

Filter integer values with optional min/max bounds.

**Schema:**

```json
{
  "min": 10,
  "max": 1000
}
```

**Fields:**

| Field | Type    | Description               |
| ----- | ------- | ------------------------- |
| `min` | integer | Minimum value (inclusive) |
| `max` | integer | Maximum value (inclusive) |

**Examples:**

```json
// Minimum holders
{"min": 100}

// Age range
{"min": 7, "max": 365}
```

**Common Uses:**

* `holder_count` - Filter by number of holders
* `token_age_days` - Filter by token age
* `trade_count` - Filter by number of trades

#### DateRangeFilter

Filter by date/time ranges.

**Schema:**

```json
{
  "from": "2025-01-01T00:00:00Z",
  "to": "2025-01-31T23:59:59Z"
}
```

**Fields:**

| Field  | Type   | Description                  |
| ------ | ------ | ---------------------------- |
| `from` | string | Start date (ISO 8601 format) |
| `to`   | string | End date (ISO 8601 format)   |

**Formats:**

```json
// Full datetime
"2025-01-01T00:00:00Z"

// Date only
"2025-01-01"
```

**Examples:**

```json
// Last 7 days
{
  "from": "2025-01-07T00:00:00Z",
  "to": "2025-01-14T00:00:00Z"
}

// Specific month
{
  "from": "2025-01-01",
  "to": "2025-01-31"
}
```

#### TokenAddressFilter

Filter by one or more token addresses.

**Schema:**

```json
"0x..."
// or
["0x...", "0x..."]
```

**Examples:**

```json
// Single token
"token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933"

// Multiple tokens
"token_addresses": [
  "0x6982508145454ce325ddbe47a25d4ec3d2311933",
  "0xdac17f958d2ee523a2206206994597c13d831ec7"
]
```

#### TraderAddressFilter

Filter by one or more trader/wallet addresses.

**Schema:**

```json
"0x..."
// or
["0x...", "0x..."]
```

**Examples:**

```json
// Single trader
"trader_address": "0x28C6c06298d514Db089934071355E5743bf21d60"

// Multiple traders
"trader_addresses": [
  "0x28C6c06298d514Db089934071355E5743bf21d60",
  "0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503"
]
```

#### LabelFilter

Filter by smart money or entity labels.

**Schema:**

```json
["Fund", "Smart Trader"]
```

**Smart Money Labels:**

```json
[
  "Fund",
  "Smart Trader",
  "30D Smart Trader",
  "90D Smart Trader",
  "180D Smart Trader",
  "Smart HL Perps Trader"
]
```

**Extended Labels:**

```json
[
  "Public Figure",
  "Exchange",
  "Whale",
  "BananaGun Bot User",
  "Maestro Bot User"
]
```

**Examples:**

```json
// Include funds and smart traders
"include_smart_money_labels": ["Fund", "Smart Trader"]

// Exclude exchanges
"exclude_labels": ["Exchange"]
```

#### SectorsFilter

Filter by token sector/category.

**Schema:**

```json
["DeFi", "Meme"]
```

**Common Sectors:**

```json
[
  "DeFi",
  "Meme",
  "Gaming",
  "NFT",
  "Infrastructure",
  "Layer 1",
  "Layer 2",
  "Stablecoin",
  "AI",
  "RWA"
]
```

**Examples:**

```json
// DeFi tokens only
"sectors": ["DeFi"]

// Multiple sectors
"sectors": ["Meme", "Gaming"]
```

#### BooleanFilter

Simple true/false filter.

**Schema:**

```json
true
// or
false
```

**Examples:**

```json
// Hide spam tokens
"hide_spam_tokens": true

// Include only new positions
"only_new_positions": true
```

### Filter Validation Rules

#### Range Filters

1. `max` must be greater than `min` if both provided
2. Some fields require positive values only

```json
// Invalid - max less than min
{"min": 1000, "max": 500}

// Invalid for some fields - negative min
{"min": -100}
```

#### Date Filters

1. `to` must be after `from`
2. Maximum range is typically 1 year

```json
// Invalid - to before from
{
  "from": "2025-12-31",
  "to": "2025-01-01"
}
```

#### Address Filters

1. Must match chain address format
2. Cannot be burn/zero addresses for some endpoints

### Using Filters in Requests

#### Basic Filter Usage

```python
response = client.post(
    "https://api.nansen.ai/api/v1/smart-money/holdings",
    json={
        "chains": ["ethereum"],
        "filters": {
            "value_usd": {"min": 100000},
            "include_smart_money_labels": ["Fund"]
        }
    }
)
```

#### Combining Multiple Filters

```python
response = client.post(
    "https://api.nansen.ai/api/v1/token-screener",
    json={
        "chains": ["ethereum"],
        "filters": {
            "market_cap_usd": {"min": 1000000, "max": 100000000},
            "volume_24h_usd": {"min": 50000},
            "holder_count": {"min": 100},
            "token_age_days": {"min": 7},
            "sectors": ["DeFi", "Meme"],
            "hide_spam_tokens": true
        }
    }
)
```

#### Endpoint-Specific Filters

Different endpoints support different filters. Check each endpoint's documentation for available filters.


# Sorting

### Overview

Most Nansen API endpoints support sorting results using the `order_by` parameter. This allows you to control the order of returned data.

### Sort Order Schema

```json
{
  "order_by": [
    {
      "field": "field_name",
      "direction": "DESC"
    }
  ]
}
```

#### Parameters

| Parameter   | Type   | Description                              |
| ----------- | ------ | ---------------------------------------- |
| `field`     | string | The field to sort by                     |
| `direction` | string | `ASC` (ascending) or `DESC` (descending) |

#### Directions

| Direction | Description                | Example                     |
| --------- | -------------------------- | --------------------------- |
| `ASC`     | Ascending (smallest first) | 1, 2, 3, ... or A, B, C     |
| `DESC`    | Descending (largest first) | 100, 99, 98, ... or Z, Y, X |

### Examples

#### Single Field Sort

Sort by USD value, highest first:

```json
{
  "order_by": [
    {"field": "value_usd", "direction": "DESC"}
  ]
}
```

#### Multiple Field Sort

Sort by volume first, then by price:

```json
{
  "order_by": [
    {"field": "volume_24h_usd", "direction": "DESC"},
    {"field": "price_usd", "direction": "ASC"}
  ]
}
```

#### Full Request Example

```python
response = client.post(
    "https://api.nansen.ai/api/v1/smart-money/holdings",
    json={
        "chains": ["ethereum"],
        "pagination": {"page": 1, "per_page": 100},
        "order_by": [
            {"field": "value_usd", "direction": "DESC"}
        ]
    }
)
```

### Common Sort Fields by Endpoint

#### Smart Money Holdings

| Field                        | Description                       |
| ---------------------------- | --------------------------------- |
| `value_usd`                  | Total USD value of holdings       |
| `balance_24h_percent_change` | 24-hour balance change percentage |
| `holders_count`              | Number of smart money holders     |
| `share_of_holdings_percent`  | Share of total token supply held  |
| `market_cap_usd`             | Token market capitalization       |
| `token_age_days`             | Days since token creation         |

```json
{
  "order_by": [{"field": "value_usd", "direction": "DESC"}]
}
```

#### Smart Money Netflow

| Field              | Description                   |
| ------------------ | ----------------------------- |
| `net_flow_1h_usd`  | 1-hour net flow in USD        |
| `net_flow_24h_usd` | 24-hour net flow in USD       |
| `net_flow_7d_usd`  | 7-day net flow in USD         |
| `net_flow_30d_usd` | 30-day net flow in USD        |
| `trader_count`     | Number of smart money traders |
| `market_cap_usd`   | Token market capitalization   |

```json
{
  "order_by": [{"field": "net_flow_24h_usd", "direction": "DESC"}]
}
```

#### Smart Money DEX Trades

| Field       | Description         |
| ----------- | ------------------- |
| `timestamp` | Trade timestamp     |
| `value_usd` | Trade value in USD  |
| `amount`    | Token amount traded |

```json
{
  "order_by": [{"field": "timestamp", "direction": "DESC"}]
}
```

#### Token Screener

| Field                      | Description              |
| -------------------------- | ------------------------ |
| `market_cap_usd`           | Market capitalization    |
| `volume_24h_usd`           | 24-hour trading volume   |
| `price_change_24h_percent` | 24-hour price change     |
| `holder_count`             | Total holder count       |
| `smart_money_holder_count` | Smart money holder count |
| `liquidity_usd`            | Total liquidity          |

```json
{
  "order_by": [
    {"field": "volume_24h_usd", "direction": "DESC"},
    {"field": "market_cap_usd", "direction": "DESC"}
  ]
}
```

#### TGM Holders

| Field                      | Description            |
| -------------------------- | ---------------------- |
| `balance_usd`              | Current balance in USD |
| `balance_change_24h_usd`   | 24-hour balance change |
| `first_transfer_timestamp` | First transfer date    |
| `last_transfer_timestamp`  | Last transfer date     |

```json
{
  "order_by": [{"field": "balance_usd", "direction": "DESC"}]
}
```

#### TGM PnL Leaderboard

| Field                | Description            |
| -------------------- | ---------------------- |
| `realized_pnl_usd`   | Realized profit/loss   |
| `unrealized_pnl_usd` | Unrealized profit/loss |
| `total_pnl_usd`      | Total profit/loss      |
| `roi_percent`        | Return on investment   |

```json
{
  "order_by": [{"field": "total_pnl_usd", "direction": "DESC"}]
}
```

### Best Practices

#### 1. Always Sort When Paginating

Ensure consistent ordering across pages:

```python
# Good - consistent ordering
for page in range(1, 10):
    response = client.post(url, json={
        "pagination": {"page": page, "per_page": 100},
        "order_by": [{"field": "value_usd", "direction": "DESC"}]
    })

# Bad - order may change between pages
for page in range(1, 10):
    response = client.post(url, json={
        "pagination": {"page": page, "per_page": 100}
    })
```

#### 2. Use Secondary Sort for Ties

Add a secondary sort field to break ties:

```json
{
  "order_by": [
    {"field": "volume_24h_usd", "direction": "DESC"},
    {"field": "token_address", "direction": "ASC"}
  ]
}
```

#### 3. Sort by Timestamp for Recent Data

For trade/transaction data, sort by timestamp:

```json
{
  "order_by": [{"field": "timestamp", "direction": "DESC"}]
}
```

#### 4. Consider Default Sorts

Many endpoints have sensible default sorts. Check the endpoint documentation for defaults.

### Error Handling

#### Invalid Sort Field

```json
{
  "detail": [
    {
      "type": "enum",
      "loc": ["body", "order_by", 0, "field"],
      "msg": "Input should be 'value_usd', 'balance_24h_percent_change', ..."
    }
  ]
}
```

#### Invalid Direction

```json
{
  "detail": [
    {
      "type": "enum",
      "loc": ["body", "order_by", 0, "direction"],
      "msg": "Input should be 'ASC' or 'DESC'"
    }
  ]
}
```

### Python Helper

```python
from enum import Enum
from typing import Literal

class SortDirection(str, Enum):
    ASC = "ASC"
    DESC = "DESC"

def create_sort_order(
    field: str,
    direction: Literal["ASC", "DESC"] = "DESC"
) -> dict:
    return {"field": field, "direction": direction}

# Usage
sort = create_sort_order("value_usd", "DESC")
```


# Endpoints Overview

### Overview

The Nansen API provides endpoints organized into 4 categories. All endpoints use `POST` requests with JSON bodies.

{% hint style="warning" %}
**Free plan: 10× credit cost.** API calls on the free plan consume **10× more credits** than on any paid plan. If you're building anything beyond light testing, upgrade before you exhaust your credits.
{% endhint %}

### Smart Money

A curated list of the top 5 000 highest-performing wallets ranked by realised profit, winrate, and strong performance across market cycles.

<table><thead><tr><th width="310">Endpoint</th><th width="126.61328125" data-type="number">Credit</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://docs.nansen.ai/api/smart-money/netflows">smart-money/netflows</a></td><td>5</td><td>Provides net flow of tokens bought/sold by Smart Money addresses</td></tr><tr><td><a href="https://docs.nansen.ai/api/smart-money/holdings">smart-money/holdings</a></td><td>5</td><td>Holdings of tokens by Smart Money addresses.</td></tr><tr><td><a href="https://docs.nansen.ai/api/smart-money/historical-holdings">smart-money/historical-holdings</a></td><td>5</td><td>All Historical Holdings of Smart Money Wallets</td></tr><tr><td><a href="https://docs.nansen.ai/api/smart-money/dex-trades">smart-money/dex-trades</a></td><td>5</td><td>All dex trades of smart money traders in the last 24h</td></tr><tr><td><a href="https://docs.nansen.ai/api/smart-money/jupiter-dcas">smart-money/dcas </a></td><td>5</td><td>All Jupiter DCAs started by Smart Money Wallets on Solana</td></tr><tr><td><a href="/pages/SykFfCZRUpWS1ASo0fzF">smart-money/perp-trades</a></td><td>5</td><td>Track what smart money wallets are trading on Hyperliquid</td></tr></tbody></table>

### Agent

<table><thead><tr><th width="316.16015625">Endpoint</th><th width="124.69140625">Credit</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://docs.nansen.ai/api/agent#post-api-v1-agent-fast">agent/fast</a></td><td>200</td><td>Ask Nansen Agent any question in fast mode</td></tr><tr><td><a href="https://docs.nansen.ai/api/agent#post-api-v1-agent-expert">agent/expert</a></td><td>750</td><td>Ask Nansen Agent any question in expert mode</td></tr></tbody></table>

### Profiler

A toolkit for diving deep into address relationships and behaviour, letting you analyse any wallet or entity cluster to uncover flows, counterparties, and behavioural patterns.

<table><thead><tr><th>Endpoint</th><th width="116.46484375" data-type="number">Credit</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://docs.nansen.ai/api/profiler/address-current-balances">address/current-balance</a></td><td>1</td><td>Current Token balances of an address</td></tr><tr><td><a href="https://docs.nansen.ai/api/profiler/address-historical-balances">profiler/address/historical-balances</a></td><td>1</td><td>Historical holdings of a wallet address</td></tr><tr><td><a href="https://docs.nansen.ai/api/profiler/address-perp-positions">profiler/perp-positions</a></td><td>1</td><td>Fetch current positions, PnL and account health of a wallet</td></tr><tr><td><a href="https://docs.nansen.ai/api/profiler/address-transactions">profiler/address/transactions</a></td><td>1</td><td>List of transactions made by an address</td></tr><tr><td><a href="/pages/butNzFXjbCaweHcvBaQz">profiler/perp-trades</a></td><td>1</td><td>Get all Hyperliquid trades of a wallet</td></tr><tr><td><a href="/pages/x5L8HdACIaagR805sAR1">profiler/address/related-wallets</a></td><td>1</td><td>List of related wallets and its first degree relation</td></tr><tr><td><a href="/pages/ToSm8byMrExbGNlZ6swt">profiler/address/pnl-summary</a></td><td>1</td><td>Trade summary including top 5 trades</td></tr><tr><td><a href="/pages/ToSm8byMrExbGNlZ6swt">profiler/address/pnl</a></td><td>1</td><td>List of Past Trades and their performance made by the address</td></tr><tr><td><a href="/pages/HsviqGyW9klWmOJuJZPA">profiler/address/counterparties</a></td><td>5</td><td>Top Counterparties a wallet has interacted with</td></tr><tr><td><a href="/pages/sONi8Oe3Em5VtPZ5hWZq">perp-leaderboard</a></td><td>5</td><td>Get a list of most profitable Hyperliquid addresses</td></tr><tr><td><a href="/pages/TLnFK9W1kBKTf0JdQiXk">/profiler/address/labels</a> (Common labels)</td><td>100</td><td>Address and list of all its labels</td></tr><tr><td><a href="/pages/TLnFK9W1kBKTf0JdQiXk">/profiler/address/labels</a> (Premium labels)</td><td>500</td><td>Address and list of all its labels</td></tr></tbody></table>

### Token God Mode

A comprehensive lens on a token’s on-chain activity, combining Smart Money movements, holder-base analysis, and exchange-flow tracking in one view.

<table><thead><tr><th>Endpoint</th><th width="101.08203125">Credits</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/vE8vmiUb7fhXOS64KaQq">tgm/token-screener</a></td><td>1</td><td>A token screening endpoint that provides real-time analytics and insights across multiple blockchain networks.</td></tr><tr><td><a href="/pages/739iUkb4YyaiA3onbMUZ">tgm/perp-screener</a></td><td>1</td><td>Discover and screen tokens on Hyperliquid with the highest volume and smart money activity.</td></tr><tr><td><a href="/pages/m4UtiJGIYEbl9NhSZRgi">tgm/flow-intelligence</a></td><td>1</td><td>Summary of token flows across Smart Money, exchanges, Top PnL Traders, Public Figures, Whales, Fresh Wallets</td></tr><tr><td><a href="/pages/dThJrb4J7d6WfgnIcEsR">tgm/holders</a> <br>(Premium labels: 150)</td><td>5 / 150</td><td>Balance of top addresses, smart money, exchanges, public figures and whales that can be queried by address or by entity. </td></tr><tr><td><a href="/pages/AP9gCDNt1lvSLJj7lGyI">tgm/perp-positions</a><br>(Premium labels: 150)</td><td>5 / 150</td><td>See all open positions for a specific perp token including leverage, PnL, and liquidation prices</td></tr><tr><td><a href="/pages/KkSfSSukuyiYPUuWc6nH">tgm/flows</a></td><td>1</td><td>Total Inflow and outflow of a token from smart money, exchanges, public figures or whales.</td></tr><tr><td><a href="/pages/EW3cNfFkF7MdnET2cs3f">tgm/who-bought-sold </a></td><td>1</td><td>Recent buyers and sellers of a token summarised</td></tr><tr><td><a href="/pages/VxAy1rM61S6hyoJdwhuk">tgm/perp-trades</a></td><td>1</td><td>View trading history for a specific perp token over a time period</td></tr><tr><td><a href="/pages/scc4waKe1lPKUEtXxOAG">tgm/dex-trades</a></td><td>1</td><td>All DEX Trades of a Token</td></tr><tr><td><a href="/pages/jKymFzvINj0eMuQyzdqp">tgm/transfers </a></td><td>1</td><td>Top Token Transfers of a token</td></tr><tr><td><a href="/pages/iK3b3QUxzTqrt1iDbuwX">tgm/jup-dca </a></td><td>1</td><td>List of all Jupiter DCA orders of a token on Solana</td></tr><tr><td><a href="/pages/I63Vcrg3EySGS7dps0Nh">tgm/pnl-leaderboard </a><br>(Premium labels: 150)</td><td>5 / 150</td><td>List of addresses and their total realised and unrealised PnL</td></tr><tr><td><a href="/pages/VaLd4tV9Os5GDkzSIH2C">tgm/perp-pnl-leaderboard</a><br>(Premium labels: 150)</td><td>5 / 150</td><td>List of addresses and their PnL for a specific token on Hyperliquid</td></tr><tr><td><a href="https://docs.nansen.ai/api/token-god-mode/token-information">tgm/token-information</a></td><td>1</td><td>Get stats about Token Marketcap, Volume, Holders, Traders, etc</td></tr><tr><td><a href="https://docs.nansen.ai/api/token-god-mode/nansen-indicators">tgm/indicators</a></td><td>5</td><td>Get risk and reward indicators for a specific token.</td></tr><tr><td><a href="https://docs.nansen.ai/api/token-god-mode/price-ohlcv">tgm/token-ohlcv</a></td><td>1</td><td>Get unified OHLCVdata for tokens</td></tr></tbody></table>

### Prediction Market API

<table><thead><tr><th>Endpoint</th><th width="97.703125" data-type="number">Credits</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://docs.nansen.ai/api/prediction-market/market-categories">prediction-market/categories</a></td><td>1</td><td>Aggregated stats for all categories</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/market-screener">prediction-market/market-screener</a></td><td>1</td><td>Browse and all Polymarket prediction markets.</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/market-event-screener">prediction-market/event-screener</a></td><td>1</td><td>Browse and filter Polymarket events</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/market-orderbook">prediction-market/orderbook</a></td><td>1</td><td>Get bid/ask orderbook for a market</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/market-ohlcv">prediction-market/ohlcv</a></td><td>1</td><td>Get 1-hour OHLCV for a market</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/trades-by-market">prediction-market/trades-by-market</a></td><td>1</td><td>Get recent trades for a market</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/trades-by-address">prediction-market/trades-by-address</a></td><td>1</td><td>Trades for a wallet across all markets</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/pnl-by-address">prediction-market/pnl-by-address</a></td><td>1</td><td>PnL for a wallet across all markets</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/address-summary">prediction-market/address-summary</a></td><td>1</td><td>Get PnL, win rate and age of a wallet active on Polymarket</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/market-top-holders">prediction-market/top-holders</a></td><td>5</td><td>Get the largest position holders for market</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/market-position-details">prediction-market/position-detail</a></td><td>5</td><td>Get per-token position data for all holders in a specific market</td></tr><tr><td><a href="https://docs.nansen.ai/api/prediction-market/pnl-by-market">prediction-market/pnl-by-market</a></td><td>5</td><td>PnL for all traders in a specific market</td></tr></tbody></table>

### Portfolio API

<table><thead><tr><th>Endpoint</th><th width="97.703125" data-type="number">Credits</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/UofenUf9aGszprYk2DzY">portfolio/defi-holdings</a></td><td>1</td><td>Track DeFi positions of all addresses</td></tr></tbody></table>


# Search

## General Search

> Search for tokens and entities by name, symbol, or contract address. This endpoint provides a unified search experience across all Nansen data.\
> \
> \*\*Use Cases:\*\*\
> 1\. \*\*Find token addresses\*\*: Search by name or symbol to get contract addresses (e.g., "AAVE", "Uniswap")\
> 2\. \*\*Discover entities\*\*: Find known entities like exchanges, funds, and public figures (e.g., "vitalik", "Binance")\
> 3\. \*\*Resolve addresses\*\*: Search by contract address to identify tokens\
> 4\. \*\*Filter by chain\*\*: Narrow down results to specific blockchains\
> \
> \*\*Search Parameters:\*\*\
> \- \`search\_query\`: Token name, symbol, contract address, or entity name\
> \- \`result\_type\`: Filter by "token", "entity", or "any" (default: "any")\
> \- \`chain\`: Optional blockchain filter (e.g., "ethereum", "solana", "base")\
> \- \`limit\`: Maximum results (1-50, default: 25)\
> \
> \*\*Example Request:\*\*\
> \`\`\`json\
> {\
> &#x20; "search\_query": "AAVE",\
> &#x20; "result\_type": "token",\
> &#x20; "chain": "ethereum"\
> }\
> \`\`\`\
> \
> \*\*Example Response:\*\*\
> \`\`\`json\
> {\
> &#x20; "tokens": \[\
> &#x20;   {\
> &#x20;     "name": "Aave",\
> &#x20;     "symbol": "AAVE",\
> &#x20;     "chain": "ethereum",\
> &#x20;     "address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",\
> &#x20;     "price": 123.45,\
> &#x20;     "volume\_24h": 50000000,\
> &#x20;     "market\_cap": 1500000000,\
> &#x20;     "rank": 25\
> &#x20;   }\
> &#x20; ],\
> &#x20; "entities": \[],\
> &#x20; "total\_results": 1\
> }\
> \`\`\`\
> \
> \*\*Important Notes:\*\*\
> \- Prices may be delayed; use token OHLCV endpoints for real-time prices\
> \- Results are sorted by relevance/popularity rank\
> \- Use the \`chain\` parameter (not the query string) to filter by blockchain

````json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"GeneralSearchRequest":{"properties":{"search_query":{"type":"string","maxLength":200,"minLength":1,"title":"Search Query","description":"Search query - token name, symbol, contract address, or entity name."},"result_type":{"type":"string","enum":["token","entity","any"],"title":"Result Type","description":"Type filter - 'token' for tokens only, 'entity' for entities only, 'any' for both.","default":"any"},"chain":{"anyOf":[{"type":"string"}],"title":"Chain","description":"Optional chain filter to narrow down token results (e.g., 'ethereum', 'solana', 'base')."},"limit":{"type":"integer","maximum":50,"minimum":1,"title":"Limit","description":"Maximum number of results to return (default: 25, max: 50).","default":25}},"additionalProperties":false,"type":"object","required":["search_query"],"title":"GeneralSearchRequest","description":"Request model for general search endpoint.\n\nThis endpoint searches for tokens and entities by name, symbol, or address."},"GeneralSearchResponse":{"properties":{"tokens":{"items":{"$ref":"#/components/schemas/TokenSearchResult"},"type":"array","title":"Tokens","description":"List of matching tokens","default":[]},"entities":{"items":{"$ref":"#/components/schemas/EntitySearchResult"},"type":"array","title":"Entities","description":"List of matching entities","default":[]},"total_results":{"type":"integer","title":"Total Results","description":"Total number of results returned"}},"type":"object","required":["total_results"],"title":"GeneralSearchResponse","description":"Response model for general search endpoint.\n\nReturns separate lists for tokens and entities, allowing clients to handle\neach type appropriately."},"TokenSearchResult":{"properties":{"name":{"type":"string","title":"Name","description":"Token name"},"symbol":{"type":"string","title":"Symbol","description":"Token symbol (ticker)"},"chain":{"type":"string","title":"Chain","description":"Blockchain the token is deployed on"},"address":{"type":"string","title":"Address","description":"Contract address of the token"},"price":{"anyOf":[{"type":"number"}],"title":"Price","description":"Current price in USD (may be delayed)"},"volume_24h":{"anyOf":[{"type":"number"}],"title":"Volume 24H","description":"24-hour trading volume in USD"},"market_cap":{"anyOf":[{"type":"number"}],"title":"Market Cap","description":"Market capitalization in USD"},"rank":{"anyOf":[{"type":"integer"}],"title":"Rank","description":"Popularity/relevance rank (lower is better)"}},"type":"object","required":["name","symbol","chain","address"],"title":"TokenSearchResult","description":"A token result from general search."},"EntitySearchResult":{"properties":{"name":{"type":"string","title":"Name","description":"Entity name"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Category tags for the entity","default":[]},"rank":{"anyOf":[{"type":"integer"}],"title":"Rank","description":"Popularity/relevance rank (lower is better)"}},"type":"object","required":["name"],"title":"EntitySearchResult","description":"An entity result from general search."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/search/general":{"post":{"tags":["Search"],"summary":"General Search","description":"Search for tokens and entities by name, symbol, or contract address. This endpoint provides a unified search experience across all Nansen data.\n\n**Use Cases:**\n1. **Find token addresses**: Search by name or symbol to get contract addresses (e.g., \"AAVE\", \"Uniswap\")\n2. **Discover entities**: Find known entities like exchanges, funds, and public figures (e.g., \"vitalik\", \"Binance\")\n3. **Resolve addresses**: Search by contract address to identify tokens\n4. **Filter by chain**: Narrow down results to specific blockchains\n\n**Search Parameters:**\n- `search_query`: Token name, symbol, contract address, or entity name\n- `result_type`: Filter by \"token\", \"entity\", or \"any\" (default: \"any\")\n- `chain`: Optional blockchain filter (e.g., \"ethereum\", \"solana\", \"base\")\n- `limit`: Maximum results (1-50, default: 25)\n\n**Example Request:**\n```json\n{\n  \"search_query\": \"AAVE\",\n  \"result_type\": \"token\",\n  \"chain\": \"ethereum\"\n}\n```\n\n**Example Response:**\n```json\n{\n  \"tokens\": [\n    {\n      \"name\": \"Aave\",\n      \"symbol\": \"AAVE\",\n      \"chain\": \"ethereum\",\n      \"address\": \"0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9\",\n      \"price\": 123.45,\n      \"volume_24h\": 50000000,\n      \"market_cap\": 1500000000,\n      \"rank\": 25\n    }\n  ],\n  \"entities\": [],\n  \"total_results\": 1\n}\n```\n\n**Important Notes:**\n- Prices may be delayed; use token OHLCV endpoints for real-time prices\n- Results are sorted by relevance/popularity rank\n- Use the `chain` parameter (not the query string) to filter by blockchain","operationId":"general_search_api_v1_search_general_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralSearchRequest"}}},"required":true},"responses":{"200":{"description":"Search results with tokens and entities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralSearchResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
````


# Smart Money

### Overview

Smart Money endpoints provide insights into the trading and holding activity of sophisticated market participants, including institutional funds and historically profitable traders.

### Endpoints

| Endpoint            | Path                                      | Description                             |
| ------------------- | ----------------------------------------- | --------------------------------------- |
| Netflow             | `/api/v1/smart-money/netflow`             | Net capital flows (inflows vs outflows) |
| DEX Trades          | `/api/v1/smart-money/dex-trades`          | Real-time DEX trading activity          |
| Perp Trades         | `/api/v1/smart-money/perp-trades`         | Perpetual trading on Hyperliquid        |
| DCAs                | `/api/v1/smart-money/dcas`                | DCA strategies on Jupiter               |
| Holdings            | `/api/v1/smart-money/holdings`            | Aggregated token balances               |
| Historical Holdings | `/api/v1/smart-money/historical-holdings` | Historical balance snapshots            |

### Supported Chains

Smart Money endpoints support these chains:

| Chain     | Value       |
| --------- | ----------- |
| Ethereum  | `ethereum`  |
| Solana    | `solana`    |
| Base      | `base`      |
| BNB Chain | `bnb`       |
| Arbitrum  | `arbitrum`  |
| Polygon   | `polygon`   |
| Optimism  | `optimism`  |
| Avalanche | `avalanche` |
| Linea     | `linea`     |
| Scroll    | `scroll`    |
| zkSync    | `zksync`    |
| Mantle    | `mantle`    |
| Ronin     | `ronin`     |
| Sei       | `sei`       |
| Plasma    | `plasma`    |
| Sonic     | `sonic`     |
| Unichain  | `unichain`  |
| Monad     | `monad`     |
| HyperEVM  | `hyperevm`  |
| IOTA EVM  | `iotaevm`   |

### Smart Money Labels

Filter by these smart money labels:

| Label                   | Description                     |
| ----------------------- | ------------------------------- |
| `Fund`                  | Institutional investment funds  |
| `Smart Trader`          | Historically profitable traders |
| `30D Smart Trader`      | Top performers (30-day window)  |
| `90D Smart Trader`      | Top performers (90-day window)  |
| `180D Smart Trader`     | Top performers (180-day window) |
| `Smart HL Perps Trader` | Profitable Hyperliquid traders  |

### Common Request Pattern

```json
{
  "chains": ["ethereum", "solana"],
  "filters": {
    "include_smart_money_labels": ["Fund", "Smart Trader"],
    "value_usd": {"min": 10000}
  },
  "pagination": {
    "page": 1,
    "per_page": 100
  },
  "order_by": [
    {"field": "value_usd", "direction": "DESC"}
  ]
}
```

### Next:

{% content-ref url="/pages/aVsWbKbTgy8fbMcKoWq7" %}
[Netflows](/api/smart-money/netflows)
{% endcontent-ref %}

{% content-ref url="/pages/1qo1HJEaDto58QBB7JoO" %}
[Holdings](/api/smart-money/holdings)
{% endcontent-ref %}

{% content-ref url="/pages/rYsYbf9uGhNH2iFjvXis" %}
[Historical Holdings](/api/smart-money/historical-holdings)
{% endcontent-ref %}

{% content-ref url="/pages/LA9mTsMicCD9eBuSA30f" %}
[DEX Trades](/api/smart-money/dex-trades)
{% endcontent-ref %}

{% content-ref url="/pages/SykFfCZRUpWS1ASo0fzF" %}
[Perp Trades](/api/smart-money/perp-trades)
{% endcontent-ref %}

{% content-ref url="/pages/ehDRbgk7yGFsGOVdRagI" %}
[Jupiter DCAs](/api/smart-money/jupiter-dcas)
{% endcontent-ref %}


# Netflows

Get aggregated token flow analysis for smart money wallets to see which tokens they're accumulating or distributing.

### Common Scenarios

<table data-full-width="true"><thead><tr><th width="228.4453125">Usecase</th><th width="189.2734375">Required Parameters</th><th width="226.98828125">Optional Filters</th><th>Sorting Logic</th><th>Expected Output</th></tr></thead><tbody><tr><td>Find what funds are buying on Solana</td><td>chains: ["Solana"] </td><td>include_smart_money_labels: ["Fund"] </td><td>[{"field":"net_flow_7d_usd",<br>"direction":"DESC"}]</td><td>Returns top tokens by funds, sorted by 7D inflow</td></tr><tr><td>Top DeFi tokens that Smart Money are selling</td><td>chains: ["ethereum"]</td><td>token_sectors: ["DeFi"]</td><td>[{"field":"net_flow_7d_usd",<br>"direction":"ASC"}]</td><td>Returns tokens with highest net outflow in DeFi sector</td></tr></tbody></table>

## Get Smart Money Netflow Data

> Analyze net capital flows (inflows vs outflows) from smart traders and funds across different time periods. This endpoint helps identify which tokens are experiencing net accumulation or distribution by smart money.\
> \
> What are Net Flows?\
> Net flows represent the difference between smart money inflows and outflows for a token. This includes:\
> \
> \- DEX Trading Activity: Tokens bought vs sold on decentralized exchanges\
> \- CEX Transfers: Tokens sent to or received from centralized exchanges\
> \- Positive Net Flow: Smart money is accumulating (buying more than selling, or withdrawing from CEXs)\
> \- Negative Net Flow: Smart money is distributing (selling more than buying, or depositing to CEXs)\
> \
> Key Features:\
> \
> \- Aggregated net flow calculations across all smart money activity\
> \- Multiple time period analysis (1h, 24h, 7d, 30d)\
> \- Sortable results by volume metrics\
> \- Includes both DEX trades and CEX transfers

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"SmartMoneyNetflowRequest":{"properties":{"chains":{"items":{"$ref":"#/components/schemas/SmartMoneyChain"},"type":"array","title":"Chains","description":"Chains to include in the analysis (only smart money supported chains). Use 'all' to include all available chains."},"filters":{"anyOf":[{"$ref":"#/components/schemas/SmartMoneyNetflowFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_SmartMoneyNetflowSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"market_cap_usd\", \"direction\": \"DESC\"}] - Sort by market cap descending\n- [{\"field\": \"net_flow_24h_usd\", \"direction\": \"ASC\"}] - Sort by 24h flow ascending\n- [{\"field\": \"market_cap_usd\", \"direction\": \"DESC\"}, {\"field\": \"net_flow_24h_usd\", \"direction\": \"ASC\"}] - Sort by market cap descending, then 24h flow ascending"}},"additionalProperties":false,"type":"object","required":["chains"],"title":"SmartMoneyNetflowRequest","description":""},"SmartMoneyChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bnb","ethereum","hyperevm","iotaevm","linea","mantle","monad","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic"],"title":"SmartMoneyChain","description":"Chains supported in smart money analysis."},"SmartMoneyNetflowFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Smart money category filters"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Smart money category filters"},"token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Address","description":"Token address or symbol filter"},"include_stablecoins":{"anyOf":[{"type":"boolean"}],"title":"Include Stablecoins","description":"Whether to include stablecoins in the results","default":false},"include_native_tokens":{"anyOf":[{"type":"boolean"}],"title":"Include Native Tokens","description":"Whether to include native tokens (e.g., ETH, SOL) in the results","default":false},"token_sector":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Token Sector","description":"Token sector filter"},"trader_count":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Trader count range filter"},"token_age_days":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token age range filter in days"},"market_cap_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Market cap range filter in USD"}},"additionalProperties":false,"type":"object","title":"SmartMoneyNetflowFilters","description":"Filters for smart money netflow endpoint.\n\nThese filters control which smart money categories, tokens, and data\nare included in the netflow analysis."},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_SmartMoneyNetflowSortField_":{"properties":{"field":{"$ref":"#/components/schemas/SmartMoneyNetflowSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[SmartMoneyNetflowSortField]"},"SmartMoneyNetflowSortField":{"type":"string","enum":["chain","token_address","token_symbol","net_flow_1h_usd","net_flow_24h_usd","net_flow_7d_usd","net_flow_30d_usd","token_sectors","trader_count","token_age_days","market_cap_usd"],"title":"SmartMoneyNetflowSortField","description":"Enum for sortable fields in smart money netflow."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"SmartMoneyNetflowResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SmartMoneyNetflow"},"type":"array","title":"Data","description":"List of smart money netflow records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"SmartMoneyNetflowResponse","description":"Response model for smart money netflow endpoint.\n\nContains the filtered smart money netflow data with metadata."},"SmartMoneyNetflow":{"properties":{"token_address":{"type":"string","title":"Token Address","description":"Token contract address"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"net_flow_1h_usd":{"type":"number","title":"Net Flow 1H Usd","description":"Net flow bought/sold of token by Smart Money in the past 1 hour."},"net_flow_24h_usd":{"type":"number","title":"Net Flow 24H Usd","description":"Net flow bought/sold of token by Smart Money in the past 24 hours."},"net_flow_7d_usd":{"type":"number","title":"Net Flow 7D Usd","description":"Net flow bought/sold of token by Smart Money in the past 7 days."},"net_flow_30d_usd":{"type":"number","title":"Net Flow 30D Usd","description":"Net flow bought/sold of token by Smart Money in the past 30 days."},"chain":{"type":"string","title":"Chain","description":"Blockchain chain"},"token_sectors":{"items":{"type":"string"},"type":"array","title":"Token Sectors","description":"Token sectors"},"trader_count":{"type":"integer","title":"Trader Count","description":"Number of Smart Money traders of token in the past 30 days."},"token_age_days":{"type":"integer","title":"Token Age Days","description":"Number of days since token was deployed."},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market cap of token."}},"type":"object","required":["token_address","token_symbol","net_flow_1h_usd","net_flow_24h_usd","net_flow_7d_usd","net_flow_30d_usd","chain","token_sectors","trader_count","token_age_days"],"title":"SmartMoneyNetflow","description":"Individual smart money netflow record.\n\nRepresents a single token's smart money netflow data."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/smart-money/netflow":{"post":{"tags":["Smart Money"],"summary":"Get Smart Money Netflow Data","description":"Analyze net capital flows (inflows vs outflows) from smart traders and funds across different time periods. This endpoint helps identify which tokens are experiencing net accumulation or distribution by smart money.\n\nWhat are Net Flows?\nNet flows represent the difference between smart money inflows and outflows for a token. This includes:\n\n- DEX Trading Activity: Tokens bought vs sold on decentralized exchanges\n- CEX Transfers: Tokens sent to or received from centralized exchanges\n- Positive Net Flow: Smart money is accumulating (buying more than selling, or withdrawing from CEXs)\n- Negative Net Flow: Smart money is distributing (selling more than buying, or depositing to CEXs)\n\nKey Features:\n\n- Aggregated net flow calculations across all smart money activity\n- Multiple time period analysis (1h, 24h, 7d, 30d)\n- Sortable results by volume metrics\n- Includes both DEX trades and CEX transfers","operationId":"get_smart_money_netflow_api_v1_smart_money_netflow_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyNetflowRequest"}}},"required":true},"responses":{"200":{"description":"Smart money netflow data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyNetflowResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Holdings

Aggregated token holdings data for smart traders and funds.

### Common Scenarios

<table data-full-width="true"><thead><tr><th>Usecase</th><th>Required Parameters</th><th>Filters </th><th>Sorting Logic</th><th>Expected Output</th></tr></thead><tbody><tr><td>View smart trader token holdings across chains</td><td>chains = ["ethereum", "solana"]</td><td>N/A</td><td>order_by = [{field: "value_usd",<br> direction: "DESC"}]</td><td>Aggregated list of tokens held by smart traders on specified chains</td></tr><tr><td>Monitor top accumulating tokens this week</td><td>chains = "all", </td><td>filters = {balance_24h_percent_change: {min: 10}}, </td><td>order_by = [{field: "balance_24h_percent_change", <br>direction: "DESC"}]</td><td>Tokens showing largest recent increases in smart trader holdings</td></tr><tr><td>Screen for newly held tokens with threshold value</td><td>chains = "all", </td><td> filters = {token_age_days: {max: 30}, <br><br>value_usd: {min: 10000}}</td><td>order_by = [{field: "token_age_days", direction: "ASC"}]</td><td>Newly acquired tokens by smart money, filtered by age and min USD value</td></tr></tbody></table>

## Get Smart Money Holdings Data

> Retrieve aggregated token balances held by smart traders and funds across multiple blockchains. This endpoint provides insights into what tokens are being accumulated by sophisticated market participants, excluding whales, large holders, and influencers to focus specifically on trading expertise.\
> \
> Key Features:\
> \
> \- Aggregated balances (not per-wallet breakdowns)\
> \- 24-hour balance change tracking updated in realtime\
> \- Sector categorization for tokens

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"SmartMoneyHoldingsRequest":{"properties":{"chains":{"items":{"$ref":"#/components/schemas/SmartMoneyChain"},"type":"array","title":"Chains","description":"Chains to include in the analysis (only smart money supported chains). Use 'all' to include all available chains."},"filters":{"anyOf":[{"$ref":"#/components/schemas/SmartMoneyHoldingsFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_SmartMoneyHoldingsSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"value_usd\", \"direction\": \"DESC\"}] - Sort by value USD descending\n- [{\"field\": \"holders_count\", \"direction\": \"ASC\"}] - Sort by number of holders ascending\n- [{\"field\": \"value_usd\", \"direction\": \"DESC\"}, {\"field\": \"holders_count\", \"direction\": \"ASC\"}] - Sort by value USD descending, then number of holders ascending"}},"additionalProperties":false,"type":"object","required":["chains"],"title":"SmartMoneyHoldingsRequest","description":""},"SmartMoneyChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bnb","ethereum","hyperevm","iotaevm","linea","mantle","monad","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic"],"title":"SmartMoneyChain","description":"Chains supported in smart money analysis."},"SmartMoneyHoldingsFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Smart money category filters"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Smart money category filters"},"include_stablecoins":{"anyOf":[{"type":"boolean"}],"title":"Include Stablecoins","description":"Whether to include stablecoins in the results","default":false},"include_native_tokens":{"anyOf":[{"type":"boolean"}],"title":"Include Native Tokens","description":"Whether to include native tokens (e.g., ETH, SOL) in the results","default":false},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Value range filter in USD"},"balance_24h_percent_change":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"24-hour balance change percentage range filter"},"holders_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of holders range filter"},"share_of_holdings_percent":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Share of holdings percentage range filter"},"token_age_days":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token age range filter in days"},"market_cap_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Market cap range filter in USD"},"token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Address","description":"Token address filter"},"token_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Symbol","description":"Token symbol filter"},"token_sectors":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Token Sectors","description":"Token sectors filter"}},"additionalProperties":false,"type":"object","title":"SmartMoneyHoldingsFilters","description":"Filters for smart money holdings endpoint.\n\nThese filters control which token holdings, smart money categories,\nand data are included in the holdings analysis."},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_SmartMoneyHoldingsSortField_":{"properties":{"field":{"$ref":"#/components/schemas/SmartMoneyHoldingsSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[SmartMoneyHoldingsSortField]"},"SmartMoneyHoldingsSortField":{"type":"string","enum":["chain","token_address","token_symbol","value_usd","balance_24h_percent_change","holders_count","share_of_holdings_percent","token_age_days","market_cap_usd"],"title":"SmartMoneyHoldingsSortField","description":"Enum for sortable fields in smart money holdings."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"SmartMoneyHoldingsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SmartMoneyHolding"},"type":"array","title":"Data","description":"List of smart money holding records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"SmartMoneyHoldingsResponse","description":"Response model for smart money holdings endpoint.\n\nContains the filtered smart money holdings data with metadata."},"SmartMoneyHolding":{"properties":{"chain":{"$ref":"#/components/schemas/SmartMoneyChain","description":"Chain name"},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"token_sectors":{"items":{"type":"string"},"type":"array","title":"Token Sectors","description":"Token sectors"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"Value of token held by Smart Money."},"balance_24h_percent_change":{"anyOf":[{"type":"number"}],"title":"Balance 24H Percent Change","description":"Balance change of Smart Money for token during the last 24 hours"},"holders_count":{"type":"integer","title":"Holders Count","description":"Number of Smart Money holders of token."},"share_of_holdings_percent":{"anyOf":[{"type":"number"}],"title":"Share Of Holdings Percent","description":"Share of Smart Money total USD balance."},"token_age_days":{"type":"integer","title":"Token Age Days","description":"Number of days since token was deployed."},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market cap of token."}},"type":"object","required":["chain","token_address","token_symbol","token_sectors","holders_count","token_age_days"],"title":"SmartMoneyHolding","description":"Individual smart money holding record.\n\nRepresents a single token's smart money holding data."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/smart-money/holdings":{"post":{"tags":["Smart Money"],"summary":"Get Smart Money Holdings Data","description":"Retrieve aggregated token balances held by smart traders and funds across multiple blockchains. This endpoint provides insights into what tokens are being accumulated by sophisticated market participants, excluding whales, large holders, and influencers to focus specifically on trading expertise.\n\nKey Features:\n\n- Aggregated balances (not per-wallet breakdowns)\n- 24-hour balance change tracking updated in realtime\n- Sector categorization for tokens","operationId":"get_smart_money_holdings_api_v1_smart_money_holdings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyHoldingsRequest"}}},"required":true},"responses":{"200":{"description":"Smart money holdings data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyHoldingsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Historical Holdings

{% hint style="info" %}
**Note:** This is a beta endpoint. The data provided may be subject to changes, corrections, or improvements as we continue to refine our Smart Money analytics.&#x20;
{% endhint %}

## Get Smart Money Historical Holdings Data

> Retrieve historical snapshots of aggregated token balances held by smart traders and funds. This endpoint provides time-series data for trend analysis, backtesting, and performance attribution.\
> \
> Key Features:\
> \
> \- Daily snapshots of smart money holdings\
> \- Date range filtering (max 4 years lookback)\
> \- Point-in-time pricing and market cap data\
> \- Balance change tracking between snapshots\
> \- Same filtering options as current holdings endpoint\
> \
> Use Cases:\
> \
> \- Trend Analysis: Track how smart money rotates between assets over time\
> \- Performance Attribution: Combine with price data to estimate ROI\
> \- Backtesting: Validate trading strategies based on historical smart money behavior

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"SmartMoneyHistoricalHoldingsRequest":{"properties":{"date_range":{"$ref":"#/components/schemas/DateOnlyRange","description":"Date range for historical data (YYYY-MM-DD format). If 'to' is omitted, defaults to today. Maximum lookback is 4 years."},"chains":{"items":{"$ref":"#/components/schemas/SmartMoneyHistoricalHoldingsChain"},"type":"array","title":"Chains","description":"Chains to include in the analysis. Supports ethereum, base, bnb, monad, and solana."},"filters":{"anyOf":[{"$ref":"#/components/schemas/SmartMoneyHistoricalHoldingsFilters"}],"description":"Additional filters to apply"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_SmartMoneyHistoricalHoldingsSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order. Defaults to sorting by date DESC, value_usd DESC, token_address ASC, chain ASC for stable pagination."}},"additionalProperties":false,"type":"object","required":["date_range","chains"],"title":"SmartMoneyHistoricalHoldingsRequest","description":"Request model for smart money historical holdings endpoint."},"DateOnlyRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in YYYY-MM-DD format"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in YYYY-MM-DD format"}},"type":"object","title":"DateOnlyRange","description":"Date range model that only accepts YYYY-MM-DD format (no time components)."},"SmartMoneyHistoricalHoldingsChain":{"type":"string","enum":["base","bnb","ethereum","monad","solana"],"title":"SmartMoneyHistoricalHoldingsChain","description":"Chains supported for smart money historical holdings endpoint."},"SmartMoneyHistoricalHoldingsFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/HistoricalSmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Smart money category filters"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/HistoricalSmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Smart money category filters"},"include_stablecoins":{"anyOf":[{"type":"boolean"}],"title":"Include Stablecoins","description":"Whether to include stablecoins in the results","default":false},"include_native_tokens":{"anyOf":[{"type":"boolean"}],"title":"Include Native Tokens","description":"Whether to include native tokens (e.g., ETH, SOL) in the results","default":false},"balance":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token balance range filter in human-readable units"},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Value range filter in USD"},"balance_24h_percent_change":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"24-hour balance change percentage range filter"},"holders_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of holders range filter"},"share_of_holdings_percent":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Share of holdings percentage range filter"},"token_age_days":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token age range filter in days"},"market_cap_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Market cap range filter in USD"},"token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Address","description":"Token address filter"},"token_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Symbol","description":"Token symbol filter"}},"additionalProperties":false,"type":"object","title":"SmartMoneyHistoricalHoldingsFilters","description":"Filters for smart money historical holdings endpoint."},"HistoricalSmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart Dex Trader","30D Smart Dex Trader","90D Smart Dex Trader","180D Smart Dex Trader","Smart HL Perps Trader"],"title":"HistoricalSmartMoneyFilterType","description":"Filter by smart money label type. Includes legacy label classes (e.g. Smart Dex Trader) that appear in historical data."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_SmartMoneyHistoricalHoldingsSortField_":{"properties":{"field":{"$ref":"#/components/schemas/SmartMoneyHistoricalHoldingsSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[SmartMoneyHistoricalHoldingsSortField]"},"SmartMoneyHistoricalHoldingsSortField":{"type":"string","enum":["date","chain","token_address","token_symbol","balance","value_usd","balance_24h_percent_change","holders_count","share_of_holdings_percent","token_age_days","market_cap_usd"],"title":"SmartMoneyHistoricalHoldingsSortField","description":"Enum for sortable fields in smart money historical holdings."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"SmartMoneyHistoricalHoldingsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SmartMoneyHistoricalHolding"},"type":"array","title":"Data","description":"List of smart money historical holding records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"SmartMoneyHistoricalHoldingsResponse","description":"Response model for smart money historical holdings endpoint."},"SmartMoneyHistoricalHolding":{"properties":{"date":{"type":"string","title":"Date","description":"Snapshot date (YYYY-MM-DD)"},"chain":{"$ref":"#/components/schemas/SmartMoneyHistoricalHoldingsChain","description":"Chain name"},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"token_sectors":{"items":{"type":"string"},"type":"array","title":"Token Sectors","description":"Token sectors"},"smart_money_labels":{"items":{"type":"string"},"type":"array","title":"Smart Money Labels","description":"Array of unique smart money labels present in the aggregated holdings for this token"},"balance":{"anyOf":[{"type":"number"}],"title":"Balance","description":"Token balance in human-readable units (accounting for decimals)"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"Value of token held by Smart Money at snapshot date"},"balance_24h_percent_change":{"anyOf":[{"type":"number"}],"title":"Balance 24H Percent Change","description":"Balance change of Smart Money for token during the 24 hours prior to snapshot"},"holders_count":{"type":"integer","title":"Holders Count","description":"Number of Smart Money holders of token at snapshot date"},"share_of_holdings_percent":{"anyOf":[{"type":"number"}],"title":"Share Of Holdings Percent","description":"Share of Smart Money total USD balance at snapshot date"},"token_age_days":{"type":"integer","title":"Token Age Days","description":"Number of days since token was deployed, relative to snapshot date"},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market cap of token at snapshot date"}},"type":"object","required":["date","chain","token_address","token_symbol","token_sectors","smart_money_labels","holders_count","token_age_days"],"title":"SmartMoneyHistoricalHolding","description":"Individual smart money historical holding record."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/smart-money/historical-holdings":{"post":{"tags":["Smart Money"],"summary":"Get Smart Money Historical Holdings Data","description":"Retrieve historical snapshots of aggregated token balances held by smart traders and funds. This endpoint provides time-series data for trend analysis, backtesting, and performance attribution.\n\nKey Features:\n\n- Daily snapshots of smart money holdings\n- Date range filtering (max 4 years lookback)\n- Point-in-time pricing and market cap data\n- Balance change tracking between snapshots\n- Same filtering options as current holdings endpoint\n\nUse Cases:\n\n- Trend Analysis: Track how smart money rotates between assets over time\n- Performance Attribution: Combine with price data to estimate ROI\n- Backtesting: Validate trading strategies based on historical smart money behavior","operationId":"get_smart_money_historical_holdings_api_v1_smart_money_historical_holdings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyHistoricalHoldingsRequest"}}},"required":true},"responses":{"200":{"description":"Smart money historical holdings data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyHistoricalHoldingsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# DEX Trades

## Get Smart Money DEX Trades Data

> Access real-time DEX trading activity from smart traders and funds over the last 24 hours. This endpoint provides granular transaction-level data showing exactly what sophisticated traders are buying and selling on decentralized exchanges.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"SmartMoneyDexTradesRequest":{"properties":{"chains":{"items":{"$ref":"#/components/schemas/SmartMoneyChain"},"type":"array","title":"Chains","description":"Chains to include in the analysis (only smart money supported chains). Use 'all' to include all available chains."},"filters":{"anyOf":[{"$ref":"#/components/schemas/SmartMoneyDexTradesFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_SmartMoneyDexTradesSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"trade_value_in_usd\", \"direction\": \"DESC\"}] - Sort by trade value descending\n- [{\"field\": \"block_timestamp\", \"direction\": \"ASC\"}] - Sort by timestamp ascending\n- [{\"field\": \"token_bought_amount\", \"direction\": \"DESC\"}, {\"field\": \"block_timestamp\", \"direction\": \"ASC\"}] - Sort by bought amount descending, then timestamp ascending"}},"additionalProperties":false,"type":"object","required":["chains"],"title":"SmartMoneyDexTradesRequest","description":""},"SmartMoneyChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bnb","ethereum","hyperevm","iotaevm","linea","mantle","monad","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic"],"title":"SmartMoneyChain","description":"Chains supported in smart money analysis."},"SmartMoneyDexTradesFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Smart money category filters"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Smart money category filters"},"chain":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Chain","description":"Blockchain network filter"},"transaction_hash":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transaction Hash","description":"Transaction hash filter"},"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader name or label filter"},"token_bought_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Bought Address","description":"Token address filter for bought tokens"},"token_sold_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Sold Address","description":"Token address filter for sold tokens"},"token_bought_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Amount range filter for bought tokens"},"token_sold_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Amount range filter for sold tokens"},"token_bought_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Bought Symbol","description":"Symbol filter for bought tokens"},"token_sold_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Sold Symbol","description":"Symbol filter for sold tokens"},"token_bought_age_days":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Age range filter for bought tokens in days"},"token_sold_age_days":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Age range filter for sold tokens in days"},"token_bought_market_cap":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Market cap range filter for bought tokens"},"token_sold_market_cap":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Market cap range filter for sold tokens"},"token_bought_fdv":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"FDV range filter for bought tokens"},"token_sold_fdv":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"FDV range filter for sold tokens"},"trade_value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Trade value range filter in USD"}},"additionalProperties":false,"type":"object","title":"SmartMoneyDexTradesFilters","description":"Filters for smart money DEX trades endpoint.\n\nThese filters control which DEX trades, tokens, and traders\nare included in the trades analysis."},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_SmartMoneyDexTradesSortField_":{"properties":{"field":{"$ref":"#/components/schemas/SmartMoneyDexTradesSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[SmartMoneyDexTradesSortField]"},"SmartMoneyDexTradesSortField":{"type":"string","enum":["chain","block_timestamp","transaction_hash","trader_address","trader_address_label","token_bought_address","token_sold_address","token_bought_amount","token_sold_amount","token_bought_symbol","token_sold_symbol","token_bought_age_days","token_sold_age_days","token_bought_market_cap","token_sold_market_cap","token_bought_fdv","token_sold_fdv","trade_value_usd"],"title":"SmartMoneyDexTradesSortField","description":"Enum for sortable fields in smart money dex trades."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"SmartMoneyDexTradesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SmartMoneyDexTrade"},"type":"array","title":"Data","description":"List of smart money dex trade records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"SmartMoneyDexTradesResponse","description":"Response model for smart money dex trades endpoint.\n\nContains the filtered smart money dex trades data with metadata."},"SmartMoneyDexTrade":{"properties":{"chain":{"type":"string","title":"Chain","description":"Blockchain chain"},"block_timestamp":{"type":"string","title":"Block Timestamp","description":"Block timestamp of the trade"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"Transaction hash"},"trader_address":{"type":"string","title":"Trader Address","description":"Hexadecimal representation of the trader's address, i.e. the signer of the transaction"},"trader_address_label":{"type":"string","title":"Trader Address Label","description":"Name of the trader, based on nansen_label"},"token_bought_address":{"type":"string","title":"Token Bought Address","description":"Hexadecimal representation of the bought token's address"},"token_sold_address":{"type":"string","title":"Token Sold Address","description":"Hexadecimal representation of the sold token's address"},"token_bought_amount":{"anyOf":[{"type":"number"}],"title":"Token Bought Amount","description":"Amount of token bought in decimal amount"},"token_sold_amount":{"anyOf":[{"type":"number"}],"title":"Token Sold Amount","description":"Amount of token sold  in decimal amount"},"token_bought_symbol":{"type":"string","title":"Token Bought Symbol","description":"Symbol of the bought token"},"token_sold_symbol":{"type":"string","title":"Token Sold Symbol","description":"Symbol of the sold token"},"token_bought_age_days":{"type":"integer","title":"Token Bought Age Days","description":"Age of bought token's address in days"},"token_sold_age_days":{"type":"integer","title":"Token Sold Age Days","description":"Age of sold token's address in days"},"token_bought_market_cap":{"anyOf":[{"type":"number"}],"title":"Token Bought Market Cap","description":"Circulating market cap of bought token in USD. Returns NULL when circulating supply data is unavailable."},"token_sold_market_cap":{"anyOf":[{"type":"number"}],"title":"Token Sold Market Cap","description":"Circulating market cap of sold token in USD. Returns NULL when circulating supply data is unavailable."},"token_bought_fdv":{"anyOf":[{"type":"number"}],"title":"Token Bought Fdv","description":"Fully Diluted Valuation of bought token in USD (total_supply x price). May be very large for tokens with no circulating supply data."},"token_sold_fdv":{"anyOf":[{"type":"number"}],"title":"Token Sold Fdv","description":"Fully Diluted Valuation of sold token in USD (total_supply x price). May be very large for tokens with no circulating supply data."},"trade_value_usd":{"anyOf":[{"type":"number"}],"title":"Trade Value Usd","description":"Either token_bought_in_usd or token_sold_in_usd, if token_bought_in_usd is 0"}},"type":"object","required":["chain","block_timestamp","transaction_hash","trader_address","trader_address_label","token_bought_address","token_sold_address","token_bought_symbol","token_sold_symbol","token_bought_age_days","token_sold_age_days"],"title":"SmartMoneyDexTrade","description":"Individual smart money dex trade record.\n\nRepresents a single DEX trade made by smart money wallets."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/smart-money/dex-trades":{"post":{"tags":["Smart Money"],"summary":"Get Smart Money DEX Trades Data","description":"Access real-time DEX trading activity from smart traders and funds over the last 24 hours. This endpoint provides granular transaction-level data showing exactly what sophisticated traders are buying and selling on decentralized exchanges.","operationId":"get_smart_money_dex_trades_api_v1_smart_money_dex_trades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyDexTradesRequest"}}},"required":true},"responses":{"200":{"description":"Smart money DEX trades data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyDexTradesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Perp Trades

## Get Smart Money Perpetual Trades Data

> Access real-time perpetual trading activity from smart traders and funds on Hyperliquid. This endpoint provides granular transaction-level data showing exactly what sophisticated traders are trading on perpetual contracts.\
> \
> Key Features:\
> \- Hyperliquid perpetual contracts only (no chain field needed)\
> \- Real-time trading data from smart money wallets\
> \- Detailed trade information including coin, amount, price, action, and type\
> \- Smart money filtering capabilities\
> \- Type filtering (Market/Limit)\
> \- Only new positions filter to show only position opening trades (defaults to false - shows all trades)

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"SmartMoneyPerpTradesRequest":{"properties":{"filters":{"anyOf":[{"$ref":"#/components/schemas/SmartMoneyPerpTradesFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"only_new_positions":{"anyOf":[{"type":"boolean"}],"title":"Only New Positions","description":"When True, includes 'Open' position actions (Open Long, Open Short). Can be combined with other action filters using OR logic (union). When False (default), returns all trades.","default":false},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_SmartMoneyPerpTradesSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"value_usd\", \"direction\": \"DESC\"}] - Sort by trade value descending\n- [{\"field\": \"block_timestamp\", \"direction\": \"ASC\"}] - Sort by timestamp ascending\n- [{\"field\": \"token_amount\", \"direction\": \"DESC\"}, {\"field\": \"block_timestamp\", \"direction\": \"ASC\"}] - Sort by token amount descending, then timestamp ascending"}},"additionalProperties":false,"type":"object","title":"SmartMoneyPerpTradesRequest","description":""},"SmartMoneyPerpTradesFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels for traders"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels for traders"},"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader name or label filter"},"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Token symbol filter"},"type":{"anyOf":[{"$ref":"#/components/schemas/TradeType"}],"description":"Trade type filter - Market or Limit"},"token_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token amount range filter"},"price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Price range filter in USD"},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Trade value range filter in USD"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"},{"items":{"$ref":"#/components/schemas/PositionSide"},"type":"array"},{"type":"null"}],"title":"Side","description":"Position side filter - Long or Short"},"action":{"anyOf":[{"$ref":"#/components/schemas/PerpActionType"},{"items":{"$ref":"#/components/schemas/PerpActionType"},"type":"array"},{"type":"null"}],"title":"Action","description":"Action filter - combined buy/sell with position action (e.g., 'Buy - Add Long', 'Sell - Open Short')"}},"additionalProperties":false,"type":"object","title":"SmartMoneyPerpTradesFilters","description":"Filters for smart money perpetual trades endpoint.\n\nThese filters control which perpetual trades and traders\nare included in the trades analysis."},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"TradeType":{"type":"string","enum":["Market","Limit"],"title":"TradeType","description":"Enum for trade types."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"PositionSide":{"type":"string","enum":["Long","Short"],"title":"PositionSide","description":"Shared enum for position side direction."},"PerpActionType":{"type":"string","enum":["Buy - Add Long","Buy - Reduce Short","Buy - Open Long","Buy - Close Short","Sell - Add Short","Sell - Reduce Long","Sell - Open Short","Sell - Close Long"],"title":"PerpActionType","description":"Shared enum for perpetual trade action types (combined buy/sell with position actions)."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_SmartMoneyPerpTradesSortField_":{"properties":{"field":{"$ref":"#/components/schemas/SmartMoneyPerpTradesSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[SmartMoneyPerpTradesSortField]"},"SmartMoneyPerpTradesSortField":{"type":"string","enum":["block_timestamp","token_amount","price_usd","value_usd"],"title":"SmartMoneyPerpTradesSortField","description":"Enum for sortable fields in smart money perp trades."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"SmartMoneyPerpTradesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SmartMoneyPerpTrade"},"type":"array","title":"Data","description":"List of smart money perpetual trade records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"SmartMoneyPerpTradesResponse","description":"Response model for smart money perpetual trades endpoint.\n\nContains the filtered smart money perpetual trades data with metadata."},"SmartMoneyPerpTrade":{"properties":{"trader_address_label":{"type":"string","title":"Trader Address Label","description":"Name of the trader, based on Nansen labels"},"trader_address":{"type":"string","title":"Trader Address","description":"Hexadecimal representation of the trader's address, i.e. the signer of the transaction"},"token_symbol":{"type":"string","title":"Token Symbol","description":"The token symbol"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"}],"description":"The side of the position (Long or Short)"},"action":{"type":"string","title":"Action","description":"The action taken by the trader (Add, Reduce, Open, Close)"},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","description":"Trade size in contract units"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Trade price in USD"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"Notional trade value in USD"},"type":{"$ref":"#/components/schemas/TradeType","description":"The trade type (Market or Limit)"},"block_timestamp":{"type":"string","title":"Block Timestamp","description":"The timestamp of the block"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"Hexadecimal representation of the transaction hash"}},"type":"object","required":["trader_address_label","trader_address","token_symbol","action","type","block_timestamp","transaction_hash"],"title":"SmartMoneyPerpTrade","description":"Individual smart money perpetual trade record.\n\nRepresents a single perpetual trade made by smart money wallets on Hyperliquid."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/smart-money/perp-trades":{"post":{"tags":["Smart Money"],"summary":"Get Smart Money Perpetual Trades Data","description":"Access real-time perpetual trading activity from smart traders and funds on Hyperliquid. This endpoint provides granular transaction-level data showing exactly what sophisticated traders are trading on perpetual contracts.\n\nKey Features:\n- Hyperliquid perpetual contracts only (no chain field needed)\n- Real-time trading data from smart money wallets\n- Detailed trade information including coin, amount, price, action, and type\n- Smart money filtering capabilities\n- Type filtering (Market/Limit)\n- Only new positions filter to show only position opening trades (defaults to false - shows all trades)","operationId":"get_smart_money_perp_trades_api_v1_smart_money_perp_trades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyPerpTradesRequest"}}},"required":true},"responses":{"200":{"description":"Smart money perpetual trades data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyPerpTradesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Jupiter DCAs

## Get Smart Money DCAs Data

> Monitor DCA strategies employed by smart money on Solana through Jupiter DCA. This endpoint reveals systematic accumulation strategies used by smart money.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"SmartMoneyDcasRequest":{"properties":{"filters":{"anyOf":[{"$ref":"#/components/schemas/SmartMoneyDcasFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_SmartMoneyDcasSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"dca_created_at\", \"direction\": \"DESC\"}] - Sort by DCA created timestamp descending\n- [{\"field\": \"dca_updated_at\", \"direction\": \"ASC\"}] - Sort by DCA updated timestamp ascending\n- [{\"field\": \"deposit_token_amount\", \"direction\": \"DESC\"}, {\"field\": \"token_spent_amount\", \"direction\": \"ASC\"}] - Sort by deposit token amount descending, then token spent amount ascending"}},"additionalProperties":false,"type":"object","title":"SmartMoneyDcasRequest","description":""},"SmartMoneyDcasFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Smart money category filters"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Smart money category filters"},"dca_created_at":{"anyOf":[{"$ref":"#/components/schemas/DateRangeFilter"}],"description":"Date range filter for DCA creation timestamps"},"transaction_hash":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transaction Hash","description":"Transaction hash filter"},"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader name or label filter"},"input_token_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Token Symbol","description":"Symbol filter for input tokens"},"output_token_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Output Token Symbol","description":"Symbol filter for output tokens"},"deposit_token_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Deposit amount range filter"},"token_spent_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token spent amount range filter"},"output_token_redeemed_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Output token redeemed amount range filter"}},"additionalProperties":false,"type":"object","title":"SmartMoneyDcasFilters","description":"Filters for smart money DCAs endpoint.\n\nThese filters control which DCA orders, tokens, and traders\nare included in the DCA analysis."},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"DateRangeFilter":{"properties":{"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"From","description":"Start date (inclusive), ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"To","description":"End date (inclusive), ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRangeFilter","description":"Filter for date ranges with optional from/to bounds. - Date range"},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_SmartMoneyDcasSortField_":{"properties":{"field":{"$ref":"#/components/schemas/SmartMoneyDcasSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[SmartMoneyDcasSortField]"},"SmartMoneyDcasSortField":{"type":"string","enum":["dca_created_at","dca_updated_at","input_token_symbol","output_token_symbol","deposit_token_amount","token_spent_amount","deposit_value_usd","output_token_redeemed_amount"],"title":"SmartMoneyDcasSortField","description":"Enum for sortable fields in smart money DCAs."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"SmartMoneyDcasResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SmartMoneyDca"},"type":"array","title":"Data","description":"List of smart money DCA records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"SmartMoneyDcasResponse","description":"Response model for smart money DCAs endpoint.\n\nContains the filtered smart money DCAs data with metadata."},"SmartMoneyDca":{"properties":{"dca_created_at":{"type":"string","title":"Dca Created At","description":"The timestamp of the earliest transaction"},"dca_updated_at":{"type":"string","title":"Dca Updated At","description":"The timestamp of the latest transaction"},"trader_address":{"type":"string","title":"Trader Address","description":"The address of the trader"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"The transaction hash at the time of creation"},"trader_address_label":{"type":"string","title":"Trader Address Label","description":"Label associated with the address"},"dca_vault_address":{"type":"string","title":"Dca Vault Address","description":"The address of the DCA vault"},"input_token_address":{"type":"string","title":"Input Token Address","description":"Address of token"},"output_token_address":{"type":"string","title":"Output Token Address","description":"Address of token"},"deposit_token_amount":{"anyOf":[{"type":"number"}],"title":"Deposit Token Amount","description":"The amount deposited into the DCA vault"},"token_spent_amount":{"anyOf":[{"type":"number"}],"title":"Token Spent Amount","description":"The amount spent from the deposit"},"output_token_redeemed_amount":{"anyOf":[{"type":"number"}],"title":"Output Token Redeemed Amount","description":"The amount of other tokens redeemed"},"dca_status":{"type":"string","title":"Dca Status","description":"Indicates if the account was closed or active"},"input_token_symbol":{"type":"string","title":"Input Token Symbol","description":"The symbol of the input token"},"output_token_symbol":{"type":"string","title":"Output Token Symbol","description":"The symbol of the output token"},"deposit_value_usd":{"anyOf":[{"type":"number"}],"title":"Deposit Value Usd","description":"The USD value of the deposit"}},"type":"object","required":["dca_created_at","dca_updated_at","trader_address","transaction_hash","trader_address_label","dca_vault_address","input_token_address","output_token_address","dca_status","input_token_symbol","output_token_symbol"],"title":"SmartMoneyDca","description":"Individual smart money DCA record.\n\nRepresents a single DCA (Dollar Cost Averaging) order made by smart money wallets."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/smart-money/dcas":{"post":{"tags":["Smart Money"],"summary":"Get Smart Money DCAs Data","description":"Monitor DCA strategies employed by smart money on Solana through Jupiter DCA. This endpoint reveals systematic accumulation strategies used by smart money.","operationId":"get_smart_money_dcas_api_v1_smart_money_dcas_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyDcasRequest"}}},"required":true},"responses":{"200":{"description":"Smart money DCAs data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyDcasResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Profiler


# Address Current Balances

Get real-time token balance information for any blockchain address or entity

### Common Scenarios

{% hint style="info" %}
You can use this endpoint to find correct entity name format to use in this Profiler Endpoint: [**Click Here**](https://docs.nansen.ai/api/profiler/entity-name-search)
{% endhint %}

<table data-full-width="true"><thead><tr><th>Usecase</th><th>Required Parameters</th><th>Optional Filters</th><th>Expected Output</th></tr></thead><tbody><tr><td>Check current holdings for a single address</td><td>address = "0x28c6c06298d514db089934071355e5743bf21d60", <br><br>chain = "ethereum"</td><td>hide_spam_token = true, </td><td>List of tokens with amounts, USD values, and chain info for the address</td></tr><tr><td>View entity-wide portfolio (e.g., Vitalik Buterin)</td><td>entity_name = "Vitalik Buterin", <br>chain = "all"</td><td>hide_spam_token = true</td><td>Aggregated balances for entity across all wallets, showing holdings per chain</td></tr></tbody></table>

## Get Address Current Balance Data

> Retrieve current token holdings for addresses or entities. Returns detailed balance information across specified chains.\
> \
> What it helps to answer:\
> \
> \- Current token holdings with quantities and USD valuations\
> \- Asset distribution across different blockchain networks\
> \- Native token versus token balances\
> \- Stablecoin holdings and percentages\
> \- Cross-chain portfolio composition\
> \
> Note: The address field in the response will be empty if entity\_name is provided.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"ProfilerAddressBalancesRequest":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Address to get balances for"},"entity_name":{"anyOf":[{"type":"string"}],"title":"Entity Name","description":"Entity name to get balances for"},"chain":{"$ref":"#/components/schemas/ProfilerChain","description":"Blockchain chain for the balances"},"hide_spam_token":{"type":"boolean","title":"Hide Spam Token","description":"Removes suspicious tokens from the balance list","default":true},"filters":{"anyOf":[{"$ref":"#/components/schemas/ProfilerAddressBalancesFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_ProfilerAddressBalancesSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering"}},"additionalProperties":false,"type":"object","required":["chain"],"title":"ProfilerAddressBalancesRequest","description":""},"ProfilerChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bitcoin","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"ProfilerChain","description":"Chains supported in profiler analysis."},"ProfilerAddressBalancesFilters":{"properties":{"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Balance range filter in USD"},"price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token price range filter in USD"},"token_amount":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Token amount range filter"},"token_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Symbol","description":"Token symbol filter"},"token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Address","description":"Token address filter"},"token_name":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Name","description":"Token name filter"}},"additionalProperties":false,"type":"object","title":"ProfilerAddressBalancesFilters","description":"Filters for profiler address current balance endpoint.\n\nThese filters control which token balances are included."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_ProfilerAddressBalancesSortField_":{"properties":{"field":{"$ref":"#/components/schemas/ProfilerAddressBalancesSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[ProfilerAddressBalancesSortField]"},"ProfilerAddressBalancesSortField":{"type":"string","enum":["value_usd","token_symbol"],"title":"ProfilerAddressBalancesSortField","description":"Enum for sortable fields in profiler address balances."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"ProfilerAddressBalancesResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/ProfilerBalance"},"type":"array","title":"Data","description":"List of balance records"}},"type":"object","required":["pagination","data"],"title":"ProfilerAddressBalancesResponse","description":"Response model for profiler address current-balance endpoint.\n\nContains the filtered balance data with metadata."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"ProfilerBalance":{"properties":{"chain":{"type":"string","title":"Chain","description":"Chain"},"address":{"type":"string","title":"Address","description":"Address of the wallet. Empty if entity_name is provided. EVM addresses are returned in lowercase."},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"token_name":{"anyOf":[{"type":"string"}],"title":"Token Name","description":"Token name"},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","description":"Token balance"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Price of the token"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"Token balance value in USD"}},"type":"object","required":["chain","address","token_address","token_symbol"],"title":"ProfilerBalance","description":"Individual profiler balance record.\n\nRepresents a single token balance from the wallet profiler."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/address/current-balance":{"post":{"tags":["Profiler"],"summary":"Get Address Current Balance Data","description":"Retrieve current token holdings for addresses or entities. Returns detailed balance information across specified chains.\n\nWhat it helps to answer:\n\n- Current token holdings with quantities and USD valuations\n- Asset distribution across different blockchain networks\n- Native token versus token balances\n- Stablecoin holdings and percentages\n- Cross-chain portfolio composition\n\nNote: The address field in the response will be empty if entity_name is provided.","operationId":"get_profiler_address_current_balance_api_v1_profiler_address_current_balance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressBalancesRequest"}}},"required":true},"responses":{"200":{"description":"Address current balance data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressBalancesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address Historical Balances

Get historical token balance information for any blockchain address or entity

### Common Scenarios

{% hint style="info" %}
You can use this endpoint to find correct entity name format to use in this Profiler Endpoint: [**Click Here**](https://docs.nansen.ai/api/profiler/entity-name-search)
{% endhint %}

<table data-full-width="true"><thead><tr><th>Usecase</th><th>Required Parameters</th><th>Optional Filters</th><th>Expected Output</th></tr></thead><tbody><tr><td>Check current holdings for a single address</td><td>address = "0x28c6c06298d514db089934071355e5743bf21d60", <br><br>chain = "ethereum"</td><td>hide_spam_token = true, </td><td>List of tokens with amounts, USD values, and chain info for the address</td></tr><tr><td>View entity-wide portfolio (e.g., Coinbase)</td><td>entity_name = "Coinbase", <br>chain = "all"</td><td>hide_spam_token = true</td><td>Aggregated balances for entity across all wallets, showing holdings per chain</td></tr></tbody></table>

## Get Address Historical Balances Data

> Track token and native coin balance changes over time for addresses or entities. Provides snapshots at configurable intervals to analyze holding patterns, transaction activity, and portfolio evolution across multiple blockchains.\
> \
> What it helps to answer:\
> \
> \- Portfolio value changes across different time periods\
> \- Token accumulation and distribution patterns over selected timeframes\
> \- New positions entered and exited during specific periods

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"ProfilerAddressHistoricalBalancesRequest":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Address to get historical balances for"},"entity_name":{"anyOf":[{"type":"string"}],"title":"Entity Name","description":"Entity name to get historical balances for"},"chain":{"$ref":"#/components/schemas/ProfilerChain","description":"Blockchain chain for the historical balances"},"date":{"$ref":"#/components/schemas/DateRange","description":"Date range for historical data"},"filters":{"anyOf":[{"$ref":"#/components/schemas/ProfilerAddressHistoricalBalancesFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_ProfilerAddressHistoricalBalancesSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering"}},"additionalProperties":false,"type":"object","required":["chain","date"],"title":"ProfilerAddressHistoricalBalancesRequest","description":""},"ProfilerChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bitcoin","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"ProfilerChain","description":"Chains supported in profiler analysis."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"ProfilerAddressHistoricalBalancesFilters":{"properties":{"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Balance range filter in USD"},"token_amount":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Token balance count range filter"},"token_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Symbol","description":"Token symbol filter"},"token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Address","description":"Token address filter"},"hide_spam_tokens":{"anyOf":[{"type":"boolean"}],"title":"Hide Spam Tokens","description":"Whether to hide spam tokens from results","default":true}},"additionalProperties":false,"type":"object","title":"ProfilerAddressHistoricalBalancesFilters","description":"Filters for profiler address historical balances endpoint.\n\nThese filters control which historical balance data is included."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_ProfilerAddressHistoricalBalancesSortField_":{"properties":{"field":{"$ref":"#/components/schemas/ProfilerAddressHistoricalBalancesSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[ProfilerAddressHistoricalBalancesSortField]"},"ProfilerAddressHistoricalBalancesSortField":{"type":"string","enum":["block_timestamp","value_usd","token_symbol"],"title":"ProfilerAddressHistoricalBalancesSortField","description":"Enum for sortable fields in profiler address historical balances."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"ProfilerAddressHistoricalBalancesResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/ProfilerHistoricalBalance"},"type":"array","title":"Data","description":"List of historical balance records"}},"type":"object","required":["pagination","data"],"title":"ProfilerAddressHistoricalBalancesResponse","description":"Response model for profiler address historical-balances endpoint.\n\nContains the filtered historical balance data with metadata."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"ProfilerHistoricalBalance":{"properties":{"block_timestamp":{"type":"string","title":"Block Timestamp","description":"The block timestamp as date"},"token_address":{"type":"string","title":"Token Address","description":"Token Address"},"chain":{"type":"string","title":"Chain","description":"Chain"},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","description":"Token amount"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"Usd balance of the holdings"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Symbol of the token"}},"type":"object","required":["block_timestamp","token_address","chain","token_symbol"],"title":"ProfilerHistoricalBalance","description":"Individual profiler historical balance record.\n\nRepresents a single historical token balance from the wallet profiler."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/address/historical-balances":{"post":{"tags":["Profiler"],"summary":"Get Address Historical Balances Data","description":"Track token and native coin balance changes over time for addresses or entities. Provides snapshots at configurable intervals to analyze holding patterns, transaction activity, and portfolio evolution across multiple blockchains.\n\nWhat it helps to answer:\n\n- Portfolio value changes across different time periods\n- Token accumulation and distribution patterns over selected timeframes\n- New positions entered and exited during specific periods","operationId":"get_profiler_address_historical_balances_api_v1_profiler_address_historical_balances_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressHistoricalBalancesRequest"}}},"required":true},"responses":{"200":{"description":"Address historical balances data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressHistoricalBalancesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address Transactions

## Get Address Transactions Data

> Retrieve recent blockchain transactions for an address including token transfers, native currency movements, and contract interactions.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"ProfilerAddressTransactionsRequest":{"properties":{"address":{"type":"string","title":"Address","description":"Address to get transactions for"},"chain":{"$ref":"#/components/schemas/ProfilerTransactionsChain","description":"Blockchain chain for the transactions"},"date":{"$ref":"#/components/schemas/DateRange","description":"Date range for the transactions"},"hide_spam_token":{"type":"boolean","title":"Hide Spam Token","description":"Removes suspicious tokens from the transaction list","default":true},"filters":{"anyOf":[{"$ref":"#/components/schemas/ProfilerAddressTransactionsFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"pagination":{"$ref":"#/components/schemas/ProfilerPaginationRequest","description":"Pagination parameters (max 100 records per page for performance)"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_ProfilerAddressTransactionsSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering"}},"additionalProperties":false,"type":"object","required":["address","chain","date"],"title":"ProfilerAddressTransactionsRequest","description":""},"ProfilerTransactionsChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bitcoin","bnb","ethereum","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"ProfilerTransactionsChain","description":"Chains supported in profiler transactions analysis."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"ProfilerAddressTransactionsFilters":{"properties":{"token_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Symbol","description":"Token symbol filter"},"token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Address","description":"Token address filter"},"counterparty_name":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Counterparty Name","description":"Counterparty name filter"},"counterparty_address":{"anyOf":[{"type":"string"}],"title":"Counterparty Address","description":"Counterparty address filter"},"volume_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Transaction volume range filter in USD"},"method":{"anyOf":[{"type":"string"}],"title":"Method","description":"Transaction method filter"},"source_type":{"anyOf":[{"type":"string"}],"title":"Source Type","description":"Transaction source type filter"}},"additionalProperties":false,"type":"object","title":"ProfilerAddressTransactionsFilters","description":"Filters for profiler address transactions endpoint.\n\nThese filters control which transactions are included\nin the wallet transaction history."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"ProfilerPaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":100,"minimum":1,"title":"Per Page","description":"Number of records per page (max 100 for performance)","default":20}},"type":"object","title":"ProfilerPaginationRequest","description":"Pagination parameters for profiler endpoints with performance constraints."},"SortOrder_ProfilerAddressTransactionsSortField_":{"properties":{"field":{"$ref":"#/components/schemas/ProfilerAddressTransactionsSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[ProfilerAddressTransactionsSortField]"},"ProfilerAddressTransactionsSortField":{"type":"string","enum":["block_timestamp"],"title":"ProfilerAddressTransactionsSortField","description":"Enum for sortable fields in smart money inflows."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"ProfilerAddressTransactionsResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/ProfilerTransaction"},"type":"array","title":"Data","description":"List of transaction records"}},"type":"object","required":["pagination","data"],"title":"ProfilerAddressTransactionsResponse","description":"Response model for profiler address transactions endpoint.\n\nContains the filtered transaction data with metadata."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"ProfilerTransaction":{"properties":{"chain":{"type":"string","title":"Chain","description":"Blockchain chain"},"method":{"type":"string","title":"Method","description":"Transaction method (sent/received)"},"tokens_sent":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProfilerTokenInfo"},"type":"array"}],"title":"Tokens Sent","description":"Tokens sent in the transaction"},"tokens_received":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProfilerTokenInfo"},"type":"array"}],"title":"Tokens Received","description":"Tokens received in the transaction"},"volume_usd":{"anyOf":[{"type":"number"}],"title":"Volume Usd","description":"Transaction volume in USD"},"block_timestamp":{"type":"string","title":"Block Timestamp","description":"Block timestamp in ISO format"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"Transaction hash in hex format"},"source_type":{"type":"string","title":"Source Type","description":"Transaction source type"}},"type":"object","required":["chain","method","block_timestamp","transaction_hash","source_type"],"title":"ProfilerTransaction","description":"Individual profiler transaction record.\n\nRepresents a single transaction from the wallet profiler."},"ProfilerTokenInfo":{"properties":{"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"token_amount":{"type":"number","title":"Token Amount","description":"Token amount"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Token price in USD"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"Token value in USD"},"token_address":{"type":"string","title":"Token Address","description":"Token contract address"},"chain":{"type":"string","title":"Chain","description":"Blockchain chain"},"from_address":{"type":"string","title":"From Address","description":"Source address"},"to_address":{"type":"string","title":"To Address","description":"Destination address"},"from_address_label":{"anyOf":[{"type":"string"}],"title":"From Address Label","description":"Source address label"},"to_address_label":{"anyOf":[{"type":"string"}],"title":"To Address Label","description":"Destination address label"}},"type":"object","required":["token_symbol","token_amount","token_address","chain","from_address","to_address"],"title":"ProfilerTokenInfo","description":"Token information for profiler transactions.\n\nRepresents detailed information about a token in a transaction."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/address/transactions":{"post":{"tags":["Profiler"],"summary":"Get Address Transactions Data","description":"Retrieve recent blockchain transactions for an address including token transfers, native currency movements, and contract interactions.","operationId":"get_profiler_address_transactions_api_v1_profiler_address_transactions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressTransactionsRequest"}}},"required":true},"responses":{"200":{"description":"Address transaction data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressTransactionsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Transaction with Token Transfer Lookup Data

> Get comprehensive transaction information including token transfers and NFT transfers.\
> &#x20;       This endpoint provides detailed information about a specific transaction including\
> &#x20;       native cryptocurrency movements, token transfers, and NFT transfers with USD values.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TransactionLookupRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TransactionLookupChain","description":"Blockchain chain for the transaction lookup"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"Transaction hash to lookup"},"block_timestamp":{"type":"string","title":"Block Timestamp","description":"Timestamp of the transaction"}},"additionalProperties":false,"type":"object","required":["chain","transaction_hash","block_timestamp"],"title":"TransactionLookupRequest","description":""},"TransactionLookupChain":{"type":"string","enum":["arbitrum","avalanche","base","bitcoin","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","ronin","scroll","sei","sonic","starknet","sui","ton","tron"],"title":"TransactionLookupChain","description":"Blockchain chain for the transaction lookup."},"TransactionLookupListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TransactionLookupResponse"},"type":"array","title":"Data","description":"List of transaction lookup results"}},"type":"object","required":["data"],"title":"TransactionLookupListResponse","description":"Response model for transaction lookup endpoint returning a list of transactions."},"TransactionLookupResponse":{"properties":{"chain":{"type":"string","title":"Chain","description":"The blockchain network of the transaction"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"The unique identifier of the transaction"},"from_address":{"type":"string","title":"From Address","description":"The hexadecimal address of the sender"},"from_address_label":{"anyOf":[{"type":"string"}],"title":"From Address Label","description":"The name or label associated with the sender's address"},"to_address":{"type":"string","title":"To Address","description":"The hexadecimal address of the recipient"},"to_address_label":{"anyOf":[{"type":"string"}],"title":"To Address Label","description":"The name or label associated with the recipient's address"},"native_value":{"anyOf":[{"type":"number"}],"title":"Native Value","description":"The amount of native cryptocurrency transferred"},"dated_native_price":{"anyOf":[{"type":"number"}],"title":"Dated Native Price","description":"The price of the native cryptocurrency at the time of the transaction"},"dated_native_value_usd":{"anyOf":[{"type":"number"}],"title":"Dated Native Value Usd","description":"The USD value of the native cryptocurrency transferred at the time of the transaction"},"current_native_price":{"anyOf":[{"type":"number"}],"title":"Current Native Price","description":"The current price of the native cryptocurrency"},"current_native_value_usd":{"anyOf":[{"type":"number"}],"title":"Current Native Value Usd","description":"The current USD value of the native cryptocurrency transferred"},"receipt_status":{"anyOf":[{"type":"integer"}],"title":"Receipt Status","description":"The status of the transaction receipt (1 for success, 0 for failure)"},"block_timestamp":{"type":"string","title":"Block Timestamp","description":"The timestamp of the block in which the transaction was included"},"token_transfer_array":{"anyOf":[{"items":{"$ref":"#/components/schemas/TokenTransfer"},"type":"array"}],"title":"Token Transfer Array","description":"Information about any token transfers associated with this transaction"},"nft_transfer_array":{"anyOf":[{"items":{"$ref":"#/components/schemas/NFTTransfer"},"type":"array"}],"title":"Nft Transfer Array","description":"Information about any NFT transfers associated with this transaction"}},"type":"object","required":["chain","transaction_hash","from_address","from_address_label","to_address","to_address_label","native_value","dated_native_price","dated_native_value_usd","current_native_price","current_native_value_usd","receipt_status","block_timestamp","token_transfer_array","nft_transfer_array"],"title":"TransactionLookupResponse","description":"Response model for transaction lookup endpoint.\n\nContains comprehensive transaction information including token transfers and NFT transfers."},"TokenTransfer":{"properties":{"from_address":{"type":"string","title":"From Address","description":"From address"},"from_address_label":{"type":"string","title":"From Address Label","description":"From address label"},"to_address":{"type":"string","title":"To Address","description":"To address"},"to_address_label":{"type":"string","title":"To Address Label","description":"To address label"},"token_address":{"type":"string","title":"Token Address","description":"Token contract address"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"token_amount":{"type":"number","title":"Token Amount","description":"Token amount transferred"},"dated_price_usd":{"anyOf":[{"type":"number"}],"title":"Dated Price Usd","description":"Price of the token in USD at the time of the transaction"},"dated_value_usd":{"anyOf":[{"type":"number"}],"title":"Dated Value Usd","description":"USD value of the token transferred at the time of the transaction"},"current_price_usd":{"anyOf":[{"type":"number"}],"title":"Current Price Usd","description":"Current price of the token in USD"},"current_value_usd":{"anyOf":[{"type":"number"}],"title":"Current Value Usd","description":"Current USD value of the token transferred"},"transfer_id":{"type":"string","title":"Transfer Id","description":"Transfer ID"}},"type":"object","required":["from_address","from_address_label","to_address","to_address_label","token_address","token_symbol","token_amount","dated_price_usd","dated_value_usd","current_price_usd","current_value_usd","transfer_id"],"title":"TokenTransfer","description":"Model for token transfer information."},"NFTTransfer":{"properties":{"from_address":{"type":"string","title":"From Address","description":"From address"},"from_address_label":{"type":"string","title":"From Address Label","description":"From address label"},"to_address":{"type":"string","title":"To Address","description":"To address"},"to_address_label":{"type":"string","title":"To Address Label","description":"To address label"},"project_id":{"type":"string","title":"Project Id","description":"Project ID"},"collection_name":{"type":"string","title":"Collection Name","description":"Collection name"},"nft_id":{"type":"string","title":"Nft Id","description":"NFT ID"}},"type":"object","required":["from_address","from_address_label","to_address","to_address_label","project_id","collection_name","nft_id"],"title":"NFTTransfer","description":"Model for NFT transfer information."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/transaction-with-token-transfer-lookup":{"post":{"tags":["Profiler"],"summary":"Get Transaction with Token Transfer Lookup Data","description":"Get comprehensive transaction information including token transfers and NFT transfers.\n        This endpoint provides detailed information about a specific transaction including\n        native cryptocurrency movements, token transfers, and NFT transfers with USD values.","operationId":"get_transaction_with_token_transfer_lookup_api_v1_transaction_with_token_transfer_lookup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionLookupRequest"}}},"required":true},"responses":{"200":{"description":"Transaction lookup data with token and NFT transfer information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionLookupListResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address Counterparties

Get counterparties and their interaction statistics for any address or entity.

### Common Scenarios

{% hint style="info" %}
You can use this endpoint to find correct entity name format to use in this Profiler Endpoint: [**Click Here**](https://docs.nansen.ai/api/profiler/entity-name-search)
{% endhint %}

<table data-full-width="true"><thead><tr><th>Usecase</th><th>Required Parameters</th><th>Expected Output</th></tr></thead><tbody><tr><td>Get counterparties for a single address</td><td>address = "0x28c6c06298d514db089934071355e5743bf21d60", <br>chain = "ethereum",<br>group_by: "address"</td><td>List of counterparties with interaction stats (volume, frequency, timing)</td></tr><tr><td>Get counterparties for an entity (e.g., Coinbase)</td><td>entity_name = "Coinbase", <br>chain = "all",<br>group_by: "entity"</td><td>Aggregated counterparties across all entity wallets with interaction stats</td></tr></tbody></table>

## Get Address Counterparties Data

> Get top counterparties that wallet addresses have interacted with, supporting different\
> grouping options (wallet or entity) and source filtering (Combined, Tokens, ETH).\
> Returns interaction statistics including volume, frequency, and timing data.\
> \
> What it helps to answer:\
> \
> \- Most frequent transaction partners by count and volume\
> \- Net value flows between addresses (inflows vs outflows)\
> \- Exchange and protocol interaction patterns\
> \- DeFi protocol usage and DEX trading counterparties\
> \- High-value transfer relationships and funding sources

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"ProfilerAddressCounterpartiesRequest":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Address to get counterparties for"},"entity_name":{"anyOf":[{"type":"string"}],"title":"Entity Name","description":"Entity name to get counterparties for"},"chain":{"$ref":"#/components/schemas/ProfilerChain","description":"Blockchain chain for the counterparties data"},"date":{"$ref":"#/components/schemas/DateRange","description":"Date range for the counterparties data. Note: High-volume addresses (e.g., WETH on Base) are limited to 180 days."},"source_input":{"$ref":"#/components/schemas/SourceInput","description":"Type of interactions to include","default":"Combined"},"group_by":{"$ref":"#/components/schemas/GroupBy","description":"Group counterparties by wallet or entity","default":"wallet"},"filters":{"anyOf":[{"$ref":"#/components/schemas/ProfilerAddressCounterpartiesFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_ProfilerAddressCounterpartiesSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"total_volume_usd\", \"direction\": \"DESC\"}] - Sort by total volume descending\n- [{\"field\": \"interaction_count\", \"direction\": \"ASC\"}] - Sort by interaction count ascending\n- [{\"field\": \"last_interaction_date\", \"direction\": \"DESC\"}] - Sort by last interaction date descending\n- [{\"field\": \"volume_in_usd\", \"direction\": \"DESC\"}] - Sort by incoming volume descending"}},"additionalProperties":false,"type":"object","required":["chain","date"],"title":"ProfilerAddressCounterpartiesRequest","description":""},"ProfilerChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bitcoin","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"ProfilerChain","description":"Chains supported in profiler analysis."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"SourceInput":{"type":"string","enum":["Combined","Tokens","ETH"],"title":"SourceInput","description":"Enum for source input types in counterparties endpoint."},"GroupBy":{"type":"string","enum":["wallet","entity"],"title":"GroupBy","description":"Enum for grouping types in counterparties endpoint."},"ProfilerAddressCounterpartiesFilters":{"properties":{"interaction_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Interaction count range filter"},"total_volume_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total volume range filter in USD"},"volume_in_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Volume in USD range filter"},"volume_out_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Volume out USD range filter"},"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels for counterparties"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels for counterparties"}},"additionalProperties":false,"type":"object","title":"ProfilerAddressCounterpartiesFilters","description":"Filters for profiler address counterparties endpoint.\n\nThese filters control which counterparties and interactions are included."},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"LabelType":{"type":"string","enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"title":"LabelType","description":"Filter by entity label type."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_ProfilerAddressCounterpartiesSortField_":{"properties":{"field":{"$ref":"#/components/schemas/ProfilerAddressCounterpartiesSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[ProfilerAddressCounterpartiesSortField]"},"ProfilerAddressCounterpartiesSortField":{"type":"string","enum":["interaction_count","total_volume_usd","last_interaction_date","volume_in_usd","volume_out_usd"],"title":"ProfilerAddressCounterpartiesSortField","description":"Enum for sortable fields in profiler address counterparties."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"ProfilerAddressCounterpartiesResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/ProfilerCounterparty"},"type":"array","title":"Data","description":"List of counterparty records"}},"type":"object","required":["pagination","data"],"title":"ProfilerAddressCounterpartiesResponse","description":"Response model for profiler address counterparties endpoint.\n\nContains the filtered counterparties data with metadata."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"ProfilerCounterparty":{"properties":{"counterparty_address":{"type":"string","title":"Counterparty Address","description":"Counterparty address in hex format"},"counterparty_address_label":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Counterparty Address Label","description":"List of labels associated with this counterparty"},"interaction_count":{"type":"integer","title":"Interaction Count","description":"Total number of interactions with this counterparty"},"total_volume_usd":{"anyOf":[{"type":"number"}],"title":"Total Volume Usd","description":"Total transaction volume in USD"},"volume_in_usd":{"anyOf":[{"type":"number"}],"title":"Volume In Usd","description":"Incoming transaction volume in USD"},"volume_out_usd":{"anyOf":[{"type":"number"}],"title":"Volume Out Usd","description":"Outgoing transaction volume in USD"},"tokens_info":{"anyOf":[{"items":{"$ref":"#/components/schemas/TokenInfo"},"type":"array"}],"title":"Tokens Info","description":"Information about tokens transferred with this counterparty"}},"type":"object","required":["counterparty_address","interaction_count"],"title":"ProfilerCounterparty","description":"Individual profiler counterparty record.\n\nRepresents a counterparty that a wallet has interacted with."},"TokenInfo":{"properties":{"token_address":{"type":"string","title":"Token Address","description":"Token contract address"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"token_name":{"type":"string","title":"Token Name","description":"Token name"},"num_transfer":{"type":"string","title":"Num Transfer","description":"Number of transfers"}},"type":"object","required":["token_address","token_symbol","token_name","num_transfer"],"title":"TokenInfo","description":"Token information for counterparty interactions."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/address/counterparties":{"post":{"tags":["Profiler"],"summary":"Get Address Counterparties Data","description":"Get top counterparties that wallet addresses have interacted with, supporting different\ngrouping options (wallet or entity) and source filtering (Combined, Tokens, ETH).\nReturns interaction statistics including volume, frequency, and timing data.\n\nWhat it helps to answer:\n\n- Most frequent transaction partners by count and volume\n- Net value flows between addresses (inflows vs outflows)\n- Exchange and protocol interaction patterns\n- DeFi protocol usage and DEX trading counterparties\n- High-value transfer relationships and funding sources","operationId":"get_profiler_address_counterparties_api_v1_profiler_address_counterparties_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressCounterpartiesRequest"}}},"required":true},"responses":{"200":{"description":"Address counterparties data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressCounterpartiesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address Related Wallets

## Get Address Related Wallets Data

> Get wallets that are related to the input address through various types\
> of blockchain interactions and relationships. Returns detailed information\
> about each related wallet including the relationship type, transaction details, and timing information.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"ProfilerAddressRelatedWalletsRequest":{"properties":{"address":{"type":"string","title":"Address","description":"Address to get related wallets for"},"chain":{"$ref":"#/components/schemas/ProfilerAddressRelatedWalletsChain","description":"Blockchain chain for the related wallets data"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_ProfilerAddressRelatedWalletsSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering"}},"additionalProperties":false,"type":"object","required":["address","chain"],"title":"ProfilerAddressRelatedWalletsRequest","description":""},"ProfilerAddressRelatedWalletsChain":{"type":"string","enum":["arbitrum","avalanche","base","bitcoin","bnb","ethereum","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"ProfilerAddressRelatedWalletsChain","description":"Chains supported in profiler related wallets analysis."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_ProfilerAddressRelatedWalletsSortField_":{"properties":{"field":{"$ref":"#/components/schemas/ProfilerAddressRelatedWalletsSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[ProfilerAddressRelatedWalletsSortField]"},"ProfilerAddressRelatedWalletsSortField":{"type":"string","enum":["order"],"title":"ProfilerAddressRelatedWalletsSortField","description":"Enum for sortable fields in profiler address related wallets."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"ProfilerAddressRelatedWalletsResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/ProfilerRelatedWallet"},"type":"array","title":"Data","description":"List of related wallet records"}},"type":"object","required":["pagination","data"],"title":"ProfilerAddressRelatedWalletsResponse","description":"Response model for profiler address related wallets endpoint.\n\nContains the related wallets data with metadata."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"ProfilerRelatedWallet":{"properties":{"address":{"type":"string","title":"Address","description":"Hexadecimal representation of the related address"},"address_label":{"anyOf":[{"type":"string"}],"title":"Address Label","description":"The label of the address"},"relation":{"type":"string","title":"Relation","description":"The type of relation between the address and the input address"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"Hexadecimal representation of the transaction hash"},"block_timestamp":{"type":"string","title":"Block Timestamp","description":"The timestamp of the transaction"},"order":{"type":"integer","title":"Order","description":"The order of the relation"},"chain":{"type":"string","title":"Chain","description":"The chain of the relation"}},"type":"object","required":["address","relation","transaction_hash","block_timestamp","order","chain"],"title":"ProfilerRelatedWallet","description":"Individual profiler related wallet record.\n\nRepresents a wallet that is related to the input address."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/address/related-wallets":{"post":{"tags":["Profiler"],"summary":"Get Address Related Wallets Data","description":"Get wallets that are related to the input address through various types\nof blockchain interactions and relationships. Returns detailed information\nabout each related wallet including the relationship type, transaction details, and timing information.","operationId":"get_profiler_address_related_wallets_api_v1_profiler_address_related_wallets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressRelatedWalletsRequest"}}},"required":true},"responses":{"200":{"description":"Address related wallets data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressRelatedWalletsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address PnL & Trade Performance

{% hint style="info" %}
You can use this endpoint to find correct entity name format to use in this Profiler Endpoint: [**Click Here**](https://docs.nansen.ai/api/profiler/entity-name-search)
{% endhint %}

## Get Address PnL Summary Data

> Get aggregate PnL statistics and top profitable tokens for a specific wallet address.\
> This endpoint provides comprehensive profit and loss analysis including realized PnL, win rate, and top performing tokens.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"ProfilerAddressPnlSummaryRequest":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Address to get PnL summary for"},"entity_name":{"anyOf":[{"type":"string"}],"title":"Entity Name","description":"Entity name to get PnL summary for"},"chain":{"$ref":"#/components/schemas/ProfilerPnLChain","description":"Blockchain chain for the PnL data"},"date":{"$ref":"#/components/schemas/DateRange","description":"Date range for the PnL data"}},"additionalProperties":false,"type":"object","required":["chain","date"],"title":"ProfilerAddressPnlSummaryRequest","description":""},"ProfilerPnLChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bnb","ethereum","linea","mantle","monad","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic"],"title":"ProfilerPnLChain","description":"Chains supported in profiler PnL analysis."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"ProfilerAddressPnlSummaryResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"top5_tokens":{"items":{"$ref":"#/components/schemas/ProfilerTopToken"},"type":"array","title":"Top5 Tokens","description":"Top 5 tokens by realized profit"},"traded_token_count":{"type":"integer","title":"Traded Token Count","description":"Total number of different tokens that have been bought or sold"},"traded_times":{"type":"integer","title":"Traded Times","description":"Total number of sales (outflow or dex sell)"},"realized_pnl_usd":{"type":"number","title":"Realized Pnl Usd","description":"Total realized profit and loss in USD"},"realized_pnl_percent":{"type":"number","title":"Realized Pnl Percent","description":"Realized profit and loss as a percentage (not multiplied by 100)"},"win_rate":{"type":"number","title":"Win Rate","description":"Number of sales where price of the token was higher than cost basis"}},"type":"object","required":["pagination","top5_tokens","traded_token_count","traded_times","realized_pnl_usd","realized_pnl_percent","win_rate"],"title":"ProfilerAddressPnlSummaryResponse","description":"Response model for profiler address pnl-summary endpoint.\n\nContains aggregate PnL statistics and top profitable tokens."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"ProfilerTopToken":{"properties":{"realized_pnl":{"anyOf":[{"type":"number"}],"title":"Realized Pnl","description":"Realized profit and loss in USD"},"realized_roi":{"anyOf":[{"type":"number"}],"title":"Realized Roi","description":"Realized return on investment as percentage"},"token_address":{"type":"string","title":"Token Address","description":"Token contract address"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"chain":{"type":"string","title":"Chain","description":"Blockchain chain"}},"type":"object","required":["realized_pnl","realized_roi","token_address","token_symbol","chain"],"title":"ProfilerTopToken","description":"Individual top token record for PnL summary.\n\nRepresents a top profitable token from the wallet's trading history."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/address/pnl-summary":{"post":{"tags":["Profiler"],"summary":"Get Address PnL Summary Data","description":"Get aggregate PnL statistics and top profitable tokens for a specific wallet address.\nThis endpoint provides comprehensive profit and loss analysis including realized PnL, win rate, and top performing tokens.","operationId":"get_profiler_address_pnl_summary_api_v1_profiler_address_pnl_summary_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressPnlSummaryRequest"}}},"required":true},"responses":{"200":{"description":"Address PnL summary data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressPnlSummaryResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Address PnL Data

> Calculate profit and loss metrics for a specific address and token. Provides detailed trading performance including realized gains from sales and unrealized gains from current holdings.\
> \
> What it helps to answer:\
> \
> \- Realized profits or losses from completed token sales\
> \- Unrealized gains or losses on current token holdings\
> \- Average purchase and sale prices for the token\
> \- Total return on investment

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"ProfilerAddressPnlRequest":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Wallet address to get PnL for"},"entity_name":{"anyOf":[{"type":"string"}],"title":"Entity Name","description":"Entity name to get PnL for"},"chain":{"$ref":"#/components/schemas/ProfilerPnLChain","description":"Blockchain chain for the PnL data"},"date":{"anyOf":[{"$ref":"#/components/schemas/DateRange"}],"description":"Date range for PnL analysis (ISO 8601 date-time)"},"filters":{"anyOf":[{"$ref":"#/components/schemas/ProfilerAddressPnlFilters"}],"description":"Additional filters to apply."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_ProfilerAddressPnlSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering (default: pnl_usd_realised DESC).\n\nIf the parameter show_realized is false, the default sort order is pnl_usd_unrealised DESC."}},"additionalProperties":false,"type":"object","required":["chain"],"title":"ProfilerAddressPnlRequest","description":""},"ProfilerPnLChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bnb","ethereum","linea","mantle","monad","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic"],"title":"ProfilerPnLChain","description":"Chains supported in profiler PnL analysis."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"ProfilerAddressPnlFilters":{"properties":{"show_realized":{"anyOf":[{"type":"boolean"}],"title":"Show Realized","description":"Include realized profit/loss in results","default":false},"token_address":{"anyOf":[{"type":"string"}],"title":"Token Address","description":"Token address filter for specific token PnL"}},"additionalProperties":false,"type":"object","title":"ProfilerAddressPnlFilters","description":"Filters for profiler address PnL endpoint.\n\nThese filters control token filtering and realized PnL options for analysis."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_ProfilerAddressPnlSortField_":{"properties":{"field":{"$ref":"#/components/schemas/ProfilerAddressPnlSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[ProfilerAddressPnlSortField]"},"ProfilerAddressPnlSortField":{"type":"string","enum":["pnl_usd_realised","roi_percent_realised","pnl_usd_unrealised","roi_percent_unrealised","bought_usd","sold_usd","holding_usd"],"title":"ProfilerAddressPnlSortField","description":"Enum for sortable fields in profiler address PnL."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"ProfilerAddressPnlResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/ProfilerAddressPnl"},"type":"array","title":"Data","description":"List of PnL records"}},"type":"object","required":["pagination","data"],"title":"ProfilerAddressPnlResponse","description":"Response model for profiler address pnl endpoint.\n\nContains the filtered PnL data with metadata."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"ProfilerAddressPnl":{"properties":{"token_address":{"type":"string","title":"Token Address","description":"Hexadecimal representation of the token's address"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Symbol of the token"},"token_price":{"anyOf":[{"type":"number"}],"title":"Token Price","description":"Price of the token on date_to"},"roi_percent_realised":{"anyOf":[{"type":"number"}],"title":"Roi Percent Realised","description":"Realised return on investment for only realised gains (not multiplied by 100)"},"pnl_usd_realised":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Realised","description":"Realised profit and loss in USD"},"pnl_usd_unrealised":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Unrealised","description":"Unrealised profit and loss in USD"},"roi_percent_unrealised":{"anyOf":[{"type":"number"}],"title":"Roi Percent Unrealised","description":"Unrealised return on investment for only unrealised gains (not multiplied by 100)"},"bought_amount":{"anyOf":[{"type":"number"}],"title":"Bought Amount","description":"Amount of tokens bought from date_from to date_to"},"bought_usd":{"anyOf":[{"type":"number"}],"title":"Bought Usd","description":"USD value of bought tokens"},"cost_basis_usd":{"anyOf":[{"type":"number"}],"title":"Cost Basis Usd","description":"Cost basis of tokens in USD as of date_to"},"sold_amount":{"anyOf":[{"type":"number"}],"title":"Sold Amount","description":"Amount of tokens sold from date_from to date_to"},"sold_usd":{"anyOf":[{"type":"number"}],"title":"Sold Usd","description":"USD value of sold tokens"},"avg_sold_price_usd":{"anyOf":[{"type":"number"}],"title":"Avg Sold Price Usd","description":"Average sale price of tokens sold in USD"},"holding_amount":{"anyOf":[{"type":"number"}],"title":"Holding Amount","description":"Current token balance"},"holding_usd":{"anyOf":[{"type":"number"}],"title":"Holding Usd","description":"USD value of token balance"},"nof_buys":{"type":"string","title":"Nof Buys","description":"Number of buys (either inflow or dex buy)"},"nof_sells":{"type":"string","title":"Nof Sells","description":"Number of sells (either outflow or dex sell)"},"max_balance_held":{"anyOf":[{"type":"number"}],"title":"Max Balance Held","description":"Maximum amount of tokens held at some point in time"},"max_balance_held_usd":{"anyOf":[{"type":"number"}],"title":"Max Balance Held Usd","description":"Maximum amount of tokens in current USD value, held at some point in time"}},"type":"object","required":["token_address","token_symbol","nof_buys","nof_sells"],"title":"ProfilerAddressPnl","description":"Individual profiler address PnL record.\n\nRepresents PnL data for a token traded by the wallet."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/address/pnl":{"post":{"tags":["Profiler"],"summary":"Get Address PnL Data","description":"Calculate profit and loss metrics for a specific address and token. Provides detailed trading performance including realized gains from sales and unrealized gains from current holdings.\n\nWhat it helps to answer:\n\n- Realized profits or losses from completed token sales\n- Unrealized gains or losses on current token holdings\n- Average purchase and sale prices for the token\n- Total return on investment","operationId":"get_profiler_address_pnl_api_v1_profiler_address_pnl_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressPnlRequest"}}},"required":true},"responses":{"200":{"description":"Address PnL data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressPnlResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address Labels

Retrieves all entity and behavioural labels associated with an address on a chain.

## Get Address Labels

> Get labels for a wallet address. Returns non-premium labels only.\
> \
> Labels include ENS domains, behavioral labels, DeFi labels, CEX labels, and more.\
> Premium labels (smart money, alpha trader) are excluded from this endpoint.\
> \
> Use /api/v1/profiler/address/premium-labels to get all labels including premium ones.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"ProfilerAddressLabelsRequest":{"properties":{"address":{"type":"string","title":"Address","description":"Wallet address to get labels for"},"chain":{"$ref":"#/components/schemas/ProfilerLabelsChain","description":"Blockchain chain. Use 'all' to search all chains compatible with the address format."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters (default: 100 per page)"}},"additionalProperties":false,"type":"object","required":["address","chain"],"title":"ProfilerAddressLabelsRequest","description":"Request model for Address Labels endpoint."},"ProfilerLabelsChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bnb","ethereum","hyperevm","hyperliquid","iotaevm","linea","mantle","monad","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","tron"],"title":"ProfilerLabelsChain","description":"Chains supported for Profiler Address Labels endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"ProfilerAddressLabelsResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/ProfilerAddressLabel"},"type":"array","title":"Data","description":"List of labels for the address"}},"type":"object","required":["pagination","data"],"title":"ProfilerAddressLabelsResponse","description":"Response model for Address Labels endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"ProfilerAddressLabel":{"properties":{"label":{"type":"string","title":"Label","description":"The label name"},"category":{"anyOf":[{"type":"string"}],"title":"Category","description":"Label category (smart_money, behavioral, defi, social, cefi, nft, others)"}},"type":"object","required":["label"],"title":"ProfilerAddressLabel","description":"A single label for a wallet address."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/address/labels":{"post":{"tags":["Profiler"],"summary":"Get Address Labels","description":"Get labels for a wallet address. Returns non-premium labels only.\n\nLabels include ENS domains, behavioral labels, DeFi labels, CEX labels, and more.\nPremium labels (smart money, alpha trader) are excluded from this endpoint.\n\nUse /api/v1/profiler/address/premium-labels to get all labels including premium ones.","operationId":"get_profiler_address_labels_api_v1_profiler_address_labels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressLabelsRequest"}}},"required":true},"responses":{"200":{"description":"Address labels data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressLabelsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Address Premium Labels

> Get all labels for a wallet address, including premium labels.\
> \
> Returns all labels including smart money labels, alpha trader labels, and public figure tags\
> that are excluded from the standard /labels endpoint.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"ProfilerAddressLabelsRequest":{"properties":{"address":{"type":"string","title":"Address","description":"Wallet address to get labels for"},"chain":{"$ref":"#/components/schemas/ProfilerLabelsChain","description":"Blockchain chain. Use 'all' to search all chains compatible with the address format."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters (default: 100 per page)"}},"additionalProperties":false,"type":"object","required":["address","chain"],"title":"ProfilerAddressLabelsRequest","description":"Request model for Address Labels endpoint."},"ProfilerLabelsChain":{"type":"string","enum":["all","arbitrum","avalanche","base","bnb","ethereum","hyperevm","hyperliquid","iotaevm","linea","mantle","monad","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","tron"],"title":"ProfilerLabelsChain","description":"Chains supported for Profiler Address Labels endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"ProfilerAddressLabelsResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/ProfilerAddressLabel"},"type":"array","title":"Data","description":"List of labels for the address"}},"type":"object","required":["pagination","data"],"title":"ProfilerAddressLabelsResponse","description":"Response model for Address Labels endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"ProfilerAddressLabel":{"properties":{"label":{"type":"string","title":"Label","description":"The label name"},"category":{"anyOf":[{"type":"string"}],"title":"Category","description":"Label category (smart_money, behavioral, defi, social, cefi, nft, others)"}},"type":"object","required":["label"],"title":"ProfilerAddressLabel","description":"A single label for a wallet address."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/address/premium-labels":{"post":{"tags":["Profiler"],"summary":"Get Address Premium Labels","description":"Get all labels for a wallet address, including premium labels.\n\nReturns all labels including smart money labels, alpha trader labels, and public figure tags\nthat are excluded from the standard /labels endpoint.","operationId":"get_profiler_address_premium_labels_api_v1_profiler_address_premium_labels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressLabelsRequest"}}},"required":true},"responses":{"200":{"description":"Address labels data (including premium)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilerAddressLabelsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address Perp Positions

## Get Perpetual Positions Data

> Get perpetual positions data for a user by calling the Hyperliquid API directly. This endpoint provides real-time position information including entry price, mark price, PnL, leverage, and other position details.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the current perpetual positions for a specific user address?\*\*\
> 2\. \*\*What is the unrealized PnL and performance of each position?\*\*\
> 3\. \*\*What are the leverage levels and margin requirements for each position?\*\*\
> 4\. \*\*What are the liquidation prices and risk levels for each position?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PerpPositionsRequest":{"properties":{"address":{"type":"string","maxLength":42,"minLength":42,"title":"Address","description":"User's Hyperliquid address in 42-character hexadecimal format"},"filters":{"anyOf":[{"$ref":"#/components/schemas/PerpPositionsFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_PerpPositionsSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"position_value_usd\", \"direction\": \"DESC\"}] - Sort by position value descending\n- [{\"field\": \"unrealized_pnl_usd\", \"direction\": \"ASC\"}] - Sort by unrealized PnL ascending\n\nIf not provided, positions are sorted by position value descending."}},"additionalProperties":false,"type":"object","required":["address"],"title":"PerpPositionsRequest","description":"Request model for Perp Positions endpoint."},"PerpPositionsFilters":{"properties":{"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Filter by token symbol"},"position_value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Filter by position value in USD"},"position_type":{"anyOf":[{"type":"string"}],"title":"Position Type","description":"Filter by position type"},"unrealized_pnl_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Filter by unrealized PnL in USD"}},"additionalProperties":false,"type":"object","title":"PerpPositionsFilters","description":"Filters for perp positions endpoint."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SortOrder_PerpPositionsSortField_":{"properties":{"field":{"$ref":"#/components/schemas/PerpPositionsSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[PerpPositionsSortField]"},"PerpPositionsSortField":{"type":"string","enum":["leverage_value","position_value_usd","entry_price_usd","liquidation_price_usd","unrealized_pnl_usd","size","token_symbol","position_type"],"title":"PerpPositionsSortField","description":"Enum for perp positions sort fields."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PerpPositionsResponse":{"properties":{"data":{"$ref":"#/components/schemas/PerpPositionsData","description":"Hyperliquid clearinghouse state data"}},"additionalProperties":false,"type":"object","required":["data"],"title":"PerpPositionsResponse","description":"Response model for perp positions endpoint."},"PerpPositionsData":{"properties":{"assetPositions":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetPosition"},"type":"array"}],"title":"Assetpositions","description":"List of asset positions"},"crossMaintenanceMarginUsed":{"anyOf":[{"type":"string"}],"title":"Crossmaintenancemarginused","description":"Cross maintenance margin used USD"},"cross_margin_summary_account_value_usd":{"anyOf":[{"type":"string"}],"title":"Cross Margin Summary Account Value Usd","description":"Cross margin summary account value USD"},"cross_margin_summary_total_margin_used_usd":{"anyOf":[{"type":"string"}],"title":"Cross Margin Summary Total Margin Used Usd","description":"Cross margin summary total margin used USD"},"cross_margin_summary_total_net_liquidation_position_on_usd":{"anyOf":[{"type":"string"}],"title":"Cross Margin Summary Total Net Liquidation Position On Usd","description":"Cross margin summary total net liquidation position on USD"},"cross_margin_summary_total_raw_usd":{"anyOf":[{"type":"string"}],"title":"Cross Margin Summary Total Raw Usd","description":"Cross margin summary total raw USD"},"margin_summary_account_value_usd":{"anyOf":[{"type":"string"}],"title":"Margin Summary Account Value Usd","description":"Margin summary account value USD"},"margin_summary_total_margin_used_usd":{"anyOf":[{"type":"string"}],"title":"Margin Summary Total Margin Used Usd","description":"Margin summary total margin used USD"},"margin_summary_total_net_liquidation_position_usd":{"anyOf":[{"type":"string"}],"title":"Margin Summary Total Net Liquidation Position Usd","description":"Margin summary total net liquidation position USD"},"margin_summary_total_raw_usd":{"anyOf":[{"type":"string"}],"title":"Margin Summary Total Raw Usd","description":"Margin summary total raw USD"},"time":{"anyOf":[{"type":"integer"}],"title":"Time","description":"Timestamp"},"withdrawable":{"anyOf":[{"type":"string"}],"title":"Withdrawable","description":"Withdrawable USD"}},"additionalProperties":false,"type":"object","title":"PerpPositionsData","description":"Data model for Hyperliquid clearinghouse state response."},"AssetPosition":{"properties":{"position":{"anyOf":[{"$ref":"#/components/schemas/Position"}],"description":"Position data"},"position_type":{"anyOf":[{"type":"string"}],"title":"Position Type","description":"Position type"}},"additionalProperties":false,"type":"object","title":"AssetPosition","description":"Asset position wrapper."},"Position":{"properties":{"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Asset symbol (e.g., BTC, ETH)"},"size":{"anyOf":[{"type":"string"}],"title":"Size","description":"Size"},"position_value_usd":{"anyOf":[{"type":"string"}],"title":"Position Value Usd","description":"Position value USD"},"entry_price_usd":{"anyOf":[{"type":"string"}],"title":"Entry Price Usd","description":"Entry price USD"},"liquidation_price_usd":{"anyOf":[{"type":"string"}],"title":"Liquidation Price Usd","description":"Liquidation price USD"},"leverage_value":{"anyOf":[{"type":"integer"}],"title":"Leverage Value","description":"Leverage value"},"leverage_type":{"anyOf":[{"type":"string"}],"title":"Leverage Type","description":"Leverage type: 'cross' or 'isolated'"},"leverage_raw_usd":{"anyOf":[{"type":"string"}],"title":"Leverage Raw Usd","description":"Raw USD leverage"},"margin_used_usd":{"anyOf":[{"type":"string"}],"title":"Margin Used Usd","description":"Margin used USD"},"max_leverage_value":{"anyOf":[{"type":"integer"}],"title":"Max Leverage Value","description":"Maximum allowed leverage value"},"return_on_equity":{"anyOf":[{"type":"string"}],"title":"Return On Equity","description":"Return on equity"},"unrealized_pnl_usd":{"anyOf":[{"type":"string"}],"title":"Unrealized Pnl Usd","description":"Unrealized PnL USD"},"cumulative_funding_all_time_usd":{"anyOf":[{"type":"string"}],"title":"Cumulative Funding All Time Usd","description":"Cumulative funding all time USD"},"cumulative_funding_since_change_usd":{"anyOf":[{"type":"string"}],"title":"Cumulative Funding Since Change Usd","description":"Cumulative funding since change USD"},"cumulative_funding_since_open_usd":{"anyOf":[{"type":"string"}],"title":"Cumulative Funding Since Open Usd","description":"Cumulative funding since open USD"}},"additionalProperties":false,"type":"object","title":"Position","description":"Individual perpetual position."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/perp-positions":{"post":{"tags":["Profiler"],"summary":"Get Perpetual Positions Data","description":"Get perpetual positions data for a user by calling the Hyperliquid API directly. This endpoint provides real-time position information including entry price, mark price, PnL, leverage, and other position details.\n\n**What it helps to answer:**\n\n1. **What are the current perpetual positions for a specific user address?**\n2. **What is the unrealized PnL and performance of each position?**\n3. **What are the leverage levels and margin requirements for each position?**\n4. **What are the liquidation prices and risk levels for each position?**","operationId":"get_perp_positions_api_v1_profiler_perp_positions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpPositionsRequest"}}},"required":true},"responses":{"200":{"description":"Perpetual positions data for the user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpPositionsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address Perp Trades

## Get Perpetual Trade Data

> Get perpetual trade data for a user. This endpoint provides trade information including trade price, size, side, fees, and other trade details.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the perpetual trades for a specific user address within a date range?\*\*\
> 2\. \*\*What are the trade prices, sizes, and directions for each trade?\*\*\
> 3\. \*\*What are the trading fees and closed PnL for each trade?\*\*\
> 4\. \*\*What are the order IDs and transaction hashes for trade tracking?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PerpTradeRequest":{"properties":{"address":{"type":"string","maxLength":42,"minLength":42,"title":"Address","description":"User's Hyperliquid address in 42-character hexadecimal format"},"date":{"$ref":"#/components/schemas/DateRange","description":"Date range for the trades (ISO 8601 date-time)"},"filters":{"anyOf":[{"$ref":"#/components/schemas/PerpTradeFilters"}],"description":"Additional filters for the trades"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_PerpTradeSortField_"},"type":"array"}],"title":"Order By","description":"Sort order for the trades"}},"additionalProperties":false,"type":"object","required":["address","date"],"title":"PerpTradeRequest","description":"Request model for Perp Trades endpoint."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PerpTradeFilters":{"properties":{"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Token symbol filter"},"side":{"anyOf":[{"$ref":"#/components/schemas/PerpTradeType"}],"description":"Position side filter (Long or Short)"},"action":{"anyOf":[{"$ref":"#/components/schemas/PerpTradeActionFilter"}],"description":"Action filter (Open/Add, Close/Reduce, Liquidation)"},"crossed":{"anyOf":[{"type":"boolean"}],"title":"Crossed","description":"Whether the trade was crossed"},"size":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Trade size range filter"},"start_position":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Start position range filter"},"closed_pnl":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Closed PnL range filter"},"fee_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Fee in USD range filter"},"fee_token_symbol":{"anyOf":[{"type":"string"}],"title":"Fee Token Symbol","description":"Fee token filter"},"oid":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Order ID range filter"},"price":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Price range filter"},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Value in USD range filter"}},"additionalProperties":false,"type":"object","title":"PerpTradeFilters","description":"Filters for perp trades endpoint.\n\nThese filters control which perpetual trades are included in the results\nbased on various trade criteria."},"PerpTradeType":{"type":"string","enum":["Long","Short"],"title":"PerpTradeType","description":"Enum for perp trade position types."},"PerpTradeActionFilter":{"type":"string","enum":["Open/Add","Close/Reduce","Liquidation"],"title":"PerpTradeActionFilter","description":"Enum for perp trade action filters (grouped)."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_PerpTradeSortField_":{"properties":{"field":{"$ref":"#/components/schemas/PerpTradeSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[PerpTradeSortField]"},"PerpTradeSortField":{"type":"string","enum":["timestamp","size","fee_usd","closed_pnl","price","value_usd"],"title":"PerpTradeSortField","description":"Enum for perp trade sort fields."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PerpTradeResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/PerpTrade"},"type":"array","title":"Data","description":"List of perpetual trades"}},"additionalProperties":false,"type":"object","required":["pagination","data"],"title":"PerpTradeResponse","description":"Response model for perp trades endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"PerpTrade":{"properties":{"timestamp":{"type":"string","title":"Timestamp","description":"Timestamp of the trade"},"side":{"anyOf":[{"$ref":"#/components/schemas/PerpTradeType"}],"description":"Position side (Long or Short)"},"action":{"type":"string","title":"Action","description":"Action taken (Open, Add, Close, Reduce, etc.)"},"block_number":{"type":"integer","title":"Block Number","description":"Block number of the trade"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Symbol of the token"},"price":{"anyOf":[{"type":"number"}],"title":"Price","description":"Average price of the trade (averaged across fills)"},"size":{"type":"number","title":"Size","description":"Total size of the trade (sum of all fills)"},"value_usd":{"type":"number","title":"Value Usd","description":"Total value in USD of the trade"},"start_position":{"type":"number","title":"Start Position","description":"Start position of the trade in token units"},"closed_pnl":{"type":"number","title":"Closed Pnl","description":"Total closed PnL of the trade (sum of all fills)"},"crossed":{"type":"boolean","title":"Crossed","description":"Crossed of the trade"},"fee_usd":{"type":"number","title":"Fee Usd","description":"Total fee in USD of the trade (sum of all fills)"},"fee_token_symbol":{"type":"string","title":"Fee Token Symbol","description":"Fee in token of the trade"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"Transaction hash of the trade"},"user":{"type":"string","title":"User","description":"User of the trade"},"oid":{"type":"integer","title":"Oid","description":"Order ID of the trade"}},"additionalProperties":false,"type":"object","required":["timestamp","side","action","block_number","token_symbol","price","size","value_usd","start_position","closed_pnl","crossed","fee_usd","fee_token_symbol","transaction_hash","user","oid"],"title":"PerpTrade","description":"Perpetual trade with computed type and action fields for client response."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/perp-trades":{"post":{"tags":["Profiler"],"summary":"Get Perpetual Trade Data","description":"Get perpetual trade data for a user. This endpoint provides trade information including trade price, size, side, fees, and other trade details.\n\n**What it helps to answer:**\n\n1. **What are the perpetual trades for a specific user address within a date range?**\n2. **What are the trade prices, sizes, and directions for each trade?**\n3. **What are the trading fees and closed PnL for each trade?**\n4. **What are the order IDs and transaction hashes for trade tracking?**","operationId":"get_perp_trades_api_v1_profiler_perp_trades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpTradeRequest"}}},"required":true},"responses":{"200":{"description":"Perpetual trade data for the user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpTradeResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Hyperliquid Address Leaderboard

## Get Perpetual Trading Leaderboard Data

> Get perpetual trading leaderboard data showing the most profitable traders within a given date range. This endpoint provides trader performance metrics including total PnL, ROI, and account values.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Who are the most profitable perpetual traders in a given timeframe?\*\*\
> 2\. \*\*What are the ROI percentages for top performing traders?\*\*\
> 3\. \*\*What are the account values of successful perpetual traders?\*\*\
> 4\. \*\*How do trader addresses and labels correlate with performance?\*\*\
> \
> \*\*Key Features:\*\*\
> \- Trader address and label information\
> \- Total PnL tracking in USD\
> \- ROI calculations as percentages\
> \- Account value tracking\
> \- Flexible filtering and sorting options

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PerpLeaderboardRequest":{"properties":{"date":{"$ref":"#/components/schemas/DateOnlyRange","description":"Date range object with optional from and to fields in YYYY-MM-DD format"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/PerpLeaderboardFilters"}],"description":"Additional filters to apply to the query."},"premium_labels":{"anyOf":[{"type":"boolean"}],"title":"Premium Labels","description":"Controls label tier in the response. When null/omitted (default), returns labels as per subscription plan (existing behavior). When false, returns free-tier labels for all users. When true, returns premium labels. Note: In a future release, the default will change from true to false — pass premium_labels=true explicitly to preserve premium label behavior."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_PerpLeaderboardSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering"}},"additionalProperties":false,"type":"object","required":["date"],"title":"PerpLeaderboardRequest","description":"Request model for Perp Leaderboard endpoint.\nThis endpoint provides a perpetual trading leaderboard showing the most profitable\ntraders within a given date range."},"DateOnlyRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in YYYY-MM-DD format"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in YYYY-MM-DD format"}},"type":"object","title":"DateOnlyRange","description":"Date range model that only accepts YYYY-MM-DD format (no time components)."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"PerpLeaderboardFilters":{"properties":{"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Filter by wallet display name. Use LIKE patterns (%) for partial matching. Note: This filters by the wallet's display name, not by label category. To filter by smart money labels, use include_smart_money_labels instead."},"total_pnl":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total PnL range filter in USD"},"roi":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"ROI range filter as percentage"},"account_value":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Account value range filter in USD. Note: Only the top 500K traders have account value data available."},"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Filter to include only traders with these smart money labels. For Hyperliquid, use 'Smart HL Perps Trader'. See SmartMoneyFilterType enum for valid values."},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels"}},"additionalProperties":false,"type":"object","title":"PerpLeaderboardFilters","description":"Filters for Perp Leaderboard endpoint.\n\nThese filters control which traders are included in the leaderboard."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"SortOrder_PerpLeaderboardSortField_":{"properties":{"field":{"$ref":"#/components/schemas/PerpLeaderboardSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[PerpLeaderboardSortField]"},"PerpLeaderboardSortField":{"type":"string","enum":["total_pnl","roi","account_value"],"title":"PerpLeaderboardSortField","description":"Enum for sortable fields in Perp Leaderboard."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PerpLeaderboardResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PerpLeaderboard"},"type":"array","title":"Data","description":"List of Perp Leaderboard records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"PerpLeaderboardResponse","description":"Response model for Perp Leaderboard endpoint.\nContains a list of leaderboard records with pagination and metadata."},"PerpLeaderboard":{"properties":{"trader_address":{"type":"string","title":"Trader Address","description":"The Ethereum wallet address of the trader."},"trader_address_label":{"anyOf":[{"type":"string"}],"title":"Trader Address Label","description":"The name associated with the address, derived using Nansen's multichain label function for Ethereum."},"total_pnl":{"anyOf":[{"type":"number"}],"title":"Total Pnl","description":"Profit and loss for the selected timeframe in USD."},"roi":{"anyOf":[{"type":"number"}],"title":"Roi","description":"Return on investment for the selected timeframe as percentage."},"account_value":{"anyOf":[{"type":"number"}],"title":"Account Value","description":"Current total account value in USD. Note: Account value data is only available for the top 500K traders due to upstream data limitations. Traders outside the top 500K may show 0 or null values."}},"type":"object","required":["trader_address"],"title":"PerpLeaderboard","description":"Individual Perp Leaderboard record.\nRepresents a single trader's perpetual trading performance."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/perp-leaderboard":{"post":{"tags":["Perp Leaderboard"],"summary":"Get Perpetual Trading Leaderboard Data","description":"Get perpetual trading leaderboard data showing the most profitable traders within a given date range. This endpoint provides trader performance metrics including total PnL, ROI, and account values.\n\n**What it helps to answer:**\n\n1. **Who are the most profitable perpetual traders in a given timeframe?**\n2. **What are the ROI percentages for top performing traders?**\n3. **What are the account values of successful perpetual traders?**\n4. **How do trader addresses and labels correlate with performance?**\n\n**Key Features:**\n- Trader address and label information\n- Total PnL tracking in USD\n- ROI calculations as percentages\n- Account value tracking\n- Flexible filtering and sorting options","operationId":"get_perp_leaderboard_api_v1_perp_leaderboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpLeaderboardRequest"}}},"required":true},"responses":{"200":{"description":"Perpetual trading leaderboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpLeaderboardResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Token God Mode


# Token Information

## Get TGM Token Information Data

> Get comprehensive token information including basic details (name, symbol, contract address, logo), token details (deployment date, social links, market metrics like market cap and FDV), and spot trading metrics (volume, buys/sells, unique traders, liquidity, holders).\
> \
> This endpoint provides a complete overview of a token's metadata, market position, and trading activity for a specific date range.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMTokenInformationRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token address"},"timeframe":{"$ref":"#/components/schemas/TGMFlowIntelligenceTimeframe","description":"Timeframe for the token information query"}},"additionalProperties":false,"type":"object","required":["chain","token_address","timeframe"],"title":"TGMTokenInformationRequest","description":"Request model for TGM token information endpoint.\nThis endpoint provides comprehensive token information including basic details,\ntoken details (deployment, social links, market metrics), and spot trading metrics."},"TGMChain":{"type":"string","enum":["arbitrum","avalanche","base","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TGMChain","description":"Chains supported in TGM (Token God Mode) endpoints."},"TGMFlowIntelligenceTimeframe":{"type":"string","enum":["5m","1h","6h","12h","1d","7d"],"title":"TGMFlowIntelligenceTimeframe","description":"TGM flow intelligence timeframe options."},"TGMTokenInformationResponse":{"properties":{"data":{"$ref":"#/components/schemas/TGMTokenInformation","description":"Token information data"}},"type":"object","required":["data"],"title":"TGMTokenInformationResponse","description":"Response model for TGM token information endpoint.\nContains comprehensive token information including basic details,\ntoken details, and spot metrics."},"TGMTokenInformation":{"properties":{"name":{"anyOf":[{"type":"string"}],"title":"Name","description":"Token name"},"symbol":{"anyOf":[{"type":"string"}],"title":"Symbol","description":"Token symbol"},"contract_address":{"anyOf":[{"type":"string"}],"title":"Contract Address","description":"Token contract address"},"logo":{"anyOf":[{"type":"string"}],"title":"Logo","description":"Token logo URL"},"token_details":{"anyOf":[{"$ref":"#/components/schemas/TokenDetails"}],"description":"Token details including deployment, social links, and market metrics"},"spot_metrics":{"anyOf":[{"$ref":"#/components/schemas/SpotMetrics"}],"description":"Spot trading metrics for the token"}},"type":"object","title":"TGMTokenInformation","description":"Token information including basic details, token details, and spot metrics."},"TokenDetails":{"properties":{"token_deployment_date":{"anyOf":[{"type":"string"}],"title":"Token Deployment Date","description":"Token deployment date in ISO format"},"website":{"anyOf":[{"type":"string"}],"title":"Website","description":"Token website URL"},"x":{"anyOf":[{"type":"string"}],"title":"X","description":"X (Twitter) profile URL"},"telegram":{"anyOf":[{"type":"string"}],"title":"Telegram","description":"Telegram channel URL"},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market capitalization in USD"},"fdv_usd":{"anyOf":[{"type":"number"}],"title":"Fdv Usd","description":"Fully diluted valuation in USD"},"circulating_supply":{"anyOf":[{"type":"number"}],"title":"Circulating Supply","description":"Circulating supply of the token"},"total_supply":{"anyOf":[{"type":"number"}],"title":"Total Supply","description":"Total supply of the token"}},"type":"object","title":"TokenDetails","description":"Token details including deployment, social links, and market metrics."},"SpotMetrics":{"properties":{"volume_total_usd":{"anyOf":[{"type":"number"}],"title":"Volume Total Usd","description":"Total trading volume in USD"},"buy_volume_usd":{"anyOf":[{"type":"number"}],"title":"Buy Volume Usd","description":"Total buy volume in USD"},"sell_volume_usd":{"anyOf":[{"type":"number"}],"title":"Sell Volume Usd","description":"Total sell volume in USD"},"total_buys":{"anyOf":[{"type":"integer"}],"title":"Total Buys","description":"Total number of buy transactions"},"total_sells":{"anyOf":[{"type":"integer"}],"title":"Total Sells","description":"Total number of sell transactions"},"unique_buyers":{"anyOf":[{"type":"integer"}],"title":"Unique Buyers","description":"Number of unique buyers"},"unique_sellers":{"anyOf":[{"type":"integer"}],"title":"Unique Sellers","description":"Number of unique sellers"},"liquidity_usd":{"anyOf":[{"type":"number"}],"title":"Liquidity Usd","description":"Liquidity in USD"},"total_holders":{"anyOf":[{"type":"integer"}],"title":"Total Holders","description":"Total number of token holders"}},"type":"object","title":"SpotMetrics","description":"Spot trading metrics for the token."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/token-information":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Token Information Data","description":"Get comprehensive token information including basic details (name, symbol, contract address, logo), token details (deployment date, social links, market metrics like market cap and FDV), and spot trading metrics (volume, buys/sells, unique traders, liquidity, holders).\n\nThis endpoint provides a complete overview of a token's metadata, market position, and trading activity for a specific date range.","operationId":"get_tgm_token_information_api_v1_tgm_token_information_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMTokenInformationRequest"}}},"required":true},"responses":{"200":{"description":"TGM token information data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMTokenInformationResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Nansen Indicators

## Get Nansen Score Indicators

> Get risk and reward indicators for a specific token.\
> \
> Returns two groups of indicators:\
> \- \*\*risk\_indicators\*\*: Metrics for assessing token risk (btc-reflexivity, liquidity-risk, concentration-risk, token-supply-inflation)\
> \- \*\*reward\_indicators\*\*: Metrics for assessing alpha potential (chain-tvl, trading-range, price-momentum, chain-fees, protocol-fees, cex-flows, funding-rate)\
> \
> Each indicator includes:\
> \- \*\*score\*\*: Summary assessment ('low'/'medium'/'high' for risk, 'bearish'/'neutral'/'bullish' for reward)\
> \- \*\*signal\*\*: Raw metric value\
> \- \*\*signal\_percentile\*\*: Percentile rank (0-100) vs tokens in same market cap group\
> \- \*\*last\_trigger\_on\*\*: When the indicator last changed state

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMIndicatorsRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token contract address"}},"additionalProperties":false,"type":"object","required":["chain","token_address"],"title":"TGMIndicatorsRequest","description":"Request model for TGM Indicators endpoint.\n\nThis endpoint provides risk and reward indicators for a specific token."},"TGMChain":{"type":"string","enum":["arbitrum","avalanche","base","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TGMChain","description":"Chains supported in TGM (Token God Mode) endpoints."},"TGMIndicatorsResponse":{"properties":{"token_address":{"type":"string","title":"Token Address","description":"Token contract address"},"chain":{"type":"string","title":"Chain","description":"Blockchain chain"},"token_info":{"$ref":"#/components/schemas/TGMIndicatorTokenInfo","description":"Token metadata including market cap information"},"risk_indicators":{"items":{"$ref":"#/components/schemas/TGMIndicator"},"type":"array","title":"Risk Indicators","description":"Risk assessment indicators (btc-reflexivity, liquidity-risk, concentration-risk, token-supply-inflation)"},"reward_indicators":{"items":{"$ref":"#/components/schemas/TGMIndicator"},"type":"array","title":"Reward Indicators","description":"Reward/alpha potential indicators (chain-tvl, trading-range, price-momentum, chain-fees, protocol-fees, cex-flows, funding-rate)"}},"type":"object","required":["token_address","chain","token_info","risk_indicators","reward_indicators"],"title":"TGMIndicatorsResponse","description":"Response model for TGM Indicators endpoint.\n\nContains risk and reward indicators grouped separately."},"TGMIndicatorTokenInfo":{"properties":{"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market capitalization in USD"},"market_cap_group":{"anyOf":[{"type":"string"}],"title":"Market Cap Group","description":"Market cap classification group"},"is_stablecoin":{"anyOf":[{"type":"boolean"}],"title":"Is Stablecoin","description":"Flag indicating if token is a stablecoin"}},"type":"object","title":"TGMIndicatorTokenInfo","description":"Token metadata from indicator data."},"TGMIndicator":{"properties":{"indicator_type":{"type":"string","title":"Indicator Type","description":"The type of indicator"},"score":{"anyOf":[{"type":"string"}],"title":"Score","description":"Summary score (risk: low/medium/high, reward: bearish/neutral/bullish)"},"signal":{"anyOf":[{"type":"number"}],"title":"Signal","description":"The raw signal value for the indicator"},"signal_percentile":{"anyOf":[{"type":"number"}],"title":"Signal Percentile","description":"Percentile of the signal against tokens in the same market cap group (0-100)"},"last_trigger_on":{"anyOf":[{"type":"string"}],"title":"Last Trigger On","description":"Date when the indicator last changed state (YYYY-MM-DD)"}},"type":"object","required":["indicator_type"],"title":"TGMIndicator","description":"Individual indicator record."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/indicators":{"post":{"tags":["Token God Mode"],"summary":"Get Nansen Score Indicators","description":"Get risk and reward indicators for a specific token.\n\nReturns two groups of indicators:\n- **risk_indicators**: Metrics for assessing token risk (btc-reflexivity, liquidity-risk, concentration-risk, token-supply-inflation)\n- **reward_indicators**: Metrics for assessing alpha potential (chain-tvl, trading-range, price-momentum, chain-fees, protocol-fees, cex-flows, funding-rate)\n\nEach indicator includes:\n- **score**: Summary assessment ('low'/'medium'/'high' for risk, 'bearish'/'neutral'/'bullish' for reward)\n- **signal**: Raw metric value\n- **signal_percentile**: Percentile rank (0-100) vs tokens in same market cap group\n- **last_trigger_on**: When the indicator last changed state","operationId":"get_tgm_indicators_api_v1_tgm_indicators_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMIndicatorsRequest"}}},"required":true},"responses":{"200":{"description":"Nansen score indicators data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMIndicatorsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Price OHLCV

## Get Token OHLCV Data

> Get unified OHLCV (Open, High, Low, Close, Volume) data for tokens across supported chains.\
> \
> This endpoint unifies the legacy TGM prices endpoints (\`/tgm/prices/low-timeframe\` and \`/tgm/prices/high-timeframe\`)\
> into a single endpoint with support for multiple timeframes:\
> \
> \*\*Low timeframes\*\* (sub-hourly): \`1m\`, \`5m\`, \`15m\`, \`30m\`, \`1h\`\
> \*\*High timeframes\*\* (multi-hour): \`4h\`, \`1d\`, \`1w\`, \`1M\`\
> \
> Returns OHLCV candle data including:\
> \- \*\*Price data\*\*: open, high, low, close prices\
> \- \*\*Volume data\*\*: trading volume in token units and USD\
> \- \*\*Market cap data\*\*: market capitalization at each time point\
> \
> Date range defaults to the last 30 days if not specified.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TokenOHLCVRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMOHLCVChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token contract address"},"date_range":{"anyOf":[{"$ref":"#/components/schemas/TokenOHLCVDateRange"}],"description":"DEPRECATED: Use 'date' instead. Date range with start/end fields.","deprecated":true},"date":{"anyOf":[{"$ref":"#/components/schemas/DateRange"}],"description":"Date range for the data (defaults to last 30 days if not specified)"},"timeframe":{"$ref":"#/components/schemas/ResolutionEnum","description":"Time resolution for OHLCV data"}},"additionalProperties":false,"type":"object","required":["chain","token_address","timeframe"],"title":"TokenOHLCVRequest","description":"Request model for Token OHLCV endpoint.\n\nThis endpoint provides unified OHLCV (Open, High, Low, Close, Volume) data\nfor tokens across supported chains with different time resolutions."},"TGMOHLCVChain":{"type":"string","enum":["algorand","aptos","arbitrum","avalanche","base","bitcoin","bitlayer","bnb","chiliz","ethereum","gravity","hyperevm","hyperliquid","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","stacks","starknet","stellar","sui","ton","tron","viction"],"title":"TGMOHLCVChain","description":"Chains supported for TGM OHLCV endpoint (includes Bitcoin)."},"TokenOHLCVDateRange":{"properties":{"start":{"type":"string","title":"Start","description":"Start date and time (ISO format)"},"end":{"type":"string","title":"End","description":"End date and time (ISO format)"}},"type":"object","required":["start","end"],"title":"TokenOHLCVDateRange","description":"DEPRECATED: Use 'date' field with standard DateRange instead."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"ResolutionEnum":{"type":"string","enum":["1m","5m","15m","30m","1h","4h","1d","1w","1M"],"title":"ResolutionEnum","description":"Supported OHLCV resolution values."},"TokenOHLCVResponse":{"properties":{"chain":{"type":"string","title":"Chain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token contract address"},"timeframe":{"type":"string","title":"Timeframe","description":"Time resolution used"},"data":{"items":{"$ref":"#/components/schemas/OHLCVCandle"},"type":"array","title":"Data","description":"OHLCV candle data points, ordered by interval_start"}},"type":"object","required":["chain","token_address","timeframe","data"],"title":"TokenOHLCVResponse","description":"Response model for Token OHLCV endpoint.\n\nContains the requested OHLCV data with metadata about the request parameters."},"OHLCVCandle":{"properties":{"interval_start":{"type":"string","title":"Interval Start","description":"Start time of the candle interval (ISO datetime string)"},"open":{"anyOf":[{"type":"number"}],"title":"Open","description":"Opening price"},"high":{"anyOf":[{"type":"number"}],"title":"High","description":"Highest price in the interval"},"low":{"anyOf":[{"type":"number"}],"title":"Low","description":"Lowest price in the interval"},"close":{"anyOf":[{"type":"number"}],"title":"Close","description":"Closing price"},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Trading volume in token units"},"volume_usd":{"anyOf":[{"type":"number"}],"title":"Volume Usd","description":"Trading volume in USD"},"market_cap":{"$ref":"#/components/schemas/MarketCapData","description":"Market capitalization data for the candle"}},"type":"object","required":["interval_start","market_cap"],"title":"OHLCVCandle","description":"Individual OHLCV candle data point."},"MarketCapData":{"properties":{"open":{"anyOf":[{"type":"number"}],"title":"Open","description":"Market cap at candle open"},"high":{"anyOf":[{"type":"number"}],"title":"High","description":"Highest market cap in the candle"},"low":{"anyOf":[{"type":"number"}],"title":"Low","description":"Lowest market cap in the candle"},"close":{"anyOf":[{"type":"number"}],"title":"Close","description":"Market cap at candle close"}},"type":"object","title":"MarketCapData","description":"Market capitalization data for OHLCV candles."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/token-ohlcv":{"post":{"tags":["Token God Mode"],"summary":"Get Token OHLCV Data","description":"Get unified OHLCV (Open, High, Low, Close, Volume) data for tokens across supported chains.\n\nThis endpoint unifies the legacy TGM prices endpoints (`/tgm/prices/low-timeframe` and `/tgm/prices/high-timeframe`)\ninto a single endpoint with support for multiple timeframes:\n\n**Low timeframes** (sub-hourly): `1m`, `5m`, `15m`, `30m`, `1h`\n**High timeframes** (multi-hour): `4h`, `1d`, `1w`, `1M`\n\nReturns OHLCV candle data including:\n- **Price data**: open, high, low, close prices\n- **Volume data**: trading volume in token units and USD\n- **Market cap data**: market capitalization at each time point\n\nDate range defaults to the last 30 days if not specified.","operationId":"get_token_ohlcv_api_v1_tgm_token_ohlcv_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOHLCVRequest"}}},"required":true},"responses":{"200":{"description":"Token OHLCV data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOHLCVResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Token Screener

{% hint style="info" %}
**Data Retention Limits**

This endpoint only supports recent data:

* Minute Granularity: Last 130 minutes&#x20;
* Hourly Granularity: Last 50 hours
* Daily Granularity: Last 50 days

**Historical Analysis Not Supported:**

* `to_date` must be within 5 minutes of current time
* Historical snapshots (e.g., "show me January 2024") are not available
  {% endhint %}

## Get Token Screener Data

> Discover and screen tokens across multiple blockchains with advanced filtering capabilities. This endpoint helps identify trending tokens, new launches, and smart money movements by combining metrics like volume, liquidity, market cap, and trading activity.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Which tokens are experiencing significant smart money activity across different chains?\*\*\
> 2\. \*\*How do market metrics (price, volume, liquidity) correlate with holder behavior and smart money movements?\*\*\
> 3\. \*\*What tokens show strong fundamentals in terms of holder distribution and trading patterns?\*\*\
> 4\. \*\*Which emerging tokens are attracting fresh wallet inflows while maintaining healthy smart money participation?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TokenScreenerRequest":{"properties":{"chains":{"items":{"$ref":"#/components/schemas/TokenScreenerChain"},"type":"array","maxItems":5,"minItems":1,"title":"Chains","description":"List of blockchain chains to filter by"},"timeframe":{"anyOf":[{"$ref":"#/components/schemas/TokenScreenerTimeframe"}],"description":"**Required** (unless using deprecated 'date' parameter).\n\nTime window for token screening data.\n\nAvailable timeframes and their data characteristics:\n- 5m: Last 5 minutes (minute-level granularity, 2-hour retention)\n- 10m: Last 10 minutes (minute-level granularity, 2-hour retention)\n- 1h: Last 1 hour (minute-level granularity, 2-hour retention)\n- 6h: Last 6 hours (hourly granularity, 2-day retention)\n- 24h: Last 24 hours (hourly granularity, 2-day retention)\n- 7d: Last 7 days (daily granularity, 2-month retention)\n- 30d: Last 30 days (daily granularity, 2-month retention)\n\nCannot be used together with 'date'."},"date":{"anyOf":[{"$ref":"#/components/schemas/DateRange"}],"description":"**DEPRECATED**: Use 'timeframe' instead for better reliability and performance.\n\nRequired only if 'timeframe' is not provided.\n\nCustom date range for the token screener. The granularity is automatically determined from the date range:\n- ≤ 1 hour: minute-level data (limited to last 2 hours)\n- > 1 hour to 1 day: hourly data (limited to last 2 days)\n- > 1 day: daily data (limited to last 2 months)\n\nCannot be used together with 'timeframe'.","deprecated":true},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TokenScreenerFilters"}],"description":"Additional filters to apply"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TokenScreenerSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"buy_volume\", \"direction\": \"DESC\"}] - Sort by buy volume descending\n- [{\"field\": \"price_change\", \"direction\": \"DESC\"}] - Sort by price change descending"}},"additionalProperties":false,"type":"object","required":["chains"],"title":"TokenScreenerRequest","description":"Request model for Token Screener endpoint.\n\nEither 'timeframe' (recommended) or 'date' (deprecated) must be provided."},"TokenScreenerChain":{"type":"string","enum":["arbitrum","avalanche","base","bitcoin","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TokenScreenerChain","description":"Chains supported for Token Screener endpoint."},"TokenScreenerTimeframe":{"type":"string","enum":["5m","10m","1h","6h","24h","7d","30d"],"title":"TokenScreenerTimeframe","description":"Token screener timeframe options.\n\nDefines the time window for token screening data.\nEach timeframe corresponds to different data granularity and retention periods.\nMatches the timeframe options in the Superapp token-screener widget."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TokenScreenerFilters":{"properties":{"token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Address","description":"Token address or symbol filter"},"token_symbol":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Symbol","description":"Token symbol filter"},"only_smart_money":{"anyOf":[{"type":"boolean"}],"title":"Only Smart Money","description":"Deprecated: use trader_type instead. Whether to only include smart money tokens","deprecated":true},"trader_type":{"anyOf":[{"$ref":"#/components/schemas/TraderType"}],"description":"Filter by trader type. Overrides only_smart_money when provided."},"sectors":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Sectors","description":"Token sectors to include"},"exclude_sectors":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Exclude Sectors","description":"Token sectors to exclude"},"token_age_days":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token age range filter in days"},"market_cap_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Market cap range filter"},"liquidity":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Liquidity range filter"},"price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Current price range filter in USD"},"price_change":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Price change percentage range filter"},"fdv":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Fully Diluted Valuation range filter"},"fdv_mc_ratio":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"FDV to Market Cap ratio range filter"},"nof_buyers":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of unique buyers range filter"},"nof_traders":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of unique traders range filter"},"nof_sellers":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of unique sellers range filter"},"nof_buys":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of buy transactions range filter"},"nof_sells":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of sell transactions range filter"},"buy_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Buy volume range filter in USD"},"sell_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Sell volume range filter in USD"},"volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total trading volume range filter in USD"},"netflow":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Net flow range filter in USD"},"inflow_fdv_ratio":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Inflow to FDV ratio range filter"},"outflow_fdv_ratio":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Outflow to FDV ratio range filter"},"include_stablecoins":{"type":"boolean","title":"Include Stablecoins","description":"Whether to include stablecoins in token screener results. Default true preserves current behavior. Set to false to exclude USDC, USDT, DAI, and other major stablecoins.","default":true},"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels"}},"additionalProperties":false,"type":"object","title":"TokenScreenerFilters","description":"Filters for token screener endpoints.\n\nThese filters control which tokens are included in the screening\nresults based on various criteria."},"TraderType":{"type":"string","enum":["all","sm","whale","public_figure"],"title":"TraderType","description":"Trader type filter for token screener."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"SortOrder_TokenScreenerSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TokenScreenerSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TokenScreenerSortField]"},"TokenScreenerSortField":{"type":"string","enum":["chain","token_address","token_symbol","market_cap_usd","volume","liquidity","nof_traders","nof_buyers","nof_sellers","nof_buys","nof_sells","price_change","price_usd","netflow","buy_volume","sell_volume"],"title":"TokenScreenerSortField","description":"Enum for sortable fields in token screener."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TokenScreenerResponse":{"properties":{"data":{"items":{"anyOf":[{"$ref":"#/components/schemas/TokenScreenerDataDefault"},{"$ref":"#/components/schemas/TokenScreenerDataSmartMoneyDefault"},{"$ref":"#/components/schemas/TokenScreenerDataNonDefault"}]},"type":"array","title":"Data","description":"List of token screening results"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TokenScreenerResponse","description":"Response model for token screener endpoint."},"TokenScreenerDataDefault":{"properties":{"chain":{"type":"string","title":"Chain","description":"The blockchain network on which the token is deployed."},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_symbol":{"type":"string","title":"Token Symbol","description":"The symbol of the token."},"token_age_days":{"anyOf":[{"type":"number"}],"title":"Token Age Days","description":"Number of days since token deployment."},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market capitalization in USD."},"liquidity":{"anyOf":[{"type":"number"}],"title":"Liquidity","description":"Total on-chain liquidity in USD."},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Price of the token"},"price_change":{"anyOf":[{"type":"number"}],"title":"Price Change","description":"Price change percentage from the previous period."},"fdv":{"anyOf":[{"type":"number"}],"title":"Fdv","description":"Fully Diluted Valuation in USD."},"fdv_mc_ratio":{"anyOf":[{"type":"number"}],"title":"Fdv Mc Ratio","description":"Ratio of Fully Diluted Valuation to Market Cap."},"buy_volume":{"anyOf":[{"type":"number"}],"title":"Buy Volume","description":"Total buy volume in USD."},"inflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Inflow Fdv Ratio","description":"Ratio of inflow to Fully Diluted Valuation."},"outflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Outflow Fdv Ratio","description":"Ratio of outflow to Fully Diluted Valuation."},"sell_volume":{"anyOf":[{"type":"number"}],"title":"Sell Volume","description":"Total sell volume in USD."},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Total trading volume in USD."},"netflow":{"anyOf":[{"type":"number"}],"title":"Netflow","description":"Net flow (buy_volume - sell_volume) in USD."}},"type":"object","required":["chain","token_address","token_symbol"],"title":"TokenScreenerDataDefault","description":"Data model for token screener results with non-default query (excludes trader-related columns)."},"TokenScreenerDataSmartMoneyDefault":{"properties":{"chain":{"type":"string","title":"Chain","description":"The blockchain network on which the token is deployed."},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_symbol":{"type":"string","title":"Token Symbol","description":"The symbol of the token."},"token_age_days":{"anyOf":[{"type":"number"}],"title":"Token Age Days","description":"Number of days since token deployment."},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market capitalization in USD."},"liquidity":{"anyOf":[{"type":"number"}],"title":"Liquidity","description":"Total on-chain liquidity in USD."},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Price of the token"},"price_change":{"anyOf":[{"type":"number"}],"title":"Price Change","description":"Price change percentage from the previous period."},"fdv":{"anyOf":[{"type":"number"}],"title":"Fdv","description":"Fully Diluted Valuation in USD."},"fdv_mc_ratio":{"anyOf":[{"type":"number"}],"title":"Fdv Mc Ratio","description":"Ratio of Fully Diluted Valuation to Market Cap."},"nof_traders":{"anyOf":[{"type":"integer"}],"title":"Nof Traders","description":"Total number of unique traders."},"buy_volume":{"anyOf":[{"type":"number"}],"title":"Buy Volume","description":"Total buy volume in USD."},"inflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Inflow Fdv Ratio","description":"Ratio of inflow to Fully Diluted Valuation."},"outflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Outflow Fdv Ratio","description":"Ratio of outflow to Fully Diluted Valuation."},"sell_volume":{"anyOf":[{"type":"number"}],"title":"Sell Volume","description":"Total sell volume in USD."},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Total trading volume in USD."},"netflow":{"anyOf":[{"type":"number"}],"title":"Netflow","description":"Net flow (buy_volume - sell_volume) in USD."}},"type":"object","required":["chain","token_address","token_symbol"],"title":"TokenScreenerDataSmartMoneyDefault","description":"Data model for smart money token screener with default query.\n\nIncludes nof_traders but excludes other trader-related columns\n(nof_buyers, nof_sellers, nof_buys, nof_sells)."},"TokenScreenerDataNonDefault":{"properties":{"chain":{"type":"string","title":"Chain","description":"The blockchain network on which the token is deployed."},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_symbol":{"type":"string","title":"Token Symbol","description":"The symbol of the token."},"token_age_days":{"anyOf":[{"type":"number"}],"title":"Token Age Days","description":"Number of days since token deployment."},"market_cap_usd":{"anyOf":[{"type":"number"}],"title":"Market Cap Usd","description":"Market capitalization in USD."},"liquidity":{"anyOf":[{"type":"number"}],"title":"Liquidity","description":"Total on-chain liquidity in USD."},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Price of the token"},"price_change":{"anyOf":[{"type":"number"}],"title":"Price Change","description":"Price change percentage from the previous period."},"fdv":{"anyOf":[{"type":"number"}],"title":"Fdv","description":"Fully Diluted Valuation in USD."},"fdv_mc_ratio":{"anyOf":[{"type":"number"}],"title":"Fdv Mc Ratio","description":"Ratio of Fully Diluted Valuation to Market Cap."},"nof_buyers":{"anyOf":[{"type":"integer"}],"title":"Nof Buyers","description":"Number of unique buyers."},"nof_traders":{"anyOf":[{"type":"integer"}],"title":"Nof Traders","description":"Total number of unique traders."},"nof_sellers":{"anyOf":[{"type":"integer"}],"title":"Nof Sellers","description":"Number of unique sellers."},"nof_buys":{"anyOf":[{"type":"integer"}],"title":"Nof Buys","description":"Total number of buy transactions."},"nof_sells":{"anyOf":[{"type":"integer"}],"title":"Nof Sells","description":"Total number of sell transactions."},"buy_volume":{"anyOf":[{"type":"number"}],"title":"Buy Volume","description":"Total buy volume in USD."},"inflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Inflow Fdv Ratio","description":"Ratio of inflow to Fully Diluted Valuation."},"outflow_fdv_ratio":{"anyOf":[{"type":"number"}],"title":"Outflow Fdv Ratio","description":"Ratio of outflow to Fully Diluted Valuation."},"sell_volume":{"anyOf":[{"type":"number"}],"title":"Sell Volume","description":"Total sell volume in USD."},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Total trading volume in USD."},"netflow":{"anyOf":[{"type":"number"}],"title":"Netflow","description":"Net flow (buy_volume - sell_volume) in USD."}},"type":"object","required":["chain","token_address","token_symbol"],"title":"TokenScreenerDataNonDefault","description":"Data model for token screener results with non-default query (includes all columns)."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/token-screener":{"post":{"tags":["Token Screener"],"summary":"Get Token Screener Data","description":"Discover and screen tokens across multiple blockchains with advanced filtering capabilities. This endpoint helps identify trending tokens, new launches, and smart money movements by combining metrics like volume, liquidity, market cap, and trading activity.\n\n**What it helps to answer:**\n\n1. **Which tokens are experiencing significant smart money activity across different chains?**\n2. **How do market metrics (price, volume, liquidity) correlate with holder behavior and smart money movements?**\n3. **What tokens show strong fundamentals in terms of holder distribution and trading patterns?**\n4. **Which emerging tokens are attracting fresh wallet inflows while maintaining healthy smart money participation?**","operationId":"get_token_screener_api_v1_token_screener_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenScreenerRequest"}}},"required":true},"responses":{"200":{"description":"Token screening data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenScreenerResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Flow Intelligence

## Get TGM Flow Intelligence Data

> This endpoint provides comprehensive flow intelligence analytics, including inflows, outflows, and net flows for a specific token, broken down by various holder segments (Exchanges, Smart Money, Public Figures, Whales) with time-based statistics and trends. It can be used for identifying accumulation/distribution patterns across different holder segments.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMFlowIntelligenceRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token address"},"timeframe":{"$ref":"#/components/schemas/TGMFlowIntelligenceTimeframe","description":"Time window for the flow intelligence data","default":"1d"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMFlowIntelligenceFilters"}],"description":"Additional filters to apply to the query."}},"additionalProperties":false,"type":"object","required":["chain","token_address"],"title":"TGMFlowIntelligenceRequest","description":"Request model for TGM flow-intelligence endpoint.\n\nThis endpoint provides detailed token flow intelligence for analyzing token movements\nacross different chains. It helps track and categorize token transfers, identifying\npatterns such as exchange deposits, withdrawals, and transfers between different\ntypes of wallets."},"TGMChain":{"type":"string","enum":["arbitrum","avalanche","base","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TGMChain","description":"Chains supported in TGM (Token God Mode) endpoints."},"TGMFlowIntelligenceTimeframe":{"type":"string","enum":["5m","1h","6h","12h","1d","7d"],"title":"TGMFlowIntelligenceTimeframe","description":"TGM flow intelligence timeframe options."},"TGMFlowIntelligenceFilters":{"properties":{"public_figure_net_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Public figure net flow range filter in USD"},"public_figure_avg_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Public figure average flow range filter in USD"},"public_figure_wallet_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Public figure wallet count range filter"},"top_pnl_net_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Top PnL net flow range filter in USD"},"top_pnl_avg_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Top PnL average flow range filter in USD"},"top_pnl_wallet_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Top PnL wallet count range filter"},"whale_net_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Whale net flow range filter in USD"},"whale_avg_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Whale average flow range filter in USD"},"whale_wallet_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Whale wallet count range filter"},"smart_trader_net_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Smart trader net flow range filter in USD"},"smart_trader_avg_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Smart trader average flow range filter in USD"},"smart_trader_wallet_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Smart trader wallet count range filter"},"exchange_net_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Exchange net flow range filter in USD"},"exchange_avg_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Exchange average flow range filter in USD"},"exchange_wallet_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Exchange wallet count range filter"},"fresh_wallets_net_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Fresh wallets net flow range filter in USD"},"fresh_wallets_avg_flow_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Fresh wallets average flow range filter in USD"},"fresh_wallets_wallet_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Fresh wallets wallet count range filter"}},"additionalProperties":false,"type":"object","title":"TGMFlowIntelligenceFilters","description":"Filters for TGM flow intelligence endpoint.\n\nThese filters control the flow intelligence analysis data."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"TGMFlowIntelligenceResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMFlowIntelligence"},"type":"array","title":"Data","description":"List of TGM flow intelligence records"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Warnings","description":"Optional warnings about the query results. For example, if fresh_wallets fields are null due to timeframe constraints."}},"type":"object","required":["data"],"title":"TGMFlowIntelligenceResponse","description":"Response model for TGM flow-intelligence endpoint.\n\nContains flow intelligence data with pagination and metadata."},"TGMFlowIntelligence":{"properties":{"public_figure_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Public Figure Net Flow Usd","description":"Net flow (USD) for addresses labeled as Public Figure"},"public_figure_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Public Figure Avg Flow Usd","description":"Geometric mean of absolute flow for Public Figure addresses"},"public_figure_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Public Figure Wallet Count","description":"Unique wallet count for Public Figure addresses"},"top_pnl_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Top Pnl Net Flow Usd","description":"Net flow (USD) for addresses labeled as Top PnL"},"top_pnl_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Top Pnl Avg Flow Usd","description":"Geometric mean of absolute flow for Top PnL addresses"},"top_pnl_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Top Pnl Wallet Count","description":"Unique wallet count for Top PnL addresses"},"whale_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Whale Net Flow Usd","description":"Net flow (USD) for addresses labeled as Whale"},"whale_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Whale Avg Flow Usd","description":"Geometric mean of absolute flow for Whale addresses"},"whale_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Whale Wallet Count","description":"Unique wallet count for Whale addresses"},"smart_trader_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Smart Trader Net Flow Usd","description":"Net flow (USD) for addresses labeled as Smart Trader"},"smart_trader_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Smart Trader Avg Flow Usd","description":"Geometric mean of absolute flow for Smart Trader addresses"},"smart_trader_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Smart Trader Wallet Count","description":"Unique wallet count for Smart Trader addresses"},"exchange_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Exchange Net Flow Usd","description":"Net flow (USD) for addresses labeled as Exchange"},"exchange_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Exchange Avg Flow Usd","description":"Geometric mean of absolute flow for Exchange addresses"},"exchange_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Exchange Wallet Count","description":"Unique wallet count for Exchange addresses"},"fresh_wallets_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Fresh Wallets Net Flow Usd","description":"Net flow (USD) for fresh wallets. Only available for 1d and 7d timeframes."},"fresh_wallets_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Fresh Wallets Avg Flow Usd","description":"Average absolute flow (USD) for fresh wallets. Only available for 1d and 7d timeframes."},"fresh_wallets_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Fresh Wallets Wallet Count","description":"Fresh wallets wallet count. Only available for 1d and 7d timeframes."}},"type":"object","title":"TGMFlowIntelligence","description":"Individual TGM flow intelligence record.\n\nRepresents flow intelligence data for different wallet categories."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/flow-intelligence":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Flow Intelligence Data","description":"This endpoint provides comprehensive flow intelligence analytics, including inflows, outflows, and net flows for a specific token, broken down by various holder segments (Exchanges, Smart Money, Public Figures, Whales) with time-based statistics and trends. It can be used for identifying accumulation/distribution patterns across different holder segments.","operationId":"get_tgm_flow_intelligence_api_v1_tgm_flow_intelligence_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMFlowIntelligenceRequest"}}},"required":true},"responses":{"200":{"description":"TGM flow intelligence data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMFlowIntelligenceResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Holders

{% hint style="warning" %}
**Update:** A `premium_labels` parameter is being added to this endpoint. From April 1, the default changes from `true` to `false` .
{% endhint %}

## Get TGM Holders Data

> Retrieve the top token holders with their current balances, historical activity, and recent balance changes. Provides insights into token distribution, smart money and fund holdings.\
> \
> \*\*Performance Optimization for Native Tokens:\*\*\
> When querying native tokens with \`label\_type: "all\_holders"\`, this endpoint uses an optimized model to prevent timeouts. This optimization has the following limitations:\
> \- \*\*Ordering\*\*: Only \`token\_amount\` field is supported\
> \- \*\*Filters\*\*: Limited to: \`token\_amount\`, \`total\_outflow\`, \`total\_inflow\`, \`address\`, \`include\_smart\_money\_labels\`, \`exclude\_smart\_money\_labels\`\
> \
> To use advanced filters and ordering on native tokens, specify a \`label\_type\` other than "all\_holders" (e.g., "smart\_money", "whale", "exchange").\
> \
> \*\*Label Tier Control (\`premium\_labels\`):\*\*\
> The \`premium\_labels\` parameter is now available to all users. When omitted, it defaults to \`true\` (premium labels). In a future release, the default will change to \`false\`. Pass \`premium\_labels=true\` explicitly to preserve premium label behavior.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMHoldersRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMHoldersChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token address"},"aggregate_by_entity":{"type":"boolean","title":"Aggregate By Entity","description":"Whether to return entity data","default":false},"label_type":{"$ref":"#/components/schemas/TGMHoldersLabel","description":"Label type. You must also include the labels filter to match the label type. For example, for label type 'smart_money', you must include '30D Smart Trader', '90D Smart Trader', '180D Smart Trader', 'Fund' or 'Smart Trader' in the filters.labels.include parameter.","default":"all_holders"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMHoldersFilters"}],"description":"Additional filters to apply to the query."},"premium_labels":{"anyOf":[{"type":"boolean"}],"title":"Premium Labels","description":"Controls label tier in the response. When null/omitted, defaults to true (premium labels filtered by subscription plan). When false, returns free-tier labels for all users. When true, returns premium labels (filtered by subscription plan). Note: In a future release, the default will change from true to false — pass premium_labels=true explicitly to preserve premium label behavior."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMHoldersSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"value_usd\", \"direction\": \"DESC\"}] - Sort by value USD descending\n- [{\"field\": \"token_amount\", \"direction\": \"ASC\"}] - Sort by token amount ascending\n- [{\"field\": \"ownership_percentage\", \"direction\": \"DESC\"}] - Sort by ownership percentage descending"}},"additionalProperties":false,"type":"object","required":["chain","token_address"],"title":"TGMHoldersRequest","description":"Request model for TGM holders endpoint.\n\nThis endpoint provides comprehensive data on token holders and their balances.\nRetrieve holders by various criteria including smart money, exchanges, public figures,\nwhales, and top holders with detailed balance information and filtering options."},"TGMHoldersChain":{"type":"string","enum":["arbitrum","avalanche","base","bitcoin","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TGMHoldersChain","description":"Chains supported for TGM holders endpoint."},"TGMHoldersLabel":{"type":"string","enum":["whale","public_figure","smart_money","all_holders","exchange"],"title":"TGMHoldersLabel","description":"TGM holders label types."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMHoldersFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels for holders"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels for holders"},"address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Address","description":"Holder address filter"},"address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Address Label","description":"Holder label filter"},"token_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token amount range filter"},"total_outflow":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total outflow range filter"},"total_inflow":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total inflow range filter"},"balance_change_24h":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"24-hour balance change range filter"},"balance_change_7d":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"7-day balance change range filter"},"balance_change_30d":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"30-day balance change range filter"},"ownership_percentage":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Ownership percentage range filter"},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Balance range filter in USD. Defaults to min: 1.0 to exclude dust holders. Set explicitly to override (e.g., {\"min\": 0} to include all holders). Note: This default does not apply to native tokens with 'all_holders' label."}},"additionalProperties":false,"type":"object","title":"TGMHoldersFilters","description":"Filters for TGM holders endpoint.\n\nThese filters control which holders are included in the analysis."},"LabelType":{"type":"string","enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"title":"LabelType","description":"Filter by entity label type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SortOrder_TGMHoldersSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMHoldersSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMHoldersSortField]"},"TGMHoldersSortField":{"type":"string","enum":["address","name","token_amount","total_outflow","total_inflow","balance_change_24h","balance_change_7d","balance_change_30d","ownership_percentage","value_usd"],"title":"TGMHoldersSortField","description":"Enum for sortable fields in TGM holders."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMHoldersResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMHolder"},"type":"array","title":"Data","description":"List of TGM holder records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Warnings","description":"Optional warnings about the query results. For example, if a token has no USD price data, a warning will indicate that the default value_usd filter may be excluding results."}},"type":"object","required":["data","pagination"],"title":"TGMHoldersResponse","description":"Response model for TGM holders endpoint.\n\nContains a list of holder records with pagination and metadata."},"TGMHolder":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Address of contract/EOA"},"address_label":{"anyOf":[{"type":"string"}],"title":"Address Label","description":"Label associated with the address"},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","description":"Total balance count"},"total_outflow":{"anyOf":[{"type":"number"}],"title":"Total Outflow","description":"Total amount of tokens sent by this address"},"total_inflow":{"anyOf":[{"type":"number"}],"title":"Total Inflow","description":"Total amount of tokens received by this address"},"balance_change_24h":{"anyOf":[{"type":"number"}],"title":"Balance Change 24H","description":"Token balance change over the last 24 hours"},"balance_change_7d":{"anyOf":[{"type":"number"}],"title":"Balance Change 7D","description":"Token balance change over the last 7 days"},"balance_change_30d":{"anyOf":[{"type":"number"}],"title":"Balance Change 30D","description":"Token balance change over the last 30 days"},"ownership_percentage":{"anyOf":[{"type":"number"}],"title":"Ownership Percentage","description":"Percentage of total token supply owned by this address"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"Current token balance value in USD"}},"type":"object","title":"TGMHolder","description":"Individual TGM holder record.\n\nRepresents a single holder with balance information and metadata."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/holders":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Holders Data","description":"Retrieve the top token holders with their current balances, historical activity, and recent balance changes. Provides insights into token distribution, smart money and fund holdings.\n\n**Performance Optimization for Native Tokens:**\nWhen querying native tokens with `label_type: \"all_holders\"`, this endpoint uses an optimized model to prevent timeouts. This optimization has the following limitations:\n- **Ordering**: Only `token_amount` field is supported\n- **Filters**: Limited to: `token_amount`, `total_outflow`, `total_inflow`, `address`, `include_smart_money_labels`, `exclude_smart_money_labels`\n\nTo use advanced filters and ordering on native tokens, specify a `label_type` other than \"all_holders\" (e.g., \"smart_money\", \"whale\", \"exchange\").\n\n**Label Tier Control (`premium_labels`):**\nThe `premium_labels` parameter is now available to all users. When omitted, it defaults to `true` (premium labels). In a future release, the default will change to `false`. Pass `premium_labels=true` explicitly to preserve premium label behavior.","operationId":"get_tgm_holders_api_v1_tgm_holders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMHoldersRequest"}}},"required":true},"responses":{"200":{"description":"TGM holders data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMHoldersResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```

### How to use the Holders Endpoint

The Holders Endpoint returns holder data for a given token on a specific chain over a defined date range. You can use this to analyze who is holding a particular token—whether it’s Smart Money wallets, exchanges, or all holders.

#### Usecase 1: Get list of Smart Money Holders

1. Set "label" to "smart\_money" in the parameters object.
2. Add "includeLabels" as an array with the specific Smart Money segments you want (e.g., "Fund", "30D Smart Trader").
3. Other parameters (like chain, tokenAddress, date range, etc.) stay the same.

**Example Configuration:**

```json
"label": "smart_money",
"includeLabels": ["Fund", "30D Smart Trader"]
"isEntity": true, -- To aggregate by Entity
```

#### Usecase 2: List of Exchanges Holding a Token

1. Set "label" to "exchange" in the parameters object.
2. Add "includeLabels"  with "Exchange"
3. Other parameters remain unchanged.

**Example Configuration:**

```json
"label": "exchange",
"includeLabels": ["Exchange"]
"isEntity": true, -- To aggregate by Entity
```


# Flows

## Get TGM Flows Data

> Analyze aggregated token flows by holder category over time. Shows hourly snapshots of balances, inflows, and outflows for specific holder groups: smart money, public figures, whales, and exchanges.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMFlowsRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMFlowsChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token address"},"date":{"$ref":"#/components/schemas/DateRange","description":"ISO 8601 date-time range object with optional from and to fields"},"label":{"$ref":"#/components/schemas/TGMFlowsLabel","description":"Label type for filtering flows","default":"top_100_holders"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMFlowsFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMFlowsSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"date\", \"direction\": \"DESC\"}] - Sort by date descending (most recent first)\n- [{\"field\": \"total_inflows_usd\", \"direction\": \"ASC\"}] - Sort by total inflows ascending\n- [{\"field\": \"total_outflows_usd\", \"direction\": \"DESC\"}] - Sort by total outflows descending"}},"additionalProperties":false,"type":"object","required":["chain","token_address","date"],"title":"TGMFlowsRequest","description":"Request model for TGM flows endpoint.\n\nThis endpoint provides comprehensive token flow analytics showing inflow and outflow patterns\nfrom various holder segments including Exchanges, Smart Money addresses, Public Figures, and Whales\nwith time-based statistics and trends."},"TGMFlowsChain":{"type":"string","enum":["arbitrum","avalanche","base","bnb","ethereum","hyperevm","hyperliquid","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TGMFlowsChain","description":"Chains supported for the TGM flows endpoint."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"TGMFlowsLabel":{"type":"string","enum":["whale","public_figure","smart_money","top_100_holders","exchange"],"title":"TGMFlowsLabel","description":"TGM flow label types."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMFlowsFilters":{"properties":{"price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Price range filter in USD"},"token_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token amount range filter"},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Value range filter in USD"},"holders_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Holders count range filter"},"total_inflows_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Total inflows count range filter"},"total_outflows_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Total outflows count range filter"}},"additionalProperties":false,"type":"object","title":"TGMFlowsFilters","description":"Filters for TGM flows endpoint.\n\nThese filters control which data points are included in the flows analysis."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"SortOrder_TGMFlowsSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMFlowsSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMFlowsSortField]"},"TGMFlowsSortField":{"type":"string","enum":["date","price_usd","token_amount","value_usd","holders_count","total_inflows_count","total_outflows_count","total_inflows_dex","total_outflows_dex","total_inflows_cex","total_outflows_cex"],"title":"TGMFlowsSortField","description":"Enum for sortable fields in TGM flows."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMFlowsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMFlows"},"type":"array","title":"Data","description":"List of TGM flow records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMFlowsResponse","description":"Response model for TGM flows endpoint.\n\nContains a list of flow records with pagination and metadata."},"TGMFlows":{"properties":{"date":{"type":"string","title":"Date","description":"Block date of the flow data point"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Daily median token price in USD. For the current day, uses the latest spot price."},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","description":"Total token amount"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"Total token value in USD"},"holders_count":{"anyOf":[{"type":"integer"}],"title":"Holders Count","description":"Number of token holders"},"total_inflows_count":{"anyOf":[{"type":"number"}],"title":"Total Inflows Count","description":"Total inflows"},"total_outflows_count":{"anyOf":[{"type":"number"}],"title":"Total Outflows Count","description":"Total outflows"},"total_inflows_dex":{"anyOf":[{"type":"number"}],"title":"Total Inflows Dex","description":"Total DEX inflows (token amount). Only populated when label=exchange, null otherwise."},"total_outflows_dex":{"anyOf":[{"type":"number"}],"title":"Total Outflows Dex","description":"Total DEX outflows (token amount). Only populated when label=exchange, null otherwise."},"total_inflows_cex":{"anyOf":[{"type":"number"}],"title":"Total Inflows Cex","description":"Total CEX inflows (token amount). Only populated when label=exchange, null otherwise."},"total_outflows_cex":{"anyOf":[{"type":"number"}],"title":"Total Outflows Cex","description":"Total CEX outflows (token amount). Only populated when label=exchange, null otherwise."}},"type":"object","required":["date"],"title":"TGMFlows","description":"Individual TGM flow record.\n\nRepresents a single flow record with token holder statistics."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/flows":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Flows Data","description":"Analyze aggregated token flows by holder category over time. Shows hourly snapshots of balances, inflows, and outflows for specific holder groups: smart money, public figures, whales, and exchanges.","operationId":"get_tgm_flows_api_v1_tgm_flows_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMFlowsRequest"}}},"required":true},"responses":{"200":{"description":"TGM flows data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMFlowsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```

### Using /flows Endpoint

The /flows endpoint allows you to analyze historical inflows and outflows of token holdings across specific wallet labels (e.g., Smart Money, Whales, Public Figures, etc.) on supported blockchains. This enables powerful workflows to investigate token accumulation or distribution trends by high-signal wallet groups over time.

This guide walks through how to use the endpoint in a workflow to explore Smart Money behavior for a given token on a given chain.

#### Usecase 1: Track Smart Money Accumulation Trends

This workflow helps you:

* Identify what tokens Smart Money is holding (e.g., via /holdings or /inflows)
* Investigate how inflows/outflows of Smart Money have evolved over time
* Combine historical activity with price trends for better decision-making

**Step by Step Guide:**

1. Start with /holdings endpoint to identify what tokens Smart Money is holding.
2. Pick a token of interest based on value and activity patterns.
3. Use the /flows endpoint with the token address and smart\_money label to view inflow/outflow trends.
4. Specify timeframe (e.g., last 30 days) and examine how Smart Money behavior is evolving.

#### Usecase 2: Monitor Exchange Flows

This workflow helps you:

* Track how much of a token is being sent to or from exchange wallets
* Spot accumulation or distribution trends by observing net exchange flow
* Correlate token price movement with CEX behavior patterns

**Step by Step Guide:**

1. Identify the token of interest (e.g., USDC, ETH, SOL).
2. Choose the chain where it is active.
3. Use label: "exchange" to track exchange wallets.
4. Analyze net flows:
   * High inflow = Possible sell pressure
   * High outflow = Possible accumulation&#x20;
5. Correlate flow data with price action or events (e.g., listings, unlocks, news).


# Who Bought/Sold

## Get TGM Who Bought/Sold Data

> This endpoint provides an aggregated summary of trade volumes in USD for addresses. It can be used to identify addresses that are net buyers or sellers of a token within a time period.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMWhoBoughtSoldRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"buy_or_sell":{"$ref":"#/components/schemas/TGMWhoBoughtSoldType","description":"Are we checking buys or sells","default":"BUY"},"date":{"$ref":"#/components/schemas/DateRange","description":"ISO 8601 date-time range object with from and to fields"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMWhoBoughtSoldFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMWhoBoughtSoldSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"bought_volume_usd\", \"direction\": \"DESC\"}] - Sort by bought volume descending\n- [{\"field\": \"sold_volume_usd\", \"direction\": \"ASC\"}] - Sort by sold volume ascending"}},"additionalProperties":false,"type":"object","required":["chain","token_address","date"],"title":"TGMWhoBoughtSoldRequest","description":"Request model for TGM who bought/sold endpoint.\n\nThis endpoint provides an aggregated summary of trade volumes in USD for addresses\ninvolved in DEX (Decentralized Exchange) trades for a specific token."},"TGMChain":{"type":"string","enum":["arbitrum","avalanche","base","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TGMChain","description":"Chains supported in TGM (Token God Mode) endpoints."},"TGMWhoBoughtSoldType":{"type":"string","enum":["BUY","SELL"],"title":"TGMWhoBoughtSoldType","description":"TGM who bought/sold type."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMWhoBoughtSoldFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels for traders"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels for traders"},"address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Address","description":"Trader address filter"},"address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Address Label","description":"Trader label filter"},"bought_token_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Bought token volume range filter"},"sold_token_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Sold token volume range filter"},"token_trade_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total token trade volume range filter"},"bought_volume_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Bought volume range filter in USD"},"sold_volume_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Sold volume range filter in USD"},"trade_volume_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total trade volume range filter in USD"}},"additionalProperties":false,"type":"object","title":"TGMWhoBoughtSoldFilters","description":"Filters for TGM who bought/sold endpoint.\n\nThese filters control which traders and trade data are included."},"LabelType":{"type":"string","enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"title":"LabelType","description":"Filter by entity label type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SortOrder_TGMWhoBoughtSoldSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMWhoBoughtSoldSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMWhoBoughtSoldSortField]"},"TGMWhoBoughtSoldSortField":{"type":"string","enum":["bought_volume_usd","sold_volume_usd","token_trade_volume","trade_volume_usd","bought_token_volume","sold_token_volume"],"title":"TGMWhoBoughtSoldSortField","description":"Sortable fields for TGM who-bought-sold endpoint."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMWhoBoughtSoldResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMWhoBoughtSold"},"type":"array","title":"Data","description":"List of TGM who bought/sold records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMWhoBoughtSoldResponse","description":"Response model for TGM who bought/sold endpoint.\n\nContains a list of address records with pagination and metadata."},"TGMWhoBoughtSold":{"properties":{"address":{"type":"string","title":"Address","description":"The address that did the trades"},"address_label":{"anyOf":[{"type":"string"}],"title":"Address Label","description":"Label associated with the address"},"bought_token_volume":{"anyOf":[{"type":"number"}],"title":"Bought Token Volume","description":"The aggregate bought token volume for the address"},"sold_token_volume":{"anyOf":[{"type":"number"}],"title":"Sold Token Volume","description":"The aggregate sold token volume for the address"},"token_trade_volume":{"anyOf":[{"type":"number"}],"title":"Token Trade Volume","description":"The net token trade volume for the address"},"bought_volume_usd":{"anyOf":[{"type":"number"}],"title":"Bought Volume Usd","description":"The aggregate bought volume in USD for the address"},"sold_volume_usd":{"anyOf":[{"type":"number"}],"title":"Sold Volume Usd","description":"The aggregate sold volume in USD for the address"},"trade_volume_usd":{"anyOf":[{"type":"number"}],"title":"Trade Volume Usd","description":"The net trade volume in USD for the address"}},"type":"object","required":["address"],"title":"TGMWhoBoughtSold","description":"Individual TGM who bought/sold record.\n\nRepresents a single address with aggregated trade volumes."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/who-bought-sold":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Who Bought/Sold Data","description":"This endpoint provides an aggregated summary of trade volumes in USD for addresses. It can be used to identify addresses that are net buyers or sellers of a token within a time period.","operationId":"get_tgm_who_bought_sold_api_v1_tgm_who_bought_sold_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMWhoBoughtSoldRequest"}}},"required":true},"responses":{"200":{"description":"TGM who bought/sold data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMWhoBoughtSoldResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# DEX Trades

## Get TGM DEX Trades Data

> Access individual DEX trading transactions for a specific token. Shows detailed trade-by-trade data including trader labels, amounts, and prices.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMDexTradesRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token address"},"only_smart_money":{"type":"boolean","title":"Only Smart Money","description":"Returns only the DEX Trades made by Smart Money wallets","default":false},"date":{"$ref":"#/components/schemas/DateRange","description":"ISO 8601 date-time range object with optional from and to fields"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMDexTradesFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMDexTradesSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"block_timestamp\", \"direction\": \"DESC\"}] - Sort by timestamp descending\n- [{\"field\": \"estimated_value_usd\", \"direction\": \"ASC\"}] - Sort by estimated value ascending\n- [{\"field\": \"token_amount\", \"direction\": \"DESC\"}] - Sort by token amount descending"}},"additionalProperties":false,"type":"object","required":["chain","token_address","date"],"title":"TGMDexTradesRequest","description":"Request model for TGM dex-trades endpoint.\n\nThis endpoint provides all DEX trades for a specific token with optional filtering\nfor smart money wallets only."},"TGMChain":{"type":"string","enum":["arbitrum","avalanche","base","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TGMChain","description":"Chains supported in TGM (Token God Mode) endpoints."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMDexTradesFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels for counterparties"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels for counterparties"},"block_timestamp":{"anyOf":[{"$ref":"#/components/schemas/DateRangeFilter"}],"description":"Date range filter for trade timestamps"},"transaction_hash":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transaction Hash","description":"Transaction hash filter"},"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader name filter"},"token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Token Address","description":"Token address filter"},"action":{"anyOf":[{"$ref":"#/components/schemas/TGMWhoBoughtSoldType"}],"description":"Action filter (BUY/SELL)"},"token_name":{"anyOf":[{"type":"string"}],"title":"Token Name","description":"Token name filter"},"token_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token amount range filter"},"traded_token_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Traded Token Address","description":"Traded token address filter"},"traded_token_name":{"anyOf":[{"type":"string"}],"title":"Traded Token Name","description":"Traded token name filter"},"traded_token_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Traded token amount range filter"},"estimated_swap_price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Estimated swap price range filter in USD"},"estimated_value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Estimated value range filter in USD"}},"additionalProperties":false,"type":"object","title":"TGMDexTradesFilters","description":"Filters for TGM DEX trades endpoint.\n\nThese filters control which DEX trades are included in the analysis."},"LabelType":{"type":"string","enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"title":"LabelType","description":"Filter by entity label type."},"DateRangeFilter":{"properties":{"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"From","description":"Start date (inclusive), ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"To","description":"End date (inclusive), ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRangeFilter","description":"Filter for date ranges with optional from/to bounds. - Date range"},"TGMWhoBoughtSoldType":{"type":"string","enum":["BUY","SELL"],"title":"TGMWhoBoughtSoldType","description":"TGM who bought/sold type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SortOrder_TGMDexTradesSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMDexTradesSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMDexTradesSortField]"},"TGMDexTradesSortField":{"type":"string","enum":["block_timestamp","transaction_hash","trader_address","trader_address_label","token_address","action","token_name","token_amount","traded_token_address","traded_token_name","traded_token_amount","estimated_swap_price_usd","estimated_value_usd"],"title":"TGMDexTradesSortField","description":"Enum for sortable fields in TGM DEX trades."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMDexTradesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMDexTrade"},"type":"array","title":"Data","description":"List of TGM DEX trade records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMDexTradesResponse","description":"Response model for TGM dex-trades endpoint.\n\nContains a list of DEX trade records with pagination and metadata."},"TGMDexTrade":{"properties":{"block_timestamp":{"type":"string","title":"Block Timestamp","description":"Block timestamp of the trade"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"Transaction hash"},"trader_address":{"type":"string","title":"Trader Address","description":"Trader's address"},"trader_address_label":{"anyOf":[{"type":"string"}],"title":"Trader Address Label","description":"Name of the trader, based on nansen_label"},"action":{"$ref":"#/components/schemas/TGMWhoBoughtSoldType","description":"The action taken by the trader. Either 'BUY' or 'SELL'"},"token_address":{"type":"string","title":"Token Address","description":"Address of token"},"token_name":{"type":"string","title":"Token Name","description":"The name of the token"},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","description":"The amount of the specified token traded"},"traded_token_address":{"type":"string","title":"Traded Token Address","description":"Address of token"},"traded_token_name":{"type":"string","title":"Traded Token Name","description":"The name of the token traded for the specified token"},"traded_token_amount":{"anyOf":[{"type":"number"}],"title":"Traded Token Amount","description":"The amount of the token traded for the specified token"},"estimated_swap_price_usd":{"anyOf":[{"type":"number"}],"title":"Estimated Swap Price Usd","description":"Estimated swap price in USD, derived from the counterpart token's USD value. Falls back to the daily median token price if the counterpart price is unavailable."},"estimated_value_usd":{"anyOf":[{"type":"number"}],"title":"Estimated Value Usd","description":"The estimated value of the trade in USD"}},"type":"object","required":["block_timestamp","transaction_hash","trader_address","action","token_address","token_name","token_amount","traded_token_address","traded_token_name","traded_token_amount","estimated_swap_price_usd","estimated_value_usd"],"title":"TGMDexTrade","description":"Individual TGM dex trade record.\n\nRepresents a single DEX trade for a specific token."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/dex-trades":{"post":{"tags":["Token God Mode"],"summary":"Get TGM DEX Trades Data","description":"Access individual DEX trading transactions for a specific token. Shows detailed trade-by-trade data including trader labels, amounts, and prices.","operationId":"get_tgm_dex_trades_api_v1_tgm_dex_trades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMDexTradesRequest"}}},"required":true},"responses":{"200":{"description":"TGM DEX trades data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMDexTradesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Token Transfers

## Get TGM Transfers Data

> Track all token transfer activity including direct transfers, DEX trades, and CEX movements. This endpoint is particularly useful for monitoring exchange flows - both centralized (CEX) and decentralized (DEX) - to identify accumulation or distribution patterns.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMTransfersRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMTransfersChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token address"},"date":{"$ref":"#/components/schemas/DateRangeMaxOneYear","description":"ISO 8601 date-time range object with from and to fields (max 1 year)."},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMTransfersFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMTransfersSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"transfer_value_usd\", \"direction\": \"ASC\"}] - Sort by transfer value ascending\n- [{\"field\": \"transfer_amount\", \"direction\": \"DESC\"}] - Sort by transfer amount descending"}},"additionalProperties":false,"type":"object","required":["chain","token_address","date"],"title":"TGMTransfersRequest","description":"Request model for TGM transfers endpoint.\n\nThis endpoint provides top token transfers for a specific token, with support for ERC-20 tokens. The model selection is dynamic based\non the token address."},"TGMTransfersChain":{"type":"string","enum":["arbitrum","avalanche","base","bitcoin","bnb","ethereum","hyperevm","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TGMTransfersChain","description":"Chains supported for TGM transfers endpoint."},"DateRangeMaxOneYear":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRangeMaxOneYear","description":"Date range model with a maximum duration of 1 year.\n\nInherits all functionality from DateRange but adds validation to ensure\nthe date range does not exceed 366 days (to account for leap years).\n\nThis limit ensures optimal query performance."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMTransfersFilters":{"properties":{"include_dex":{"anyOf":[{"type":"boolean"}],"title":"Include Dex","description":"Whether to include DEX transfers"},"include_cex":{"anyOf":[{"type":"boolean"}],"title":"Include Cex","description":"Whether to include CEX transfers"},"non_exchange_transfers":{"anyOf":[{"type":"boolean"}],"title":"Non Exchange Transfers","description":"Whether to include non-exchange transfers"},"only_smart_money":{"anyOf":[{"type":"boolean"}],"title":"Only Smart Money","description":"Whether to include only smart money transfers"},"from_include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"From Include Smart Money Labels","description":"Include smart money labels for from address"},"from_exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"From Exclude Smart Money Labels","description":"Exclude smart money labels for from address"},"to_include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"To Include Smart Money Labels","description":"Include smart money labels for to address"},"to_exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"To Exclude Smart Money Labels","description":"Exclude smart money labels for to address"},"transaction_hash":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transaction Hash","description":"Transaction hash filter"},"from_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"From Address","description":"From address filter"},"to_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"To Address","description":"To address filter"},"from_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"From Address Label","description":"From address label filter"},"to_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"To Address Label","description":"To address label filter"},"transaction_type":{"anyOf":[{"type":"string"}],"title":"Transaction Type","description":"Transaction type filter"},"transfer_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Transfer amount range filter"},"transfer_value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Transfer value range filter in USD"}},"additionalProperties":false,"type":"object","title":"TGMTransfersFilters","description":"Filters for TGM transfers endpoint.\n\nThese filters control which transfers are included in the analysis."},"LabelType":{"type":"string","enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"title":"LabelType","description":"Filter by entity label type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SortOrder_TGMTransfersSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMTransfersSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMTransfersSortField]"},"TGMTransfersSortField":{"type":"string","enum":["block_timestamp","transaction_hash","from_address","to_address","from_address_label","to_address_label","transaction_type","transfer_amount","transfer_value_usd"],"title":"TGMTransfersSortField","description":"Enum for sortable fields in TGM transfers."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMTransfersResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMTransfer"},"type":"array","title":"Data","description":"List of TGM transfer records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMTransfersResponse","description":"Response model for TGM transfers endpoint.\n\nContains a list of transfer records with pagination and metadata."},"TGMTransfer":{"properties":{"block_timestamp":{"type":"string","title":"Block Timestamp","description":"The block timestamp for the transaction"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"The transaction hash for the transaction"},"from_address":{"type":"string","title":"From Address","description":"from address"},"to_address":{"type":"string","title":"To Address","description":"to address"},"from_address_label":{"anyOf":[{"type":"string"}],"title":"From Address Label","description":"from address label"},"to_address_label":{"anyOf":[{"type":"string"}],"title":"To Address Label","description":"to address label"},"transaction_type":{"anyOf":[{"type":"string"}],"title":"Transaction Type","description":"Transaction type"},"transfer_amount":{"anyOf":[{"type":"number"}],"title":"Transfer Amount","description":"value of the token traded"},"transfer_value_usd":{"anyOf":[{"type":"number"}],"title":"Transfer Value Usd","description":"value of the token traded in USD"}},"type":"object","required":["block_timestamp","transaction_hash","from_address","to_address"],"title":"TGMTransfer","description":"Individual TGM transfer record.\n\nRepresents a single token transfer with transaction details and participant information."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/transfers":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Transfers Data","description":"Track all token transfer activity including direct transfers, DEX trades, and CEX movements. This endpoint is particularly useful for monitoring exchange flows - both centralized (CEX) and decentralized (DEX) - to identify accumulation or distribution patterns.","operationId":"get_tgm_transfers_api_v1_tgm_transfers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMTransfersRequest"}}},"required":true},"responses":{"200":{"description":"TGM transfers data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMTransfersResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Jupiter DCAs

## Get TGM Jupiter DCA Data

> This endpoint provides Jupiter DCA orders with stats per vault for a specific token.\
> Jupiter DCA (Dollar Cost Averaging) is only available on Solana and allows users to automate token purchases over time. Returns comprehensive data about DCA vaults including deposit amounts, redemption status, and trader information.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMJupDcaRequest":{"properties":{"token_address":{"type":"string","title":"Token Address","description":"Token address on Solana"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMJupDcaFilters"}],"description":"Additional filters to apply to the query."}},"additionalProperties":false,"type":"object","required":["token_address"],"title":"TGMJupDcaRequest","description":"Request model for TGM Jupiter DCA endpoint.\n\nThis endpoint provides Jupiter DCA orders with stats per vault for a specific token.\nOnly supports Solana chain as Jupiter DCA is exclusive to Solana."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMJupDcaFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels for traders"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels for traders"},"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Label","description":"Trader label filter"},"creation_hash":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Creation Hash","description":"Creation transaction hash filter"},"dca_vault_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Dca Vault Address","description":"DCA vault address filter"},"input_mint_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Mint Address","description":"Input token mint address filter"},"output_mint_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Output Mint Address","description":"Output token mint address filter"},"deposit_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Deposit amount range filter"},"deposit_spent":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Deposit spent amount range filter"},"other_token_redeemed":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Other token redeemed amount range filter"},"status":{"anyOf":[{"$ref":"#/components/schemas/TGMJupDcaStatus"}],"description":"DCA vault status filter"},"token_input":{"anyOf":[{"type":"string"}],"title":"Token Input","description":"Input token symbol filter"},"token_output":{"anyOf":[{"type":"string"}],"title":"Token Output","description":"Output token symbol filter"},"deposit_usd_value":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Deposit USD value range filter"}},"additionalProperties":false,"type":"object","title":"TGMJupDcaFilters","description":"Filters for TGM Jupiter DCA endpoint.\n\nThese filters control which Jupiter DCA orders are included in the analysis."},"LabelType":{"type":"string","enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"title":"LabelType","description":"Filter by entity label type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"TGMJupDcaStatus":{"type":"string","enum":["Active","Closed"],"title":"TGMJupDcaStatus","description":"Enum for TGM Jupiter DCA status values."},"TGMJupDcaResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMJupDca"},"type":"array","title":"Data","description":"List of TGM Jupiter DCA records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMJupDcaResponse","description":"Response model for TGM Jupiter DCA endpoint.\n\nContains a list of Jupiter DCA records with pagination and metadata."},"TGMJupDca":{"properties":{"since_timestamp":{"anyOf":[{"type":"string"}],"title":"Since Timestamp","description":"The timestamp of the earliest transaction"},"last_timestamp":{"anyOf":[{"type":"string"}],"title":"Last Timestamp","description":"The timestamp of the latest transaction"},"trader_address":{"type":"string","title":"Trader Address","description":"The address of the trader"},"creation_hash":{"anyOf":[{"type":"string"}],"title":"Creation Hash","description":"The transaction hash at the time of creation"},"trader_label":{"anyOf":[{"type":"string"}],"title":"Trader Label","description":"The label of the trader obtained from Nansen's multichain data"},"dca_vault_address":{"anyOf":[{"type":"string"}],"title":"Dca Vault Address","description":"The address of the DCA vault"},"input_mint_address":{"anyOf":[{"type":"string"}],"title":"Input Mint Address","description":"The mint address of the input token"},"output_mint_address":{"anyOf":[{"type":"string"}],"title":"Output Mint Address","description":"The mint address of the output token"},"deposit_amount":{"anyOf":[{"type":"number"}],"title":"Deposit Amount","description":"The amount deposited into the DCA vault"},"deposit_spent":{"anyOf":[{"type":"number"}],"title":"Deposit Spent","description":"The amount spent from the deposit"},"other_token_redeemed":{"anyOf":[{"type":"number"}],"title":"Other Token Redeemed","description":"The amount of other tokens redeemed"},"status":{"anyOf":[{"$ref":"#/components/schemas/TGMJupDcaStatus"}],"description":"The status of the DCA vault"},"token_input":{"anyOf":[{"type":"string"}],"title":"Token Input","description":"The symbol of the input token"},"token_output":{"anyOf":[{"type":"string"}],"title":"Token Output","description":"The symbol of the output token"},"deposit_usd_value":{"anyOf":[{"type":"number"}],"title":"Deposit Usd Value","description":"The USD value of the deposit"}},"type":"object","required":["trader_address"],"title":"TGMJupDca","description":"Individual TGM Jupiter DCA record.\n\nRepresents a single Jupiter DCA order with stats per vault."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/jup-dca":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Jupiter DCA Data","description":"This endpoint provides Jupiter DCA orders with stats per vault for a specific token.\nJupiter DCA (Dollar Cost Averaging) is only available on Solana and allows users to automate token purchases over time. Returns comprehensive data about DCA vaults including deposit amounts, redemption status, and trader information.","operationId":"get_tgm_jup_dca_api_v1_tgm_jup_dca_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMJupDcaRequest"}}},"required":true},"responses":{"200":{"description":"TGM Jupiter DCA data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMJupDcaResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# PnL Leaderboard

{% hint style="warning" %}
**Update:** A `premium_labels` parameter is being added to this endpoint. From April 1, the default changes from `true` to `false` .
{% endhint %}

## Get TGM PnL Leaderboard Data

> Rank traders by their profit/loss performance for a specific token. Shows both realized profits (from completed trades) and unrealized profits (from current holdings), along with ROI percentages and trading patterns. This endpoint can be used to analyze the realized and unrealized profit for each trader who traded the input token.\
> \
> \*\*Label Tier Control (\`premium\_labels\`):\*\*\
> The \`premium\_labels\` parameter is now available to all users. When omitted, it defaults to \`true\` (premium labels). In a future release, the default will change to \`false\`. Pass \`premium\_labels=true\` explicitly to preserve premium label behavior.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMPnlLeaderboardRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMPnLLeaderboardChain","description":"Blockchain chain"},"token_address":{"type":"string","title":"Token Address","description":"Token address"},"date":{"$ref":"#/components/schemas/DateRange","description":"ISO 8601 date-time range object with optional from and to fields"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMPnlLeaderboardFilters"}],"description":"Additional filters to apply to the query."},"premium_labels":{"anyOf":[{"type":"boolean"}],"title":"Premium Labels","description":"Controls label tier in the response. When null/omitted, defaults to true (premium labels filtered by subscription plan). When false, returns free-tier labels for all users. When true, returns premium labels (filtered by subscription plan). Note: In a future release, the default will change from true to false — pass premium_labels=true explicitly to preserve premium label behavior."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMPnlLeaderboardSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering"}},"additionalProperties":false,"type":"object","required":["chain","token_address","date"],"title":"TGMPnlLeaderboardRequest","description":"Request model for TGM PnL leaderboard endpoint.\nThis endpoint provides a token PnL leaderboard showing the most profitable\ntraders for a specific token within a given date range."},"TGMPnLLeaderboardChain":{"type":"string","enum":["arbitrum","avalanche","base","bnb","ethereum","hyperevm","linea","mantle","monad","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic"],"title":"TGMPnLLeaderboardChain","description":"Chains supported for TGM PnL leaderboard endpoint."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMPnlLeaderboardFilters":{"properties":{"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader name filter"},"token_price":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token price range filter"},"pnl_usd_realised":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Realized PnL range filter in USD"},"pnl_usd_unrealised":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Unrealized PnL range filter in USD"},"holding_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Holding amount range filter"},"holding_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Holding value range filter in USD"},"max_balance_held":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Maximum balance held range filter"},"max_balance_held_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Maximum balance held range filter in USD"},"still_holding_balance_ratio":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Still holding balance ratio range filter"},"nof_trades":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Number of trades range filter"}},"additionalProperties":false,"type":"object","title":"TGMPnlLeaderboardFilters","description":"Filters for TGM PnL leaderboard endpoint.\n\nThese filters control which traders are included in the leaderboard."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SortOrder_TGMPnlLeaderboardSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMPnlLeaderboardSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMPnlLeaderboardSortField]"},"TGMPnlLeaderboardSortField":{"type":"string","enum":["pnl_usd_realised","pnl_usd_unrealised","pnl_usd_total","roi_percent_total","roi_percent_realised","roi_percent_unrealised","holding_amount","holding_usd","max_balance_held","max_balance_held_usd","still_holding_balance_ratio","netflow_amount_usd","netflow_amount","nof_trades"],"title":"TGMPnlLeaderboardSortField","description":"Enum for sortable fields in TGM PnL leaderboard."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMPnlLeaderboardResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMPnlLeaderboard"},"type":"array","title":"Data","description":"List of TGM PnL leaderboard records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMPnlLeaderboardResponse","description":"Response model for TGM PnL leaderboard endpoint.\nContains a list of PnL leaderboard records with pagination and metadata."},"TGMPnlLeaderboard":{"properties":{"trader_address":{"type":"string","title":"Trader Address","description":"Hexadecimal representation of the trader's address."},"trader_address_label":{"anyOf":[{"type":"string"}],"title":"Trader Address Label","description":"Nansen name of the trader"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Token price in USD at date_to. Uses latest spot price if date_to is today or later, otherwise the daily median price for that date."},"pnl_usd_realised":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Realised","description":"Realised profit and loss in USD."},"pnl_usd_unrealised":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Unrealised","description":"Unrealised profit and loss in USD."},"holding_amount":{"anyOf":[{"type":"number"}],"title":"Holding Amount","description":"Current token balance"},"holding_usd":{"anyOf":[{"type":"number"}],"title":"Holding Usd","description":"USD value of token balance"},"max_balance_held":{"anyOf":[{"type":"number"}],"title":"Max Balance Held","description":"Maximum amount of tokens held at some point in time."},"max_balance_held_usd":{"anyOf":[{"type":"number"}],"title":"Max Balance Held Usd","description":"Maximum amount of tokens in current USD value, held at some point in time."},"still_holding_balance_ratio":{"anyOf":[{"type":"number"}],"title":"Still Holding Balance Ratio","description":"The ratio of current holdings to max balance held."},"netflow_amount_usd":{"anyOf":[{"type":"number"}],"title":"Netflow Amount Usd","description":"Netflow amount in USD."},"netflow_amount":{"anyOf":[{"type":"number"}],"title":"Netflow Amount","description":"Netflow amount."},"roi_percent_total":{"anyOf":[{"type":"number"}],"title":"Roi Percent Total","description":"Total ROI."},"roi_percent_realised":{"anyOf":[{"type":"number"}],"title":"Roi Percent Realised","description":"Realised ROI."},"roi_percent_unrealised":{"anyOf":[{"type":"number"}],"title":"Roi Percent Unrealised","description":"Unrealised ROI."},"pnl_usd_total":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Total","description":"Total PNL in USD."},"nof_trades":{"anyOf":[{"type":"integer"}],"title":"Nof Trades","description":"Number of trades."}},"type":"object","required":["trader_address"],"title":"TGMPnlLeaderboard","description":"Individual TGM PnL leaderboard record.\nRepresents a single trader's PnL performance for a specific token."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/pnl-leaderboard":{"post":{"tags":["Token God Mode"],"summary":"Get TGM PnL Leaderboard Data","description":"Rank traders by their profit/loss performance for a specific token. Shows both realized profits (from completed trades) and unrealized profits (from current holdings), along with ROI percentages and trading patterns. This endpoint can be used to analyze the realized and unrealized profit for each trader who traded the input token.\n\n**Label Tier Control (`premium_labels`):**\nThe `premium_labels` parameter is now available to all users. When omitted, it defaults to `true` (premium labels). In a future release, the default will change to `false`. Pass `premium_labels=true` explicitly to preserve premium label behavior.","operationId":"get_tgm_pnl_leaderboard_api_v1_tgm_pnl_leaderboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPnlLeaderboardRequest"}}},"required":true},"responses":{"200":{"description":"TGM PnL leaderboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPnlLeaderboardResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Perp Screener

## Get Perpetual Contract Screening Data

> Discover and screen perpetual contracts on Hyperliquid with advanced filtering capabilities. This endpoint helps identify trending perpetual contracts, trading activity, funding rates, and smart money movements by combining metrics like volume, open interest, funding rates, and position data.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Which perpetual contracts are experiencing significant trading volume and activity?\*\*\
> 2\. \*\*How do funding rates correlate with trading patterns and smart money positions?\*\*\
> 3\. \*\*What perpetual contracts show strong fundamentals in terms of open interest and trading patterns?\*\*\
> 4\. \*\*Which perpetual contracts are attracting smart money participation with long/short positions?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PerpScreenerRequest":{"properties":{"date":{"$ref":"#/components/schemas/DateRange","description":"Date range for the perp screener"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/PerpScreenerFilters"}],"description":"Additional filters to apply"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_Union_PerpScreenerSortFieldDefault__PerpScreenerSortFieldSmartMoney__"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"volume\", \"direction\": \"DESC\"}] - Sort by volume descending\n- [{\"field\": \"net_positionz_change\", \"direction\": \"DESC\"}] - Sort by net_position_change descending\n- [{\"field\": \"buy_sell_pressure\", \"direction\": \"DESC\"}] - Sort by buy/sell pressure descending (smart money)\n\nDefault behavior:\n- When only_smart_money is False: sorts by buy_sell_pressure DESC\n- When only_smart_money is True: sorts by net_position_change DESC"}},"additionalProperties":false,"type":"object","required":["date"],"title":"PerpScreenerRequest","description":"Request model for Perp Screener endpoint."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"PerpScreenerFilters":{"properties":{"only_smart_money":{"anyOf":[{"type":"boolean"}],"title":"Only Smart Money","description":"Whether to only include smart money data","default":false},"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Asset symbol filter (e.g., BTC, ETH)"},"volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total traded notional in USD range filter"},"buy_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total USD value of market buy trades range filter"},"sell_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total USD value of market sell trades range filter"},"buy_sell_pressure":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Net USD flow range filter"},"trader_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of unique traders range filter"},"mark_price":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Latest mark price range filter"},"funding":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Latest funding rate range filter"},"previous_price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"First price in the time window range filter"},"open_interest":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Latest open interest range filter"},"smart_money_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total traded notional in USD by Smart Money range filter"},"smart_money_buy_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total USD value of Smart Money market buy trades range filter"},"smart_money_sell_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total USD value of Smart Money market sell trades range filter"},"net_position_change":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Net USD flow (buy_market_vol - sell_market_vol) range filter"},"current_smart_money_position_longs_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Aggregate USD value of Smart Money long positions range filter"},"current_smart_money_position_shorts_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Aggregate USD value of Smart Money short positions range filter"},"smart_money_longs_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of Smart Money accounts with net long position range filter"},"smart_money_shorts_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of Smart Money accounts with net short position range filter"}},"additionalProperties":false,"type":"object","title":"PerpScreenerFilters","description":"Filters for perp screener endpoints.\n\nThese filters control which perpetual contracts are included in the screening\nresults based on various criteria."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"SortOrder_Union_PerpScreenerSortFieldDefault__PerpScreenerSortFieldSmartMoney__":{"properties":{"field":{"anyOf":[{"$ref":"#/components/schemas/PerpScreenerSortFieldDefault"},{"$ref":"#/components/schemas/PerpScreenerSortFieldSmartMoney"}],"title":"Field","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[Union[PerpScreenerSortFieldDefault, PerpScreenerSortFieldSmartMoney]]"},"PerpScreenerSortFieldDefault":{"type":"string","enum":["token_symbol","volume","buy_volume","sell_volume","buy_sell_pressure","trader_count","mark_price","funding","previous_price_usd","open_interest"],"title":"PerpScreenerSortFieldDefault","description":"Sort fields available for default perp screener data (only_smart_money=False)."},"PerpScreenerSortFieldSmartMoney":{"type":"string","enum":["token_symbol","smart_money_volume","smart_money_buy_volume","smart_money_sell_volume","net_position_change","trader_count","mark_price","funding","previous_price_usd","open_interest","current_smart_money_position_longs_usd","current_smart_money_position_shorts_usd","smart_money_longs_count","smart_money_shorts_count"],"title":"PerpScreenerSortFieldSmartMoney","description":"Sort fields available for smart money perp screener data (only_smart_money=True)."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PerpScreenerResponse":{"properties":{"data":{"items":{"anyOf":[{"$ref":"#/components/schemas/PerpScreenerDataDefault"},{"$ref":"#/components/schemas/PerpScreenerDataSmartMoney"}]},"type":"array","title":"Data","description":"List of perp screening results"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"PerpScreenerResponse","description":"Response model for perp screener endpoint."},"PerpScreenerDataDefault":{"properties":{"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Total traded notional in USD over the recent window."},"buy_volume":{"anyOf":[{"type":"number"}],"title":"Buy Volume","description":"Total USD value of market buy trades over the recent window."},"sell_volume":{"anyOf":[{"type":"number"}],"title":"Sell Volume","description":"Total USD value of market sell trades over the recent window."},"buy_sell_pressure":{"anyOf":[{"type":"number"}],"title":"Buy Sell Pressure","description":"Changes in position by Market Orders. Buys and sells through market orders (top of orderbook) indicate a rush into adjusting the position."},"trader_count":{"anyOf":[{"type":"integer"}],"title":"Trader Count","description":"Number of unique traders active over the recent window."},"token_symbol":{"type":"string","title":"Token Symbol","description":"Asset symbol (e.g., BTC, ETH) on Hyperliquid."},"mark_price":{"anyOf":[{"type":"number"}],"title":"Mark Price","description":"Latest mark price for the coin."},"funding":{"anyOf":[{"type":"number"}],"title":"Funding","description":"Latest funding rate/value for the coin."},"open_interest":{"anyOf":[{"type":"number"}],"title":"Open Interest","description":"Latest open interest for the coin."},"previous_price_usd":{"anyOf":[{"type":"number"}],"title":"Previous Price Usd","description":"First price in the time window."}},"type":"object","required":["token_symbol"],"title":"PerpScreenerDataDefault","description":"Data model for perp screener results when only_smart_money is False."},"PerpScreenerDataSmartMoney":{"properties":{"smart_money_volume":{"anyOf":[{"type":"number"}],"title":"Smart Money Volume","description":"Total traded notional in USD by Smart Money over the window."},"smart_money_buy_volume":{"anyOf":[{"type":"number"}],"title":"Smart Money Buy Volume","description":"Total USD value of Smart Money market buy trades over the window."},"smart_money_sell_volume":{"anyOf":[{"type":"number"}],"title":"Smart Money Sell Volume","description":"Total USD value of Smart Money market sell trades over the window."},"net_position_change":{"anyOf":[{"type":"number"}],"title":"Net Position Change","description":"Net USD flow (buy_market_vol - sell_market_vol) over the window."},"trader_count":{"anyOf":[{"type":"integer"}],"title":"Trader Count","description":"Number of unique Smart Money traders active over the window."},"token_symbol":{"type":"string","title":"Token Symbol","description":"Asset symbol (e.g., BTC, ETH) on Hyperliquid."},"mark_price":{"anyOf":[{"type":"number"}],"title":"Mark Price","description":"Latest mark price for the coin."},"funding":{"anyOf":[{"type":"number"}],"title":"Funding","description":"Latest funding rate/value for the coin."},"previous_price_usd":{"anyOf":[{"type":"number"}],"title":"Previous Price Usd","description":"First observed price within the time window."},"open_interest":{"anyOf":[{"type":"number"}],"title":"Open Interest","description":"Latest open interest in USD (open_interest × mark_price)."},"current_smart_money_position_longs_usd":{"anyOf":[{"type":"number"}],"title":"Current Smart Money Position Longs Usd","description":"Aggregate USD value of Smart Money long positions for the coin."},"current_smart_money_position_shorts_usd":{"anyOf":[{"type":"number"}],"title":"Current Smart Money Position Shorts Usd","description":"Aggregate USD value of Smart Money short positions for the coin (negative)."},"smart_money_longs_count":{"anyOf":[{"type":"integer"}],"title":"Smart Money Longs Count","description":"Number of Smart Money accounts with a net long position."},"smart_money_shorts_count":{"anyOf":[{"type":"integer"}],"title":"Smart Money Shorts Count","description":"Number of Smart Money accounts with a net short position."}},"type":"object","required":["token_symbol"],"title":"PerpScreenerDataSmartMoney","description":"Data model for perp screener results when only_smart_money is True."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/perp-screener":{"post":{"tags":["Token Screener"],"summary":"Get Perpetual Contract Screening Data","description":"Discover and screen perpetual contracts on Hyperliquid with advanced filtering capabilities. This endpoint helps identify trending perpetual contracts, trading activity, funding rates, and smart money movements by combining metrics like volume, open interest, funding rates, and position data.\n\n**What it helps to answer:**\n\n1. **Which perpetual contracts are experiencing significant trading volume and activity?**\n2. **How do funding rates correlate with trading patterns and smart money positions?**\n3. **What perpetual contracts show strong fundamentals in terms of open interest and trading patterns?**\n4. **Which perpetual contracts are attracting smart money participation with long/short positions?**","operationId":"get_perp_screener_api_v1_perp_screener_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpScreenerRequest"}}},"required":true},"responses":{"200":{"description":"Perpetual contract screening data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpScreenerResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Perp PnL Leaderboard

{% hint style="warning" %}
**Update:** A `premium_labels` parameter is being added to this endpoint. From April 1, the default changes from `true` to `false` .
{% endhint %}

## Get TGM Perp PnL Leaderboard Data

> Rank traders by their profit/loss performance for a specific perpetual contract on Hyperliquid. Shows both realized profits (from completed trades) and unrealized profits (from current holdings), along with ROI percentages and trading patterns. This endpoint can be used to analyze the realized and unrealized profit for each trader who traded the input perpetual contract.\
> \
> \*\*Key Features:\*\*\
> \- Hyperliquid perpetual contracts only (no chain field needed)\
> \- Realized and unrealized PnL tracking\
> \- ROI calculations and trading patterns\
> \- Position size and balance tracking\
> \
> \*\*Request Format:\*\*\
> \- \`token\_symbol\`: Perpetual contract symbol (e.g., "BTC", "ETH", "SOL")\
> \- \`date\`: Date range for analysis\
> \- \`filters\`: Optional filters for trader addresses, PnL ranges, etc.\
> \- \`pagination\`: Page and per\_page parameters\
> \
> \*\*Label Tier Control (\`premium\_labels\`):\*\*\
> The \`premium\_labels\` parameter is now available to all users. When omitted, it defaults to \`true\` (premium labels). In a future release, the default will change to \`false\`. Pass \`premium\_labels=true\` explicitly to preserve premium label behavior.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMPerpPnlLeaderboardRequest":{"properties":{"token_symbol":{"type":"string","title":"Token Symbol","description":"Perpetual contract symbol (e.g., BTC, ETH, SOL)"},"date":{"$ref":"#/components/schemas/DateRange","description":"ISO 8601 date-time range object with optional from and to fields"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMPerpPnlLeaderboardFilters"}],"description":"Additional filters to apply to the query."},"premium_labels":{"anyOf":[{"type":"boolean"}],"title":"Premium Labels","description":"Controls label tier in the response. When null/omitted (default), returns labels as per subscription plan (existing behavior). When false, returns free-tier labels for all users. When true, returns premium labels. Note: In a future release, the default will change from true to false — pass premium_labels=true explicitly to preserve premium label behavior."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMPerpPnlLeaderboardSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering"}},"type":"object","required":["token_symbol","date"],"title":"TGMPerpPnlLeaderboardRequest","description":"Request model for TGM Perp PnL leaderboard endpoint.\nSimplified version that only supports Hyperliquid perpetual contracts."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMPerpPnlLeaderboardFilters":{"properties":{"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader name filter"},"token_price":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token price range filter"},"pnl_usd_realised":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Realized PnL range filter in USD"},"pnl_usd_unrealised":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Unrealized PnL range filter in USD"},"holding_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Holding amount range filter"},"position_value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Position value range filter in USD (+ve = Long position, -ve = Short position, 0 = Flat)"},"max_balance_held":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Maximum balance held range filter"},"max_balance_held_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Maximum balance held range filter in USD"},"still_holding_balance_ratio":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Still holding balance ratio range filter"},"nof_trades":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Number of trades range filter"},"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels"}},"additionalProperties":false,"type":"object","title":"TGMPerpPnlLeaderboardFilters","description":"Filters for TGM Perp PnL leaderboard endpoint.\n\nThese filters control which traders are included in the leaderboard."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"SortOrder_TGMPerpPnlLeaderboardSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMPerpPnlLeaderboardSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMPerpPnlLeaderboardSortField]"},"TGMPerpPnlLeaderboardSortField":{"type":"string","enum":["pnl_usd_realised","pnl_usd_unrealised","pnl_usd_total","roi_percent_total","roi_percent_realised","roi_percent_unrealised","holding_amount","position_value_usd","max_balance_held","max_balance_held_usd","still_holding_balance_ratio","netflow_amount_usd","netflow_amount","nof_trades"],"title":"TGMPerpPnlLeaderboardSortField","description":"Enum for sortable fields in TGM Perp PnL leaderboard."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMPerpPnlLeaderboardResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMPerpPnlLeaderboard"},"type":"array","title":"Data","description":"List of TGM Perp PnL leaderboard records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMPerpPnlLeaderboardResponse","description":"Response model for TGM Perp PnL leaderboard endpoint.\nContains a list of PnL leaderboard records with pagination and metadata."},"TGMPerpPnlLeaderboard":{"properties":{"trader_address":{"type":"string","title":"Trader Address","description":"Hexadecimal representation of the trader's address."},"trader_address_label":{"anyOf":[{"type":"string"}],"title":"Trader Address Label","description":"Nansen name of the trader"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Token price in USD at date_to. Uses latest spot price if date_to is today or later, otherwise the daily median price for that date."},"pnl_usd_realised":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Realised","description":"Realised profit and loss in USD."},"pnl_usd_unrealised":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Unrealised","description":"Unrealised profit and loss in USD."},"holding_amount":{"anyOf":[{"type":"number"}],"title":"Holding Amount","description":"Current token balance"},"position_value_usd":{"anyOf":[{"type":"number"}],"title":"Position Value Usd","description":"Position value in USD (+ve = Long position, -ve = Short position, 0 = Flat)"},"max_balance_held":{"anyOf":[{"type":"number"}],"title":"Max Balance Held","description":"Maximum amount of tokens held at some point in time."},"max_balance_held_usd":{"anyOf":[{"type":"number"}],"title":"Max Balance Held Usd","description":"Maximum amount of tokens in current USD value, held at some point in time."},"still_holding_balance_ratio":{"anyOf":[{"type":"number"}],"title":"Still Holding Balance Ratio","description":"The ratio of current holdings to max balance held."},"netflow_amount_usd":{"anyOf":[{"type":"number"}],"title":"Netflow Amount Usd","description":"Netflow amount in USD."},"netflow_amount":{"anyOf":[{"type":"number"}],"title":"Netflow Amount","description":"Netflow amount."},"roi_percent_total":{"anyOf":[{"type":"number"}],"title":"Roi Percent Total","description":"Total ROI."},"roi_percent_realised":{"anyOf":[{"type":"number"}],"title":"Roi Percent Realised","description":"Realised ROI."},"roi_percent_unrealised":{"anyOf":[{"type":"number"}],"title":"Roi Percent Unrealised","description":"Unrealised ROI."},"pnl_usd_total":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Total","description":"Total PNL in USD."},"nof_trades":{"anyOf":[{"type":"integer"}],"title":"Nof Trades","description":"Number of trades."}},"type":"object","required":["trader_address"],"title":"TGMPerpPnlLeaderboard","description":"Individual TGM Perp PnL leaderboard record.\nRepresents a single trader's PnL performance for a specific perpetual contract."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/perp-pnl-leaderboard":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Perp PnL Leaderboard Data","description":"Rank traders by their profit/loss performance for a specific perpetual contract on Hyperliquid. Shows both realized profits (from completed trades) and unrealized profits (from current holdings), along with ROI percentages and trading patterns. This endpoint can be used to analyze the realized and unrealized profit for each trader who traded the input perpetual contract.\n\n**Key Features:**\n- Hyperliquid perpetual contracts only (no chain field needed)\n- Realized and unrealized PnL tracking\n- ROI calculations and trading patterns\n- Position size and balance tracking\n\n**Request Format:**\n- `token_symbol`: Perpetual contract symbol (e.g., \"BTC\", \"ETH\", \"SOL\")\n- `date`: Date range for analysis\n- `filters`: Optional filters for trader addresses, PnL ranges, etc.\n- `pagination`: Page and per_page parameters\n\n**Label Tier Control (`premium_labels`):**\nThe `premium_labels` parameter is now available to all users. When omitted, it defaults to `true` (premium labels). In a future release, the default will change to `false`. Pass `premium_labels=true` explicitly to preserve premium label behavior.","operationId":"get_tgm_perp_pnl_leaderboard_api_v1_tgm_perp_pnl_leaderboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpPnlLeaderboardRequest"}}},"required":true},"responses":{"200":{"description":"TGM Perp PnL leaderboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpPnlLeaderboardResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Perp Positions

{% hint style="warning" %}
**Update:** A `premium_labels` parameter is being added to this endpoint. From April 1, the default changes from `true` to `false` .
{% endhint %}

## Get TGM Perp Positions Data

> Retrieve current perpetual positions for a specific token on Hyperliquid. Shows active positions with detailed metrics including entry price, mark price, leverage, PnL, and liquidation price.\
> \
> \*\*Key Features:\*\*\
> \- Hyperliquid perpetual contracts only (no chain field needed)\
> \- Real-time position tracking with live PnL calculations\
> \- Leverage and margin information\
> \- Smart money filtering capabilities\
> \- Support for both Long and Short positions\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the current perp positions for a specific token?\*\*\
> 2\. \*\*Which addresses have the largest positions by value?\*\*\
> 3\. \*\*What are the unrealized gains/losses on current positions?\*\*\
> 4\. \*\*What leverage levels are traders using?\*\*\
> 5\. \*\*Which smart money wallets are holding positions?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMPerpPositionsRequest":{"properties":{"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"label_type":{"$ref":"#/components/schemas/TGMPerpPositionsLabel","description":"Label type filter","default":"all_traders"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMPerpPositionsFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMPerpPositionsSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"position_value_usd\", \"direction\": \"DESC\"}] - Sort by position value USD descending\n- [{\"field\": \"upnl_usd\", \"direction\": \"ASC\"}] - Sort by unrealized PnL ascending\n- [{\"field\": \"leverage\", \"direction\": \"DESC\"}] - Sort by leverage descending"}},"additionalProperties":false,"type":"object","required":["token_symbol"],"title":"TGMPerpPositionsRequest","description":"Request model for TGM perp positions endpoint.\n\nThis endpoint provides perp positions data for a specific token."},"TGMPerpPositionsLabel":{"type":"string","enum":["smart_money","all_traders","whale","public_figure"],"title":"TGMPerpPositionsLabel","description":"TGM perp positions label types."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMPerpPositionsFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels for traders"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels for traders"},"address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Address","description":"Trader address filter"},"address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Address Label","description":"Trader label filter"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"},{"items":{"$ref":"#/components/schemas/PositionSide"},"type":"array"},{"type":"null"}],"title":"Side","description":"Position side filter (Long or Short)"},"position_value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Position value range filter in USD"},"position_size":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Position size range filter (token amount)"},"entry_price":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Entry price range filter"},"upnl_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Unrealized PnL range filter in USD"},"funding_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Funding range filter in USD"}},"additionalProperties":false,"type":"object","title":"TGMPerpPositionsFilters","description":"Filters for TGM perp positions endpoint.\n\nThese filters control which perp positions are included in the analysis."},"LabelType":{"type":"string","enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"title":"LabelType","description":"Filter by entity label type."},"PositionSide":{"type":"string","enum":["Long","Short"],"title":"PositionSide","description":"Shared enum for position side direction."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SortOrder_TGMPerpPositionsSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMPerpPositionsSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMPerpPositionsSortField]"},"TGMPerpPositionsSortField":{"type":"string","enum":["address","address_label","side","position_value_usd","position_size","leverage","entry_price","mark_price","liquidation_price","funding_usd","upnl_usd"],"title":"TGMPerpPositionsSortField","description":"Enum for sortable fields in TGM perp positions."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMPerpPositionsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMPerpPosition"},"type":"array","title":"Data","description":"List of TGM perp position records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMPerpPositionsResponse","description":"Response model for TGM perp positions endpoint.\n\nContains a list of perp position records with pagination and metadata."},"TGMPerpPosition":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"The wallet address of the trader."},"address_label":{"anyOf":[{"type":"string"}],"title":"Address Label","description":"Wallet or labeled entity holding the position."},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"}],"description":"Position direction (Long/Short)"},"position_value_usd":{"anyOf":[{"type":"number"}],"title":"Position Value Usd","description":"USD notional size of the position."},"position_size":{"anyOf":[{"type":"number"}],"title":"Position Size","description":"The position size (token amount)."},"leverage":{"type":"string","title":"Leverage","description":"The leverage applied to the position."},"leverage_type":{"anyOf":[{"type":"string"}],"title":"Leverage Type","description":"The type of leverage used, e.g., cross or isolated."},"entry_price":{"anyOf":[{"type":"number"}],"title":"Entry Price","description":"Average price where the position was opened."},"mark_price":{"anyOf":[{"type":"number"}],"title":"Mark Price","description":"The current mark price of the asset."},"liquidation_price":{"anyOf":[{"type":"number"}],"title":"Liquidation Price","description":"The price at which the position would be liquidated."},"funding_usd":{"anyOf":[{"type":"number"}],"title":"Funding Usd","description":"Net funding paid (-) or received (+) since entry."},"upnl_usd":{"anyOf":[{"type":"number"}],"title":"Upnl Usd","description":"Unrealized profit/loss including funding."}},"type":"object","required":["leverage"],"title":"TGMPerpPosition","description":"Individual TGM perp position record.\n\nRepresents a single perp position."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/perp-positions":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Perp Positions Data","description":"Retrieve current perpetual positions for a specific token on Hyperliquid. Shows active positions with detailed metrics including entry price, mark price, leverage, PnL, and liquidation price.\n\n**Key Features:**\n- Hyperliquid perpetual contracts only (no chain field needed)\n- Real-time position tracking with live PnL calculations\n- Leverage and margin information\n- Smart money filtering capabilities\n- Support for both Long and Short positions\n\n**What it helps to answer:**\n\n1. **What are the current perp positions for a specific token?**\n2. **Which addresses have the largest positions by value?**\n3. **What are the unrealized gains/losses on current positions?**\n4. **What leverage levels are traders using?**\n5. **Which smart money wallets are holding positions?**","operationId":"get_tgm_perp_positions_api_v1_tgm_perp_positions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpPositionsRequest"}}},"required":true},"responses":{"200":{"description":"TGM perp positions data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpPositionsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Perp Trades

## Get TGM Perp Trades Data

> Retrieve perpetual trade data for a specific token on Hyperliquid. Shows individual trades with detailed information including trader address, trade side (Long/Short), action type (Add/Reduce/Open/Close), order type (Market/Limit), and trade metrics.\
> \
> \*\*Key Features:\*\*\
> \- Hyperliquid perpetual contracts only\
> \- Smart money filtering capabilities\
> \- Detailed trade breakdown with parsed action fields\
> \- Support for both Long and Short position trading\
> \- Market and Limit order types\
> \
> \*\*Request Parameters:\*\*\
> \- \`token\_symbol\`: Token symbol to fetch trades for (e.g., "BTC", "ETH")\
> \- \`date\`: Date range for the trades\
> \- \`filters\`: Additional filters for side, action, order\_type, etc.\
> \- \`pagination\`: Page and per\_page parameters

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMPerpTradesRequest":{"properties":{"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"date":{"$ref":"#/components/schemas/DateRange","description":"ISO 8601 date-time range object with optional from and to fields"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMPerpTradesFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMPerpTradesSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"block_timestamp\", \"direction\": \"DESC\"}] - Sort by timestamp descending\n- [{\"field\": \"value_usd\", \"direction\": \"DESC\"}] - Sort by trade value descending\n\nDefault: block_timestamp DESC, transaction_hash ASC, trader_address ASC (ensures stable pagination and prevents duplicate rows)"}},"additionalProperties":false,"type":"object","required":["token_symbol","date"],"title":"TGMPerpTradesRequest","description":"Request model for TGM perp trades endpoint.\n\nThis endpoint provides perp trades data for a specific token."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMPerpTradesFilters":{"properties":{"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader label filter"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"},{"items":{"$ref":"#/components/schemas/PositionSide"},"type":"array"},{"type":"null"}],"title":"Side","description":"Position side filter (Long or Short)"},"action":{"anyOf":[{"$ref":"#/components/schemas/PerpActionType"},{"items":{"$ref":"#/components/schemas/PerpActionType"},"type":"array"},{"type":"null"}],"title":"Action","description":"Action filter with combined buy/sell direction (e.g., 'Buy - Add Long', 'Sell - Reduce Long')"},"order_type":{"anyOf":[{"$ref":"#/components/schemas/OrderType"},{"items":{"$ref":"#/components/schemas/OrderType"},"type":"array"},{"type":"null"}],"title":"Order Type","description":"Order type filter (MARKET or LIMIT)"},"token_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token amount range filter"},"price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Price range filter in USD"},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Trade value range filter in USD"},"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels"}},"additionalProperties":false,"type":"object","title":"TGMPerpTradesFilters","description":"Filters for TGM perp trades endpoint.\n\nThese filters control which perp trades are included in the results."},"PositionSide":{"type":"string","enum":["Long","Short"],"title":"PositionSide","description":"Shared enum for position side direction."},"PerpActionType":{"type":"string","enum":["Buy - Add Long","Buy - Reduce Short","Buy - Open Long","Buy - Close Short","Sell - Add Short","Sell - Reduce Long","Sell - Open Short","Sell - Close Long"],"title":"PerpActionType","description":"Shared enum for perpetual trade action types (combined buy/sell with position actions)."},"OrderType":{"type":"string","enum":["MARKET","LIMIT"],"title":"OrderType","description":"Order type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"SortOrder_TGMPerpTradesSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMPerpTradesSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMPerpTradesSortField]"},"TGMPerpTradesSortField":{"type":"string","enum":["block_timestamp","token_amount","value_usd","transaction_hash","trader_address"],"title":"TGMPerpTradesSortField","description":"Enum for sortable fields in TGM perp trades."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMPerpTradesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMPerpTrade"},"type":"array","title":"Data","description":"List of TGM perp trade records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMPerpTradesResponse","description":"Response model for TGM perp trades endpoint.\n\nContains a list of perp trade records with pagination and metadata."},"TGMPerpTrade":{"properties":{"trader_address_label":{"anyOf":[{"type":"string"}],"title":"Trader Address Label","description":"The label associated with the trader"},"trader_address":{"type":"string","title":"Trader Address","description":"The trader's address"},"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"The symbol of the token"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"}],"description":"The side of the position (Long or Short)"},"action":{"type":"string","title":"Action","description":"The action taken by the trader (Add, Reduce, Open, Close)"},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","description":"The amount of the specified token traded"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Average fill price in USD across all fills in the trade, from exchange data."},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"The value in USD"},"type":{"$ref":"#/components/schemas/OrderType","description":"The order type (MARKET or LIMIT)"},"block_timestamp":{"type":"string","title":"Block Timestamp","description":"The block timestamp for the transaction"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"A representative transaction hash for this trade. Note: A single row may aggregate multiple fills that occurred at the same timestamp. If the trader had fills across multiple transactions at the exact same millisecond, only one transaction_hash is shown. The token_amount and value_usd reflect the total across all fills."}},"type":"object","required":["trader_address","action","type","block_timestamp","transaction_hash"],"title":"TGMPerpTrade","description":"Individual TGM perp trade record.\n\nRepresents a single perp trade with parsed action fields."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/perp-trades":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Perp Trades Data","description":"Retrieve perpetual trade data for a specific token on Hyperliquid. Shows individual trades with detailed information including trader address, trade side (Long/Short), action type (Add/Reduce/Open/Close), order type (Market/Limit), and trade metrics.\n\n**Key Features:**\n- Hyperliquid perpetual contracts only\n- Smart money filtering capabilities\n- Detailed trade breakdown with parsed action fields\n- Support for both Long and Short position trading\n- Market and Limit order types\n\n**Request Parameters:**\n- `token_symbol`: Token symbol to fetch trades for (e.g., \"BTC\", \"ETH\")\n- `date`: Date range for the trades\n- `filters`: Additional filters for side, action, order_type, etc.\n- `pagination`: Page and per_page parameters","operationId":"get_tgm_perp_trades_api_v1_tgm_perp_trades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpTradesRequest"}}},"required":true},"responses":{"200":{"description":"TGM perp trades data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpTradesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Portfolio

DeFi Holdings API tracks active positions across DeFi protocols.

## Get Portfolio DeFi Holdings Data

> Get simplified DeFi holdings for a wallet address with aggregated tokens\
> &#x20;       and protocol summaries in a user-friendly format.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PortfolioDefiHoldingsRequest":{"properties":{"wallet_address":{"type":"string","title":"Wallet Address","description":"Wallet address to get DeFi holdings for"}},"type":"object","required":["wallet_address"],"title":"PortfolioDefiHoldingsRequest","description":"Request model for portfolio DeFi holdings endpoint."},"PortfolioDefiHoldingsResponse":{"properties":{"summary":{"$ref":"#/components/schemas/HoldingsSummary","description":"Overall portfolio summary"},"protocols":{"items":{"$ref":"#/components/schemas/ProtocolHolding"},"type":"array","title":"Protocols","description":"Protocol-specific holdings with token breakdown"}},"type":"object","required":["summary","protocols"],"title":"PortfolioDefiHoldingsResponse","description":"Response model for portfolio DeFi holdings endpoint."},"HoldingsSummary":{"properties":{"total_value_usd":{"type":"number","title":"Total Value Usd","description":"Total USD value of all holdings"},"total_assets_usd":{"type":"number","title":"Total Assets Usd","description":"Total USD value of all assets"},"total_debts_usd":{"type":"number","title":"Total Debts Usd","description":"Total USD value of all debts"},"total_rewards_usd":{"type":"number","title":"Total Rewards Usd","description":"Total USD value of all rewards"},"token_count":{"type":"integer","title":"Token Count","description":"Total number of unique tokens"},"protocol_count":{"type":"integer","title":"Protocol Count","description":"Total number of protocols"}},"type":"object","required":["total_value_usd","total_assets_usd","total_debts_usd","total_rewards_usd","token_count","protocol_count"],"title":"HoldingsSummary","description":"Summary statistics for DeFi holdings."},"ProtocolHolding":{"properties":{"protocol_name":{"type":"string","title":"Protocol Name","description":"User-friendly protocol name"},"chain":{"type":"string","title":"Chain","description":"Blockchain network"},"total_value_usd":{"type":"number","title":"Total Value Usd","description":"Total USD value in this protocol"},"total_assets_usd":{"type":"number","title":"Total Assets Usd","description":"Total USD value of assets in this protocol"},"total_debts_usd":{"type":"number","title":"Total Debts Usd","description":"Total USD value of debts in this protocol"},"total_rewards_usd":{"type":"number","title":"Total Rewards Usd","description":"Total USD value of rewards in this protocol"},"tokens":{"items":{"$ref":"#/components/schemas/ProtocolToken"},"type":"array","title":"Tokens","description":"Token holdings in this protocol"}},"type":"object","required":["protocol_name","chain","total_value_usd","total_assets_usd","total_debts_usd","total_rewards_usd","tokens"],"title":"ProtocolHolding","description":"Holdings summary for a specific protocol."},"ProtocolToken":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Token contract address (null for native tokens)"},"symbol":{"anyOf":[{"type":"string"}],"title":"Symbol","description":"Token symbol"},"amount":{"anyOf":[{"type":"number"}],"title":"Amount","description":"Token amount"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"USD value"},"position_type":{"type":"string","title":"Position Type","description":"Position type: deposit, stake, borrow, or mixed"}},"type":"object","required":["symbol","amount","value_usd","position_type"],"title":"ProtocolToken","description":"Individual token holding within a protocol."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/portfolio/defi-holdings":{"post":{"tags":["Portfolio"],"summary":"Get Portfolio DeFi Holdings Data","description":"Get simplified DeFi holdings for a wallet address with aggregated tokens\n        and protocol summaries in a user-friendly format.","operationId":"portfolio_defi_holdings_v1_api_v1_portfolio_defi_holdings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioDefiHoldingsRequest"}}},"required":true},"responses":{"200":{"description":"Portfolio DeFi holdings data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioDefiHoldingsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```

### Output Field Meanings

#### Top-Level Fields

| Field                | Description                                                                 |
| -------------------- | --------------------------------------------------------------------------- |
| `protocolsUsed`      | Array of protocol names the wallet actively uses (e.g., "aave-v3-ethereum") |
| `holdingsByProtocol` | Detailed breakdown of positions per protocol                                |
| `success`            | Boolean indicating API call success                                         |
| `totalProtocols`     | Count of protocols with detected activity                                   |

#### Position Types within `holdingsByProtocol`

| Type                  | Description                                                                                  |
| --------------------- | -------------------------------------------------------------------------------------------- |
| `deposits`/`lendings` | Assets supplied to lending protocols (Aave, Compound), including amounts, value, and rewards |
| `borrows`             | Borrowed assets with debt ratios and health factors                                          |
| `stakings`            | Tokens staked for rewards (liquid staking, governance tokens)                                |
| `positions`           | Complex positions like LP tokens, derivatives, or structured products                        |
| `locked`              | Time-locked or vested tokens (e.g., vote-escrowed tokens)                                    |
| `rewards`             | Claimable but unclaimed protocol rewards                                                     |
| `farms`               | Yield farming positions with staked LP tokens                                                |

#### Position Detail Structure

| Field     | Description                                                                       |
| --------- | --------------------------------------------------------------------------------- |
| `type`    | Position category (e.g., "lending", "common", "locked")                           |
| `summary` | High-level metrics (asset value, rewards, debt)                                   |
| `detail`  | Granular breakdown including individual token balances, prices, and price changes |

## Supported Protocols

You can find the list of supported protocols on each supported chain by [clicking here](https://app.nansen.ai/portfolio/protocols).

## Usage Guide: Creating Complete Portfolio Overview

Use the following steps to create a complete Portfolio Overview:

**Step 1: Fetch DeFi Positions**\
Get active protocol positions, staking rewards, and lending activities. This shows how assets are being used in DeFi.

**Step 2: Fetch Wallet Balances** [**(Link Here)**](https://docs.nansen.ai/api/profiler/balances#post-beta-profiler-address-balances)\
Retrieve all token holdings across chains, including idle tokens not actively deployed in protocols.

**Step 3: Combine & Analyze**

* Total Portfolio Value = DeFi positions + wallet balances
* Strategy Analysis: Compare liquid vs. staked vs. lending positions
* Chain Distribution: Identify multi-chain allocation patterns
* Risk Assessment: Analyze borrowing ratios, protocol concentration


# Agent

## Fast Research Agent

> Ask the Nansen AI agent a research question and receive a streamed answer backed by on-chain data. The \*\*fast\*\* variant uses a lighter model optimised for low-latency responses.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Which tokens are smart money accumulating right now?\*\*\
> 2\. \*\*What is the current narrative driving activity in DeFi?\*\*\
> 3\. \*\*Which wallets are connected to a specific address?\*\*\
> 4\. \*\*What is the on-chain story behind a recent price move?\*\*\
> \
> \*\*SSE event types:\*\*\
> \
> The response is a \`text/event-stream\` with the following JSON event types:\
> \
> \| type | payload | description |\
> \|---|---|---|\
> \| \`delta\` | \`{"type": "delta", "text": "…"}\` | Incremental text chunk of the agent's answer. |\
> \| \`tool\_call\` | \`{"type": "tool\_call", "name": "…"}\` | Emitted once per unique Nansen tool the agent invokes. |\
> \| \`finish\` | \`{"type": "finish", "conversation\_id": "…", "tool\_calls": \[...]}\` | Final event. Contains the \`conversation\_id\` for follow-up requests and the full list of tools used. |\
> \| \`error\` | \`{"type": "error", "error": "…", "status\_code": …}\` | Emitted if the upstream agent service is unavailable or times out. |\
> \
> The stream terminates with a \`data: \[DONE]\` sentinel.\
> \
> \*\*Fast vs Expert:\*\* Use \`/agent/fast\` for quick factual lookups and simple questions. Use \`/agent/expert\` when you need deeper multi-step analysis or synthesis across multiple data sources.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"AgentResearchRequest":{"properties":{"text":{"type":"string","minLength":1,"title":"Text","description":"Research query or question for the Nansen AI agent."},"conversation_id":{"anyOf":[{"type":"string"}],"title":"Conversation Id","description":"Optional conversation ID for multi-turn interactions. Returned in the finish event of a previous response. Omit to start a new conversation."}},"type":"object","required":["text"],"title":"AgentResearchRequest","description":"Request model for Agent Research endpoints (fast and expert)."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/agent/fast":{"post":{"tags":["Agent"],"summary":"Fast Research Agent","description":"Ask the Nansen AI agent a research question and receive a streamed answer backed by on-chain data. The **fast** variant uses a lighter model optimised for low-latency responses.\n\n**What it helps to answer:**\n\n1. **Which tokens are smart money accumulating right now?**\n2. **What is the current narrative driving activity in DeFi?**\n3. **Which wallets are connected to a specific address?**\n4. **What is the on-chain story behind a recent price move?**\n\n**SSE event types:**\n\nThe response is a `text/event-stream` with the following JSON event types:\n\n| type | payload | description |\n|---|---|---|\n| `delta` | `{\"type\": \"delta\", \"text\": \"…\"}` | Incremental text chunk of the agent's answer. |\n| `tool_call` | `{\"type\": \"tool_call\", \"name\": \"…\"}` | Emitted once per unique Nansen tool the agent invokes. |\n| `finish` | `{\"type\": \"finish\", \"conversation_id\": \"…\", \"tool_calls\": [...]}` | Final event. Contains the `conversation_id` for follow-up requests and the full list of tools used. |\n| `error` | `{\"type\": \"error\", \"error\": \"…\", \"status_code\": …}` | Emitted if the upstream agent service is unavailable or times out. |\n\nThe stream terminates with a `data: [DONE]` sentinel.\n\n**Fast vs Expert:** Use `/agent/fast` for quick factual lookups and simple questions. Use `/agent/expert` when you need deeper multi-step analysis or synthesis across multiple data sources.","operationId":"agent_fast_api_v1_agent_fast_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResearchRequest"}}},"required":true},"responses":{"200":{"description":"Server-Sent Events stream. Each event is a `data: {json}` line. See endpoint description for event schema.","content":{"application/json":{"schema":{}},"text/event-stream":{}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Expert Research Agent

> Ask the Nansen AI agent a research question and receive a streamed answer backed by on-chain data. The \*\*expert\*\* variant uses a more capable model for deeper, multi-step analysis.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Which tokens are smart money accumulating right now?\*\*\
> 2\. \*\*What is the current narrative driving activity in DeFi?\*\*\
> 3\. \*\*Which wallets are connected to a specific address?\*\*\
> 4\. \*\*What is the on-chain story behind a recent price move?\*\*\
> \
> \*\*SSE event types:\*\*\
> \
> The response is a \`text/event-stream\` with the following JSON event types:\
> \
> \| type | payload | description |\
> \|---|---|---|\
> \| \`delta\` | \`{"type": "delta", "text": "…"}\` | Incremental text chunk of the agent's answer. |\
> \| \`tool\_call\` | \`{"type": "tool\_call", "name": "…"}\` | Emitted once per unique Nansen tool the agent invokes. |\
> \| \`finish\` | \`{"type": "finish", "conversation\_id": "…", "tool\_calls": \[...]}\` | Final event. Contains the \`conversation\_id\` for follow-up requests and the full list of tools used. |\
> \| \`error\` | \`{"type": "error", "error": "…", "status\_code": …}\` | Emitted if the upstream agent service is unavailable or times out. |\
> \
> The stream terminates with a \`data: \[DONE]\` sentinel.\
> \
> \*\*Fast vs Expert:\*\* Use \`/agent/fast\` for quick factual lookups and simple questions. Use \`/agent/expert\` when you need deeper multi-step analysis or synthesis across multiple data sources.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"AgentResearchRequest":{"properties":{"text":{"type":"string","minLength":1,"title":"Text","description":"Research query or question for the Nansen AI agent."},"conversation_id":{"anyOf":[{"type":"string"}],"title":"Conversation Id","description":"Optional conversation ID for multi-turn interactions. Returned in the finish event of a previous response. Omit to start a new conversation."}},"type":"object","required":["text"],"title":"AgentResearchRequest","description":"Request model for Agent Research endpoints (fast and expert)."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/agent/expert":{"post":{"tags":["Agent"],"summary":"Expert Research Agent","description":"Ask the Nansen AI agent a research question and receive a streamed answer backed by on-chain data. The **expert** variant uses a more capable model for deeper, multi-step analysis.\n\n**What it helps to answer:**\n\n1. **Which tokens are smart money accumulating right now?**\n2. **What is the current narrative driving activity in DeFi?**\n3. **Which wallets are connected to a specific address?**\n4. **What is the on-chain story behind a recent price move?**\n\n**SSE event types:**\n\nThe response is a `text/event-stream` with the following JSON event types:\n\n| type | payload | description |\n|---|---|---|\n| `delta` | `{\"type\": \"delta\", \"text\": \"…\"}` | Incremental text chunk of the agent's answer. |\n| `tool_call` | `{\"type\": \"tool_call\", \"name\": \"…\"}` | Emitted once per unique Nansen tool the agent invokes. |\n| `finish` | `{\"type\": \"finish\", \"conversation_id\": \"…\", \"tool_calls\": [...]}` | Final event. Contains the `conversation_id` for follow-up requests and the full list of tools used. |\n| `error` | `{\"type\": \"error\", \"error\": \"…\", \"status_code\": …}` | Emitted if the upstream agent service is unavailable or times out. |\n\nThe stream terminates with a `data: [DONE]` sentinel.\n\n**Fast vs Expert:** Use `/agent/fast` for quick factual lookups and simple questions. Use `/agent/expert` when you need deeper multi-step analysis or synthesis across multiple data sources.","operationId":"agent_expert_api_v1_agent_expert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResearchRequest"}}},"required":true},"responses":{"200":{"description":"Server-Sent Events stream. Each event is a `data: {json}` line. See endpoint description for event schema.","content":{"application/json":{"schema":{}},"text/event-stream":{}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Points

Developer reference for the Permissionless Rewards API service.

### Permissionless Rewards: Concepts

Before integrating the Nansen Points Leaderboard endpoint, it helps to understand **Permissionless Rewards** at a high level—see [Nansen Academy: On Permissionless Rewards](https://academy.nansen.ai/articles/2154465-on-permissionless-rewards) for full details.

* **What they are**: An open registry that maps Nansen Points balances to onchain wallets (EVM and Solana), without requiring an API key or explicit permission from Nansen.
* **Why it matters**: Protocols can seamlessly discover eligible wallets and distribute tokens, NFTs, or other perks—fully public and opt-in.
* **User control**: Holders can add or remove their wallet mapping at any time, revoking future distributions.

### A. Points Leaderboard (Paginated)

<mark style="color:green;">`GET`</mark>  <https://app.nansen.ai/api/points-leaderboard/api>

Query the full leaderboard with pagination. No authentication required.                                                                                                                                                                                         &#x20;

#### Query Parameters&#x20;

<table><thead><tr><th width="163.828125">Name</th><th width="119.97265625">Type</th><th width="108.3671875">Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>tier</td><td>string</td><td>No</td><td>all tiers</td><td>Filter by tier: green, ice, north, star</td></tr><tr><td>page</td><td>integer</td><td>No</td><td>1</td><td>Page number (min: 1)</td></tr><tr><td>recordsPerPage</td><td>integer</td><td>No</td><td>10</td><td>Results per page (min: 1, max: 10,000)</td></tr></tbody></table>

#### **Example Request**

<https://app.nansen.ai/api/points-leaderboard/api?tier=star&recordsPerPage=10>

#### Response Structure&#x20;

Results are ordered by rank. Ties share the same rank.

```json
"results": [
      {                                                                                                                                                                                    
        "rank": 1,
        "points": 982400,
        "evm_address": "0x1234...abcd",
        "solana_address": null,                                                                                                                                                            
        "tier": "Star",                                                                                                                                                                    
        "is_eligible": true                                                                                                                                                                
      },                                                                                                                                                                                   
      {                                                                                                                                                                                    
        "rank": 2,                                                                                                                                                                         
        "points": 871200,                                                                                                                                                                  
        "evm_address": "0x5678...efgh",                                                                                                                                                    
        "solana_address": "7xKX...9mPq",                                                                                                                                                   
        "tier": "Star",                                                                                                                                                                    
        "is_eligible": true                                                                                                                                                                
      }                                                                                                                                                                                    
    ]
```

### B. Individual Lookup

<mark style="color:green;">`GET`</mark> [https://app.nansen.ai/api/points-leaderboard/{address}](https://app.nansen.ai/api/points-leaderboard/{address}`)

Fetch the tier for a single wallet address. **No API key or authentication required.**

#### Query Parameters

<table><thead><tr><th width="163.828125">Name</th><th width="119.97265625">Type</th><th width="108.3671875">Required</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>string</td><td>Yes</td><td>EVM or Solana wallet address. Case-insensitive.</td></tr></tbody></table>

#### **Example Request**

[**https://app.nansen.ai/api/points-leaderboard/0xbbfb6566ad064c233af6314aeb1eee4c26a5f921**](https://app.nansen.ai/api/points-leaderboard/0xbbfb6566ad064c233af6314aeb1eee4c26a5f921)

#### Response Structure&#x20;

```json
   {"tier":"star"}
```

### References

#### Response Codes

| Code | Description         |
| ---- | ------------------- |
| 200  | Successful response |
| 400  | Invalid parameters  |

#### Fields Response:

| Field            | Type   | Description                                                                                                                                                             |
| ---------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tier`           | string | <p>Tier name determined by points thresholds.<br>Valid tier values are: "none," "green," "ice," "north," or "star." Addresses not on the leaderboard return "none."</p> |
| `rank`           | number | Leaderboard rank. Users with the same points share the same rank.                                                                                                       |
| `points`         | number | Total accumulated Nansen Points                                                                                                                                         |
| `evm_address`    | string | Linked EVM rewards wallet                                                                                                                                               |
| `solana_address` | string | Linked Solana rewards wallet                                                                                                                                            |

#### Usage Notes

* **Minimum Qualification**: Wallets with fewer than 1,000 points return {"tier":"none"}
* **Public & Permissionless**: No authentication required.
* **Data Refresh**: Tier data refreshes daily at 11am UTC. Implement local caching to reduce redundant calls.


# Hyperliquid

Nansen's Hyperliquid API endpoints provide comprehensive access to perp trading data on Hyperliquid. Track positions, analyze trades, screen tokens, and follow smart money activity across the fastest-growing perps platform.

## What can you do?

With Hyperliquid endpoints, you can:

* **Track wallet positions:** Monitor real-time perpetual positions, PnL, and account health
* **Analyze trading activity:** View detailed trade history and execution data of any address
* **Screen perp trading activity:** Find high-volume tokens and smart money flows on Hyperliquid
* **Find top performers:** Discover the most profitable traders on specific tokens.

## Which endpoints can I use?

| I want to...                                                                                     | Use this endpoint                                                                              | Best for                                     |
| ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | -------------------------------------------- |
| See all open positions for a wallet including leverage, PnL, and liquidation prices              | [Address Perp Positions](https://docs.nansen.ai/api/hyperliquid-apis/address-perp-positions)   | Snapshot of current positions                |
| View a wallet's trading history with entry/exit prices, fees, and PnL                            | [Address Perp Trades](https://docs.nansen.ai/api/hyperliquid-apis/address-perp-trades)         | Trade by trade breakdown of address activity |
| See top profitable wallets on Hyperliquid over a given period                                    | [Hyperliquid Leaderboard](https://docs.nansen.ai/api/hyperliquid-apis/hyperliquid-leaderboard) | Find profitable wallets and copy trading     |
| Find high-volume perp tokens or see where smart money is trading                                 | [Perp Screener](https://docs.nansen.ai/api/hyperliquid-apis/perp-screener)                     | Market discovery & trends                    |
| Find the most profitable traders on a specific perp token                                        | [Perp PnL Leaderboard](https://docs.nansen.ai/api/hyperliquid-apis/perp-pnl-leaderboard)       | Performance rankings                         |
| Track what smart money wallets are trading on Hyperliquid                                        | [Smart Money Perp Trades](/api/hyperliquid/smart-money-perp-trades)                            | Real-time smart money                        |
| See all open positions for a specific perp token including leverage, PnL, and liquidation prices | [Token Perp Positions](/api/hyperliquid/token-perp-positions)                                  | Snapshot of current positions for a token    |
| View trading history for a specific perp token over a time period                                | [Token Perp Trades](/api/hyperliquid/token-perp-trades)                                        | All trading activity for a specific token    |

## Key Differences: Hyperliquid vs. Other Chains

#### Token Identification

**Important**: Hyperliquid perp endpoints use **token symbols** instead of token addresses in Token God Mode Inputs

| Other Chains                 | Hyperliquid                              |
| ---------------------------- | ---------------------------------------- |
| `token_address: "0x1234..."` | `token_symbol: "BTC"`                    |
| Use contract addresses       | Use ticker symbols (BTC, ETH, SOL, etc.) |

**Example**:

```json
// Other chains
{"token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}

// Hyperliquid
{"token_symbol": "BTC"}  // For leaderboard endpoint
```

#### Positive and Negative Positions

Some endpoints (Eg. Token Perp Positions) have negative Position value. This usually represents a short and a positive value represents a long.&#x20;

## Quick Start Checklist

1. **Get your API key** from Nansen
2. **Choose your use case**:
   * Wallet monitoring → Use `/perp-positions` + `/perp-trades`
   * Market discovery → Use `/perp-screener`
   * Copy trading → Use `/perp-leaderboard` + `/tgm/perp-pnl-leaderboard`
3. **Remember**: Use token symbols (BTC, ETH) not addresses
4. **Add filters**: Refine results with volume, PnL, or time filters


# Address Perp Positions

### Common Scenarios

<table data-full-width="true"><thead><tr><th>Usecase</th><th>Required Parameters</th><th>Optional Filters</th><th>Expected Output</th></tr></thead><tbody><tr><td>Check current perp positions for a single address</td><td>address ="0xa312114b5795dff9b8db50474dd57701aa78ad1e"</td><td>filters ={"position_value_usd": {"min": 1000}}</td><td>List of open perpetual positions with entry price, mark price, leverage, PnL, and margin info for the address</td></tr><tr><td>Get all perp positions with negative PnL for an address</td><td>address ="0xa312114b5795dff9b8db50474dd57701aa78ad1e"</td><td>filters ={"unrealized_pnl_usd": {"max": 0}}</td><td>List of positions with negative unrealized PnL</td></tr></tbody></table>

## Get Perpetual Positions Data

> Get perpetual positions data for a user by calling the Hyperliquid API directly. This endpoint provides real-time position information including entry price, mark price, PnL, leverage, and other position details.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the current perpetual positions for a specific user address?\*\*\
> 2\. \*\*What is the unrealized PnL and performance of each position?\*\*\
> 3\. \*\*What are the leverage levels and margin requirements for each position?\*\*\
> 4\. \*\*What are the liquidation prices and risk levels for each position?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PerpPositionsRequest":{"properties":{"address":{"type":"string","maxLength":42,"minLength":42,"title":"Address","description":"User's Hyperliquid address in 42-character hexadecimal format"},"filters":{"anyOf":[{"$ref":"#/components/schemas/PerpPositionsFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_PerpPositionsSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"position_value_usd\", \"direction\": \"DESC\"}] - Sort by position value descending\n- [{\"field\": \"unrealized_pnl_usd\", \"direction\": \"ASC\"}] - Sort by unrealized PnL ascending\n\nIf not provided, positions are sorted by position value descending."}},"additionalProperties":false,"type":"object","required":["address"],"title":"PerpPositionsRequest","description":"Request model for Perp Positions endpoint."},"PerpPositionsFilters":{"properties":{"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Filter by token symbol"},"position_value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Filter by position value in USD"},"position_type":{"anyOf":[{"type":"string"}],"title":"Position Type","description":"Filter by position type"},"unrealized_pnl_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Filter by unrealized PnL in USD"}},"additionalProperties":false,"type":"object","title":"PerpPositionsFilters","description":"Filters for perp positions endpoint."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SortOrder_PerpPositionsSortField_":{"properties":{"field":{"$ref":"#/components/schemas/PerpPositionsSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[PerpPositionsSortField]"},"PerpPositionsSortField":{"type":"string","enum":["leverage_value","position_value_usd","entry_price_usd","liquidation_price_usd","unrealized_pnl_usd","size","token_symbol","position_type"],"title":"PerpPositionsSortField","description":"Enum for perp positions sort fields."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PerpPositionsResponse":{"properties":{"data":{"$ref":"#/components/schemas/PerpPositionsData","description":"Hyperliquid clearinghouse state data"}},"additionalProperties":false,"type":"object","required":["data"],"title":"PerpPositionsResponse","description":"Response model for perp positions endpoint."},"PerpPositionsData":{"properties":{"assetPositions":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetPosition"},"type":"array"}],"title":"Assetpositions","description":"List of asset positions"},"crossMaintenanceMarginUsed":{"anyOf":[{"type":"string"}],"title":"Crossmaintenancemarginused","description":"Cross maintenance margin used USD"},"cross_margin_summary_account_value_usd":{"anyOf":[{"type":"string"}],"title":"Cross Margin Summary Account Value Usd","description":"Cross margin summary account value USD"},"cross_margin_summary_total_margin_used_usd":{"anyOf":[{"type":"string"}],"title":"Cross Margin Summary Total Margin Used Usd","description":"Cross margin summary total margin used USD"},"cross_margin_summary_total_net_liquidation_position_on_usd":{"anyOf":[{"type":"string"}],"title":"Cross Margin Summary Total Net Liquidation Position On Usd","description":"Cross margin summary total net liquidation position on USD"},"cross_margin_summary_total_raw_usd":{"anyOf":[{"type":"string"}],"title":"Cross Margin Summary Total Raw Usd","description":"Cross margin summary total raw USD"},"margin_summary_account_value_usd":{"anyOf":[{"type":"string"}],"title":"Margin Summary Account Value Usd","description":"Margin summary account value USD"},"margin_summary_total_margin_used_usd":{"anyOf":[{"type":"string"}],"title":"Margin Summary Total Margin Used Usd","description":"Margin summary total margin used USD"},"margin_summary_total_net_liquidation_position_usd":{"anyOf":[{"type":"string"}],"title":"Margin Summary Total Net Liquidation Position Usd","description":"Margin summary total net liquidation position USD"},"margin_summary_total_raw_usd":{"anyOf":[{"type":"string"}],"title":"Margin Summary Total Raw Usd","description":"Margin summary total raw USD"},"time":{"anyOf":[{"type":"integer"}],"title":"Time","description":"Timestamp"},"withdrawable":{"anyOf":[{"type":"string"}],"title":"Withdrawable","description":"Withdrawable USD"}},"additionalProperties":false,"type":"object","title":"PerpPositionsData","description":"Data model for Hyperliquid clearinghouse state response."},"AssetPosition":{"properties":{"position":{"anyOf":[{"$ref":"#/components/schemas/Position"}],"description":"Position data"},"position_type":{"anyOf":[{"type":"string"}],"title":"Position Type","description":"Position type"}},"additionalProperties":false,"type":"object","title":"AssetPosition","description":"Asset position wrapper."},"Position":{"properties":{"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Asset symbol (e.g., BTC, ETH)"},"size":{"anyOf":[{"type":"string"}],"title":"Size","description":"Size"},"position_value_usd":{"anyOf":[{"type":"string"}],"title":"Position Value Usd","description":"Position value USD"},"entry_price_usd":{"anyOf":[{"type":"string"}],"title":"Entry Price Usd","description":"Entry price USD"},"liquidation_price_usd":{"anyOf":[{"type":"string"}],"title":"Liquidation Price Usd","description":"Liquidation price USD"},"leverage_value":{"anyOf":[{"type":"integer"}],"title":"Leverage Value","description":"Leverage value"},"leverage_type":{"anyOf":[{"type":"string"}],"title":"Leverage Type","description":"Leverage type: 'cross' or 'isolated'"},"leverage_raw_usd":{"anyOf":[{"type":"string"}],"title":"Leverage Raw Usd","description":"Raw USD leverage"},"margin_used_usd":{"anyOf":[{"type":"string"}],"title":"Margin Used Usd","description":"Margin used USD"},"max_leverage_value":{"anyOf":[{"type":"integer"}],"title":"Max Leverage Value","description":"Maximum allowed leverage value"},"return_on_equity":{"anyOf":[{"type":"string"}],"title":"Return On Equity","description":"Return on equity"},"unrealized_pnl_usd":{"anyOf":[{"type":"string"}],"title":"Unrealized Pnl Usd","description":"Unrealized PnL USD"},"cumulative_funding_all_time_usd":{"anyOf":[{"type":"string"}],"title":"Cumulative Funding All Time Usd","description":"Cumulative funding all time USD"},"cumulative_funding_since_change_usd":{"anyOf":[{"type":"string"}],"title":"Cumulative Funding Since Change Usd","description":"Cumulative funding since change USD"},"cumulative_funding_since_open_usd":{"anyOf":[{"type":"string"}],"title":"Cumulative Funding Since Open Usd","description":"Cumulative funding since open USD"}},"additionalProperties":false,"type":"object","title":"Position","description":"Individual perpetual position."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/perp-positions":{"post":{"tags":["Profiler"],"summary":"Get Perpetual Positions Data","description":"Get perpetual positions data for a user by calling the Hyperliquid API directly. This endpoint provides real-time position information including entry price, mark price, PnL, leverage, and other position details.\n\n**What it helps to answer:**\n\n1. **What are the current perpetual positions for a specific user address?**\n2. **What is the unrealized PnL and performance of each position?**\n3. **What are the leverage levels and margin requirements for each position?**\n4. **What are the liquidation prices and risk levels for each position?**","operationId":"get_perp_positions_api_v1_profiler_perp_positions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpPositionsRequest"}}},"required":true},"responses":{"200":{"description":"Perpetual positions data for the user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpPositionsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address Perp Trades

### Common Scenarios

<table data-full-width="true"><thead><tr><th>Usecase</th><th>Required Parameters</th><th>Optional Filters</th><th>Expected Output</th></tr></thead><tbody><tr><td>Fetch all perp trades for an address within a specific date range</td><td>address ="0x45d26f28196d226497130c4bac709d808fed4029" date ={ "from": "2025-10-01", "to": "2025-10-10" }</td><td>(none needed for basic usage)</td><td>List of trades with timestamps, price, size, token, direction (Long/Short), action (Open/Close), and fees for the address</td></tr><tr><td>Analyze high-value trades with closed PnL details</td><td>address ="0x45d26f28196d226497130c4bac709d808fed4029" date ={ "from": "2025-10-01", "to": "2025-10-10" }</td><td>filters ={"value_usd": {"min": 1000}}</td><td>List of trades above $1,000 with closed PnL, fees paid, order IDs, and asset symbols</td></tr><tr><td>Track all short trades and compare performance by token</td><td>address ="0x45d26f28196d226497130c4bac709d808fed4029" date ={ "from": "2025-10-01", "to": "2025-10-10" }</td><td>filters ={"type": "Short"} order_by =[{"direction": "DESC", "field": "closed_pnl"}]</td><td>All short trades, sorted by closed profit, allowing analysis of which tokens and trades delivered the best results</td></tr></tbody></table>

## Get Perpetual Trade Data

> Get perpetual trade data for a user. This endpoint provides trade information including trade price, size, side, fees, and other trade details.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the perpetual trades for a specific user address within a date range?\*\*\
> 2\. \*\*What are the trade prices, sizes, and directions for each trade?\*\*\
> 3\. \*\*What are the trading fees and closed PnL for each trade?\*\*\
> 4\. \*\*What are the order IDs and transaction hashes for trade tracking?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PerpTradeRequest":{"properties":{"address":{"type":"string","maxLength":42,"minLength":42,"title":"Address","description":"User's Hyperliquid address in 42-character hexadecimal format"},"date":{"$ref":"#/components/schemas/DateRange","description":"Date range for the trades (ISO 8601 date-time)"},"filters":{"anyOf":[{"$ref":"#/components/schemas/PerpTradeFilters"}],"description":"Additional filters for the trades"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_PerpTradeSortField_"},"type":"array"}],"title":"Order By","description":"Sort order for the trades"}},"additionalProperties":false,"type":"object","required":["address","date"],"title":"PerpTradeRequest","description":"Request model for Perp Trades endpoint."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PerpTradeFilters":{"properties":{"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Token symbol filter"},"side":{"anyOf":[{"$ref":"#/components/schemas/PerpTradeType"}],"description":"Position side filter (Long or Short)"},"action":{"anyOf":[{"$ref":"#/components/schemas/PerpTradeActionFilter"}],"description":"Action filter (Open/Add, Close/Reduce, Liquidation)"},"crossed":{"anyOf":[{"type":"boolean"}],"title":"Crossed","description":"Whether the trade was crossed"},"size":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Trade size range filter"},"start_position":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Start position range filter"},"closed_pnl":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Closed PnL range filter"},"fee_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Fee in USD range filter"},"fee_token_symbol":{"anyOf":[{"type":"string"}],"title":"Fee Token Symbol","description":"Fee token filter"},"oid":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Order ID range filter"},"price":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Price range filter"},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Value in USD range filter"}},"additionalProperties":false,"type":"object","title":"PerpTradeFilters","description":"Filters for perp trades endpoint.\n\nThese filters control which perpetual trades are included in the results\nbased on various trade criteria."},"PerpTradeType":{"type":"string","enum":["Long","Short"],"title":"PerpTradeType","description":"Enum for perp trade position types."},"PerpTradeActionFilter":{"type":"string","enum":["Open/Add","Close/Reduce","Liquidation"],"title":"PerpTradeActionFilter","description":"Enum for perp trade action filters (grouped)."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_PerpTradeSortField_":{"properties":{"field":{"$ref":"#/components/schemas/PerpTradeSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[PerpTradeSortField]"},"PerpTradeSortField":{"type":"string","enum":["timestamp","size","fee_usd","closed_pnl","price","value_usd"],"title":"PerpTradeSortField","description":"Enum for perp trade sort fields."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PerpTradeResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"},"data":{"items":{"$ref":"#/components/schemas/PerpTrade"},"type":"array","title":"Data","description":"List of perpetual trades"}},"additionalProperties":false,"type":"object","required":["pagination","data"],"title":"PerpTradeResponse","description":"Response model for perp trades endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"PerpTrade":{"properties":{"timestamp":{"type":"string","title":"Timestamp","description":"Timestamp of the trade"},"side":{"anyOf":[{"$ref":"#/components/schemas/PerpTradeType"}],"description":"Position side (Long or Short)"},"action":{"type":"string","title":"Action","description":"Action taken (Open, Add, Close, Reduce, etc.)"},"block_number":{"type":"integer","title":"Block Number","description":"Block number of the trade"},"token_symbol":{"type":"string","title":"Token Symbol","description":"Symbol of the token"},"price":{"anyOf":[{"type":"number"}],"title":"Price","description":"Average price of the trade (averaged across fills)"},"size":{"type":"number","title":"Size","description":"Total size of the trade (sum of all fills)"},"value_usd":{"type":"number","title":"Value Usd","description":"Total value in USD of the trade"},"start_position":{"type":"number","title":"Start Position","description":"Start position of the trade in token units"},"closed_pnl":{"type":"number","title":"Closed Pnl","description":"Total closed PnL of the trade (sum of all fills)"},"crossed":{"type":"boolean","title":"Crossed","description":"Crossed of the trade"},"fee_usd":{"type":"number","title":"Fee Usd","description":"Total fee in USD of the trade (sum of all fills)"},"fee_token_symbol":{"type":"string","title":"Fee Token Symbol","description":"Fee in token of the trade"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"Transaction hash of the trade"},"user":{"type":"string","title":"User","description":"User of the trade"},"oid":{"type":"integer","title":"Oid","description":"Order ID of the trade"}},"additionalProperties":false,"type":"object","required":["timestamp","side","action","block_number","token_symbol","price","size","value_usd","start_position","closed_pnl","crossed","fee_usd","fee_token_symbol","transaction_hash","user","oid"],"title":"PerpTrade","description":"Perpetual trade with computed type and action fields for client response."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/profiler/perp-trades":{"post":{"tags":["Profiler"],"summary":"Get Perpetual Trade Data","description":"Get perpetual trade data for a user. This endpoint provides trade information including trade price, size, side, fees, and other trade details.\n\n**What it helps to answer:**\n\n1. **What are the perpetual trades for a specific user address within a date range?**\n2. **What are the trade prices, sizes, and directions for each trade?**\n3. **What are the trading fees and closed PnL for each trade?**\n4. **What are the order IDs and transaction hashes for trade tracking?**","operationId":"get_perp_trades_api_v1_profiler_perp_trades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpTradeRequest"}}},"required":true},"responses":{"200":{"description":"Perpetual trade data for the user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpTradeResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Hyperliquid Leaderboard

### Common Scenarios

<table data-full-width="true"><thead><tr><th>Usecase</th><th>Required Parameters</th><th>Optional Filters</th><th>Expected Output</th></tr></thead><tbody><tr><td>Find top perpetual traders in a specific date range</td><td>date ={ "from": "2025-10-14", "to": "2025-10-15" }</td><td>pagination ={ "page": 1, "per_page": 10 }</td><td>List of the most profitable perpetual traders (addresses and labels) with their total PnL, ROI (%), and account values in the date range</td></tr><tr><td>Filter leaderboard for high-value profitable accounts</td><td>date ={ "from": "2025-10-14", "to": "2025-10-15" }</td><td>filters ={ "account_value": { "min": 10000 }, "total_pnl": { "min": 1000 } }</td><td>Leaderboard limited to traders with $10k+ account value and $1k+ profit, for easier benchmarking</td></tr><tr><td>Show only smart money leaders (filtered by trader address label)</td><td>date ={ "from": "2025-10-14", "to": "2025-10-15" }</td><td>filters ={ "trader_address_label": "Smart Money" }</td><td>Leaderboard showing only traders identified as Smart Money, with PnL, ROI, and account value for each</td></tr></tbody></table>

## Get Perpetual Trading Leaderboard Data

> Get perpetual trading leaderboard data showing the most profitable traders within a given date range. This endpoint provides trader performance metrics including total PnL, ROI, and account values.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Who are the most profitable perpetual traders in a given timeframe?\*\*\
> 2\. \*\*What are the ROI percentages for top performing traders?\*\*\
> 3\. \*\*What are the account values of successful perpetual traders?\*\*\
> 4\. \*\*How do trader addresses and labels correlate with performance?\*\*\
> \
> \*\*Key Features:\*\*\
> \- Trader address and label information\
> \- Total PnL tracking in USD\
> \- ROI calculations as percentages\
> \- Account value tracking\
> \- Flexible filtering and sorting options

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PerpLeaderboardRequest":{"properties":{"date":{"$ref":"#/components/schemas/DateOnlyRange","description":"Date range object with optional from and to fields in YYYY-MM-DD format"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/PerpLeaderboardFilters"}],"description":"Additional filters to apply to the query."},"premium_labels":{"anyOf":[{"type":"boolean"}],"title":"Premium Labels","description":"Controls label tier in the response. When null/omitted (default), returns labels as per subscription plan (existing behavior). When false, returns free-tier labels for all users. When true, returns premium labels. Note: In a future release, the default will change from true to false — pass premium_labels=true explicitly to preserve premium label behavior."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_PerpLeaderboardSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering"}},"additionalProperties":false,"type":"object","required":["date"],"title":"PerpLeaderboardRequest","description":"Request model for Perp Leaderboard endpoint.\nThis endpoint provides a perpetual trading leaderboard showing the most profitable\ntraders within a given date range."},"DateOnlyRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in YYYY-MM-DD format"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in YYYY-MM-DD format"}},"type":"object","title":"DateOnlyRange","description":"Date range model that only accepts YYYY-MM-DD format (no time components)."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"PerpLeaderboardFilters":{"properties":{"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Filter by wallet display name. Use LIKE patterns (%) for partial matching. Note: This filters by the wallet's display name, not by label category. To filter by smart money labels, use include_smart_money_labels instead."},"total_pnl":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total PnL range filter in USD"},"roi":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"ROI range filter as percentage"},"account_value":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Account value range filter in USD. Note: Only the top 500K traders have account value data available."},"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Filter to include only traders with these smart money labels. For Hyperliquid, use 'Smart HL Perps Trader'. See SmartMoneyFilterType enum for valid values."},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels"}},"additionalProperties":false,"type":"object","title":"PerpLeaderboardFilters","description":"Filters for Perp Leaderboard endpoint.\n\nThese filters control which traders are included in the leaderboard."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"SortOrder_PerpLeaderboardSortField_":{"properties":{"field":{"$ref":"#/components/schemas/PerpLeaderboardSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[PerpLeaderboardSortField]"},"PerpLeaderboardSortField":{"type":"string","enum":["total_pnl","roi","account_value"],"title":"PerpLeaderboardSortField","description":"Enum for sortable fields in Perp Leaderboard."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PerpLeaderboardResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PerpLeaderboard"},"type":"array","title":"Data","description":"List of Perp Leaderboard records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"PerpLeaderboardResponse","description":"Response model for Perp Leaderboard endpoint.\nContains a list of leaderboard records with pagination and metadata."},"PerpLeaderboard":{"properties":{"trader_address":{"type":"string","title":"Trader Address","description":"The Ethereum wallet address of the trader."},"trader_address_label":{"anyOf":[{"type":"string"}],"title":"Trader Address Label","description":"The name associated with the address, derived using Nansen's multichain label function for Ethereum."},"total_pnl":{"anyOf":[{"type":"number"}],"title":"Total Pnl","description":"Profit and loss for the selected timeframe in USD."},"roi":{"anyOf":[{"type":"number"}],"title":"Roi","description":"Return on investment for the selected timeframe as percentage."},"account_value":{"anyOf":[{"type":"number"}],"title":"Account Value","description":"Current total account value in USD. Note: Account value data is only available for the top 500K traders due to upstream data limitations. Traders outside the top 500K may show 0 or null values."}},"type":"object","required":["trader_address"],"title":"PerpLeaderboard","description":"Individual Perp Leaderboard record.\nRepresents a single trader's perpetual trading performance."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/perp-leaderboard":{"post":{"tags":["Perp Leaderboard"],"summary":"Get Perpetual Trading Leaderboard Data","description":"Get perpetual trading leaderboard data showing the most profitable traders within a given date range. This endpoint provides trader performance metrics including total PnL, ROI, and account values.\n\n**What it helps to answer:**\n\n1. **Who are the most profitable perpetual traders in a given timeframe?**\n2. **What are the ROI percentages for top performing traders?**\n3. **What are the account values of successful perpetual traders?**\n4. **How do trader addresses and labels correlate with performance?**\n\n**Key Features:**\n- Trader address and label information\n- Total PnL tracking in USD\n- ROI calculations as percentages\n- Account value tracking\n- Flexible filtering and sorting options","operationId":"get_perp_leaderboard_api_v1_perp_leaderboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpLeaderboardRequest"}}},"required":true},"responses":{"200":{"description":"Perpetual trading leaderboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpLeaderboardResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Perp Screener

### Common Scenarios

<table data-full-width="true"><thead><tr><th>Usecase</th><th>Required Parameters</th><th>Optional Filters</th><th>Expected Output</th></tr></thead><tbody><tr><td>Screen for perps with net buy/sell pressure and strong fundamentals</td><td>date ={ "from": "2025-10-01T00:00:00Z", "to": "2025-10-06T23:59:59Z" }</td><td>filters ={ "buy_sell_pressure": { "min": 100000 }, "open_interest": { "min": 500000 } }</td><td>Perps showing high buy/sell pressure and strong open interest, returned with mark price, volume, and trader details</td></tr><tr><td>Discover perps favored by smart money</td><td>date ={ "from": "2025-10-01T00:00:00Z", "to": "2025-10-06T23:59:59Z" }</td><td>only_smart_money =true filters ={ "smart_money_volume": { "min": 100000 } }</td><td>Perps with the highest smart money  volume, including smart money long/short counts, USD position sizes, and assets</td></tr></tbody></table>

## Get Perpetual Contract Screening Data

> Discover and screen perpetual contracts on Hyperliquid with advanced filtering capabilities. This endpoint helps identify trending perpetual contracts, trading activity, funding rates, and smart money movements by combining metrics like volume, open interest, funding rates, and position data.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Which perpetual contracts are experiencing significant trading volume and activity?\*\*\
> 2\. \*\*How do funding rates correlate with trading patterns and smart money positions?\*\*\
> 3\. \*\*What perpetual contracts show strong fundamentals in terms of open interest and trading patterns?\*\*\
> 4\. \*\*Which perpetual contracts are attracting smart money participation with long/short positions?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PerpScreenerRequest":{"properties":{"date":{"$ref":"#/components/schemas/DateRange","description":"Date range for the perp screener"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/PerpScreenerFilters"}],"description":"Additional filters to apply"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_Union_PerpScreenerSortFieldDefault__PerpScreenerSortFieldSmartMoney__"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"volume\", \"direction\": \"DESC\"}] - Sort by volume descending\n- [{\"field\": \"net_positionz_change\", \"direction\": \"DESC\"}] - Sort by net_position_change descending\n- [{\"field\": \"buy_sell_pressure\", \"direction\": \"DESC\"}] - Sort by buy/sell pressure descending (smart money)\n\nDefault behavior:\n- When only_smart_money is False: sorts by buy_sell_pressure DESC\n- When only_smart_money is True: sorts by net_position_change DESC"}},"additionalProperties":false,"type":"object","required":["date"],"title":"PerpScreenerRequest","description":"Request model for Perp Screener endpoint."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"PerpScreenerFilters":{"properties":{"only_smart_money":{"anyOf":[{"type":"boolean"}],"title":"Only Smart Money","description":"Whether to only include smart money data","default":false},"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Asset symbol filter (e.g., BTC, ETH)"},"volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total traded notional in USD range filter"},"buy_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total USD value of market buy trades range filter"},"sell_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total USD value of market sell trades range filter"},"buy_sell_pressure":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Net USD flow range filter"},"trader_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of unique traders range filter"},"mark_price":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Latest mark price range filter"},"funding":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Latest funding rate range filter"},"previous_price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"First price in the time window range filter"},"open_interest":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Latest open interest range filter"},"smart_money_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total traded notional in USD by Smart Money range filter"},"smart_money_buy_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total USD value of Smart Money market buy trades range filter"},"smart_money_sell_volume":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Total USD value of Smart Money market sell trades range filter"},"net_position_change":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Net USD flow (buy_market_vol - sell_market_vol) range filter"},"current_smart_money_position_longs_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Aggregate USD value of Smart Money long positions range filter"},"current_smart_money_position_shorts_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Aggregate USD value of Smart Money short positions range filter"},"smart_money_longs_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of Smart Money accounts with net long position range filter"},"smart_money_shorts_count":{"anyOf":[{"$ref":"#/components/schemas/IntegerRangeFilter"}],"description":"Number of Smart Money accounts with net short position range filter"}},"additionalProperties":false,"type":"object","title":"PerpScreenerFilters","description":"Filters for perp screener endpoints.\n\nThese filters control which perpetual contracts are included in the screening\nresults based on various criteria."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"IntegerRangeFilter":{"properties":{"min":{"anyOf":[{"type":"integer"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"integer"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"IntegerRangeFilter","description":"Filter for integer values with optional min/max bounds.\nUse for counts, numbers of items, and other whole number values. - Values between 5 and 100"},"SortOrder_Union_PerpScreenerSortFieldDefault__PerpScreenerSortFieldSmartMoney__":{"properties":{"field":{"anyOf":[{"$ref":"#/components/schemas/PerpScreenerSortFieldDefault"},{"$ref":"#/components/schemas/PerpScreenerSortFieldSmartMoney"}],"title":"Field","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[Union[PerpScreenerSortFieldDefault, PerpScreenerSortFieldSmartMoney]]"},"PerpScreenerSortFieldDefault":{"type":"string","enum":["token_symbol","volume","buy_volume","sell_volume","buy_sell_pressure","trader_count","mark_price","funding","previous_price_usd","open_interest"],"title":"PerpScreenerSortFieldDefault","description":"Sort fields available for default perp screener data (only_smart_money=False)."},"PerpScreenerSortFieldSmartMoney":{"type":"string","enum":["token_symbol","smart_money_volume","smart_money_buy_volume","smart_money_sell_volume","net_position_change","trader_count","mark_price","funding","previous_price_usd","open_interest","current_smart_money_position_longs_usd","current_smart_money_position_shorts_usd","smart_money_longs_count","smart_money_shorts_count"],"title":"PerpScreenerSortFieldSmartMoney","description":"Sort fields available for smart money perp screener data (only_smart_money=True)."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PerpScreenerResponse":{"properties":{"data":{"items":{"anyOf":[{"$ref":"#/components/schemas/PerpScreenerDataDefault"},{"$ref":"#/components/schemas/PerpScreenerDataSmartMoney"}]},"type":"array","title":"Data","description":"List of perp screening results"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"PerpScreenerResponse","description":"Response model for perp screener endpoint."},"PerpScreenerDataDefault":{"properties":{"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Total traded notional in USD over the recent window."},"buy_volume":{"anyOf":[{"type":"number"}],"title":"Buy Volume","description":"Total USD value of market buy trades over the recent window."},"sell_volume":{"anyOf":[{"type":"number"}],"title":"Sell Volume","description":"Total USD value of market sell trades over the recent window."},"buy_sell_pressure":{"anyOf":[{"type":"number"}],"title":"Buy Sell Pressure","description":"Changes in position by Market Orders. Buys and sells through market orders (top of orderbook) indicate a rush into adjusting the position."},"trader_count":{"anyOf":[{"type":"integer"}],"title":"Trader Count","description":"Number of unique traders active over the recent window."},"token_symbol":{"type":"string","title":"Token Symbol","description":"Asset symbol (e.g., BTC, ETH) on Hyperliquid."},"mark_price":{"anyOf":[{"type":"number"}],"title":"Mark Price","description":"Latest mark price for the coin."},"funding":{"anyOf":[{"type":"number"}],"title":"Funding","description":"Latest funding rate/value for the coin."},"open_interest":{"anyOf":[{"type":"number"}],"title":"Open Interest","description":"Latest open interest for the coin."},"previous_price_usd":{"anyOf":[{"type":"number"}],"title":"Previous Price Usd","description":"First price in the time window."}},"type":"object","required":["token_symbol"],"title":"PerpScreenerDataDefault","description":"Data model for perp screener results when only_smart_money is False."},"PerpScreenerDataSmartMoney":{"properties":{"smart_money_volume":{"anyOf":[{"type":"number"}],"title":"Smart Money Volume","description":"Total traded notional in USD by Smart Money over the window."},"smart_money_buy_volume":{"anyOf":[{"type":"number"}],"title":"Smart Money Buy Volume","description":"Total USD value of Smart Money market buy trades over the window."},"smart_money_sell_volume":{"anyOf":[{"type":"number"}],"title":"Smart Money Sell Volume","description":"Total USD value of Smart Money market sell trades over the window."},"net_position_change":{"anyOf":[{"type":"number"}],"title":"Net Position Change","description":"Net USD flow (buy_market_vol - sell_market_vol) over the window."},"trader_count":{"anyOf":[{"type":"integer"}],"title":"Trader Count","description":"Number of unique Smart Money traders active over the window."},"token_symbol":{"type":"string","title":"Token Symbol","description":"Asset symbol (e.g., BTC, ETH) on Hyperliquid."},"mark_price":{"anyOf":[{"type":"number"}],"title":"Mark Price","description":"Latest mark price for the coin."},"funding":{"anyOf":[{"type":"number"}],"title":"Funding","description":"Latest funding rate/value for the coin."},"previous_price_usd":{"anyOf":[{"type":"number"}],"title":"Previous Price Usd","description":"First observed price within the time window."},"open_interest":{"anyOf":[{"type":"number"}],"title":"Open Interest","description":"Latest open interest in USD (open_interest × mark_price)."},"current_smart_money_position_longs_usd":{"anyOf":[{"type":"number"}],"title":"Current Smart Money Position Longs Usd","description":"Aggregate USD value of Smart Money long positions for the coin."},"current_smart_money_position_shorts_usd":{"anyOf":[{"type":"number"}],"title":"Current Smart Money Position Shorts Usd","description":"Aggregate USD value of Smart Money short positions for the coin (negative)."},"smart_money_longs_count":{"anyOf":[{"type":"integer"}],"title":"Smart Money Longs Count","description":"Number of Smart Money accounts with a net long position."},"smart_money_shorts_count":{"anyOf":[{"type":"integer"}],"title":"Smart Money Shorts Count","description":"Number of Smart Money accounts with a net short position."}},"type":"object","required":["token_symbol"],"title":"PerpScreenerDataSmartMoney","description":"Data model for perp screener results when only_smart_money is True."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/perp-screener":{"post":{"tags":["Token Screener"],"summary":"Get Perpetual Contract Screening Data","description":"Discover and screen perpetual contracts on Hyperliquid with advanced filtering capabilities. This endpoint helps identify trending perpetual contracts, trading activity, funding rates, and smart money movements by combining metrics like volume, open interest, funding rates, and position data.\n\n**What it helps to answer:**\n\n1. **Which perpetual contracts are experiencing significant trading volume and activity?**\n2. **How do funding rates correlate with trading patterns and smart money positions?**\n3. **What perpetual contracts show strong fundamentals in terms of open interest and trading patterns?**\n4. **Which perpetual contracts are attracting smart money participation with long/short positions?**","operationId":"get_perp_screener_api_v1_perp_screener_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpScreenerRequest"}}},"required":true},"responses":{"200":{"description":"Perpetual contract screening data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpScreenerResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Perp PnL Leaderboard

### Common Scenarios

<table data-full-width="true"><thead><tr><th>Usecase</th><th>Required Parameters</th><th>Optional Filters</th><th>Expected Output</th></tr></thead><tbody><tr><td>Filter for high-profit and high-balance addresses</td><td>token_symbol ="ETH" date ={ "from": "2025-10-14", "to": "2025-10-15" }</td><td>filters ={ "pnl_usd_realised": { "min": 100000 }, "position_value_usd": { "min": 100000 } }</td><td>Only addresses with at least $100k realized PnL and $100k+ in position value are shown</td></tr><tr><td>Surface only smart money traders for a specific contract</td><td>token_symbol ="SOL" date ={ "from": "2025-10-14", "to": "2025-10-15" }</td><td>filters ={ "trader_address_label": "Smart Money" }</td><td>Leaderboard limited to traders labeled as Smart Money</td></tr></tbody></table>

## Get TGM Perp PnL Leaderboard Data

> Rank traders by their profit/loss performance for a specific perpetual contract on Hyperliquid. Shows both realized profits (from completed trades) and unrealized profits (from current holdings), along with ROI percentages and trading patterns. This endpoint can be used to analyze the realized and unrealized profit for each trader who traded the input perpetual contract.\
> \
> \*\*Key Features:\*\*\
> \- Hyperliquid perpetual contracts only (no chain field needed)\
> \- Realized and unrealized PnL tracking\
> \- ROI calculations and trading patterns\
> \- Position size and balance tracking\
> \
> \*\*Request Format:\*\*\
> \- \`token\_symbol\`: Perpetual contract symbol (e.g., "BTC", "ETH", "SOL")\
> \- \`date\`: Date range for analysis\
> \- \`filters\`: Optional filters for trader addresses, PnL ranges, etc.\
> \- \`pagination\`: Page and per\_page parameters\
> \
> \*\*Label Tier Control (\`premium\_labels\`):\*\*\
> The \`premium\_labels\` parameter is now available to all users. When omitted, it defaults to \`true\` (premium labels). In a future release, the default will change to \`false\`. Pass \`premium\_labels=true\` explicitly to preserve premium label behavior.

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMPerpPnlLeaderboardRequest":{"properties":{"token_symbol":{"type":"string","title":"Token Symbol","description":"Perpetual contract symbol (e.g., BTC, ETH, SOL)"},"date":{"$ref":"#/components/schemas/DateRange","description":"ISO 8601 date-time range object with optional from and to fields"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMPerpPnlLeaderboardFilters"}],"description":"Additional filters to apply to the query."},"premium_labels":{"anyOf":[{"type":"boolean"}],"title":"Premium Labels","description":"Controls label tier in the response. When null/omitted (default), returns labels as per subscription plan (existing behavior). When false, returns free-tier labels for all users. When true, returns premium labels. Note: In a future release, the default will change from true to false — pass premium_labels=true explicitly to preserve premium label behavior."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMPerpPnlLeaderboardSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering"}},"type":"object","required":["token_symbol","date"],"title":"TGMPerpPnlLeaderboardRequest","description":"Request model for TGM Perp PnL leaderboard endpoint.\nSimplified version that only supports Hyperliquid perpetual contracts."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMPerpPnlLeaderboardFilters":{"properties":{"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader name filter"},"token_price":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token price range filter"},"pnl_usd_realised":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Realized PnL range filter in USD"},"pnl_usd_unrealised":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Unrealized PnL range filter in USD"},"holding_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Holding amount range filter"},"position_value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Position value range filter in USD (+ve = Long position, -ve = Short position, 0 = Flat)"},"max_balance_held":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Maximum balance held range filter"},"max_balance_held_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Maximum balance held range filter in USD"},"still_holding_balance_ratio":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Still holding balance ratio range filter"},"nof_trades":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Number of trades range filter"},"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels"}},"additionalProperties":false,"type":"object","title":"TGMPerpPnlLeaderboardFilters","description":"Filters for TGM Perp PnL leaderboard endpoint.\n\nThese filters control which traders are included in the leaderboard."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"SortOrder_TGMPerpPnlLeaderboardSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMPerpPnlLeaderboardSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMPerpPnlLeaderboardSortField]"},"TGMPerpPnlLeaderboardSortField":{"type":"string","enum":["pnl_usd_realised","pnl_usd_unrealised","pnl_usd_total","roi_percent_total","roi_percent_realised","roi_percent_unrealised","holding_amount","position_value_usd","max_balance_held","max_balance_held_usd","still_holding_balance_ratio","netflow_amount_usd","netflow_amount","nof_trades"],"title":"TGMPerpPnlLeaderboardSortField","description":"Enum for sortable fields in TGM Perp PnL leaderboard."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMPerpPnlLeaderboardResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMPerpPnlLeaderboard"},"type":"array","title":"Data","description":"List of TGM Perp PnL leaderboard records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMPerpPnlLeaderboardResponse","description":"Response model for TGM Perp PnL leaderboard endpoint.\nContains a list of PnL leaderboard records with pagination and metadata."},"TGMPerpPnlLeaderboard":{"properties":{"trader_address":{"type":"string","title":"Trader Address","description":"Hexadecimal representation of the trader's address."},"trader_address_label":{"anyOf":[{"type":"string"}],"title":"Trader Address Label","description":"Nansen name of the trader"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Token price in USD at date_to. Uses latest spot price if date_to is today or later, otherwise the daily median price for that date."},"pnl_usd_realised":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Realised","description":"Realised profit and loss in USD."},"pnl_usd_unrealised":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Unrealised","description":"Unrealised profit and loss in USD."},"holding_amount":{"anyOf":[{"type":"number"}],"title":"Holding Amount","description":"Current token balance"},"position_value_usd":{"anyOf":[{"type":"number"}],"title":"Position Value Usd","description":"Position value in USD (+ve = Long position, -ve = Short position, 0 = Flat)"},"max_balance_held":{"anyOf":[{"type":"number"}],"title":"Max Balance Held","description":"Maximum amount of tokens held at some point in time."},"max_balance_held_usd":{"anyOf":[{"type":"number"}],"title":"Max Balance Held Usd","description":"Maximum amount of tokens in current USD value, held at some point in time."},"still_holding_balance_ratio":{"anyOf":[{"type":"number"}],"title":"Still Holding Balance Ratio","description":"The ratio of current holdings to max balance held."},"netflow_amount_usd":{"anyOf":[{"type":"number"}],"title":"Netflow Amount Usd","description":"Netflow amount in USD."},"netflow_amount":{"anyOf":[{"type":"number"}],"title":"Netflow Amount","description":"Netflow amount."},"roi_percent_total":{"anyOf":[{"type":"number"}],"title":"Roi Percent Total","description":"Total ROI."},"roi_percent_realised":{"anyOf":[{"type":"number"}],"title":"Roi Percent Realised","description":"Realised ROI."},"roi_percent_unrealised":{"anyOf":[{"type":"number"}],"title":"Roi Percent Unrealised","description":"Unrealised ROI."},"pnl_usd_total":{"anyOf":[{"type":"number"}],"title":"Pnl Usd Total","description":"Total PNL in USD."},"nof_trades":{"anyOf":[{"type":"integer"}],"title":"Nof Trades","description":"Number of trades."}},"type":"object","required":["trader_address"],"title":"TGMPerpPnlLeaderboard","description":"Individual TGM Perp PnL leaderboard record.\nRepresents a single trader's PnL performance for a specific perpetual contract."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/perp-pnl-leaderboard":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Perp PnL Leaderboard Data","description":"Rank traders by their profit/loss performance for a specific perpetual contract on Hyperliquid. Shows both realized profits (from completed trades) and unrealized profits (from current holdings), along with ROI percentages and trading patterns. This endpoint can be used to analyze the realized and unrealized profit for each trader who traded the input perpetual contract.\n\n**Key Features:**\n- Hyperliquid perpetual contracts only (no chain field needed)\n- Realized and unrealized PnL tracking\n- ROI calculations and trading patterns\n- Position size and balance tracking\n\n**Request Format:**\n- `token_symbol`: Perpetual contract symbol (e.g., \"BTC\", \"ETH\", \"SOL\")\n- `date`: Date range for analysis\n- `filters`: Optional filters for trader addresses, PnL ranges, etc.\n- `pagination`: Page and per_page parameters\n\n**Label Tier Control (`premium_labels`):**\nThe `premium_labels` parameter is now available to all users. When omitted, it defaults to `true` (premium labels). In a future release, the default will change to `false`. Pass `premium_labels=true` explicitly to preserve premium label behavior.","operationId":"get_tgm_perp_pnl_leaderboard_api_v1_tgm_perp_pnl_leaderboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpPnlLeaderboardRequest"}}},"required":true},"responses":{"200":{"description":"TGM Perp PnL leaderboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpPnlLeaderboardResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Smart Money Perp Trades

## Get Smart Money Perpetual Trades Data

> Access real-time perpetual trading activity from smart traders and funds on Hyperliquid. This endpoint provides granular transaction-level data showing exactly what sophisticated traders are trading on perpetual contracts.\
> \
> Key Features:\
> \- Hyperliquid perpetual contracts only (no chain field needed)\
> \- Real-time trading data from smart money wallets\
> \- Detailed trade information including coin, amount, price, action, and type\
> \- Smart money filtering capabilities\
> \- Type filtering (Market/Limit)\
> \- Only new positions filter to show only position opening trades (defaults to false - shows all trades)

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"SmartMoneyPerpTradesRequest":{"properties":{"filters":{"anyOf":[{"$ref":"#/components/schemas/SmartMoneyPerpTradesFilters"}],"description":"Additional filters to apply. Only filters for columns that are being selected will be applied."},"only_new_positions":{"anyOf":[{"type":"boolean"}],"title":"Only New Positions","description":"When True, includes 'Open' position actions (Open Long, Open Short). Can be combined with other action filters using OR logic (union). When False (default), returns all trades.","default":false},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_SmartMoneyPerpTradesSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"value_usd\", \"direction\": \"DESC\"}] - Sort by trade value descending\n- [{\"field\": \"block_timestamp\", \"direction\": \"ASC\"}] - Sort by timestamp ascending\n- [{\"field\": \"token_amount\", \"direction\": \"DESC\"}, {\"field\": \"block_timestamp\", \"direction\": \"ASC\"}] - Sort by token amount descending, then timestamp ascending"}},"additionalProperties":false,"type":"object","title":"SmartMoneyPerpTradesRequest","description":""},"SmartMoneyPerpTradesFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels for traders"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels for traders"},"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader name or label filter"},"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Token symbol filter"},"type":{"anyOf":[{"$ref":"#/components/schemas/TradeType"}],"description":"Trade type filter - Market or Limit"},"token_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token amount range filter"},"price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Price range filter in USD"},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Trade value range filter in USD"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"},{"items":{"$ref":"#/components/schemas/PositionSide"},"type":"array"},{"type":"null"}],"title":"Side","description":"Position side filter - Long or Short"},"action":{"anyOf":[{"$ref":"#/components/schemas/PerpActionType"},{"items":{"$ref":"#/components/schemas/PerpActionType"},"type":"array"},{"type":"null"}],"title":"Action","description":"Action filter - combined buy/sell with position action (e.g., 'Buy - Add Long', 'Sell - Open Short')"}},"additionalProperties":false,"type":"object","title":"SmartMoneyPerpTradesFilters","description":"Filters for smart money perpetual trades endpoint.\n\nThese filters control which perpetual trades and traders\nare included in the trades analysis."},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"TradeType":{"type":"string","enum":["Market","Limit"],"title":"TradeType","description":"Enum for trade types."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"PositionSide":{"type":"string","enum":["Long","Short"],"title":"PositionSide","description":"Shared enum for position side direction."},"PerpActionType":{"type":"string","enum":["Buy - Add Long","Buy - Reduce Short","Buy - Open Long","Buy - Close Short","Sell - Add Short","Sell - Reduce Long","Sell - Open Short","Sell - Close Long"],"title":"PerpActionType","description":"Shared enum for perpetual trade action types (combined buy/sell with position actions)."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_SmartMoneyPerpTradesSortField_":{"properties":{"field":{"$ref":"#/components/schemas/SmartMoneyPerpTradesSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[SmartMoneyPerpTradesSortField]"},"SmartMoneyPerpTradesSortField":{"type":"string","enum":["block_timestamp","token_amount","price_usd","value_usd"],"title":"SmartMoneyPerpTradesSortField","description":"Enum for sortable fields in smart money perp trades."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"SmartMoneyPerpTradesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SmartMoneyPerpTrade"},"type":"array","title":"Data","description":"List of smart money perpetual trade records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"SmartMoneyPerpTradesResponse","description":"Response model for smart money perpetual trades endpoint.\n\nContains the filtered smart money perpetual trades data with metadata."},"SmartMoneyPerpTrade":{"properties":{"trader_address_label":{"type":"string","title":"Trader Address Label","description":"Name of the trader, based on Nansen labels"},"trader_address":{"type":"string","title":"Trader Address","description":"Hexadecimal representation of the trader's address, i.e. the signer of the transaction"},"token_symbol":{"type":"string","title":"Token Symbol","description":"The token symbol"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"}],"description":"The side of the position (Long or Short)"},"action":{"type":"string","title":"Action","description":"The action taken by the trader (Add, Reduce, Open, Close)"},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","description":"Trade size in contract units"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Trade price in USD"},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"Notional trade value in USD"},"type":{"$ref":"#/components/schemas/TradeType","description":"The trade type (Market or Limit)"},"block_timestamp":{"type":"string","title":"Block Timestamp","description":"The timestamp of the block"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"Hexadecimal representation of the transaction hash"}},"type":"object","required":["trader_address_label","trader_address","token_symbol","action","type","block_timestamp","transaction_hash"],"title":"SmartMoneyPerpTrade","description":"Individual smart money perpetual trade record.\n\nRepresents a single perpetual trade made by smart money wallets on Hyperliquid."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/smart-money/perp-trades":{"post":{"tags":["Smart Money"],"summary":"Get Smart Money Perpetual Trades Data","description":"Access real-time perpetual trading activity from smart traders and funds on Hyperliquid. This endpoint provides granular transaction-level data showing exactly what sophisticated traders are trading on perpetual contracts.\n\nKey Features:\n- Hyperliquid perpetual contracts only (no chain field needed)\n- Real-time trading data from smart money wallets\n- Detailed trade information including coin, amount, price, action, and type\n- Smart money filtering capabilities\n- Type filtering (Market/Limit)\n- Only new positions filter to show only position opening trades (defaults to false - shows all trades)","operationId":"get_smart_money_perp_trades_api_v1_smart_money_perp_trades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyPerpTradesRequest"}}},"required":true},"responses":{"200":{"description":"Smart money perpetual trades data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartMoneyPerpTradesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Token Perp Positions

## Get TGM Perp Positions Data

> Retrieve current perpetual positions for a specific token on Hyperliquid. Shows active positions with detailed metrics including entry price, mark price, leverage, PnL, and liquidation price.\
> \
> \*\*Key Features:\*\*\
> \- Hyperliquid perpetual contracts only (no chain field needed)\
> \- Real-time position tracking with live PnL calculations\
> \- Leverage and margin information\
> \- Smart money filtering capabilities\
> \- Support for both Long and Short positions\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the current perp positions for a specific token?\*\*\
> 2\. \*\*Which addresses have the largest positions by value?\*\*\
> 3\. \*\*What are the unrealized gains/losses on current positions?\*\*\
> 4\. \*\*What leverage levels are traders using?\*\*\
> 5\. \*\*Which smart money wallets are holding positions?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMPerpPositionsRequest":{"properties":{"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"label_type":{"$ref":"#/components/schemas/TGMPerpPositionsLabel","description":"Label type filter","default":"all_traders"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMPerpPositionsFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMPerpPositionsSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"position_value_usd\", \"direction\": \"DESC\"}] - Sort by position value USD descending\n- [{\"field\": \"upnl_usd\", \"direction\": \"ASC\"}] - Sort by unrealized PnL ascending\n- [{\"field\": \"leverage\", \"direction\": \"DESC\"}] - Sort by leverage descending"}},"additionalProperties":false,"type":"object","required":["token_symbol"],"title":"TGMPerpPositionsRequest","description":"Request model for TGM perp positions endpoint.\n\nThis endpoint provides perp positions data for a specific token."},"TGMPerpPositionsLabel":{"type":"string","enum":["smart_money","all_traders","whale","public_figure"],"title":"TGMPerpPositionsLabel","description":"TGM perp positions label types."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMPerpPositionsFilters":{"properties":{"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels for traders"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels for traders"},"address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Address","description":"Trader address filter"},"address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Address Label","description":"Trader label filter"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"},{"items":{"$ref":"#/components/schemas/PositionSide"},"type":"array"},{"type":"null"}],"title":"Side","description":"Position side filter (Long or Short)"},"position_value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Position value range filter in USD"},"position_size":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Position size range filter (token amount)"},"entry_price":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Entry price range filter"},"upnl_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Unrealized PnL range filter in USD"},"funding_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Funding range filter in USD"}},"additionalProperties":false,"type":"object","title":"TGMPerpPositionsFilters","description":"Filters for TGM perp positions endpoint.\n\nThese filters control which perp positions are included in the analysis."},"LabelType":{"type":"string","enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"title":"LabelType","description":"Filter by entity label type."},"PositionSide":{"type":"string","enum":["Long","Short"],"title":"PositionSide","description":"Shared enum for position side direction."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SortOrder_TGMPerpPositionsSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMPerpPositionsSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMPerpPositionsSortField]"},"TGMPerpPositionsSortField":{"type":"string","enum":["address","address_label","side","position_value_usd","position_size","leverage","entry_price","mark_price","liquidation_price","funding_usd","upnl_usd"],"title":"TGMPerpPositionsSortField","description":"Enum for sortable fields in TGM perp positions."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMPerpPositionsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMPerpPosition"},"type":"array","title":"Data","description":"List of TGM perp position records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMPerpPositionsResponse","description":"Response model for TGM perp positions endpoint.\n\nContains a list of perp position records with pagination and metadata."},"TGMPerpPosition":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"The wallet address of the trader."},"address_label":{"anyOf":[{"type":"string"}],"title":"Address Label","description":"Wallet or labeled entity holding the position."},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"}],"description":"Position direction (Long/Short)"},"position_value_usd":{"anyOf":[{"type":"number"}],"title":"Position Value Usd","description":"USD notional size of the position."},"position_size":{"anyOf":[{"type":"number"}],"title":"Position Size","description":"The position size (token amount)."},"leverage":{"type":"string","title":"Leverage","description":"The leverage applied to the position."},"leverage_type":{"anyOf":[{"type":"string"}],"title":"Leverage Type","description":"The type of leverage used, e.g., cross or isolated."},"entry_price":{"anyOf":[{"type":"number"}],"title":"Entry Price","description":"Average price where the position was opened."},"mark_price":{"anyOf":[{"type":"number"}],"title":"Mark Price","description":"The current mark price of the asset."},"liquidation_price":{"anyOf":[{"type":"number"}],"title":"Liquidation Price","description":"The price at which the position would be liquidated."},"funding_usd":{"anyOf":[{"type":"number"}],"title":"Funding Usd","description":"Net funding paid (-) or received (+) since entry."},"upnl_usd":{"anyOf":[{"type":"number"}],"title":"Upnl Usd","description":"Unrealized profit/loss including funding."}},"type":"object","required":["leverage"],"title":"TGMPerpPosition","description":"Individual TGM perp position record.\n\nRepresents a single perp position."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/perp-positions":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Perp Positions Data","description":"Retrieve current perpetual positions for a specific token on Hyperliquid. Shows active positions with detailed metrics including entry price, mark price, leverage, PnL, and liquidation price.\n\n**Key Features:**\n- Hyperliquid perpetual contracts only (no chain field needed)\n- Real-time position tracking with live PnL calculations\n- Leverage and margin information\n- Smart money filtering capabilities\n- Support for both Long and Short positions\n\n**What it helps to answer:**\n\n1. **What are the current perp positions for a specific token?**\n2. **Which addresses have the largest positions by value?**\n3. **What are the unrealized gains/losses on current positions?**\n4. **What leverage levels are traders using?**\n5. **Which smart money wallets are holding positions?**","operationId":"get_tgm_perp_positions_api_v1_tgm_perp_positions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpPositionsRequest"}}},"required":true},"responses":{"200":{"description":"TGM perp positions data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpPositionsResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Token Perp Trades

## Get TGM Perp Trades Data

> Retrieve perpetual trade data for a specific token on Hyperliquid. Shows individual trades with detailed information including trader address, trade side (Long/Short), action type (Add/Reduce/Open/Close), order type (Market/Limit), and trade metrics.\
> \
> \*\*Key Features:\*\*\
> \- Hyperliquid perpetual contracts only\
> \- Smart money filtering capabilities\
> \- Detailed trade breakdown with parsed action fields\
> \- Support for both Long and Short position trading\
> \- Market and Limit order types\
> \
> \*\*Request Parameters:\*\*\
> \- \`token\_symbol\`: Token symbol to fetch trades for (e.g., "BTC", "ETH")\
> \- \`date\`: Date range for the trades\
> \- \`filters\`: Additional filters for side, action, order\_type, etc.\
> \- \`pagination\`: Page and per\_page parameters

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMPerpTradesRequest":{"properties":{"token_symbol":{"type":"string","title":"Token Symbol","description":"Token symbol"},"date":{"$ref":"#/components/schemas/DateRange","description":"ISO 8601 date-time range object with optional from and to fields"},"pagination":{"$ref":"#/components/schemas/PaginationRequest","description":"Pagination parameters"},"filters":{"anyOf":[{"$ref":"#/components/schemas/TGMPerpTradesFilters"}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TGMPerpTradesSortField_"},"type":"array"}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"block_timestamp\", \"direction\": \"DESC\"}] - Sort by timestamp descending\n- [{\"field\": \"value_usd\", \"direction\": \"DESC\"}] - Sort by trade value descending\n\nDefault: block_timestamp DESC, transaction_hash ASC, trader_address ASC (ensures stable pagination and prevents duplicate rows)"}},"additionalProperties":false,"type":"object","required":["token_symbol","date"],"title":"TGMPerpTradesRequest","description":"Request model for TGM perp trades endpoint.\n\nThis endpoint provides perp trades data for a specific token."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"TGMPerpTradesFilters":{"properties":{"trader_address":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address","description":"Trader address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trader Address Label","description":"Trader label filter"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"},{"items":{"$ref":"#/components/schemas/PositionSide"},"type":"array"},{"type":"null"}],"title":"Side","description":"Position side filter (Long or Short)"},"action":{"anyOf":[{"$ref":"#/components/schemas/PerpActionType"},{"items":{"$ref":"#/components/schemas/PerpActionType"},"type":"array"},{"type":"null"}],"title":"Action","description":"Action filter with combined buy/sell direction (e.g., 'Buy - Add Long', 'Sell - Reduce Long')"},"order_type":{"anyOf":[{"$ref":"#/components/schemas/OrderType"},{"items":{"$ref":"#/components/schemas/OrderType"},"type":"array"},{"type":"null"}],"title":"Order Type","description":"Order type filter (MARKET or LIMIT)"},"token_amount":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Token amount range filter"},"price_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Price range filter in USD"},"value_usd":{"anyOf":[{"$ref":"#/components/schemas/NumericRangeFilter"}],"description":"Trade value range filter in USD"},"include_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Include Smart Money Labels","description":"Include smart money labels"},"exclude_smart_money_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/SmartMoneyFilterType"},"type":"array"}],"title":"Exclude Smart Money Labels","description":"Exclude smart money labels"}},"additionalProperties":false,"type":"object","title":"TGMPerpTradesFilters","description":"Filters for TGM perp trades endpoint.\n\nThese filters control which perp trades are included in the results."},"PositionSide":{"type":"string","enum":["Long","Short"],"title":"PositionSide","description":"Shared enum for position side direction."},"PerpActionType":{"type":"string","enum":["Buy - Add Long","Buy - Reduce Short","Buy - Open Long","Buy - Close Short","Sell - Add Short","Sell - Reduce Long","Sell - Open Short","Sell - Close Long"],"title":"PerpActionType","description":"Shared enum for perpetual trade action types (combined buy/sell with position actions)."},"OrderType":{"type":"string","enum":["MARKET","LIMIT"],"title":"OrderType","description":"Order type."},"NumericRangeFilter":{"properties":{"min":{"anyOf":[{"type":"number"}],"title":"Min","description":"Minimum value (inclusive)"},"max":{"anyOf":[{"type":"number"}],"title":"Max","description":"Maximum value (inclusive)"}},"type":"object","title":"NumericRangeFilter","description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"},"SmartMoneyFilterType":{"type":"string","enum":["Fund","Smart Trader","30D Smart Trader","90D Smart Trader","180D Smart Trader","Smart HL Perps Trader"],"title":"SmartMoneyFilterType","description":"Filter by smart money label type."},"SortOrder_TGMPerpTradesSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TGMPerpTradesSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TGMPerpTradesSortField]"},"TGMPerpTradesSortField":{"type":"string","enum":["block_timestamp","token_amount","value_usd","transaction_hash","trader_address"],"title":"TGMPerpTradesSortField","description":"Enum for sortable fields in TGM perp trades."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TGMPerpTradesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMPerpTrade"},"type":"array","title":"Data","description":"List of TGM perp trade records"},"pagination":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination information"}},"type":"object","required":["data","pagination"],"title":"TGMPerpTradesResponse","description":"Response model for TGM perp trades endpoint.\n\nContains a list of perp trade records with pagination and metadata."},"TGMPerpTrade":{"properties":{"trader_address_label":{"anyOf":[{"type":"string"}],"title":"Trader Address Label","description":"The label associated with the trader"},"trader_address":{"type":"string","title":"Trader Address","description":"The trader's address"},"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"The symbol of the token"},"side":{"anyOf":[{"$ref":"#/components/schemas/PositionSide"}],"description":"The side of the position (Long or Short)"},"action":{"type":"string","title":"Action","description":"The action taken by the trader (Add, Reduce, Open, Close)"},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","description":"The amount of the specified token traded"},"price_usd":{"anyOf":[{"type":"number"}],"title":"Price Usd","description":"Average fill price in USD across all fills in the trade, from exchange data."},"value_usd":{"anyOf":[{"type":"number"}],"title":"Value Usd","description":"The value in USD"},"type":{"$ref":"#/components/schemas/OrderType","description":"The order type (MARKET or LIMIT)"},"block_timestamp":{"type":"string","title":"Block Timestamp","description":"The block timestamp for the transaction"},"transaction_hash":{"type":"string","title":"Transaction Hash","description":"A representative transaction hash for this trade. Note: A single row may aggregate multiple fills that occurred at the same timestamp. If the trader had fills across multiple transactions at the exact same millisecond, only one transaction_hash is shown. The token_amount and value_usd reflect the total across all fills."}},"type":"object","required":["trader_address","action","type","block_timestamp","transaction_hash"],"title":"TGMPerpTrade","description":"Individual TGM perp trade record.\n\nRepresents a single perp trade with parsed action fields."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/tgm/perp-trades":{"post":{"tags":["Token God Mode"],"summary":"Get TGM Perp Trades Data","description":"Retrieve perpetual trade data for a specific token on Hyperliquid. Shows individual trades with detailed information including trader address, trade side (Long/Short), action type (Add/Reduce/Open/Close), order type (Market/Limit), and trade metrics.\n\n**Key Features:**\n- Hyperliquid perpetual contracts only\n- Smart money filtering capabilities\n- Detailed trade breakdown with parsed action fields\n- Support for both Long and Short position trading\n- Market and Limit order types\n\n**Request Parameters:**\n- `token_symbol`: Token symbol to fetch trades for (e.g., \"BTC\", \"ETH\")\n- `date`: Date range for the trades\n- `filters`: Additional filters for side, action, order_type, etc.\n- `pagination`: Page and per_page parameters","operationId":"get_tgm_perp_trades_api_v1_tgm_perp_trades_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpTradesRequest"}}},"required":true},"responses":{"200":{"description":"TGM perp trades data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMPerpTradesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Prediction Market

Nansen's Prediction Market API endpoints provide comprehensive access to onchain prediction market data. Track positions, analyze market activity, find top traders, and discover trending events on Polymarket

### What can you do? <a href="#what-can-you-do" id="what-can-you-do"></a>

With Prediction Market endpoints, you can:

* **Discover trending markets and events:** Screen markets by volume, liquidity, and activity to find what's moving
* **Analyze wallet performance:** Track any address's prediction market trades, positions, and PnL
* **Find top traders:** Identify the most profitable participants on specific markets
* **Monitor market dynamics:** Access orderbooks, price history (OHLCV), and trade flows for any market
* **Browse by category:** Filter markets by topic: politics, crypto, sports, and more

### Which endpoints can I use? <a href="#which-endpoints-can-i-use" id="which-endpoints-can-i-use"></a>

| I want to...                                              | Use this endpoint | Best for                                 |
| --------------------------------------------------------- | ----------------- | ---------------------------------------- |
| Find high-volume or trending prediction markets           | Market Screener   | Market discovery and trends              |
| Browse and filter events by category, status, or volume   | Event Screener    | Event discovery                          |
| View price history for a specific market                  | OHLCV             | Charting and trend analysis              |
| See the current orderbook depth for a market              | Orderbook         | Liquidity analysis and entry/exit sizing |
| Find the largest position holders in a market             | Top Holders       | Identifying conviction holders           |
| See all trades made by a wallet across prediction markets | Trades by Address | Wallet activity breakdown                |
| View all trades on a specific market                      | Trades by Market  | Market-level trade flow                  |
| See a wallet's PnL and win rate across all markets        | PnL by Address    | Trader performance analysis              |
| See profitability rankings for a specific market          | PnL by Market     | Find top performers per market           |
| Get full details on a wallet's open position in a market  | Position Detail   | Position monitoring                      |
| Browse available market categories                        | Categories        | Navigation and filtering                 |
| PnL, Win rate and age of a wallet                         | Address Summary   | Screening wallets                        |

### Key Concepts <a href="#key-concepts" id="key-concepts"></a>

**Market vs Event**

Prediction markets are organised into two levels:

| Concept    | Description                                                    | Example                                                 |
| ---------- | -------------------------------------------------------------- | ------------------------------------------------------- |
| **Market** | The fundamental tradable unit: a single binary Yes/No question | "Will ETH reach $5k in 2025?"                           |
| **Event**  | A container that groups one or more related markets            | "2025 Crypto Predictions" (containing multiple markets) |

**Positions and Shares**

Unlike perp trading, prediction market positions are expressed as **shares** in a YES/NO outcome:

* A positive position = holding YES shares (bullish on the event)
* A negative position = holding NO shares (bearish on the event)
* Price ranges from $0 to $1, representing the implied probability

**Platforms Covered**

Nansen currently only supports data across Polymarket. We will be adding more platforms in the future.


# Market Categories

## Get Prediction Market Categories

> Get aggregated statistics for all prediction market categories. Shows volume,\
> open interest, and top markets per category.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Which prediction market categories have the most activity?\*\*\
> 2\. \*\*What is the volume breakdown by category?\*\*\
> 3\. \*\*What are the top markets in each category?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"CategoriesRequest":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationRequest"}},"additionalProperties":false,"type":"object","title":"CategoriesRequest","description":"Request for categories endpoint (pagination only)."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"CategoriesResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/CategoryItem"},"type":"array","title":"Data","description":"List of category records"}},"type":"object","required":["data"],"title":"CategoriesResponse","description":"Response for categories endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"CategoryItem":{"properties":{"category":{"type":"string","title":"Category","description":"Category name"},"active_markets":{"anyOf":[{"type":"integer"}],"title":"Active Markets","description":"Number of active markets"},"total_open_interest":{"anyOf":[{"type":"number"}],"title":"Total Open Interest","description":"Total open interest (USD)"},"total_volume":{"anyOf":[{"type":"number"}],"title":"Total Volume","description":"Total volume (USD)"},"total_volume_24hr":{"anyOf":[{"type":"number"}],"title":"Total Volume 24Hr","description":"Total 24h volume (USD)"},"total_volume_1wk":{"anyOf":[{"type":"number"}],"title":"Total Volume 1Wk","description":"Total 1 week volume (USD)"},"total_traders_24h":{"anyOf":[{"type":"integer"}],"title":"Total Traders 24H","description":"Total unique traders in 24h"},"top_market_id":{"anyOf":[{"type":"string"}],"title":"Top Market Id","description":"Top market by 24h volume"},"top_market_question":{"anyOf":[{"type":"string"}],"title":"Top Market Question","description":"Top market question"},"top_market_volume_24hr":{"anyOf":[{"type":"number"}],"title":"Top Market Volume 24Hr","description":"Top market 24h volume"}},"type":"object","required":["category"],"title":"CategoryItem","description":"Category data from ch_api_pm_categories."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/categories":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market Categories","description":"Get aggregated statistics for all prediction market categories. Shows volume,\nopen interest, and top markets per category.\n\n**What it helps to answer:**\n\n1. **Which prediction market categories have the most activity?**\n2. **What is the volume breakdown by category?**\n3. **What are the top markets in each category?**","operationId":"get_prediction_market_categories_api_v1_prediction_market_categories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesRequest"}}},"required":true},"responses":{"200":{"description":"Category data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Market Screener

## Get Prediction Market Screener

> Browse and filter all Polymarket prediction markets. Supports sorting by volume,\
> liquidity, price change, and more. Filter by search query and active/closed status.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the most active prediction markets right now?\*\*\
> 2\. \*\*Which markets have the highest volume or liquidity?\*\*\
> 3\. \*\*What new markets have been created recently?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"MarketScreenerRequest":{"properties":{"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_ScreenerSortField_"},"type":"array"}],"title":"Order By","description":"Sort order"},"sort_by":{"$ref":"#/components/schemas/ScreenerSortField","description":"Deprecated: use 'order_by' instead.","default":"volume_24hr"},"query":{"type":"string","maxLength":200,"title":"Query","description":"Search query to filter results","default":""},"status":{"$ref":"#/components/schemas/MarketStatus","description":"Filter by status (active, closed, or empty for all)","default":""},"tags":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Tags","description":"Filter by tags"},"min_liquidity":{"type":"number","minimum":-1,"title":"Min Liquidity","description":"Minimum liquidity filter (-1 = no filter)","default":-1},"max_liquidity":{"type":"number","minimum":-1,"title":"Max Liquidity","description":"Maximum liquidity filter (-1 = no limit)","default":-1},"max_unique_traders_24h":{"type":"integer","minimum":-1,"title":"Max Unique Traders 24H","description":"Maximum unique traders in 24h (-1 = no limit)","default":-1},"min_volume_24hr":{"type":"number","minimum":-1,"title":"Min Volume 24Hr","description":"Minimum 24h volume filter (-1 = no filter)","default":-1},"neg_risk":{"anyOf":[{"type":"boolean"}],"title":"Neg Risk","description":"Filter by neg-risk framework (null = no filter)"},"min_open_interest":{"type":"number","minimum":-1,"title":"Min Open Interest","description":"Minimum open interest filter (-1 = no filter)","default":-1},"max_open_interest":{"type":"number","minimum":-1,"title":"Max Open Interest","description":"Maximum open interest filter (-1 = no limit)","default":-1},"end_date_before":{"type":"string","maxLength":100,"title":"End Date Before","description":"Filter markets ending before this datetime (ISO 8601)","default":""},"end_date_after":{"type":"string","maxLength":100,"title":"End Date After","description":"Filter markets ending after this datetime (ISO 8601)","default":""},"pagination":{"$ref":"#/components/schemas/PaginationRequest"},"min_price":{"type":"number","minimum":-1,"title":"Min Price","description":"Minimum price filter (-1 = no filter)","default":-1},"max_price":{"type":"number","minimum":-1,"title":"Max Price","description":"Maximum price filter (-1 = no limit)","default":-1}},"additionalProperties":false,"type":"object","title":"MarketScreenerRequest","description":"Request for market screener endpoint."},"SortOrder_ScreenerSortField_":{"properties":{"field":{"$ref":"#/components/schemas/ScreenerSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[ScreenerSortField]"},"ScreenerSortField":{"type":"string","enum":["volume_24hr","volume","volume_1wk","volume_1mo","liquidity","open_interest","unique_traders_24h","age_hours"],"title":"ScreenerSortField","description":"Valid sort fields for screener endpoints."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"MarketStatus":{"type":"string","enum":["active","closed",""],"title":"MarketStatus","description":"Valid status filters for screener endpoints."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"MarketScreenerResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/MarketScreenerItem"},"type":"array","title":"Data","description":"List of market screener records"}},"type":"object","required":["data"],"title":"MarketScreenerResponse","description":"Response for market screener endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"MarketScreenerItem":{"properties":{"market_id":{"type":"string","title":"Market Id","description":"Market ID"},"question":{"anyOf":[{"type":"string"}],"title":"Question","description":"Market question"},"slug":{"anyOf":[{"type":"string"}],"title":"Slug","description":"URL slug"},"event_id":{"anyOf":[{"type":"string"}],"title":"Event Id","description":"Parent event ID"},"event_title":{"anyOf":[{"type":"string"}],"title":"Event Title","description":"Parent event title"},"active":{"anyOf":[{"type":"boolean"}],"title":"Active","description":"Whether market is active"},"closed":{"anyOf":[{"type":"boolean"}],"title":"Closed","description":"Whether market is closed"},"end_date":{"anyOf":[{"type":"string","format":"date-time"}],"title":"End Date","description":"Market end date"},"neg_risk":{"anyOf":[{"type":"boolean"}],"title":"Neg Risk","description":"Uses neg-risk framework"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Tags","description":"Market tags"},"volume":{"anyOf":[{"type":"number"}],"title":"Volume","description":"Total volume (USD)"},"volume_24hr":{"anyOf":[{"type":"number"}],"title":"Volume 24Hr","description":"24h volume (USD)"},"volume_1wk":{"anyOf":[{"type":"number"}],"title":"Volume 1Wk","description":"1 week volume (USD)"},"volume_1mo":{"anyOf":[{"type":"number"}],"title":"Volume 1Mo","description":"1 month volume (USD)"},"liquidity":{"anyOf":[{"type":"number"}],"title":"Liquidity","description":"Current liquidity (USD)"},"volume_change_pct":{"anyOf":[{"type":"number"}],"title":"Volume Change Pct","description":"Volume change percentage"},"open_interest":{"anyOf":[{"type":"number"}],"title":"Open Interest","description":"Open interest (USD)"},"best_bid":{"anyOf":[{"type":"number"}],"title":"Best Bid","description":"Best bid price"},"best_ask":{"anyOf":[{"type":"number"}],"title":"Best Ask","description":"Best ask price"},"last_trade_price":{"anyOf":[{"type":"number"}],"title":"Last Trade Price","description":"Last trade price"},"one_day_price_change":{"anyOf":[{"type":"number"}],"title":"One Day Price Change","description":"24h price change"},"unique_traders_24h":{"anyOf":[{"type":"integer"}],"title":"Unique Traders 24H","description":"Unique traders in 24h"},"created_at":{"anyOf":[{"type":"string","format":"date-time"}],"title":"Created At","description":"Market creation time"},"age_hours":{"anyOf":[{"type":"number"}],"title":"Age Hours","description":"Market age in hours"}},"type":"object","required":["market_id"],"title":"MarketScreenerItem","description":"Market screener data from ch_api_pm_market_screener."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/market-screener":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market Screener","description":"Browse and filter all Polymarket prediction markets. Supports sorting by volume,\nliquidity, price change, and more. Filter by search query and active/closed status.\n\n**What it helps to answer:**\n\n1. **What are the most active prediction markets right now?**\n2. **Which markets have the highest volume or liquidity?**\n3. **What new markets have been created recently?**","operationId":"get_prediction_market_screener_api_v1_prediction_market_market_screener_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketScreenerRequest"}}},"required":true},"responses":{"200":{"description":"Market screener data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketScreenerResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Market Event Screener

## Get Prediction Market Event Screener

> Browse and filter Polymarket events (groups of related markets). Includes aggregated\
> volume, liquidity, and trader counts across all markets in each event.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the most popular prediction market events?\*\*\
> 2\. \*\*How much total volume does an event have across all its markets?\*\*\
> 3\. \*\*Which events have the most active trading?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"EventScreenerRequest":{"properties":{"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_ScreenerSortField_"},"type":"array"}],"title":"Order By","description":"Sort order"},"sort_by":{"$ref":"#/components/schemas/ScreenerSortField","description":"Deprecated: use 'order_by' instead.","default":"volume_24hr"},"query":{"type":"string","maxLength":200,"title":"Query","description":"Search query to filter results","default":""},"status":{"$ref":"#/components/schemas/MarketStatus","description":"Filter by status (active, closed, or empty for all)","default":""},"tags":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Tags","description":"Filter by tags"},"min_liquidity":{"type":"number","minimum":-1,"title":"Min Liquidity","description":"Minimum liquidity filter (-1 = no filter)","default":-1},"max_liquidity":{"type":"number","minimum":-1,"title":"Max Liquidity","description":"Maximum liquidity filter (-1 = no limit)","default":-1},"max_unique_traders_24h":{"type":"integer","minimum":-1,"title":"Max Unique Traders 24H","description":"Maximum unique traders in 24h (-1 = no limit)","default":-1},"min_volume_24hr":{"type":"number","minimum":-1,"title":"Min Volume 24Hr","description":"Minimum 24h volume filter (-1 = no filter)","default":-1},"neg_risk":{"anyOf":[{"type":"boolean"}],"title":"Neg Risk","description":"Filter by neg-risk framework (null = no filter)"},"min_open_interest":{"type":"number","minimum":-1,"title":"Min Open Interest","description":"Minimum open interest filter (-1 = no filter)","default":-1},"max_open_interest":{"type":"number","minimum":-1,"title":"Max Open Interest","description":"Maximum open interest filter (-1 = no limit)","default":-1},"end_date_before":{"type":"string","maxLength":100,"title":"End Date Before","description":"Filter markets ending before this datetime (ISO 8601)","default":""},"end_date_after":{"type":"string","maxLength":100,"title":"End Date After","description":"Filter markets ending after this datetime (ISO 8601)","default":""},"pagination":{"$ref":"#/components/schemas/PaginationRequest"}},"additionalProperties":false,"type":"object","title":"EventScreenerRequest","description":"Request for event screener endpoint."},"SortOrder_ScreenerSortField_":{"properties":{"field":{"$ref":"#/components/schemas/ScreenerSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[ScreenerSortField]"},"ScreenerSortField":{"type":"string","enum":["volume_24hr","volume","volume_1wk","volume_1mo","liquidity","open_interest","unique_traders_24h","age_hours"],"title":"ScreenerSortField","description":"Valid sort fields for screener endpoints."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"MarketStatus":{"type":"string","enum":["active","closed",""],"title":"MarketStatus","description":"Valid status filters for screener endpoints."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"EventScreenerResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/EventScreenerItem"},"type":"array","title":"Data","description":"List of event screener records"}},"type":"object","required":["data"],"title":"EventScreenerResponse","description":"Response for event screener endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"EventScreenerItem":{"properties":{"event_id":{"type":"string","title":"Event Id","description":"Event ID"},"event_title":{"anyOf":[{"type":"string"}],"title":"Event Title","description":"Event title"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Tags","description":"Event tags"},"neg_risk":{"anyOf":[{"type":"boolean"}],"title":"Neg Risk","description":"Uses neg-risk framework"},"market_count":{"anyOf":[{"type":"integer"}],"title":"Market Count","description":"Number of markets"},"total_volume":{"anyOf":[{"type":"number"}],"title":"Total Volume","description":"Total volume (USD)"},"total_volume_24hr":{"anyOf":[{"type":"number"}],"title":"Total Volume 24Hr","description":"Total 24h volume (USD)"},"total_volume_1wk":{"anyOf":[{"type":"number"}],"title":"Total Volume 1Wk","description":"Total 1 week volume (USD)"},"total_volume_1mo":{"anyOf":[{"type":"number"}],"title":"Total Volume 1Mo","description":"Total 1 month volume (USD)"},"total_liquidity":{"anyOf":[{"type":"number"}],"title":"Total Liquidity","description":"Total liquidity (USD)"},"total_open_interest":{"anyOf":[{"type":"number"}],"title":"Total Open Interest","description":"Total open interest (USD)"},"total_volume_change_pct":{"anyOf":[{"type":"number"}],"title":"Total Volume Change Pct","description":"Total volume change percentage"},"total_traders_24h":{"anyOf":[{"type":"integer"}],"title":"Total Traders 24H","description":"Total unique traders in 24h"},"max_age_hours":{"anyOf":[{"type":"number"}],"title":"Max Age Hours","description":"Max market age in hours"},"top_market_id":{"anyOf":[{"type":"string"}],"title":"Top Market Id","description":"Top market by 24h volume"},"top_market_question":{"anyOf":[{"type":"string"}],"title":"Top Market Question","description":"Top market question"},"top_market_volume_24hr":{"anyOf":[{"type":"number"}],"title":"Top Market Volume 24Hr","description":"Top market 24h volume"},"markets":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventScreenerMarket"},"type":"array"}],"title":"Markets","description":"Nested market data"}},"type":"object","required":["event_id"],"title":"EventScreenerItem","description":"Event screener data from ch_api_pm_event_screener."},"EventScreenerMarket":{"properties":{"market_id":{"type":"string","title":"Market Id"},"question":{"type":"string","title":"Question"},"volume_24hr":{"anyOf":[{"type":"number"}],"title":"Volume 24Hr"},"open_interest":{"anyOf":[{"type":"number"}],"title":"Open Interest"},"best_bid":{"anyOf":[{"type":"number"}],"title":"Best Bid"},"best_ask":{"anyOf":[{"type":"number"}],"title":"Best Ask"},"last_trade_price":{"anyOf":[{"type":"number"}],"title":"Last Trade Price"},"one_day_price_change":{"anyOf":[{"type":"number"}],"title":"One Day Price Change"},"volume_change_pct":{"anyOf":[{"type":"number"}],"title":"Volume Change Pct"},"unique_traders_24h":{"anyOf":[{"type":"integer"}],"title":"Unique Traders 24H"},"end_date":{"anyOf":[{"type":"string","format":"date-time"}],"title":"End Date"}},"type":"object","required":["market_id","question"],"title":"EventScreenerMarket","description":"Single market within an event screener row."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/event-screener":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market Event Screener","description":"Browse and filter Polymarket events (groups of related markets). Includes aggregated\nvolume, liquidity, and trader counts across all markets in each event.\n\n**What it helps to answer:**\n\n1. **What are the most popular prediction market events?**\n2. **How much total volume does an event have across all its markets?**\n3. **Which events have the most active trading?**","operationId":"get_prediction_market_event_screener_api_v1_prediction_market_event_screener_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventScreenerRequest"}}},"required":true},"responses":{"200":{"description":"Event screener data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventScreenerResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Market Orderbook

## Get Prediction Market Orderbook

> Get the full bid/ask orderbook for a Polymarket prediction market. Data is\
> polled from the Polymarket CLOB API every \~60 seconds with MD5 change detection.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What is the current bid/ask depth for a prediction market?\*\*\
> 2\. \*\*How much liquidity is available at each price level?\*\*\
> 3\. \*\*What is the current spread?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"OrderbookRequest":{"properties":{"market_id":{"type":"string","maxLength":100,"minLength":1,"title":"Market Id","description":"Polymarket market ID"},"pagination":{"$ref":"#/components/schemas/PaginationRequest"}},"additionalProperties":false,"type":"object","required":["market_id"],"title":"OrderbookRequest","description":"Request for orderbook endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"OrderbookResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/OrderbookLevel"},"type":"array","title":"Data","description":"List of orderbook level records"}},"type":"object","required":["data"],"title":"OrderbookResponse","description":"Response for orderbook endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"OrderbookLevel":{"properties":{"market_id":{"type":"string","title":"Market Id","description":"Market ID"},"event_id":{"anyOf":[{"type":"string"}],"title":"Event Id","description":"Event ID"},"outcome":{"anyOf":[{"type":"string"}],"title":"Outcome","description":"Outcome label"},"outcome_index":{"anyOf":[{"type":"integer"}],"title":"Outcome Index","description":"Outcome index"},"asset_id":{"anyOf":[{"type":"string"}],"title":"Asset Id","description":"CLOB token ID"},"side":{"anyOf":[{"type":"string"}],"title":"Side","description":"buy or sell"},"price":{"anyOf":[{"type":"number"}],"title":"Price","description":"Price level"},"size":{"anyOf":[{"type":"number"}],"title":"Size","description":"Size at level"},"cumulative_size":{"anyOf":[{"type":"number"}],"title":"Cumulative Size","description":"Cumulative size"},"snapshot_timestamp":{"anyOf":[{"type":"string","format":"date-time"}],"title":"Snapshot Timestamp","description":"Snapshot timestamp"}},"type":"object","required":["market_id"],"title":"OrderbookLevel","description":"Orderbook level from ch_api_pm_orderbook."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/orderbook":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market Orderbook","description":"Get the full bid/ask orderbook for a Polymarket prediction market. Data is\npolled from the Polymarket CLOB API every ~60 seconds with MD5 change detection.\n\n**What it helps to answer:**\n\n1. **What is the current bid/ask depth for a prediction market?**\n2. **How much liquidity is available at each price level?**\n3. **What is the current spread?**","operationId":"get_prediction_market_orderbook_api_v1_prediction_market_orderbook_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderbookRequest"}}},"required":true},"responses":{"200":{"description":"Orderbook data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderbookResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Market OHLCV

## Get Prediction Market OHLCV Candles

> Get 1-hour OHLCV (Open, High, Low, Close, Volume) candles for a Polymarket\
> prediction market. Candles are computed from on-chain OrderFilled events on Polygon.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What is the price history of a prediction market outcome?\*\*\
> 2\. \*\*How has trading volume changed over time?\*\*\
> 3\. \*\*What were the high and low prices in each time period?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"OhlcvRequest":{"properties":{"market_id":{"type":"string","maxLength":100,"minLength":1,"title":"Market Id","description":"Polymarket market ID"},"pagination":{"$ref":"#/components/schemas/PaginationRequest"},"date":{"anyOf":[{"$ref":"#/components/schemas/DateRange"}],"description":"Date range filter (ISO 8601 date-time)"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_OhlcvSortField_"},"type":"array"}],"title":"Order By","description":"Sort order"},"sort":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_OhlcvSortField_"},"type":"array"}],"title":"Sort","description":"Deprecated: use 'order_by' instead."}},"additionalProperties":false,"type":"object","required":["market_id"],"title":"OhlcvRequest","description":"Request for OHLCV endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"SortOrder_OhlcvSortField_":{"properties":{"field":{"$ref":"#/components/schemas/OhlcvSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[OhlcvSortField]"},"OhlcvSortField":{"type":"string","enum":["period_start","volume_usd","trade_count"],"title":"OhlcvSortField","description":"Sortable fields for OHLCV endpoint."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"OhlcvResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/OhlcvCandle"},"type":"array","title":"Data","description":"List of OHLCV candle records"}},"type":"object","required":["data"],"title":"OhlcvResponse","description":"Response for OHLCV endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"OhlcvCandle":{"properties":{"market_id":{"type":"string","title":"Market Id","description":"Market ID"},"token_id":{"anyOf":[{"type":"string"}],"title":"Token Id","description":"CLOB token ID"},"side":{"anyOf":[{"type":"string"}],"title":"Side","description":"Side label (Yes/No)"},"outcome_index":{"anyOf":[{"type":"integer"}],"title":"Outcome Index","description":"Outcome index (1/2)"},"period_start":{"anyOf":[{"type":"string","format":"date-time"}],"title":"Period Start","description":"Candle period start (ISO format)"},"open":{"anyOf":[{"type":"number"}],"title":"Open","description":"Open price"},"high":{"anyOf":[{"type":"number"}],"title":"High","description":"High price"},"low":{"anyOf":[{"type":"number"}],"title":"Low","description":"Low price"},"close":{"anyOf":[{"type":"number"}],"title":"Close","description":"Close price"},"volume_usd":{"anyOf":[{"type":"number"}],"title":"Volume Usd","description":"Volume in USD"},"trade_count":{"anyOf":[{"type":"integer"}],"title":"Trade Count","description":"Number of trades"},"unique_traders":{"anyOf":[{"type":"integer"}],"title":"Unique Traders","description":"Unique traders in period"}},"type":"object","required":["market_id"],"title":"OhlcvCandle","description":"OHLCV candle data from ch_api_pm_ohlcv."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/ohlcv":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market OHLCV Candles","description":"Get 1-hour OHLCV (Open, High, Low, Close, Volume) candles for a Polymarket\nprediction market. Candles are computed from on-chain OrderFilled events on Polygon.\n\n**What it helps to answer:**\n\n1. **What is the price history of a prediction market outcome?**\n2. **How has trading volume changed over time?**\n3. **What were the high and low prices in each time period?**","operationId":"get_prediction_market_ohlcv_api_v1_prediction_market_ohlcv_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OhlcvRequest"}}},"required":true},"responses":{"200":{"description":"OHLCV candle data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OhlcvResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Market Position Details

## Get Prediction Market Position Detail

> Get detailed per-token position data for all holders in a specific prediction market.\
> Includes token balances, entry prices, current prices, and per-token PnL.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the exact positions of each holder in this market?\*\*\
> 2\. \*\*What is the average entry price vs current price for each position?\*\*\
> 3\. \*\*How much has each token position gained or lost?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PositionDetailRequest":{"properties":{"market_id":{"type":"string","maxLength":100,"minLength":1,"title":"Market Id","description":"Polymarket market ID"},"pagination":{"$ref":"#/components/schemas/PaginationRequest"}},"additionalProperties":false,"type":"object","required":["market_id"],"title":"PositionDetailRequest","description":"Request for position detail endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"PositionDetailResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/PositionDetailItem"},"type":"array","title":"Data","description":"List of position detail records"}},"type":"object","required":["data"],"title":"PositionDetailResponse","description":"Response for position detail endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"PositionDetailItem":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Holder address (hex)"},"owner_address":{"anyOf":[{"type":"string"}],"title":"Owner Address","description":"SAFE proxy owner address (hex)"},"outcome":{"anyOf":[{"type":"string"}],"title":"Outcome","description":"Outcome label"},"outcome_index":{"anyOf":[{"type":"integer"}],"title":"Outcome Index","description":"Outcome index"},"token_id":{"anyOf":[{"type":"string"}],"title":"Token Id","description":"CLOB token ID"},"balance":{"anyOf":[{"type":"number"}],"title":"Balance","description":"Token balance"},"buy_cost_usd":{"anyOf":[{"type":"number"}],"title":"Buy Cost Usd","description":"Total buy cost in USD"},"buy_tokens":{"anyOf":[{"type":"number"}],"title":"Buy Tokens","description":"Total tokens bought"},"sell_proceeds_usd":{"anyOf":[{"type":"number"}],"title":"Sell Proceeds Usd","description":"Total sell proceeds in USD"},"sell_tokens":{"anyOf":[{"type":"number"}],"title":"Sell Tokens","description":"Total tokens sold"},"avg_entry_price":{"anyOf":[{"type":"number"}],"title":"Avg Entry Price","description":"Average entry price"},"current_price":{"anyOf":[{"type":"number"}],"title":"Current Price","description":"Current price"},"unrealized_value_usd":{"anyOf":[{"type":"number"}],"title":"Unrealized Value Usd","description":"Unrealized value in USD"},"redemption_value_usd":{"anyOf":[{"type":"number"}],"title":"Redemption Value Usd","description":"Redemption value in USD"},"token_pnl_usd":{"anyOf":[{"type":"number"}],"title":"Token Pnl Usd","description":"Token PnL in USD"},"event_id":{"anyOf":[{"type":"string"}],"title":"Event Id","description":"Parent event ID"},"event_title":{"anyOf":[{"type":"string"}],"title":"Event Title","description":"Parent event title"},"market_resolved":{"anyOf":[{"type":"boolean"}],"title":"Market Resolved","description":"Whether market is resolved"},"market_id":{"type":"string","title":"Market Id","description":"Market ID"}},"type":"object","required":["market_id"],"title":"PositionDetailItem","description":"Position detail data from ch_api_pm_position_detail."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/position-detail":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market Position Detail","description":"Get detailed per-token position data for all holders in a specific prediction market.\nIncludes token balances, entry prices, current prices, and per-token PnL.\n\n**What it helps to answer:**\n\n1. **What are the exact positions of each holder in this market?**\n2. **What is the average entry price vs current price for each position?**\n3. **How much has each token position gained or lost?**","operationId":"get_prediction_market_position_detail_api_v1_prediction_market_position_detail_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionDetailRequest"}}},"required":true},"responses":{"200":{"description":"Position detail data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionDetailResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Market Top Holders

## Get Prediction Market Top Holders

> Get the largest position holders for a Polymarket prediction market. Positions are\
> computed from on-chain ERC-1155 token transfers on Polygon, with SAFE proxy wallet\
> resolution to identify actual users.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Who are the biggest holders in this prediction market?\*\*\
> 2\. \*\*What are the position sizes and entry prices of top holders?\*\*\
> 3\. \*\*What is the unrealized PnL of major positions?\*\*\
> 4\. \*\*Are whales positioned Yes or No?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TopHoldersRequest":{"properties":{"market_id":{"type":"string","maxLength":100,"minLength":1,"title":"Market Id","description":"Polymarket market ID"},"pagination":{"$ref":"#/components/schemas/PaginationRequest"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TopHolderSortField_"},"type":"array"}],"title":"Order By","description":"Sort order"},"sort":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TopHolderSortField_"},"type":"array"}],"title":"Sort","description":"Deprecated: use 'order_by' instead."}},"additionalProperties":false,"type":"object","required":["market_id"],"title":"TopHoldersRequest","description":"Request for top holders endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_TopHolderSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TopHolderSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TopHolderSortField]"},"TopHolderSortField":{"type":"string","enum":["position_size","unrealized_pnl_usd","avg_entry_price"],"title":"TopHolderSortField","description":"Sortable fields for top holders endpoint."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TopHoldersResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/TopHolder"},"type":"array","title":"Data","description":"List of top holder records"}},"type":"object","required":["data"],"title":"TopHoldersResponse","description":"Response for top holders endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"TopHolder":{"properties":{"market_id":{"type":"string","title":"Market Id","description":"Market ID"},"outcome_index":{"anyOf":[{"type":"integer"}],"title":"Outcome Index","description":"Outcome index"},"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Holder address (hex)"},"owner_address":{"anyOf":[{"type":"string"}],"title":"Owner Address","description":"SAFE proxy owner address (hex)"},"side":{"anyOf":[{"type":"string"}],"title":"Side","description":"Side held (Yes/No)"},"position_size":{"anyOf":[{"type":"number"}],"title":"Position Size","description":"Token position size"},"avg_entry_price":{"anyOf":[{"type":"number"}],"title":"Avg Entry Price","description":"Average entry price"},"current_price":{"anyOf":[{"type":"number"}],"title":"Current Price","description":"Current price"},"unrealized_pnl_usd":{"anyOf":[{"type":"number"}],"title":"Unrealized Pnl Usd","description":"Unrealized PnL in USD"}},"type":"object","required":["market_id"],"title":"TopHolder","description":"Top holder data from ch_api_pm_top_holders."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/top-holders":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market Top Holders","description":"Get the largest position holders for a Polymarket prediction market. Positions are\ncomputed from on-chain ERC-1155 token transfers on Polygon, with SAFE proxy wallet\nresolution to identify actual users.\n\n**What it helps to answer:**\n\n1. **Who are the biggest holders in this prediction market?**\n2. **What are the position sizes and entry prices of top holders?**\n3. **What is the unrealized PnL of major positions?**\n4. **Are whales positioned Yes or No?**","operationId":"get_prediction_market_top_holders_api_v1_prediction_market_top_holders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopHoldersRequest"}}},"required":true},"responses":{"200":{"description":"Top holder data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopHoldersResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Trades By Market

## Get Prediction Market Trades by Market

> Get recent trades for a Polymarket prediction market. Trades are decoded from\
> on-chain OrderFilled events on Polygon, joined with market metadata.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What are the most recent trades in this market?\*\*\
> 2\. \*\*Who is buying and selling, and at what prices?\*\*\
> 3\. \*\*What is the trade size distribution?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TradesByMarketRequest":{"properties":{"market_id":{"type":"string","maxLength":100,"minLength":1,"title":"Market Id","description":"Polymarket market ID"},"pagination":{"$ref":"#/components/schemas/PaginationRequest"},"date":{"anyOf":[{"$ref":"#/components/schemas/DateRange"}],"description":"Date range filter (ISO 8601 date-time)"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TradesByMarketSortField_"},"type":"array"}],"title":"Order By","description":"Sort order"}},"additionalProperties":false,"type":"object","required":["market_id"],"title":"TradesByMarketRequest","description":"Request for trades by market endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"SortOrder_TradesByMarketSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TradesByMarketSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TradesByMarketSortField]"},"TradesByMarketSortField":{"type":"string","enum":["timestamp"],"title":"TradesByMarketSortField","description":"Sortable fields for trades by market endpoint."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TradesByMarketResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/TradeByMarket"},"type":"array","title":"Data","description":"List of trade records"}},"type":"object","required":["data"],"title":"TradesByMarketResponse","description":"Response for trades by market endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"TradeByMarket":{"properties":{"timestamp":{"anyOf":[{"type":"string","format":"date-time"}],"title":"Timestamp","description":"Trade timestamp (ISO format)"},"seller":{"anyOf":[{"type":"string"}],"title":"Seller","description":"Seller address (hex)"},"buyer":{"anyOf":[{"type":"string"}],"title":"Buyer","description":"Buyer address (hex)"},"taker_action":{"anyOf":[{"type":"string"}],"title":"Taker Action","description":"Taker action (buy/sell)"},"side":{"anyOf":[{"type":"string"}],"title":"Side","description":"Outcome side (Yes/No)"},"outcome_index":{"anyOf":[{"type":"integer"}],"title":"Outcome Index","description":"Outcome index"},"size":{"anyOf":[{"type":"number"}],"title":"Size","description":"Trade size in tokens"},"price":{"anyOf":[{"type":"number"}],"title":"Price","description":"Price per share (0-1)"},"usdc_value":{"anyOf":[{"type":"number"}],"title":"Usdc Value","description":"Trade value in USDC"},"tx_hash":{"anyOf":[{"type":"string"}],"title":"Tx Hash","description":"Transaction hash (hex)"},"market_id":{"type":"string","title":"Market Id","description":"Market ID"}},"type":"object","required":["market_id"],"title":"TradeByMarket","description":"Trade data from ch_api_pm_trades_by_market."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/trades-by-market":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market Trades by Market","description":"Get recent trades for a Polymarket prediction market. Trades are decoded from\non-chain OrderFilled events on Polygon, joined with market metadata.\n\n**What it helps to answer:**\n\n1. **What are the most recent trades in this market?**\n2. **Who is buying and selling, and at what prices?**\n3. **What is the trade size distribution?**","operationId":"get_prediction_market_trades_by_market_api_v1_prediction_market_trades_by_market_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradesByMarketRequest"}}},"required":true},"responses":{"200":{"description":"Trade data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradesByMarketResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# PnL By Market

## Get Prediction Market PnL by Market

> Get profit and loss breakdown for all traders in a specific prediction market.\
> Includes buy cost, sell proceeds, redemption values, and unrealized positions.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*Who are the biggest winners and losers in this market?\*\*\
> 2\. \*\*What is the PnL distribution across traders?\*\*\
> 3\. \*\*How much unrealized value exists in open positions?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PnlByMarketRequest":{"properties":{"market_id":{"type":"string","maxLength":100,"minLength":1,"title":"Market Id","description":"Polymarket market ID"},"pagination":{"$ref":"#/components/schemas/PaginationRequest"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_PnlByMarketSortField_"},"type":"array"}],"title":"Order By","description":"Sort order"}},"additionalProperties":false,"type":"object","required":["market_id"],"title":"PnlByMarketRequest","description":"Request for PnL by market endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_PnlByMarketSortField_":{"properties":{"field":{"$ref":"#/components/schemas/PnlByMarketSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[PnlByMarketSortField]"},"PnlByMarketSortField":{"type":"string","enum":["total_pnl_usd"],"title":"PnlByMarketSortField","description":"Sortable fields for PnL by market endpoint."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PnlByMarketResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/PnlByMarketItem"},"type":"array","title":"Data","description":"List of PnL by market records"}},"type":"object","required":["data"],"title":"PnlByMarketResponse","description":"Response for PnL by market endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"PnlByMarketItem":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Trader address (hex)"},"owner_address":{"anyOf":[{"type":"string"}],"title":"Owner Address","description":"SAFE proxy owner address (hex)"},"side_held":{"anyOf":[{"type":"string"}],"title":"Side Held","description":"Side held: Yes, No, or Both. Reflects last known position even if fully exited (unrealized_value_usd = 0). Null only if no buy activity on record."},"net_buy_cost_usd":{"anyOf":[{"type":"number"}],"title":"Net Buy Cost Usd","description":"Net buy cost in USD"},"net_sell_proceeds_usd":{"anyOf":[{"type":"number"}],"title":"Net Sell Proceeds Usd","description":"Net sell proceeds in USD"},"redemption_value_usd":{"anyOf":[{"type":"number"}],"title":"Redemption Value Usd","description":"Redemption value in USD"},"unrealized_value_usd":{"anyOf":[{"type":"number"}],"title":"Unrealized Value Usd","description":"Unrealized value in USD"},"total_pnl_usd":{"anyOf":[{"type":"number"}],"title":"Total Pnl Usd","description":"Total PnL in USD"},"question":{"anyOf":[{"type":"string"}],"title":"Question","description":"Market question"},"event_id":{"anyOf":[{"type":"string"}],"title":"Event Id","description":"Parent event ID"},"event_title":{"anyOf":[{"type":"string"}],"title":"Event Title","description":"Parent event title"},"market_resolved":{"anyOf":[{"type":"boolean"}],"title":"Market Resolved","description":"Whether market is resolved"},"market_id":{"type":"string","title":"Market Id","description":"Market ID"}},"type":"object","required":["market_id"],"title":"PnlByMarketItem","description":"PnL by market data from ch_api_pm_pnl_by_market."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/pnl-by-market":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market PnL by Market","description":"Get profit and loss breakdown for all traders in a specific prediction market.\nIncludes buy cost, sell proceeds, redemption values, and unrealized positions.\n\n**What it helps to answer:**\n\n1. **Who are the biggest winners and losers in this market?**\n2. **What is the PnL distribution across traders?**\n3. **How much unrealized value exists in open positions?**","operationId":"get_prediction_market_pnl_by_market_api_v1_prediction_market_pnl_by_market_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PnlByMarketRequest"}}},"required":true},"responses":{"200":{"description":"PnL by market data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PnlByMarketResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# PnL By Address

## Get Prediction Market PnL by Address

> Get profit and loss across all prediction markets for a specific wallet address.\
> Shows per-market PnL including buy costs, sell proceeds, and redemption values.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What is a trader's total PnL across all prediction markets?\*\*\
> 2\. \*\*Which markets has this address traded, and what were the results?\*\*\
> 3\. \*\*Does this trader have unrealized positions?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"PnlByAddressRequest":{"properties":{"address":{"type":"string","maxLength":100,"minLength":1,"title":"Address","description":"Wallet address (hex, with or without 0x prefix)"},"pagination":{"$ref":"#/components/schemas/PaginationRequest"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_PnlByAddressSortField_"},"type":"array"}],"title":"Order By","description":"Sort order"}},"additionalProperties":false,"type":"object","required":["address"],"title":"PnlByAddressRequest","description":"Request for PnL by address endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"SortOrder_PnlByAddressSortField_":{"properties":{"field":{"$ref":"#/components/schemas/PnlByAddressSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[PnlByAddressSortField]"},"PnlByAddressSortField":{"type":"string","enum":["total_pnl_usd"],"title":"PnlByAddressSortField","description":"Sortable fields for PnL by address endpoint."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"PnlByAddressResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/PnlByAddressItem"},"type":"array","title":"Data","description":"List of PnL by address records"}},"type":"object","required":["data"],"title":"PnlByAddressResponse","description":"Response for PnL by address endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"PnlByAddressItem":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Trader address (hex)"},"market_id":{"anyOf":[{"type":"string"}],"title":"Market Id","description":"Market ID"},"question":{"anyOf":[{"type":"string"}],"title":"Question","description":"Market question"},"event_id":{"anyOf":[{"type":"string"}],"title":"Event Id","description":"Parent event ID"},"event_title":{"anyOf":[{"type":"string"}],"title":"Event Title","description":"Parent event title"},"side_held":{"anyOf":[{"type":"string"}],"title":"Side Held","description":"Side held (Yes/No)"},"net_buy_cost_usd":{"anyOf":[{"type":"number"}],"title":"Net Buy Cost Usd","description":"Net buy cost in USD"},"net_sell_proceeds_usd":{"anyOf":[{"type":"number"}],"title":"Net Sell Proceeds Usd","description":"Net sell proceeds in USD"},"redemption_value_usd":{"anyOf":[{"type":"number"}],"title":"Redemption Value Usd","description":"Redemption value in USD"},"unrealized_value_usd":{"anyOf":[{"type":"number"}],"title":"Unrealized Value Usd","description":"Unrealized value in USD"},"total_pnl_usd":{"anyOf":[{"type":"number"}],"title":"Total Pnl Usd","description":"Total PnL in USD"},"market_resolved":{"anyOf":[{"type":"boolean"}],"title":"Market Resolved","description":"Whether market is resolved"}},"type":"object","title":"PnlByAddressItem","description":"PnL by address data from ch_api_pm_pnl_by_address."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/pnl-by-address":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market PnL by Address","description":"Get profit and loss across all prediction markets for a specific wallet address.\nShows per-market PnL including buy costs, sell proceeds, and redemption values.\n\n**What it helps to answer:**\n\n1. **What is a trader's total PnL across all prediction markets?**\n2. **Which markets has this address traded, and what were the results?**\n3. **Does this trader have unrealized positions?**","operationId":"get_prediction_market_pnl_by_address_api_v1_prediction_market_pnl_by_address_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PnlByAddressRequest"}}},"required":true},"responses":{"200":{"description":"PnL by address data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PnlByAddressResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Address Summary

## Get Prediction Market Address Summary

> Get wallet-level PnL summary for a single Polymarket trader.\
> Returns realized PnL, unrealized PnL, win rate, and wallet age.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What is this trader's overall Polymarket performance?\*\*\
> 2\. \*\*How many markets has this trader won vs traded?\*\*\
> 3\. \*\*How old is this wallet and when did it start trading?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"AddressSummaryRequest":{"properties":{"address":{"type":"string","maxLength":100,"minLength":1,"title":"Address","description":"Wallet address (hex, with or without 0x prefix)"},"pagination":{"$ref":"#/components/schemas/PaginationRequest"}},"additionalProperties":false,"type":"object","required":["address"],"title":"AddressSummaryRequest","description":"Request for address summary endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"AddressSummaryResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/AddressSummaryItem"},"type":"array","title":"Data","description":"Address summary (single row)"}},"type":"object","required":["data"],"title":"AddressSummaryResponse","description":"Response for address summary endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"AddressSummaryItem":{"properties":{"address":{"anyOf":[{"type":"string"}],"title":"Address","description":"Trader address (hex)"},"first_seen":{"anyOf":[{"type":"string","format":"date"}],"title":"First Seen","description":"Date of first on-chain activity on Polygon"},"wallet_age_days":{"anyOf":[{"type":"integer"}],"title":"Wallet Age Days","description":"Days since first on-chain activity"},"realized_pnl_usd":{"anyOf":[{"type":"number"}],"title":"Realized Pnl Usd","description":"Realized PnL in USD"},"unrealized_pnl_usd":{"anyOf":[{"type":"number"}],"title":"Unrealized Pnl Usd","description":"Unrealized PnL from open positions in USD"},"total_pnl_usd":{"anyOf":[{"type":"number"}],"title":"Total Pnl Usd","description":"Total PnL (realized + unrealized) in USD"},"markets_won":{"anyOf":[{"type":"integer"}],"title":"Markets Won","description":"Number of markets with positive total PnL"},"markets_traded":{"anyOf":[{"type":"integer"}],"title":"Markets Traded","description":"Total number of markets with fills"},"win_rate":{"anyOf":[{"type":"number"}],"title":"Win Rate","description":"Win rate (markets_won / markets_traded, 0-1)"},"p2p_tokens_sent":{"anyOf":[{"type":"number"}],"title":"P2P Tokens Sent","description":"Total tokens sent via P2P transfers"},"p2p_tokens_received":{"anyOf":[{"type":"number"}],"title":"P2P Tokens Received","description":"Total tokens received via P2P transfers"}},"type":"object","title":"AddressSummaryItem","description":"Address summary data from ch_api_pm_address_summary."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/address-summary":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market Address Summary","description":"Get wallet-level PnL summary for a single Polymarket trader.\nReturns realized PnL, unrealized PnL, win rate, and wallet age.\n\n**What it helps to answer:**\n\n1. **What is this trader's overall Polymarket performance?**\n2. **How many markets has this trader won vs traded?**\n3. **How old is this wallet and when did it start trading?**","operationId":"get_prediction_market_address_summary_api_v1_prediction_market_address_summary_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressSummaryRequest"}}},"required":true},"responses":{"200":{"description":"Address summary data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressSummaryResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Trades By Address

## Get Prediction Market Trades by Address

> Get all trades for a specific wallet address across all prediction markets.\
> Trades are decoded from on-chain OrderFilled events on Polygon.\
> \
> \*\*What it helps to answer:\*\*\
> \
> 1\. \*\*What trades has this address made on Polymarket?\*\*\
> 2\. \*\*When did this trader buy or sell, and at what prices?\*\*\
> 3\. \*\*What markets has this address been active in?\*\*

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TradesByAddressRequest":{"properties":{"address":{"type":"string","maxLength":100,"minLength":1,"title":"Address","description":"Wallet address (hex, with or without 0x prefix)"},"pagination":{"$ref":"#/components/schemas/PaginationRequest"},"date":{"anyOf":[{"$ref":"#/components/schemas/DateRange"}],"description":"Date range filter (ISO 8601 date-time)"},"order_by":{"anyOf":[{"items":{"$ref":"#/components/schemas/SortOrder_TradesByAddressSortField_"},"type":"array"}],"title":"Order By","description":"Sort order"}},"additionalProperties":false,"type":"object","required":["address"],"title":"TradesByAddressRequest","description":"Request for trades by address endpoint."},"PaginationRequest":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Page number (1-based)","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page (max 1000)","default":10}},"type":"object","title":"PaginationRequest","description":"Pagination parameters for API requests."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"SortOrder_TradesByAddressSortField_":{"properties":{"field":{"$ref":"#/components/schemas/TradesByAddressSortField","description":"Field to sort by"},"direction":{"$ref":"#/components/schemas/SortDirection","description":"Sort direction (ASC or DESC)"}},"type":"object","required":["field","direction"],"title":"SortOrder[TradesByAddressSortField]"},"TradesByAddressSortField":{"type":"string","enum":["timestamp"],"title":"TradesByAddressSortField","description":"Sortable fields for trades by address endpoint."},"SortDirection":{"type":"string","enum":["ASC","DESC"],"title":"SortDirection","description":"Enum for sort directions."},"TradesByAddressResponse":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"items":{"$ref":"#/components/schemas/TradeByAddress"},"type":"array","title":"Data","description":"List of trade records"}},"type":"object","required":["data"],"title":"TradesByAddressResponse","description":"Response for trades by address endpoint."},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":1,"title":"Page","description":"Current page number","default":1},"per_page":{"type":"integer","maximum":1000,"minimum":1,"title":"Per Page","description":"Number of records per page","default":10},"is_last_page":{"type":"boolean","title":"Is Last Page","description":"Whether this is the last page","default":true}},"type":"object","title":"PaginationInfo","description":"Pagination information for API responses."},"TradeByAddress":{"properties":{"timestamp":{"anyOf":[{"type":"string","format":"date-time"}],"title":"Timestamp","description":"Trade timestamp (ISO format)"},"seller":{"anyOf":[{"type":"string"}],"title":"Seller","description":"Seller address (hex)"},"buyer":{"anyOf":[{"type":"string"}],"title":"Buyer","description":"Buyer address (hex)"},"taker_action":{"anyOf":[{"type":"string"}],"title":"Taker Action","description":"Taker action (buy/sell)"},"side":{"anyOf":[{"type":"string"}],"title":"Side","description":"Outcome side (Yes/No)"},"outcome_index":{"anyOf":[{"type":"integer"}],"title":"Outcome Index","description":"Outcome index"},"size":{"anyOf":[{"type":"number"}],"title":"Size","description":"Trade size in tokens"},"price":{"anyOf":[{"type":"number"}],"title":"Price","description":"Price per share (0-1)"},"usdc_value":{"anyOf":[{"type":"number"}],"title":"Usdc Value","description":"Trade value in USDC"},"tx_hash":{"anyOf":[{"type":"string"}],"title":"Tx Hash","description":"Transaction hash (hex)"},"market_id":{"anyOf":[{"type":"string"}],"title":"Market Id","description":"Market ID"},"market_question":{"anyOf":[{"type":"string"}],"title":"Market Question","description":"Market question"},"event_id":{"anyOf":[{"type":"string"}],"title":"Event Id","description":"Parent event ID"},"event_title":{"anyOf":[{"type":"string"}],"title":"Event Title","description":"Parent event title"}},"type":"object","title":"TradeByAddress","description":"Trade data from ch_api_pm_trades_by_address."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1/prediction-market/trades-by-address":{"post":{"tags":["Prediction Markets"],"summary":"Get Prediction Market Trades by Address","description":"Get all trades for a specific wallet address across all prediction markets.\nTrades are decoded from on-chain OrderFilled events on Polygon.\n\n**What it helps to answer:**\n\n1. **What trades has this address made on Polymarket?**\n2. **When did this trader buy or sell, and at what prices?**\n3. **What markets has this address been active in?**","operationId":"get_prediction_market_trades_by_address_api_v1_prediction_market_trades_by_address_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradesByAddressRequest"}}},"required":true},"responses":{"200":{"description":"Trade data by address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradesByAddressResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


# API Changelog


# 31-03-2026: TGM Endpoints - Premium Labels Flag

**Affected endpoints:** `tgm/holders`, `tgm/pnl-leaderboard`, `tgm/perp-pnl-leaderboard`, `perp-leaderboard`

A new `premium_labels` parameter has been added to these endpoints to control wallet label tier.

<table><thead><tr><th width="198.51953125">Value</th><th width="413.2578125">Behavior</th><th>Credits Used</th></tr></thead><tbody><tr><td><code>true</code></td><td>Returns dbt-sourced premium labels (Smart Money, Fund, etc.)</td><td>150</td></tr><tr><td><code>false</code></td><td>Returns free-tier labels only</td><td>5</td></tr></tbody></table>

**Plan enforcement:** Free plan users sending `premium_labels=true` will receive a `403 Forbidden` response. Paid plan users may use either value.

**Default behavior:** The default is currently `true`. A change on April 1st will flip the default to `false` and start consuming 150 credits.


# 29-08-2025: Major API Restructuring

This changelog highlights the key architectural and structural differences between the beta endpoints and v1 endpoints, focusing on breaking changes that developers need to be aware of when migrating.

#### 🔄 Version Update

* **From**: Beta endpoints (`/api/beta/*`)
* **To**: v1 endpoints (`/api/v1/*`)

#### 🏗️ **Major Structural Changes**

#### 1. **Parameter Structure Overhaul**

**Before (Beta): Nested Parameters Object**

```json
{
  "parameters": {
    "tokenAddress": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv",
    "smFilter": ["180D Smart Trader"],
    "chain": "solana"
  },
  "pagination": {
    "page": 1,
    "recordsPerPage": 100
  }
}
```

**After (v1): Structured Request with Nested Filters**

```json
{
  "chain": "solana",
  "token_address": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv",
  "filters": {
    "smart_money": {
      "include": ["180D Smart Trader"]
    },
    "include_stablecoins": true,
    "include_native_tokens": true
  },
  "pagination": {
    "page": 1,
    "per_page": 100
  }
}
```

**Impact**: All existing client code must be restructured to remove the nested `parameters` wrapper.

#### 2. **Naming Convention Changes**

**Before (Beta): camelCase**

* `tokenAddress`
* `includeStablecoin`

**After (v1): snake\_case**

* `tokenAddress →` token\_address\`
* `smFilter` → `filters.smart_money.include` (nested structure)
* `includeStablecoin` → `filters.include_stablecoins`

**Impact**: Significant impact - all fields are changed to snake\_case

#### 3. **Response Structure Standardization**

**Before (Beta): camelCase Response Fields**

```json
{
  "tokenAddress": "...",
  "symbol": "...",
  "marketCap": 1000000
}
```

**After (v1): snake\_case Response Fields**

```json
{
  "token_address": "...",
  "symbol": "...",
  "market_cap": 1000000
}
```

**Note**: Not all v1 endpoints return pagination fields - some return data only while others include pagination metadata. When pagination is present, it now includes an `is_last_page` boolean for easier pagination handling.

**Impact**: All client code must be updated to handle snake\_case field names in responses.

#### 📋 **Renamed Endpoint**

#### **Smart Money Endpoints**

**`/beta/smart-money/inflows` → `/api/v1/smart-money/netflow`**

#### **Profiler Endpoints**

**`/beta/profiler/address/balances` → `/api/v1/profiler/address/current-balance`**

#### 🚨 **Breaking Changes Summary**

#### **Must Update**:

1. **Remove nested `parameters` wrapper** from all requests
2. **Handle new response structure** with `data` and `pagination` fields
3. **Check parameter naming** for snake\_case vs camelCase changes

### Endpoint Migration Map

#### Smart Money Endpoints

**`/api/beta/smart-money/inflows` → `/api/v1/smart-money/netflow`**

**Changes:**

* Renamed from "inflows" to "netflow" for clarity
* Request structure simplified (no `parameters` wrapper)
* Enhanced filtering capabilities
* Added comprehensive sorting options
* Response includes pagination metadata

**New Features in V1:**

* `remove_scam_tokens` filter
* `hide_spam_tokens` filter
* `token_sector` filter
* Custom sort ordering support

**`/api/beta/smart-money/holdings` → `/api/v1/smart-money/holdings`**

**Changes:**

* Direct request body structure
* Enhanced response with pagination
* Improved filtering system
* Added sort customization

**`/api/beta/smart-money/dex-trades` → `/api/v1/smart-money/dex-trades`**

**Changes:**

* Simplified request structure
* Added comprehensive trade filters
* Enhanced label filtering
* Improved response metadata

**`/api/beta/smart-money/dcas` → `/api/v1/smart-money/dcas`**

**Changes:**

* Standardized request/response format
* Enhanced filtering for DCA parameters
* Added sort capabilities

#### Wallet Profiler Endpoints

**`/api/beta/profiler/address/transactions` → `/api/v1/profiler/address/transactions`**

**Changes:**

* Reduced max pagination from 100 to 20 records per page (performance optimization)
* Enhanced filtering for transaction types
* Added method and source type filters
* Improved token info structure

**`/api/beta/profiler/address/balances` → `/api/v1/profiler/address/current-balance`**

**Changes:**

* Renamed for clarity (balances → current-balance)
* Enhanced filtering capabilities
* Added value range filters
* Improved chain support

**`/api/beta/profiler/address/pnl` → `/api/v1/profiler/address/pnl`**

**Changes:**

* Simplified request structure
* Enhanced PnL calculation fields
* Added comprehensive filtering
* Improved sort options

**`/api/beta/profiler/address/pnl-summary` → `/api/v1/profiler/address/pnl-summary`**

**Changes:**

* Standardized response format
* Enhanced top token structure
* Improved metadata

**`/api/beta/profiler/address/counterparties` → `/api/v1/profiler/address/counterparties`**

**Changes:**

* Enhanced label filtering
* Added interaction count filters
* Improved volume filtering
* Better token info structure

**`/api/beta/profiler/address/historical-balances` → `/api/v1/profiler/address/historical-balances`**

**Changes:**

* Standardized date range handling
* Enhanced spam token filtering
* Improved response structure

**`/api/beta/profiler/address/related-wallets` → `/api/v1/profiler/address/related-wallets`**

**Changes:**

* Enhanced relationship metadata
* Added sort capabilities
* Improved response structure

#### Token God Mode (TGM) Endpoints

**`/api/beta/tgm/dex-trades` → `/api/v1/tgm/dex-trades`**

**Changes:**

* Enhanced filtering system
* Added action filters (buy/sell)
* Improved trader label filtering
* Better value range filters

**`/api/beta/tgm/transfers` → `/api/v1/tgm/transfers`**

**Changes:**

* Enhanced transfer type filtering
* Added CEX/DEX inclusion controls
* Improved smart money filtering
* Better address label filtering

**`/api/beta/tgm/holders` → `/api/v1/tgm/holders`**

**Changes:**

* Simplified label type handling
* Enhanced balance change tracking
* Added ownership percentage filters
* Improved sort capabilities

**`/api/beta/tgm/flows` → `/api/v1/tgm/flows`**

**Changes:**

* Enhanced flow tracking
* Added holder statistics
* Improved time-based analysis
* Better sort options

**`/api/beta/tgm/pnl-leaderboard` → `/api/v1/tgm/pnl-leaderboard`**

**Changes:**

* Enhanced PnL metrics
* Added ROI calculations
* Improved trader filtering
* Better sort capabilities

**`/api/beta/tgm/who-bought-sold` → `/api/v1/tgm/who-bought-sold`**

**Changes:**

* Enhanced volume tracking
* Added trade direction analysis
* Improved label filtering

**`/api/beta/tgm/jup-dca` → `/api/v1/tgm/jup-dca`**

**Changes:**

* Standardized DCA vault tracking
* Enhanced status filtering
* Improved deposit tracking

**`/api/beta/tgm/flow-intelligence` → `/api/v1/tgm/flow-intelligence`**

**Changes:**

* Enhanced category tracking
* Added wallet count metrics
* Improved flow analysis

#### New V1-Only Endpoints

**`/api/v1/portfolio/defi-holdings`**

* Production-ready DeFi portfolio tracking
* Comprehensive protocol breakdown
* Asset/debt/reward categorization

**`/api/v1/transaction-with-token-transfer-lookup`**

* Enhanced transaction lookup
* NFT transfer support
* Comprehensive token transfer tracking

**`/api/v1/token-screener`**

* Advanced token discovery
* Multi-chain screening
* Comprehensive filtering system
* Smart money integration


# Nansen CLI

### Overview

The Nansen CLI (`nansen-cli`) is a command-line interface for the Nansen API. All output is structured JSON, making it ideal for AI agents, scripts, and automation pipelines.

```bash
npm install -g nansen-cli
```

Or run without installing:

```bash
npx nansen-cli help
```

Source code: [github.com/nansen-ai/nansen-cli](https://github.com/nansen-ai/nansen-cli)

### Authentication

The CLI uses the same API key as the REST API. Two options, in priority order:

**Environment variable** (recommended for agents and CI):

```bash
export NANSEN_API_KEY=your-api-key
```

**Interactive login** (persistent):

```bash
nansen login
```

Verify it works:

```bash
nansen schema | head -1
```

`schema` is free and requires no API key -- if you get JSON back, the CLI is installed correctly.

### Quick Start

```bash
# Trending tokens on Solana
nansen token screener --chain solana --timeframe 24h

# Smart Money flows
nansen smart-money netflow --chain solana

# Profile a wallet
nansen profiler balance --address 0x28c6c06298d514db089934071355e5743bf21d60 --chain ethereum

# Search for an entity
nansen profiler search --query "Vitalik Buterin"
```

### Schema Discovery

The CLI is fully self-documenting via `nansen schema`. This requires no API key and returns a machine-readable JSON reference of all commands, options, return fields, and supported chains.

```bash
nansen schema --pretty                    # Full schema
nansen schema smart-money --pretty        # Single command group
```

Example: query supported chains:

```bash
nansen schema | jq '.supportedChains'
```

Agents should use `nansen schema` as the source of truth for available commands and options.

### Output Format

All responses use a consistent JSON envelope:

```json
{
  "success": true,
  "data": { ... }
}
```

Errors include a machine-readable code:

```json
{
  "success": false,
  "error": "Invalid API key",
  "code": "UNAUTHORIZED",
  "status": 401
}
```

Key error codes: `UNAUTHORIZED`, `CREDITS_EXHAUSTED`, `RATE_LIMITED`, `INVALID_ADDRESS`, `UNSUPPORTED_FILTER`. See Error Handling for the full list.

### Tips for AI Agents

**Use `schema` for self-discovery.** Agents should call `nansen schema` at the start of a session to learn available commands, options, and supported chains -- it costs zero credits.

**Use `--fields` to reduce response size.** Large JSON responses waste agent context tokens.

```bash
nansen smart-money netflow --chain solana --fields token_symbol,net_flow_usd --limit 10
```

**Use `--stream` for large result sets.** Processes results line-by-line instead of buffering the entire response.

```bash
nansen token dex-trades --chain solana --limit 100 --stream
```

**Budget credits carefully.** Most calls cost 1 credit. `schema` and `help` are free. If you get `CREDITS_EXHAUSTED`, stop all calls immediately.


# Overview

Learn how to connect AI agents to Nansen

Connect your AI tools (Eg. Claude, Cursor) using Anthropic's Model Context Protocol, a standard that lets AI tools interact with Nansen data.

{% hint style="info" %}
Check out the links below to learn how to connect and access all available tools in MCP.

Connecting to Nansen MCP -> <https://docs.nansen.ai/mcp/connecting>

Tools Supported -> <https://docs.nansen.ai/mcp/tools>
{% endhint %}

### What is Nansen MCP?

**Nansen MCP** is a Model Context Protocol (MCP) server that provides access to Nansen's institutional-grade blockchain intelligence platform. It transforms Nansen's onchain intelligence into an accessible interface that AI agents, developers, and researchers can use to analyze crypto markets and blockchain activity.

#### Core Offering

* **MCP Protocol**: Built on the standardized Model Context Protocol, ensuring compatibility with AI tools like Claude, Cursor, and other MCP-compatible clients
* **Multi-Chain Coverage**: Supports 25+ major blockchains including Ethereum, Solana, Bitcoin, Arbitrum, Base, Polygon, and more
* **Real-Time Data**: Provides access to live blockchain data including transactions, token movements, wallet activities, dex trades and PnL

### Why Use Nansen MCP?

AI tools currently have no visibility into what's happening onchain. Even answering simple blockchain queries is extremely difficult without proper data access and context. Nansen MCP gives AI tools the ability to see and understand onchain activities, transforming them into powerful blockchain research assistants.

#### **1. Real-Time Access to Nansen's Rich Data**

* Access to Nansen's proprietary wallet labeling system with millions of identified addresses including smart money labels
* Institutional-grade data accuracy and reliability
* Real-time processing of onchain activities across multiple blockchains

#### **2. AI-Native Integration**

* One-click installation with Claude Desktop
* No need to struggle with complex APIs or documentation - everything works out of the box
* Build custom AI agents and LLMs with blockchain intelligence

#### **3. Streamlined Research Workflows**

* Saves time by wrapping complex workflows into simpler tasks
* Automate onchain research that would take hours manually
* Generate insights from multiple data sources simultaneously

### What Can You Do with Nansen MCP?

#### **Smart Money Tracking**

Track DEX trades, token holdings, and portfolio changes of profitable traders and funds. Discover tokens gaining traction among smart money before broader market adoption.

#### **Token Intelligence & Discovery**

Screen thousands of tokens across multiple chains using advanced filters. Analyze real-time trading data, holder distributions, and exchange flows to identify opportunities.

#### **Address & Entity Profiling**

Deep dive into wallet activities, trading patterns, and PnL analysis. Map relationships between wallets and identify connected addresses across all supported blockchains.

#### **Example Prompts**

* "Show me all tokens that funds bought in the last 24 hours"
* "What DCA strategies are profitable traders using on Jupiter?"
* "Find new tokens with high smart money inflows and growing trading volume"
* "Show me trending tokens with liquidity above $100k"
* "Analyze the trading performance of this whale address"
* "Find wallets connected to this successful trader"
* "Track how this fund's portfolio allocation has changed over time"
* "Do a deep dive into this wallet to find whom does it belong to"


# Connecting to Nansen MCP

The Nansen MCP server provides AI assistants with access to comprehensive blockchain analytics through a secure API. This guide covers how to connect to Nansen MCP.

### Prerequisites

Before connecting, you'll need:

1. **Nansen API Key**: Get yours at <https://app.nansen.ai/api?tab=api>
2. **npx**: Required for remote connections (`npm install -g npx`)

### Installation Guide

#### 1. Claude Desktop (One-Click Install; Claude Desktop Required)

The easiest way to get started with Nansen MCP. Double-click the downloaded .dxt file to configure automatically.

[**Quick Install Link**](https://github.com/nansen-ai/nansen-mcp-dxt/raw/refs/heads/main/nansen.dxt)

#### 2. Claude Code (Terminal Integration)

Connect Nansen MCP through your terminal:

{% code overflow="wrap" %}

```bash
claude mcp add --transport http nansen https://mcp.nansen.ai/ra/mcp --header "NANSEN-API-KEY: YOUR_API_KEY_HERE"
```

{% endcode %}

#### 3. Cursor IDE

**One-click install via Cursor deep link:**

1. Copy the deep link below (right-click > copy)
2. Paste into any Cursor text/chat field
3. Ctrl+Click (or Cmd+Click on Mac) inside Cursor to install

{% code overflow="wrap" fullWidth="true" %}

```
cursor://anysphere.cursor-deeplink/mcp/install?name=nansen-mcp&config=eyJlbnYiOnsiTkFOU0VOX0FQSV9LRVkiOiJSRVBMQUNFX1RISVMifSwiY29tbWFuZCI6Im5weCIsImFyZ3MiOlsiLXkiLCJtY3AtcmVtb3RlIiwiaHR0cHM6Ly9tY3AubmFuc2VuLmFpL3JhL21jcC8iLCItLWhlYWRlciIsIk5BTlNFTi1BUEktS0VZOiR7TkFOU0VOX0FQSV9LRVl9IiwiLS1hbGxvdy1odHRwIl19Cg==
```

{% endcode %}

#### 4. Other MCP Clients

Integration example for various other tools supporting MCPs

**Server configuration:**

* Server: `https://mcp.nansen.ai/ra/mcp`
* Header: `NANSEN-API-KEY: your_api_key`
* Transport: `mcp-remote --allow-http`

```jsx
{
  "mcpServers": {
    "nansen-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.nansen.ai/ra/mcp",
        "--header",
        "NANSEN-API-KEY: ",
        "--allow-http"
      ]
    }
  }
}
```

**NPX example:**

```bash
npx -y mcp-remote https://mcp.nansen.ai/ra/mcp \\
  --header "NANSEN-API-KEY:YOUR_API_KEY_HERE" \\
  --allow-http

```

### Authentication

⚠️ Nansen MCP uses the same API as your regular API keys. Ensure you have sufficient credits for your usage.


# Tools supported by Nansen MCP

## Tools supported by Nansen MCP

Explore the suite of tools available through Nansen MCP. Each tool is purpose-built to deliver actionable blockchain insights — from tracking smart money movements to analyzing token flows and wallet activities.

**Total tools:** 24

> **Protocol:** JSON-RPC 2.0 over Streamable HTTP (SSE)\
> **Endpoint:** `https://mcp.nansen.ai/ra/mcp`\
> **Auth:** `NANSEN-API-KEY` header\
> **Required header:** `Accept: application/json, text/event-stream`

### Quick Reference

<table><thead><tr><th width="322.33203125">Tool</th><th>Description</th><th width="103.96484375">Credits</th></tr></thead><tbody><tr><td><code>smart_traders_and_funds_token_balances</code></td><td>Smart money holdings &#x26; 24h changes</td><td>5</td></tr><tr><td><code>smart_traders_and_funds_perp_trades</code></td><td>Smart money perpetual trades (HyperLiquid)</td><td>5</td></tr><tr><td><code>token_current_top_holders</code></td><td>Top token holders with labels</td><td>5</td></tr><tr><td><code>token_dex_trades</code></td><td>DEX trading activity for a token</td><td>1</td></tr><tr><td><code>token_transfers</code></td><td>Token transfer history</td><td>1</td></tr><tr><td><code>token_flows</code></td><td>Hourly aggregated token flows by segment</td><td>1</td></tr><tr><td><code>token_pnl_leaderboard</code></td><td>Trader PnL rankings for a token</td><td>5</td></tr><tr><td><code>token_who_bought_sold</code></td><td>Total bought/sold by address (DEX)</td><td>1</td></tr><tr><td><code>token_recent_flows_summary</code></td><td>Flow summary by segment (Smart Money, Whales, etc.)</td><td>1</td></tr><tr><td><code>token_discovery_screener</code></td><td>Multi-chain token screening with filters</td><td>1</td></tr><tr><td><code>token_ohlcv</code></td><td>OHLCV price data with auto interval</td><td>1</td></tr><tr><td><code>token_quant_scores</code></td><td>Quantitative scores for a token</td><td>2</td></tr><tr><td><code>nansen_score_top_tokens</code></td><td>Top tokens ranked by Nansen score</td><td>1</td></tr><tr><td><code>address_historical_balances</code></td><td>Historical token &#x26; native coin balances</td><td>1</td></tr><tr><td><code>address_related_addresses</code></td><td>First funders, signers, deployed contracts</td><td>1</td></tr><tr><td><code>address_counterparties</code></td><td>Most interacted addresses/entities</td><td>5</td></tr><tr><td><code>address_transactions</code></td><td>Recent transactions for an address</td><td>1</td></tr><tr><td><code>wallet_pnl_for_token</code></td><td>PnL for a specific token by wallet</td><td>1</td></tr><tr><td><code>wallet_pnl_summary</code></td><td>Overall realized PnL for a wallet</td><td>1</td></tr><tr><td><code>address_portfolio</code></td><td>Full portfolio overview &#x26; DeFi positions</td><td>1</td></tr><tr><td><code>general_search</code></td><td>Search tokens, entities, addresses (free)</td><td>0</td></tr><tr><td><code>growth_chain_rank</code></td><td>Chain growth rankings by key metrics</td><td>1</td></tr><tr><td><code>hyperliquid_leaderboard</code></td><td>Top HyperLiquid traders leaderboard</td><td>9</td></tr><tr><td><code>transaction_lookup</code></td><td>Transaction details with transfers (EVM)</td><td>1</td></tr></tbody></table>

#### Common Gotchas

1. **Most tools** wrap arguments in `{"request": {...}}`  but `general_search` and `transaction_lookup` take **flat args**
2. **Date ranges** use object format: `{"from": "YYYY-MM-DD", "to": "YYYY-MM-DD"}`
3. **Wallet tools** use `addresses: ["0x..."]` (plural array), not `address: "0x..."` — except `wallet_pnl_for_token`, `wallet_pnl_summary` (singular `address`), and `address_portfolio` (`wallet_address`)
4. **Enum values are case-sensitive:** `"BUY"` / `"SELL"` — not lowercase
5. **HyperLiquid dates** accept relative strings: `"7D_AGO"`, `"30D_AGO"`, `"NOW"`


# Common MCP clients

Below are some popular MCP clients for running remote Nansen MCP servers:

* Claude
* Cursor
* VS Code
* N8N


# MCP Data Redistribution Guidelines

### Purpose <a href="#purpose" id="purpose"></a>

These guidelines help developers understand how to legally and responsibly redistribute data obtained from Nansen API and MCP tools, while protecting Nansen's proprietary insights and competitive advantage.

### Quick Reference: Can You Redistribute? <a href="#quick-reference-can-you-redistribute" id="quick-reference-can-you-redistribute"></a>

#### Wallet Profiler&#x20;

| Tool Name                        | Redistribution Status | Requirements         |
| -------------------------------- | --------------------- | -------------------- |
| `address_portfolio`              | ✅ Allowed             | None                 |
| `address_historical_balances`    | ✅ Allowed             | None                 |
| `wallet_pnl_for_token`           | ✅ Allowed             | None                 |
| `wallet_pnl_summary`             | ✅ Allowed             | None                 |
| `address_transactions`           | ✅ Allowed             | Attribution required |
| `address_related_addresses`      | ✅ Allowed             | Attribution required |
| `address_counterparties`         | ✅ Allowed             | Attribution required |
| `address_transactions_for_token` | ✅ Allowed             | Attribution required |

#### Token God Mode

| Tool Name                     | Redistribution Status | Notes                               |
| ----------------------------- | --------------------- | ----------------------------------- |
| `token_ohlcv`                 | ✅ Allowed             | None                                |
| `token_dex_trades`            | ✅ Allowed             | Attribution required                |
| `token_transfers`             | ✅ Allowed             | Attribution required                |
| `token_who_bought_sold`       | ✅ Allowed             | Attribution required                |
| `token_flows`                 | ✅ Allowed             | Attribution required                |
| `token_recent_flows_summary`  | ✅ Allowed             | Attribution required                |
| `token_jup_dca`               | ✅ Allowed             | Attribution required                |
| `token_exchange_transactions` | ✅ Allowed             | Attribution required                |
| `token_discovery_screener`    | ✅ Allowed             | Attribution required                |
| `token_current_top_holders`   | ⚠️ Restricted         | Approval + Significant Modification |
| `token_pnl_leaderboard`       | 🚫 Prohibited         | Not permitted                       |

#### Smart Money&#x20;

<table><thead><tr><th width="353.046875">Tool Name</th><th>Redistribution Status</th><th>Notes</th></tr></thead><tbody><tr><td><code>smart_traders_and_funds_netflows</code></td><td>⚠️ Restricted</td><td>Approval + Significant Modification</td></tr><tr><td><code>smart_traders_and_funds_token_balances</code></td><td>🚫 Prohibited</td><td>Not permitted</td></tr></tbody></table>

***

### Understanding Redistribution Statuses

#### ✅ **Allowed**

You may freely redistribute this data in your products, services, or applications according to Nansen's Terms of Service. No additional permissions needed.

**Example use cases:**

* Displaying wallet balances in your portfolio tracker

***

#### ✅ **Allowed (with attribution)**

You may redistribute this data, but you **must** provide clear attribution to Nansen.

**Attribution requirements:**

* Display "Powered by Nansen API" visibly in your product interface, OR
* Provide a clickable link to [Nansen.ai](https://nansen.ai/) near the data display

**Note:** Attribution is NOT required for personal or internal-only use.

**Example use cases:**

* Token screening dashboards that display real-time token metrics and volume data
* Trading analytics platforms showing DEX trade flows and whale activity
* Portfolio management apps displaying counterparties
* Research reports examining flow intelligence patterns across tokens

***

#### ⚠️ **Restricted By-Default**

These endpoints contain Nansen's proprietary smart money insights and require **both** approval AND significant data modification.

**You must:**

1. Submit a request for approval via [this form](https://forms.gle/AoXk9jRdbuiqqG5f9)
2. Demonstrate significant data transformation (see requirements below)
3. Provide clear attribution to Nansen

**This data cannot be redistributed without meeting these requirements.**

***

#### 🚫 **Prohibited**

Redistribution is **NOT allowed** under any circumstances. These endpoints contain Nansen's most sensitive proprietary data and competitive advantages.

**Do not:**

* Display this data in any public or customer-facing interface
* Use this data to build competing products
* Redistribute this data through APIs, exports, or any other means

**Internal use only:** You may use this data for your own internal analysis, but not share it externally.

***

### What is "Significant Modification"?

To redistribute smart money data, you must transform it substantially so that:

1. **Not Directly Traceable**: The output cannot be reverse-engineered to reveal Nansen's underlying smart money classifications, wallet lists, or raw activity data
2. **Meaningfully Combined**: The data must be integrated with at least one other substantial, independent data source (not just cosmetic additions)
3. **Novel Insights**: Your final output must provide unique analysis or value-add beyond what Nansen already offers

<details>

<summary>✅ <strong>ALLOWED Use Cases</strong> (with approval)</summary>

#### 1. **AI Agent Background Analysis**

Using smart money data as one input among multiple sources to generate unique analytical responses.

**✓ Good Example:**

> Your AI agent analyzes: Nansen smart money flows (30%) + on-chain volume metrics (30%) + social sentiment analysis (20%) + technical indicators (20%) → generates custom investment thesis that synthesizes all sources

**✗ Bad Example:**

> Your AI agent says: "Smart money wallets bought 5M tokens in the last 24 hours according to Nansen data"

#### 2. **Custom Composite Indicators**

Building proprietary trading signals that incorporate smart money data alongside other metrics.

**✓ Good Example:**

> A "Token Momentum Score" (0-100) that combines:
>
> * Smart money net flow (25%)
> * DEX liquidity depth (25%)
> * Price action volatility (25%)
> * Developer activity (25%)

**✗ Bad Example:**

> A "Smart Money Activity Index" that's just a reformatted version of Nansen's smart money inflow data

#### 3. **Research Reports & Analysis**

Periodic research that synthesizes smart money trends with broader market context.

**✓ Good Example:**

> Weekly market report: "DeFi sector analysis combining smart trader positioning (via Nansen), protocol TVL trends (via DeFiLlama), and governance activity (via on-chain data) suggests..."

**✗ Bad Example:**

> Daily newsletter that lists: "Top 10 tokens smart money bought yesterday" with minimal additional context

</details>

<details>

<summary>🚫 <strong>PROHIBITED Use Cases</strong></summary>

#### 1. **Direct Display Dashboards**

Any interface where Nansen's smart money data is shown without substantial transformation.

**Examples of what NOT to do:**

* Dashboards showing "Smart Money bought these tokens in last 24h"
* Charts displaying raw smart money wallet balances over time
* Tables listing smart money trades with timestamps and amounts
* Real-time feeds of smart money wallet activity

#### 2. **Competing Smart Money Products**

Products that directly compete with or replicate Nansen's core offerings.

**Examples of what NOT to do:**

* "Smart Money Tracker" features
* "Profitable Wallet Scanner" tools
* "Smart Trader Leaderboards"
* "Elite Wallet Following" services

#### 3. **Public Leaderboards & Rankings**

Displaying smart money wallet performance, rankings, or PnL data.

**Examples of what NOT to do:**

* "Top 50 Smart Money Wallets This Month"
* "Highest PnL Smart Traders" rankings
* Public smart money wallet performance dashboards
* Smart money wallet comparison tools

#### 4. **Near Real-Time Data Redistribution**

Redistributing smart money data with minimal time delay or transformation.

**Examples of what NOT to do:**

* API endpoints serving Nansen smart money data with <7d delay
* Webhook notifications for smart money wallet trades
* Real-time smart money activity alerts
* Automated smart money trade copying services

</details>

***

### Requesting Approval for Restricted Endpoints

**Step 1: Submit Your Request**

Complete the approval form: <https://forms.gle/AoXk9jRdbuiqqG5f9>

**Step 2: Provide Required Information**

1. Describe your product, how you'll use the data, and your target audience
2. Explain modifications, other data sources, and provide mockups
3. Show unique insights and differentiation from Nansen's products
4. Detail how you'll credit Nansen and potential partnership opportunities

***

### Attribution Guidelines

**When Attribution is Required**

Required for endpoints marked "✅ Allowed (with attribution)" or "⚠️ Restricted".

**How to Attribute**

Choose one:

* **Text**: "Powered by Nansen API" or similar, displayed near the data
* **Logo**: Nansen logo with link to [nansen.ai](https://nansen.ai/)
* **Footer**: "Blockchain analytics powered by [Nansen](https://nansen.ai/)"

**When Attribution is NOT Required**

* Personal or internal use only
* Endpoints marked "✅ Allowed" (no attribution noted)

***

### General Rules & Compliance

**1. Terms of Service**

* Must comply with Nansen's [Terms of Service](https://www.nansen.ai/legal/terms-of-services)

**2. Stay Updated**

* Check latest guidelines before launching products, changing data usage, or entering new markets

**3. API & MCP Coverage**

* Rules apply to API responses, MCP tools, and derived data

**4. Volume & Rate Limits**

* Redistribution doesn't exempt you from rate limits

**5. Data Accuracy**

* Don't misrepresent data
* Include appropriate disclaimers
* Don't make unwarranted guarantees

**6. Competitive Use**

* Don't build competing products
* Don't use Nansen data as foundation for competitor services
* Don't repackage data to commoditize Nansen's insights


# Use case Templates

This section provides comprehensive use case templates for the Nansen API V1, organized by both difficulty level and specific use case. Templates are grouped into "Simple" and "Complex" categories to help developers quickly find relevant examples based on their experience and needs. Each template is designed to guide you through integrating with the API and building meaningful applications.

{% content-ref url="/pages/VjlW6HaIQjTxvUK6PIt2" %}
[Simple Use cases](/guides/templates/simple-use-cases)
{% endcontent-ref %}

{% content-ref url="/pages/nMMDfMzZQEnpE3LOn6TA" %}
[Complex Use cases](/guides/templates/complex-use-cases)
{% endcontent-ref %}


# Simple Use cases

Use the sample requests and responses to accelerate development and gain actionable insights from blockchain data.

### 1. Viewing DeFi Positions

**Description**: Get comprehensive information about a wallet's DeFi positions including balances, values, and token details.

**Use Case**: Analyze DeFi portfolio performance, track position changes, and understand asset allocation.

**Endpoint Documentation:** [Click Here](https://docs.nansen.ai/beta-nansen-api/api/portfolio#post-api-beta-portfolio-defi-holdings)

**cURL Command (Replace your API Key and run this in your terminal)**:

```bash
curl -L \
  --request POST \
  --url 'https://api.nansen.ai/api/v1/portfolio/defi-holdings' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "wallet_address": "0x4062b997279de7213731dbe00485722a26718892"
  }'
```

**Key Benefits**:

* Complete portfolio overview across multiple chains
* Real-time balance and value calculations

**Common Use Cases**:

* Portfolio tracking applications
* DeFi protocol analytics
* Risk management systems

***

### 2. Viewing Smart Money Holdings

**Description**: Discover which tokens top traders and funds are holding.

**Use Case**: Follow smart money movements, identify trending tokens, and make informed investment decisions.

**Endpoint Documentation:** [Click Here](https://docs.nansen.ai/api/smart-money/holdings#post-api-v1-smart-money-holdings)

**cURL Command (Replace your API Key and run this in your terminal)**:

```bash
curl -L \
  --request POST \
  --url 'https://api.nansen.ai/api/v1/smart-money/holdings' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "chains": [
    "ethereum",
    "solana",
    "base"
  ],
  "pagination": {
    "page": 1,
    "per_page": 50
  },
  "order_by": [
    {
      "field": "value_usd",
      "direction": "DESC"
    }
  ]
}'
```

**Key Benefits**:

* Identify institutional investment trends
* Track smart money portfolio changes
* Filter by smart money categories

**Common Use Cases**:

* Investment research and analysis
* Token discovery and trending analysis
* Market sentiment analysis

***

### 3. Finding Top Holders of a Token

**Description**: Discover the largest holders of a specific token, including their balances and wallet types.

**Use Case**: Analyze token distribution, identify major stakeholders, and understand market concentration.

**Endpoint Documentation**: [Click Here](https://docs.nansen.ai/api/token-god-mode/holders)

**cURL Command (Replace your API Key and run this in your terminal)**:

```bash
curl -L \
  --request POST \
  --url 'https://api.nansen.ai/api/v1/tgm/holders' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "chain": "solana",
    "token_address": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv",
    "aggregate_by_entity": false,
    "label_type": "all_holders",
    "pagination": {
      "page": 1,
      "per_page": 10
    },
    "order_by": [
      {
        "field": "value_usd",
        "direction": "DESC"
      }
    ]
  }'
```

**Key Benefits**:

* Identify major token holders and their types
* Includes individual addresses and aggregated by entity views
* Track balance changes over time
* Understand token distribution patterns

**Common Use Cases**:

* Token governance analysis
* Market concentration studies
* Risk assessment for token holders

***

### 4. Using Token Screener to Find New Tokens

**Description**: Discover new and trending tokens based on various metrics like market cap, token age, volume, and smart money activity.

**Use Case**: Find emerging opportunities, track new token launches, and identify trending assets.

**Endpoint Documentation**: [Click Here](https://docs.nansen.ai/api/token-god-mode/token-screener)

**cURL Command**:

```bash
curl -L \
  --request POST \
  --url 'https://api.nansen.ai/api/v1/token-screener' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "chains": [
      "ethereum",
      "solana",
      "base"
    ],
    "date": {
      "from": "2025-08-27T00:00:00Z",
      "to": "2025-09-03T23:59:59Z"
    },
    "pagination": {
      "page": 1,
      "per_page": 10
    },
    "filters": {
      "token_age_days": {
        "max": 7
      }
    },
    "order_by": [
      {
        "field": "market_cap_usd",
        "direction": "DESC"
      }
    ]
  }'

```

**Key Benefits**:

* Discover new token opportunities
* Filter by market cap, volume, sectors and age
* Track trending metrics and holder growth

**Common Use Cases**:

* Token discovery using different metrics

***

### Next Steps

Once you're comfortable with these easy-level use cases, explore:

* **Medium Level**: Advanced filtering, historical data analysis, and multi-chain operations
* **Hard Level**: Complex analytics, data aggregation, and real-time monitoring systems

For more information, refer to the complete API documentation and examples in the repository.


# Complex Use cases

Explore advanced workflows you can create with the Nansen API. This section showcases complex use cases designed to help you unlock deeper insights and automate sophisticated tasks, empowering your team to get the most from Nansen’s API.

{% content-ref url="/pages/B7ZpMdJSA2w9fOgYspik" %}
[Use case 1: Automated Token Tracking & Smart Money Analysis](/guides/templates/complex-use-cases/use-case-1-automated-token-tracking-and-smart-money-analysis)
{% endcontent-ref %}

{% content-ref url="/pages/Ct1ahT1aLdHZsFe0hhsr" %}
[Use Case 2: Find & Copytrade Wallets on Hyperliquid](/guides/templates/complex-use-cases/use-case-2-find-and-copytrade-wallets-on-hyperliquid)
{% endcontent-ref %}

{% content-ref url="/pages/OpQSo1UAZN116AbmARjA" %}
[Use case 3:  Identifying Related Wallets at Scale](/guides/templates/complex-use-cases/use-case-3-identifying-related-wallets-at-scale)
{% endcontent-ref %}

{% content-ref url="/pages/MmOEdcypcZHJmxtHW6IR" %}
[Use case 4: Copytrading Top Performing Wallets](/guides/templates/complex-use-cases/use-case-4-copytrading-top-performing-wallets)
{% endcontent-ref %}

{% content-ref url="/pages/FytWjXRl58KHW4UhvZvB" %}
[Use case 5: Monitoring CEX Health](/guides/templates/complex-use-cases/use-case-5-monitoring-cex-health)
{% endcontent-ref %}


# Use case 1: Automated Token Tracking & Smart Money Analysis

### Scenario

A DeFi trading team automated their token discovery and smart money analysis using Nansen's API. They built custom tools that combine multiple data sources to identify promising trading opportunities in real-time.

### Problem

* Manual Process: Hours spent cross-referencing multiple dashboards
* Fragmented Data: Token analysis scattered across different platforms
* Slow Decisions: Opportunities missed due to manual analysis delays
* Poor Scalability: Process couldn't handle growing portfolio needs

### Solution

The team built an automated system using three core Nansen API endpoints:

1. **Token Screener** **(**[**Link Here**](https://docs.nansen.ai/api/token-god-mode/token-screener)**)** - Find trending tokens
2. **Smart Money Netflow** **(**[**Link Here**](https://docs.nansen.ai/api/smart-money/netflows)**)** - Track institutional buying
3. **TGM PnL Leaderboard** **(**[**Link Here**](https://docs.nansen.ai/api/token-god-mode/pnl-leaderboard)**)** - Score trader credibility

### Step-by-Step Guide

**Step 1: Configure Your Token Screener Filters**

Start by selecting the chains you want to analyze (e.g., Ethereum, Solana). Apply filters to narrow down your search:

* Set market cap range (`min` and `max`) to target tokens with desired liquidity.
* Specify minimum liquidity and number of traders to focus on active, tradable tokens.
* Limit token age to capture new and trending assets.
* Enable “only\_smart\_money” to prioritize tokens held by sophisticated traders.
* Order results by volume (descending) for immediate visibility on high-activity tokens.

**Step 2: Analyze Smart Money Netflow**

Use the Smart Money Netflow endpoint to track institutional and expert activity:

* Select your chains.
* Include smart money labels such as “Fund”, “Smart Trader”, and “30D Smart Trader” for targeted analysis.
* Set a minimum market cap and trader count to filter out low-activity tokens.
* Order by net flow over the past 7 days to surface tokens with significant smart money movement.

**Step 3: Validate Trader Credibility with TGM PnL Leaderboard**

For any token of interest, use the TGM PnL Leaderboard:

* Specify the chain and token address.
* Set your date range for analysis.
* Filter for holders with significant USD value and realized profit.
* Use pagination to manage large datasets.
* This step helps you confirm which traders are consistently profitable, adding confidence to your token selection.

### Code Blocks

#### Token Screener API Call

```bash
curl -X POST "https://api.nansen.ai/api/v1/token-screener" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chains": ["ethereum", "solana"],
    "date": {
      "from": "2025-01-20T00:00:00Z",
      "to": "2025-01-21T23:59:59Z"
    },
    "pagination": {
      "page": 1,
      "per_page": 50
    },
    "filters": {
      "market_cap_usd": {
        "min": 1000000,
        "max": 100000000
      },
      "liquidity": {
        "min": 500000
      },
      "nof_traders": {
        "min": 100
      },
      "only_smart_money": true,
      "token_age_days": {
        "min": 1,
        "max": 30
      }
    },
    "order_by": [
      {
        "field": "volume",
        "direction": "DESC"
      }
    ]
  }'
```

#### Smart Money Netflow API Call

```bash
curl -L \
  --request POST \
  --url 'https://api.nansen.ai/api/v1/smart-money/netflow' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "chains": [
      "ethereum",
      "solana"
    ],
    "filters": {
      "include_smart_money_labels": [
        "Fund",
        "Smart Trader",
        "30D Smart Trader"
      ],
      "market_cap_usd": {
        "min": 1000000
      },
      "trader_count": {
        "min": 5
      }
    },
    "pagination": {
      "page": 1,
      "per_page": 10
    },
    "order_by": [
      {
        "field": "net_flow_7d_usd",
        "direction": "DESC"
      }
    ]
  }'

```

#### TGM PnL Leaderboard API Call

```bash
curl -L \
  --request POST \
  --url 'https://api.nansen.ai/api/v1/tgm/pnl-leaderboard' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "chain": "ethereum",
    "token_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "date": {
      "from": "2024-10-23",
      "to": "2025-01-21"
    },
    "pagination": {
      "page": 1,
      "per_page": 100
    },
    "filters": {
      "holding_usd": {
        "min": 1000
      },
      "pnl_usd_realised": {
        "min": 1000
      }
    }
  }'

```


# Use Case 2: Find & Copytrade Wallets on Hyperliquid

Use Nansen API To Find and Copytrade Profitable Wallets on Hyperliquid

### 1. Scenario

Identify and replicate trades from successful perpetual traders on Hyperliquid by monitoring their positions and trade activity in real-time.

**Goal:** Build an automated copytrading system that:

1. **Discovers** profitable traders using the Hyperliquid leaderboard
2. **Monitors** their perpetual positions and recent trades
3. **Replicates** their trading activity in your own account

### 2. Solution

Use three Nansen API endpoints:

1. **Perp Leaderboard** [**(Link Here)**](https://docs.nansen.ai/api/hyperliquid-apis/hyperliquid-leaderboard) - Discover top performing traders by PnL and ROI
2. **Perp Positions** [**(Link Here)**](https://docs.nansen.ai/api/hyperliquid-apis/address-perp-positions) - Monitor current open positions for selected wallets
3. **Perp Trades** [**(Link Here)**](https://docs.nansen.ai/api/hyperliquid-apis/address-perp-trades) - Track all trades executed by profitable wallets

**Optional:** Filter the leaderboard to smart money wallets only for higher quality signals.

**Example workflow:**

1. Discover top Smart Money traders from Step 1
2. Every 30 minutes to an hour:
   1. Fetch recent trades (last 1 hour) for all traders
   2. Identify new "Open" or "Add" Actions
   3. Execute matching trades on your account
3. **Every couple of hours**
   1. **Check current positions vs tracked wallets**
   2. **Close any positions where traders have exited**
   3. **Rebalance position sizes if needed**

### 3. Step-by-Step Guide

**Step 1: Find Profitable Traders on Hyperliquid**

Use the Perp Leaderboard endpoint to discover the most profitable perpetual traders over a specific timeframe.

**Call the perp leaderboard endpoint:**

```bash
curl -X POST "https://api.nansen.ai/api/v1/perp-leaderboard" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "date": {
      "from": "2025-10-01",
      "to": "2025-10-31"
    },
    "filters": {
      "total_pnl": { "min": 10000 },
      "roi": { "min": 20 },
      "account_value": { "min": 50000 },
      "include_smart_money_labels": ["Fund", "Smart Trader"]
    },
    "pagination": { "page": 1, "per_page": 20 },
    "order_by": [{ "field": "total_pnl", "direction": "DESC" }]
  }'
```

**Process the response:**

* Extract `trader_address` from top performers
* Note their `total_pnl`, `roi`, and `account_value` for ranking
* Filter by `trader_address_label` to identify known smart money wallets
* Store addresses for monitoring in the next steps

**Example response:**

```json
{
  "data": [
    {
      "trader_address": "0x28c6c06298d514db089934071355e5743bf21d60",
      "trader_address_label": "Smart Money Trader [0x28c6c0]",
      "total_pnl": 45230.50,
      "roi": 35.2,
      "account_value": 150000.0
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 150
  }
}
```

**Step 2: Monitor Current Positions**

For each profitable trader identified, check their current open positions to understand what they're actively trading.

**Call the perp positions endpoint:**

```bash
curl -X POST "https://api.nansen.ai/api/v1/profiler/perp-positions" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "0x28c6c06298d514db089934071355e5743bf21d60",
    "order_by": [{ "field": "position_value_usd", "direction": "DESC" }]
  }'
```

**Process the response:**

* Identify active positions by `token_symbol` (e.g., BTC, ETH, SOL)
* Note position direction from `size` (positive = long, negative = short)
* Review `unrealized_pnl_usd` to gauge current profitability
* Check `leverage_value` to understand risk levels
* Use `entry_price_usd` and `liquidation_price_usd` for position context

**Key fields to monitor:**

* `token_symbol`: The perpetual contract being traded
* `size`: Position size (negative for short, positive for long)
* `position_value_usd`: Total position value
* `unrealized_pnl_usd`: Current unrealized profit/loss
* `leverage_value`: Leverage multiplier used
* `entry_price_usd`: Average entry price
* `mark_price_usd`: Current market price

**Step 3: Track Trading Activity**

Monitor recent trades to identify entry and exit signals you can replicate.

**Call the perp trades endpoint:**

```bash
curl -X POST "https://api.nansen.ai/api/v1/profiler/perp-trades" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "0x28c6c06298d514db089934071355e5743bf21d60",
    "date": {
      "from": "2025-10-30T00:00:00Z",
      "to": "2025-10-31T23:59:59Z"
    },
    "filters": {
      "value_usd": { "min": 5000 }
    },
    "pagination": { "page": 1, "per_page": 100 },
    "order_by": [{ "field": "timestamp", "direction": "DESC" }]
  }'
```

**Process the response:**

* Identify new positions from trades where `action` = "Open"
* Detect position increases where `action` = "Add"
* Track exits where `action` = "Close" or "Reduce"
* Note the `side` (Long/Short) and `token_symbol` for each trade
* Monitor `price`, `size`, and `value_usd` to replicate sizing
* Check `closed_pnl` to understand profitability of closed trades

**Key fields for copytrading:**

* `timestamp`: When the trade occurred
* `token_symbol`: What contract was traded (e.g., BTC, ETH)
* `side`: Position direction (Long or Short)
* `action`: Trade action (Open, Add, Close, Reduce)
* `price`: Execution price
* `size`: Trade size in token units
* `value_usd`: USD value of the trade
* `start_position`: Position size before this trade
* `closed_pnl`: Realized profit/loss (for closing trades)


# Use case 3:  Identifying Related Wallets at Scale

### Scenario

An address clustering workflow that uses the Nansen API to systematically identify related wallet addresses and analyze their relationships. This enables researchers to uncover wallet connections through funding patterns, shared interactions, and behavioral analysis across multiple blockchains.

### Core Components

* **Labels:** Find labels of the initial address&#x20;
* **Related Wallets**: Detection of special connections (funding, signing, contract deployment)
* **Counterparties Analysis**: Identification of high-interaction addresses and shared patterns

This integration enables systematic discovery of wallet clusters through multiple relationship types and confidence levels.

### Workflow Implementation

**Step 1: Tarket Address Label Lookup**

* Query labels of the target address

#### Step 2: Initial Relationship Discovery

* Query Related Wallets endpoint with target address
* Identify direct relationships: `relation: "First Funder"`, `"Signer"`, `"Deployed via"`
* Build initial cluster with high-confidence connections

#### Step 3: Counterparty Analysis

* Analyze counterparties with `group_by: "entity"` for entity-level grouping
* Filter for `volume_in_usd > 50000` to find significant addresses
* Identify shared CEX deposit addresses across potential cluster members

#### Step 4: Pattern Recognition

* Compare transaction timing using `block_timestamp` fields
* Look for addresses with similar `method: "0x"` patterns
* Check for coordinated movements with matching `transaction_type` values

#### Step 5: Multi-Level Clustering

* For each high-confidence related address, repeat steps 1-3
* Cross-reference addresses that deposit to same CEX addresses
* Build network graph of relationships with confidence scores

#### Step 6: Confidence Assessment

* **High confidence** (>90%): First funder, shared signers, same CEX deposits
* **Medium confidence** (60-90%): High interaction volume, coordinated timing
* **Low confidence** (<60%): Indirect relationships, behavioral similarities

#### Step 7: Validation and Refinement

* Check balance patterns for coordinated movements
* Filter out false positives from common protocol interactions

### Code Examples

#### 1. Find Target Address Labels

Identify all the labels associated with the target address

```bash
curl -L \
  --request POST \
  --url 'https://api.nansen.ai/api/beta/profiler/address/labels' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "parameters": {
      "chain": "ethereum",
      "address": "0xbdfa4f4492dd7b7cf211209c4791af8d52bf5c50"
    },
    "pagination": {
      "page": 1,
      "recordsPerPage": 100
    }
  }'
```

#### 2. Find Related Wallets (Direct Relationships)

Identify wallets with special connections to a target address:

```bash
curl -X POST "https://api.nansen.ai/api/v1/profiler/address/related-wallets" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "0x28c6c06298d514db089934071355e5743bf21d60",
    "chain": "ethereum",
    "pagination": {
      "page": 1,
      "per_page": 20
    }
  }'
```

This reveals first funder relationships, signer connections, multisig relationships, and contract deployment patterns.

#### 3. Analyze Address Counterparties

Find addresses with the highest interaction volume:

```bash
curl -X POST "https://api.nansen.ai/api/v1/profiler/address/counterparties" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "0x28c6c06298d514db089934071355e5743bf21d60",
    "chain": "ethereum",
    "date": {
      "from": "2024-07-01",
      "to": "2025-01-21"
    },
    "group_by": "wallet",
    "source_input": "Combined",
    "filters": {
      "total_volume_usd": {
        "min": 10000
      }
    },
    "order_by": [
      {
        "field": "total_volume_usd",
        "direction": "DESC"
      }
    ]
  }'
```

This identifies CEX deposit addresses and high-frequency interaction patterns crucial for clustering.

#### 4. Track Historical Balance Patterns

Analyze coordinated balance movements across potential cluster members:

```bash
curl -X POST "https://api.nansen.ai/api/v1/profiler/address/historical-balances" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "0x28c6c06298d514db089934071355e5743bf21d60",
    "chain": "ethereum",
    "date": {
      "from": "2024-10-01",
      "to": "2025-01-21"
    },
    "filters": {
      "token_symbol": "USDC",
      "value_usd": {
        "min": 1000
      }
    }
  }'
```

Coordinated balance changes across addresses indicate potential cluster membership.

#### 5. Examine Transaction Patterns

Review transaction history for behavioral similarities:

```bash
curl -X POST "https://api.nansen.ai/api/v1/profiler/address/transactions" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "0x28c6c06298d514db089934071355e5743bf21d60",
    "chain": "ethereum",
    "date": {
      "from": "2025-01-01",
      "to": "2025-01-21"
    },
    "filters": {
      "volume_usd": {
        "min": 5000
      },
      "source_type": "transfer"
    }
  }'
```

Similar transaction timing and patterns across addresses suggest coordinated activity.


# Use case 4: Copytrading Top Performing Wallets

### Scenario

A copy trading workflow that uses the Nansen API to deliver structured, real-time onchain token insights. This enables traders to understand token flows, track smart money activity, and evaluate token performance across multiple chains.

### Core Components

* **Flow Intelligence (**[**Link Here**](https://docs.nansen.ai/api/token-god-mode/flow-intelligence)**)**: Real-time tracking of wallet inflows and outflows for each token
* **PnL Leaderboard (**[**Link Here**](https://docs.nansen.ai/api/token-god-mode/pnl-leaderboard)**)**: Identification of top-performing wallets by token
* **PnL Summary (**[**Link Here**](https://docs.nansen.ai/api/profiler/address-pnl-and-trade-performance#post-api-v1-profiler-address-pnl-summary)**)**: Cross-chain wallet performance analysis
* **TGM Holders (**[**Link Here**](https://docs.nansen.ai/api/token-god-mode/holders)**)**: Identify top holders of any token

### Step-by-Step Guide

#### Step 1: Track Token Flow Intelligence

* Select your target blockchain (`chain: "ethereum"`) and token address (`token_address: "0x6982508145454ce325ddbe47a25d4ec3d2311933"`).
* Call the Flow Intelligence endpoint with `timeframe: "7d"` to monitor weekly inflows and outflows.
* Review net flows by wallet type - check `smart_trader_net_flow_usd`, `whale_net_flow_usd`, and `public_figure_net_flow_usd` fields to spot accumulation (positive values) or distribution (negative values) trends.

#### Step 2: Find Top-Performing Wallets For a Token

* Use the PnL Leaderboard endpoint with `chain: "ethereum"` and your token address.
* Set date range with `date: { "from": "2024-10-01", "to": "2025-01-21" }` for 3-month analysis.
* Apply filter `pnl_usd_realised: { "min": 1000 }` to find wallets with over $1,000 realized profits.
* Review the `roi_percent_realised` and `nof_trades` fields to identify consistent performers.

#### Step 3: Assess Cross-Chain Wallet Performance

* For any wallet, use PnL Summary with `address: "0x39d52da6beec991f075eebe577474fd105c5caec"` and `chain: "ethereum"`.
* Set `date: { "from": "2024-07-01", "to": "2025-01-21" }` for 6-month performance history.
* Check `win_rate` (target > 0.5), `realized_pnl_usd`, and `top5_tokens` array to judge trader reliability.

#### Step 4: Monitor Smart Money DEX Trades

* Call Smart Money DEX Trades with `chains: ["ethereum", "base", "arbitrum"]` for multi-chain coverage.
* Apply filters: `token_bought_address: "0x6982508145454ce325ddbe47a25d4ec3d2311933"` and `trade_value_usd: { "min": 10000 }`.
* Include `include_smart_money_labels: ["Smart Trader", "Fund"]` to focus on sophisticated traders.
* Monitor `token_bought_amount` and `estimated_swap_price_usd` for entry points.

#### Step 5: Analyze Token Holder Distribution

* Access Token Holders endpoint with `chain: "ethereum"` and your token address.
* Set `label_type: "smart_money"` and filter with `include_smart_money_labels: ["Smart Trader", "Fund", "30D Smart Trader"]`.
* Apply `filters: { "ownership_percentage": { "min": 0.1 }, "value_usd": { "min": 50000 } }` to find significant holders.
* Check `balance_change_7d` and `balance_change_30d` fields to see if smart money is accumulating (positive) or exiting (negative).

#### Step 6: Implement and Refine Copy Trading

* Select wallets with `roi_percent_realised > 50` and `win_rate > 0.6` from your PnL analysis.
* Set up monitoring with `pagination: { "page": 1, "per_page": 20 }` to track the top 20 performers.
* Use `order_by: [{ "field": "pnl_usd_realised", "direction": "DESC" }]` to prioritize highest profit wallets.
* Refresh Flow Intelligence data with `timeframe: "1h"` for intraday monitoring during volatile periods.

### Code Examples

#### 1. Get Token Flow Intelligence&#x20;

Track real-time capital flows to identify accumulation or distribution patterns:

```bash
curl -X POST "https://api.nansen.ai/api/v1/tgm/flow-intelligence" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "solana",
    "token_address": "token_address_here",
    "timeframe": "7d"
  }'
```

This endpoint reveals net flows across different wallet segments (smart traders, whales, public figures) helping identify whether sophisticated players are accumulating or distributing.

#### 2. Get PnL Leaderboard (Find Highest Performing Wallets)

Identify the most profitable traders for any token:

```bash
curl -X POST "https://api.nansen.ai/api/v1/tgm/pnl-leaderboard" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "solana",
    "token_address": "token_address_here",
    "date": {
      "from": "2024-10-23",
      "to": "2025-01-21"
    },
    "filters": {
      "pnl_usd_realised": {
        "min": 1000
      }
    }
  }'
```

This leaderboard shows which wallets have the highest realized profits, enabling copy traders to identify successful trading patterns.

#### 3. Get Wallet PnL Summary (Cross-Chain Performance)

Analyze a trader's overall performance and success rate:

```bash
curl -X POST "https://api.nansen.ai/api/v1/profiler/address/pnl-summary" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "wallet_address_here",
    "chain": "solana",
    "date": {
      "from": "2024-10-23",
      "to": "2025-01-21"
    }
  }'
```

This provides win-rate, realized PnL, and top profitable tokens for any wallet, helping assess trader quality before copying their strategies.

#### 4. Track Smart Money DEX Trades

Monitor real-time trading activity from sophisticated traders:

```bash
curl -X POST "https://api.nansen.ai/api/v1/smart-money/dex-trades" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chains": ["solana"],
    "filters": {
      "token_bought_address": "token_address_here",
      "trade_value_usd": {
        "min": 10000
      }
    }
  }'
```

Real-time smart money trades provide copy trading signals by showing what experienced traders are buying or selling right now.

#### 5. Analyze Token Holder Distribution

Understand token concentration and holder quality:

```bash
curl -X POST "https://api.nansen.ai/api/v1/tgm/holders" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "solana",
    "token_address": "token_address_here",
    "label_type": "smart_money",
    "filters": {
      "include_smart_money_labels": ["Smart Trader", "Fund"]
    }
  }'
```

This shows smart money concentration in any token, helping traders assess whether sophisticated investors are holding or have exited.


# Use case 5: Monitoring CEX Health

### 1. Scenario

Monitor centralized exchange (CEX) health by tracking onchain asset balances and daily net flows.

**Goal:** Generate daily reports showing:

| Name           | Assets on Exchange | 24hr Net Flows |
| -------------- | ------------------ | -------------- |
| Coinbase, Inc. | $30bn              | $1.2bn         |
| OKX            | $129bn             | $34m           |

### 2. Solution

Use two Nansen API endpoints:

1. **Address Balances** [**(Link Here)**](https://docs.nansen.ai/api/profiler/address-current-balances) - Get total token holdings across all chains
2. **Counterparties** [**(Link Here)**](https://docs.nansen.ai/api/profiler/address-counterparties) - Calculate 24hr net flows (inflows minus outflows)

**Alternative:** Compare today's balance vs yesterday's balance for a simpler net flow calculation.

### 3. Step-by-Step Guide

#### Step 1: Get Current Assets on Exchange

Fetch token balances across all chains covered by Nansen.

**Call the address balances endpoint:**

```bash
curl -X POST "https://api.nansen.ai/api/v1/profiler/address/current-balance" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entity_name": "Coinbase",
    "chain": "all",
    "hide_spam_token": true,
    "pagination": { "page": 1, "per_page": 1000 }
  }'
```

**Process the response:**

* Sum all `usd_value` fields to get total assets on exchange
* Store this value for comparison

#### Step 2: Calculate 24hr Net Flow

**Method A: Simple (Balance Difference)**

1. Get today's total balance (from Step 1)
2. Get yesterday's total balance (same call, run 24 hours earlier)
3. Calculate: `Net Flow = Today's Balance - Yesterday's Balance`

**Method B: Detailed (Counterparties Breakdown)**

Fetch all inflows and outflows for the past 24 hours:

```bash
curl -X POST "https://api.nansen.ai/api/v1/profiler/address/counterparties" \
  -H "apiKey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entity_name": "Coinbase",
    "chain": "base",
    "date": {
      "from": "2025-10-22T18:43:00Z",
      "to": "2025-10-23T18:43:00Z"
    },
    "group_by": "entity",
    "source_input": "Combined",
    "pagination": { "page": 1, "per_page": 1000 }
  }'
```

**Process the response:**

1. Sum all `inflow_usd` values = Total Inflows
2. Sum all `outflow_usd` values = Total Outflows
3. Calculate: `Net Flow = Total Inflows - Total Outflows`

#### Step 3: Format Results

Combine data into your target format:

```
Name: [entity_name]
Assets on Exchange: [Sum of usd_value from current-balance]
24hr Net Flows: [Net Flow calculation from Step 2
```


# Data Methodology & Technical Reference

This page provides detailed technical specifications about how data is calculated, returned, and timed across Nansen API endpoints. This information is essential for quantitative analysis, backtesting

### Date Range Behaviour

All date range parameters across Nansen API endpoints use closed brackets on both sides \[from, to], meaning both the from\_date and to\_date are inclusive. For example, requesting from=2024-11-04, to=2024-11-05 will return data for both November 4th and November 5th.

### Historical Data Calculation Method (Smart Money Holdings)

The Smart Money Historical Holdings API returns pure historical snapshots using prices from the actual date requested, not recalculated values. This ensures there is no look-ahead bias, making the data suitable for backtesting and predictive models.

#### Field-Level Details

* value\_usd: Historical USD value using the median price from that day
* market\_cap\_usd: Historical market cap snapshot for that date
* balance\_24h\_percent\_change: Historical percentage calculated using that day's balance and the previous day's balance (with each day using its respective price)

### Snapshot Timing & Data Availability

#### Snapshot Time

Daily snapshots represent end-of-day UTC values.

#### Data Availability (Smart Money Historical Holdings)

Data processing begins at 05:00 AM UTC. Data is typically available by 07:00 AM UTC, though exact timing may vary. The current day's data is excluded from responses since it would be incomplete.

#### Historical Depth

The Smart Money Historical Holdings endpoint provides a 4-year rolling window of historical data. The earliest available date moves forward daily.


# Data Redistribution Guidelines

Updated as of 18/11/2025

### Purpose <a href="#purpose" id="purpose"></a>

These guidelines help developers understand how to legally and responsibly redistribute data obtained from Nansen API and MCP tools, while protecting Nansen's proprietary insights and competitive advantage.

### Quick Reference: Can You Redistribute? <a href="#quick-reference-can-you-redistribute" id="quick-reference-can-you-redistribute"></a>

| Endpoint                                     | Status        | Requirements                        |
| -------------------------------------------- | ------------- | ----------------------------------- |
| profiler/address/balances                    | ✅ Allowed     | None                                |
| profiler/perp-positions                      | ✅ Allowed     | None                                |
| profiler/perp-trades                         | ✅ Allowed     | None                                |
| profiler/address/pnl & pnl-summary           | ✅ Allowed     | None                                |
| profiler/address/historical-balances         | ✅ Allowed     | None                                |
| tgm/transfers                                | ✅ Allowed     | Attribution required                |
| profiler/address/transactions                | ✅ Allowed     | Attribution required                |
| profiler/address/counterparty                | ✅ Allowed     | Attribution required                |
| profiler/address/related-wallets             | ✅ Allowed     | Attribution required                |
| tgm/token-screener                           | ✅ Allowed     | Attribution required                |
| tgm/perp-screener                            | ✅ Allowed     | Attribution required                |
| tgm/dex-trades                               | ✅ Allowed     | Attribution required                |
| tgm/perp-trades                              | ✅ Allowed     | Attribution required                |
| tgm/who-bought-sold                          | ✅ Allowed     | Attribution required                |
| tgm/flow-intelligence                        | ✅ Allowed     | Attribution required                |
| tgm/flows                                    | ✅ Allowed     | Attribution required                |
| tgm/holders (with smart money filter)        | ⚠️ Restricted | Approval + Significant Modification |
| tgm/perp-positions (with smart money filter) | ⚠️ Restricted | Approval + Significant Modification |
| smart-money/inflows                          | ⚠️ Restricted | Approval + Significant Modification |
| **Prohibited Endpoints**                     |               |                                     |
| address/labels                               | 🚫 Prohibited | Not permitted                       |
| smart-money/holdings                         | 🚫 Prohibited | Not permitted                       |
| tgm/pnl-leaderboard                          | 🚫 Prohibited | Not permitted                       |
| perp-leaderboard                             | 🚫 Prohibited | Not permitted                       |
| smart-money/dex-trades                       | 🚫 Prohibited | Not permitted                       |
| smart-money/dcas                             | 🚫 Prohibited | Not permitted                       |
| smart-money/perp-trades                      | 🚫 Prohibited | Not permitted                       |

***

### Understanding Redistribution Statuses

#### ✅ **Allowed**

You may freely redistribute this data in your products, services, or applications according to Nansen's Terms of Service. No additional permissions needed.

**Example use cases:**

* Displaying wallet balances in your portfolio tracker

***

#### ✅ **Allowed (with attribution)**

You may redistribute this data, but you **must** provide clear attribution to Nansen.

**Attribution requirements:**

* Display "Powered by Nansen API" visibly in your product interface, OR
* Provide a clickable link to [Nansen.ai](https://nansen.ai/) near the data display

**Note:** Attribution is NOT required for personal or internal-only use.

**Example use cases:**

* Token screening dashboards that display real-time token metrics and volume data
* Trading analytics platforms showing DEX trade flows and whale activity
* Portfolio management apps displaying counterparties
* Research reports examining flow intelligence patterns across tokens

***

#### ⚠️ **Restricted By-Default**

These endpoints contain Nansen's proprietary smart money insights and require **both** approval AND significant data modification.

**You must:**

1. Submit a request for approval via [this form](https://forms.gle/AoXk9jRdbuiqqG5f9)
2. Demonstrate significant data transformation (see requirements below)
3. Provide clear attribution to Nansen

**This data cannot be redistributed without meeting these requirements.**

***

#### 🚫 **Prohibited**

Redistribution is **NOT allowed** under any circumstances. These endpoints contain Nansen's most sensitive proprietary data and competitive advantages.

**Do not:**

* Display this data in any public or customer-facing interface
* Use this data to build competing products
* Redistribute this data through APIs, exports, or any other means

**Internal use only:** You may use this data for your own internal analysis, but not share it externally.

***

### What is "Significant Modification"?

To redistribute smart money data, you must transform it substantially so that:

1. **Not Directly Traceable**: The output cannot be reverse-engineered to reveal Nansen's underlying smart money classifications, wallet lists, or raw activity data
2. **Meaningfully Combined**: The data must be integrated with at least one other substantial, independent data source (not just cosmetic additions)
3. **Novel Insights**: Your final output must provide unique analysis or value-add beyond what Nansen already offers

<details>

<summary>✅ <strong>ALLOWED Use Cases</strong> (with approval)</summary>

#### 1. **AI Agent Background Analysis**

Using smart money data as one input among multiple sources to generate unique analytical responses.

**✓ Good Example:**

> Your AI agent analyzes: Nansen smart money flows (30%) + on-chain volume metrics (30%) + social sentiment analysis (20%) + technical indicators (20%) → generates custom investment thesis that synthesizes all sources

**✗ Bad Example:**

> Your AI agent says: "Smart money wallets bought 5M tokens in the last 24 hours according to Nansen data"

#### 2. **Custom Composite Indicators**

Building proprietary trading signals that incorporate smart money data alongside other metrics.

**✓ Good Example:**

> A "Token Momentum Score" (0-100) that combines:
>
> * Smart money net flow (25%)
> * DEX liquidity depth (25%)
> * Price action volatility (25%)
> * Developer activity (25%)

**✗ Bad Example:**

> A "Smart Money Activity Index" that's just a reformatted version of Nansen's smart money inflow data

#### 3. **Research Reports & Analysis**

Periodic research that synthesizes smart money trends with broader market context.

**✓ Good Example:**

> Weekly market report: "DeFi sector analysis combining smart trader positioning (via Nansen), protocol TVL trends (via DeFiLlama), and governance activity (via on-chain data) suggests..."

**✗ Bad Example:**

> Daily newsletter that lists: "Top 10 tokens smart money bought yesterday" with minimal additional context

</details>

<details>

<summary>🚫 <strong>PROHIBITED Use Cases</strong></summary>

#### 1. **Direct Display Dashboards**

Any interface where Nansen's smart money data is shown without substantial transformation.

**Examples of what NOT to do:**

* Dashboards showing "Smart Money bought these tokens in last 24h"
* Charts displaying raw smart money wallet balances over time
* Tables listing smart money trades with timestamps and amounts
* Real-time feeds of smart money wallet activity

#### 2. **Competing Smart Money Products**

Products that directly compete with or replicate Nansen's core offerings.

**Examples of what NOT to do:**

* "Smart Money Tracker" features
* "Profitable Wallet Scanner" tools
* "Smart Trader Leaderboards"
* "Elite Wallet Following" services

#### 3. **Public Leaderboards & Rankings**

Displaying smart money wallet performance, rankings, or PnL data.

**Examples of what NOT to do:**

* "Top 50 Smart Money Wallets This Month"
* "Highest PnL Smart Traders" rankings
* Public smart money wallet performance dashboards
* Smart money wallet comparison tools

#### 4. **Near Real-Time Data Redistribution**

Redistributing smart money data with minimal time delay or transformation.

**Examples of what NOT to do:**

* API endpoints serving Nansen smart money data with <7d delay
* Webhook notifications for smart money wallet trades
* Real-time smart money activity alerts
* Automated smart money trade copying services

</details>

***

### Requesting Approval for Restricted Endpoints

**Step 1: Submit Your Request**

Complete the approval form: <https://forms.gle/AoXk9jRdbuiqqG5f9>

**Step 2: Provide Required Information**

1. Describe your product, how you'll use the data, and your target audience
2. Explain modifications, other data sources, and provide mockups
3. Show unique insights and differentiation from Nansen's products
4. Detail how you'll credit Nansen and potential partnership opportunities

***

### Attribution Guidelines

**When Attribution is Required**

Required for endpoints marked "✅ Allowed (with attribution)" or "⚠️ Restricted".

**How to Attribute**

Choose one:

* **Text**: "Powered by Nansen API" or similar, displayed near the data
* **Logo**: Nansen logo with link to [nansen.ai](https://nansen.ai/)
* **Footer**: "Blockchain analytics powered by [Nansen](https://nansen.ai/)"

**When Attribution is NOT Required**

* Personal or internal use only
* Endpoints marked "✅ Allowed" (no attribution noted)

***

### General Rules & Compliance

**1. Terms of Service**

* Must comply with Nansen's [Terms of Service](https://www.nansen.ai/legal/terms-of-services)

**2. Stay Updated**

* Check latest guidelines before launching products, changing data usage, or entering new markets

**3. API & MCP Coverage**

* Rules apply to API responses, MCP tools, and derived data

**4. Volume & Rate Limits**

* Redistribution doesn't exempt you from rate limits

**5. Data Accuracy**

* Don't misrepresent data
* Include appropriate disclaimers
* Don't make unwarranted guarantees

**6. Competitive Use**

* Don't build competing products
* Don't use Nansen data as foundation for competitor services
* Don't repackage data to commoditize Nansen's insights


# Frequently Asked Questions

### Authentication

<details>

<summary>How can developers obtain API keys and access Nansen’s API endpoints?</summary>

You can request an API key by signing up on Nansen. You can find the detailed steps [here](https://docs.nansen.ai/getting-started/authentication#obtaining-api-keys).

</details>

#### Available Endpoints

<details>

<summary>What types of data are available through Nansen’s API (e.g., wallet balances, token prices, labeled transactions)?</summary>

The API provides access to wallet balances, transaction data, exchange flows, smart money tracking and other on-chain analytics across multiple chains. You can find the full list of endpoints [here](https://docs.nansen.ai/endpoints-overview).

</details>

#### API Rate Limits & Quotas

<details>

<summary>What are the usage limits for Nansen’s API?</summary>

&#x20;Nansen API comes with a flexi-credit plan. You purchase as many credits you need.&#x20;

</details>

#### **Data Coverage**

<details>

<summary>Can I access labeled transaction data across multiple chains via the API?</summary>

Yes, you can use /transactions to access transaction data and /labels endpoint to fetch labels across multiple chains.

</details>

<details>

<summary>What on-chain metrics are available via Nansen’s API?</summary>

Metrics include wallet balances, token flows, smart money movements, portfolio distributions, and other derived analytics from raw blockchain data. You can find the full list of endpoints [here.](https://docs.nansen.ai/endpoints-overview)

</details>

<details>

<summary>Does the API provide access to smart money wallet activities and behaviors?</summary>

Yes, API allows users to monitor smart money inflows, portfolio holdings and DEX Trades. You can find the full list of Smart Money endpoints [here](https://docs.nansen.ai/api/smart-money).

</details>

<details>

<summary>How does Nansen handle and provide data for non-EVM chains such as Solana or Sui?</summary>

Nansen processes data from non-EVM chains by building native integrations that extract and structure on-chain information similar to EVM-based chains, while adjusting for each chain’s unique architecture. You can find the full list of supported chains [here](https://docs.nansen.ai/getting-started/chain-coverage).

</details>

#### Data Freshness and Performance

<details>

<summary>How frequently is the data updated in the API?</summary>

Data is refreshed at varying intervals, with many endpoints updating in real-time depending on the data type.

</details>

<details>

<summary>What is the typical latency for data delivery through Nansen’s API?</summary>

Typical data latency is low, often within seconds, depending on the chain being queried

</details>

#### Developer Tools and Integration

<details>

<summary>Does Nansen support AI Integration Capabilities?</summary>

Nansen offers MCP support that allows you to connect your AI tools to Nansen's Onchain Data. You can read more and follow steps for access [here](https://docs.nansen.ai/nansen-mcp/overview).

</details>

<details>

<summary>Does Nansen offer SDKs, libraries, or tools for integrating analytics into third-party applications like DEXs or wallets?</summary>

No

</details>

<details>

<summary>Can I programmatically perform bulk analysis on wallet data using Nansen’s tools?</summary>

Yes, Nansen’s API endpoints are designed for scalable, programmatic analysis across large datasets of wallets and transactions.

</details>


# Quant Signals

Learn more about Nansen's new and upcoming Quant Signals and how to use them to gain an edge


# BTC Drop Reflexivity

Measure how a token behaves when Bitcoin drops—a risk signal for market drawdowns.

### What is BTC Drop Reflexivity?

BTC Drop Reflexivity measures how much a token typically falls (or rises) relative to Bitcoin during significant BTC price drops. It answers the question: *"When Bitcoin drops 5%, does this token drop 5%, 15%, or does it actually hold steady?"*

This metric helps you:

* **Assess downside risk**: Understand how exposed a token is to broad market selloffs
* **Compare relative stability**: Find tokens that show strength during BTC drawdowns
* **Inform position sizing**: Higher reflexivity = higher risk during market corrections

***

### Use Cases

1. **Portfolio risk management**: Screen out high-reflexivity tokens when reducing risk exposure
2. **Flight to quality**: During uncertain markets, identify tokens with lower reflexivity scores
3. **Position sizing**: Allocate smaller positions to high-reflexivity assets
4. **Relative value**: Compare reflexivity across similar tokens (e.g., competing L1s or DeFi protocols)

***

### How It Works

#### Calculation

1. We identify days when **Bitcoin drops more than 3%** within a 24-hour period
2. For each drop event, we calculate the **reflexivity ratio**:

   ```
   Reflexivity Ratio = Token % Change / BTC % Change
   ```

   *Example: If BTC drops -5% and a token drops -15%, the ratio is -15% / -5% = 3.0*
3. We compute a **rolling median** across the last 4-5 qualifying BTC drop events to smooth out noise

#### What the Ratio Means

| Ratio      | Interpretation                                                |
| ---------- | ------------------------------------------------------------- |
| **< 0**    | Token *gains* when BTC drops (very rare, inverse correlation) |
| **0 to 1** | Token drops *less* than BTC (more stable)                     |
| **= 1**    | Token drops the *same* as BTC                                 |
| **> 1**    | Token drops *more* than BTC (amplified volatility)            |

***

### API Response Fields

The `btc_drop_reflexivity` object is included in the Token Information endpoint response:

| Field               | Type    | Description                                                                   |
| ------------------- | ------- | ----------------------------------------------------------------------------- |
| `signal`            | number  | **Primary metric.** Rolling 5-drop median reflexivity ratio. Lower is better. |
| `avg_signal`        | number  | TBD                                                                           |
| `volatility`        | number  | TBD                                                                           |
| `signal_percentile` | number  | TBD                                                                           |
| `score`             | string  | Risk classification: `"low"`, `"medium"`, or `"high"`                         |
| `drops_in_window`   | integer | Number of BTC drop events used in the calculation (4-5 required)              |
| `is_stablecoin`     | boolean | Whether the token is classified as a stablecoin                               |

**Note:** Returns `null` if there are fewer than 4 qualifying BTC drop events in the last 365 days.

***

### Interpreting the Results

#### Example Response

```json
{
  "btc_drop_reflexivity": {
    "drops_in_window": 5,
    "signal": 1.42,
    "avg_signal": 1.58,
    "volatility": 0.31,
    "signal_percentile": 62.5,
    "score": "medium",
    "is_stablecoin": false
  }
}
```

**Interpretation:** This token typically drops \~1.4x more than Bitcoin during drawdowns (e.g., if BTC drops 5%, expect this token to drop \~7%). The medium score indicates moderate risk. The volatility of 0.31 suggests reasonably consistent behavior. At the 62.5th percentile, it's slightly more volatile than the median token in its market cap tier.

***

### Key Considerations

* **New tokens:** Reflexivity data requires sufficient BTC drop events. Tokens deployed recently may return `null`.
* **Stablecoins:** Will show values near 0 and are flagged via `is_stablecoin: true`.
* **Upside correlation:** Tokens with high downside reflexivity often also amplify gains during upswings. High reflexivity doesn't mean "bad", it means higher risk *and* potentially higher reward.
* **Slow-changing signal:** This is a general risk characteristic, not a real-time alert. It updates only when new BTC drop events occur.

***


# Useful Links

| Name              | Link                                         |
| ----------------- | -------------------------------------------- |
| Website Link      | <https://www.nansen.ai>                      |
| Plans and Pricing | <https://app.nansen.ai/account/switch-plans> |
| Web-App           | <https://app.nansen.ai>                      |


