> For the complete documentation index, see [llms.txt](https://docs.nansen.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nansen.ai/guides/templates.md).

# Use cases and workflows

Examples of what you can build with the Nansen API, from a single request to workflows that chain several requests into an answer.

## Try a workflow in the app

The [Workflow Library](https://app.nansen.ai/api?tab=workflows) runs each workflow below in your browser, one step at a time. Each step shows the request, the response, and what to look for. The token or wallet you pick in one step feeds the next.

* You get free workflow runs every week. They are separate from your API credits and only work in the Workflow Library. Your free runs top up every week.
* One run covers every step of a workflow.
* Sign in to [app.nansen.ai](https://app.nansen.ai/api?tab=workflows) to see the Workflows tab.
* At the end of a workflow you can copy or download it as a curl or Python script. Scripts call the API with your API key and use your API credits.
* When you have used this week's free runs, you can still download each workflow's script.

### Wallet Hunter

Find who is making money and follow them.

1. **Discover**: rank tokens by Smart Money net inflow and pick one. [`POST /api/v1/smart-money/netflow`](https://docs.nansen.ai/api/smart-money/netflows.md)
2. **Buyers & sellers**: see which wallets bought or sold that token, and pick one. [`POST /api/v1/tgm/who-bought-sold`](https://docs.nansen.ai/api/token-god-mode/who-bought-sold.md)
3. **Track record**: check whether that wallet is profitable. [`POST /api/v1/profiler/address/pnl-summary`](https://docs.nansen.ai/api/profiler/address-pnl-and-trade-performance.md)
4. **Recent trades**: see what that wallet is trading now. [`POST /api/v1/profiler/dex-trades`](https://docs.nansen.ai/api/profiler/address-dex-trades.md)

[Run Wallet Hunter in the app](https://app.nansen.ai/api?tab=workflows\&workflow=wallet-hunter)

### Token Due Diligence

Should I buy this token?

1. **Screen**: rank tokens by Smart Money net flow and pick one. [`POST /api/v1/token-screener`](https://docs.nansen.ai/api/token-god-mode/token-screener.md)
2. **Fundamentals**: see what the token is. [`POST /api/v1/tgm/token-information`](https://docs.nansen.ai/api/token-god-mode/token-information.md)
3. **Flows**: see which groups of wallets are buying and selling it. [`POST /api/v1/tgm/flow-intelligence`](https://docs.nansen.ai/api/token-god-mode/flow-intelligence.md)
4. **Price**: see how its price has moved. [`POST /api/v1/tgm/token-ohlcv`](https://docs.nansen.ai/api/token-god-mode/price-ohlcv.md)

[Run Token Due Diligence in the app](https://app.nansen.ai/api?tab=workflows\&workflow=token-due-diligence)

### Hyperliquid Trader Scout

Find the best perp traders and copy them.

1. **Leaderboard**: rank Hyperliquid traders by ROI or PnL and pick one. [`POST /api/v1/perp-leaderboard`](https://docs.nansen.ai/api/hyperliquid/hyperliquid-leaderboard.md)
2. **Positions**: see what the trader holds. [`POST /api/v1/profiler/perp-positions`](https://docs.nansen.ai/api/hyperliquid/address-perp-positions.md)
3. **Trades**: see how the trader trades. [`POST /api/v1/profiler/perp-trades`](https://docs.nansen.ai/api/hyperliquid/address-perp-trades.md)
4. **PnL**: check whether the trader makes money on closed trades. [`POST /api/v1/profiler/perp-pnl-summary`](https://docs.nansen.ai/api/profiler/perp-pnl-summary.md)

[Run Hyperliquid Trader Scout in the app](https://app.nansen.ai/api?tab=workflows\&workflow=hyperliquid-trader-scout)

### CEX Health Monitor

Track exchange reserves and net flows.

1. **Reserves**: see what an exchange holds onchain. [`POST /api/v1/profiler/address/current-balance`](https://docs.nansen.ai/api/profiler/address-current-balances.md)
2. **Flows**: see who the exchange moved funds with, and whether money is flowing in or out. [`POST /api/v1/profiler/address/counterparties`](https://docs.nansen.ai/api/profiler/address-counterparties.md)

[Run CEX Health Monitor in the app](https://app.nansen.ai/api?tab=workflows\&workflow=cex-health-monitor)

### Wallet Due Diligence

Who is this wallet, and should I trust it?

1. **Identity**: see the wallet's labels. [`POST /api/v1/profiler/address/labels`](https://docs.nansen.ai/api/profiler/address-labels.md)
2. **Holdings**: see what it holds. [`POST /api/v1/profiler/address/current-balance`](https://docs.nansen.ai/api/profiler/address-current-balances.md)
3. **DeFi**: see its DeFi positions. [`POST /api/v1/portfolio/defi-holdings`](https://docs.nansen.ai/api/portfolio.md)
4. **Counterparties**: see who it deals with. [`POST /api/v1/profiler/address/counterparties`](https://docs.nansen.ai/api/profiler/address-counterparties.md)
5. **PnL**: check whether it trades at a profit. [`POST /api/v1/profiler/address/pnl-summary`](https://docs.nansen.ai/api/profiler/address-pnl-and-trade-performance.md)

[Run Wallet Due Diligence in the app](https://app.nansen.ai/api?tab=workflows\&workflow=wallet-due-diligence)

### Catch the Next Winner

Find who made the most on the last winner and see what they buy next.

1. **Winners**: rank tokens by price change and pick one. [`POST /api/v1/token-screener`](https://docs.nansen.ai/api/token-god-mode/token-screener.md)
2. **Top traders**: see who made the most on that token, and pick a wallet. [`POST /api/v1/tgm/pnl-leaderboard`](https://docs.nansen.ai/api/token-god-mode/pnl-leaderboard.md)
3. **Track record**: check whether that wallet is consistent or made one lucky trade. [`POST /api/v1/profiler/address/pnl-summary`](https://docs.nansen.ai/api/profiler/address-pnl-and-trade-performance.md)
4. **Recent trades**: see what that wallet is buying now. [`POST /api/v1/profiler/dex-trades`](https://docs.nansen.ai/api/profiler/address-dex-trades.md)

[Run Catch the Next Winner in the app](https://app.nansen.ai/api?tab=workflows\&workflow=catch-the-next-winner)

### Smart Money's New Perp Bets

See the new perp positions Smart Money opened today.

1. **New bets**: see the new perp positions Smart Money opened, and pick a coin. [`POST /api/v1/smart-money/perp-trades`](https://docs.nansen.ai/api/hyperliquid/smart-money-perp-trades.md)
2. **Positions**: see how Smart Money is positioned on that coin. [`POST /api/v1/tgm/perp-positions`](https://docs.nansen.ai/api/hyperliquid/token-perp-positions.md)
3. **Top traders**: check whether the top traders on that coin are on the same side. [`POST /api/v1/tgm/perp-pnl-leaderboard`](https://docs.nansen.ai/api/hyperliquid/perp-pnl-leaderboard.md)
4. **Price**: see how the coin's price has moved. [`POST /api/v1/tgm/token-ohlcv`](https://docs.nansen.ai/api/token-god-mode/price-ohlcv.md)

[Run Smart Money's New Perp Bets in the app](https://app.nansen.ai/api?tab=workflows\&workflow=smart-money-new-perp-bets)

## Single requests

Copy a request, replace `YOUR_API_KEY` with your API key, and run it in your terminal.

### DeFi positions of a wallet

Get a wallet's DeFi positions, with balances, values and token details. [Endpoint docs](https://docs.nansen.ai/api/portfolio.md)

```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"
  }'
```

### Smart Money holdings

See which tokens Smart Money wallets (historically profitable traders) hold. [Endpoint docs](https://docs.nansen.ai/api/smart-money/holdings.md)

```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"
    }
  ]
}'
```

### Top holders of a token

Find the largest holders of a token, with their balances and wallet types. [Endpoint docs](https://docs.nansen.ai/api/token-god-mode/holders.md)

```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"
      }
    ]
  }'
```

### New tokens with the Token Screener

Find new tokens by market cap, token age, volume and Smart Money activity. [Endpoint docs](https://docs.nansen.ai/api/token-god-mode/token-screener.md)

```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"
    ],
    "timeframe": "7d",
    "pagination": {
      "page": 1,
      "per_page": 10
    },
    "filters": {
      "token_age_days": {
        "max": 7
      }
    },
    "order_by": [
      {
        "field": "market_cap_usd",
        "direction": "DESC"
      }
    ]
  }'
```

## Step-by-step guides

Longer guides that chain several endpoints, with code.

* [Use case 1: Automated Token Tracking & Smart Money Analysis](https://docs.nansen.ai/guides/templates/use-case-1-automated-token-tracking-and-smart-money-analysis.md): find promising tokens and check Smart Money activity on them.
* [Use case 2: Find & Copytrade Wallets on Hyperliquid](https://docs.nansen.ai/guides/templates/use-case-2-find-and-copytrade-wallets-on-hyperliquid.md): find profitable Hyperliquid wallets and follow their trades.
* [Use case 3: Identifying Related Wallets at Scale](https://docs.nansen.ai/guides/templates/use-case-3-identifying-related-wallets-at-scale.md): find wallets linked by funding and shared counterparties.
* [Use case 4: Copytrading Top Performing Wallets](https://docs.nansen.ai/guides/templates/use-case-4-copytrading-top-performing-wallets.md): find top-performing wallets and track what they trade.
* [Use case 5: Monitoring CEX Health](https://docs.nansen.ai/guides/templates/use-case-5-monitoring-cex-health.md): report an exchange's onchain balances and daily net flows.
* [Use case 6: Finding FOMO Traders](https://docs.nansen.ai/guides/templates/use-case-6-finding-fomo-traders.md): find wallets that trade through the FOMO app.

For every endpoint, see the [API reference](https://docs.nansen.ai/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nansen.ai/guides/templates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
