🚀Make Your First API Call

This guide takes you from API key → first successful response in minutes.

Get your API key

  1. Create or copy your key from the Nansen dashboard (Link Here).

  1. You’ll pass it in the apiKey request header.

-H 'apiKey: YOUR_API_KEY' \
  1. Base URL for all requests: https://api.nansen.ai/api/v1. All endpoints are POST.

Make the call

Let's try the first API Call by calling the Smart Money Netflows API:

  1. Click on Test It button on the API codeblock below

  2. Paste your API Key under the value section (As shown in the screenshot

  3. Click on "Send" or press CMD + Enter.

Get Smart Money Netflow Data

post

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 (24h, 7d, 30d)

  • Sortable results by volume metrics

  • Includes both DEX trades and CEX transfers

Authorizations
Body
filtersany ofOptional

Additional filters to apply. Only filters for columns that are being selected will be applied.

Example: {"exclude_smart_money_labels":["30D Smart Trader"],"include_native_tokens":false,"include_smart_money_labels":["Fund","Smart Trader"],"include_stablecoins":false}
order_byany ofOptional

Custom sort order to override the endpoint's default ordering.

Examples:

  • [{"field": "market_cap_usd", "direction": "DESC"}] - Sort by market cap descending
  • [{"field": "net_flow_24h_usd", "direction": "ASC"}] - Sort by 24h flow ascending
  • [{"field": "market_cap_usd", "direction": "DESC"}, {"field": "net_flow_24h_usd", "direction": "ASC"}] - Sort by market cap descending, then 24h flow ascending
Responses
200

Smart money netflow data

application/json
post
POST /api/v1/smart-money/netflow HTTP/1.1
Host: api.nansen.ai
apiKey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 292

{
  "chains": [
    "ethereum",
    "solana"
  ],
  "filters": {
    "exclude_smart_money_labels": [
      "30D Smart Trader"
    ],
    "include_native_tokens": false,
    "include_smart_money_labels": [
      "Fund",
      "Smart Trader"
    ],
    "include_stablecoins": false
  },
  "pagination": {
    "page": 1,
    "per_page": 10
  },
  "order_by": [
    {
      "field": "chain",
      "direction": "ASC"
    }
  ]
}
{
  "data": [
    {
      "token_address": "text",
      "token_symbol": "text",
      "net_flow_24h_usd": 1,
      "net_flow_7d_usd": 1,
      "net_flow_30d_usd": 1,
      "chain": "text",
      "token_sectors": [
        "text"
      ],
      "trader_count": 1,
      "token_age_days": 1,
      "market_cap_usd": 1
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "is_last_page": true
  }
}

Do the same in code

Javascript:

const response = await fetch('https://api.nansen.ai/api/v1/smart-money/netflow', {
    method: 'POST',
    headers: {
      "apiKey": "YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "chains": [
        "ethereum",
        "solana"
      ],
      "filters": {
        "exclude_smart_money_labels": [
          "30D Smart Trader"
        ],
        "include_native_tokens": false,
        "include_smart_money_labels": [
          "Fund",
          "Smart Trader"
        ],
        "include_stablecoins": false
      },
      "pagination": {
        "page": 1,
        "per_page": 10
      },
      "order_by": [
        {
          "field": "chain",
          "direction": "ASC"
        }
      ]
    })
});

const data = await response.json();

Python:

import json
import requests

response = requests.post(
    "https://api.nansen.ai/api/v1/smart-money/netflow",
    headers={"apiKey":"YOUR_API_KEY","Content-Type":"application/json"},
    data=json.dumps({
      "chains": [
        "ethereum",
        "solana"
      ],
      "filters": {
        "exclude_smart_money_labels": [
          "30D Smart Trader"
        ],
        "include_native_tokens": False,
        "include_smart_money_labels": [
          "Fund",
          "Smart Trader"
        ],
        "include_stablecoins": False
      },
      "pagination": {
        "page": 1,
        "per_page": 10
      },
      "order_by": [
        {
          "field": "chain",
          "direction": "ASC"
        }
      ]
    })
)

data = response.json()

Tip: You can easily swap between cURL, Python or Javascript by clicking on these code blocks.

Next Steps

  1. Checkout these Usecase Templates

📜Use case Templates

  1. Checkout all the available endpoints

Smart MoneyToken God ModeProfilerPortfolio

Last updated

Was this helpful?