🚀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/beta. 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.

smart-money/inflows

post

This model provides net flow of tokens bought/sold by Smart Money addresses.

Questions

  1. What are the most commonly traded tokens by smart money addresses in the last day, and how does their trading volume in USD compare?

  2. Are there any new tokens (recently deployed) that have been significantly adopted by smart money traders, as indicated by the amount of USD traded?

Authorizations
Body
Responses
200

Successful response

application/json
post
POST /api/beta/smart-money/inflows HTTP/1.1
Host: api.nansen.ai
apiKey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 220

{
  "parameters": {
    "smFilter": [
      "180D Smart Trader",
      "Fund",
      "Smart Trader"
    ],
    "chains": [
      "ethereum",
      "solana"
    ],
    "includeStablecoin": true,
    "includeNativeTokens": true,
    "excludeSmFilter": []
  },
  "pagination": {
    "page": 1,
    "recordsPerPage": 100
  }
}
[
  {
    "chain": "text",
    "tokenAddress": "text",
    "symbol": "text",
    "sectors": [
      "text"
    ],
    "volume24hUSD": 1,
    "volume7dUSD": 1,
    "volume30dUSD": 1,
    "nofTraders": "text",
    "tokenAgeDays": "text",
    "marketCap": 1
  }
]

Do the same in code

Javascript:

const response = await fetch('https://api.nansen.ai/api/beta/smart-money/inflows', {
    method: 'POST',
    headers: {
      "apiKey": "YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "parameters": {
        "smFilter": [
          "180D Smart Trader",
          "Fund",
          "Smart Trader"
        ],
        "chains": [
          "ethereum",
          "solana"
        ],
        "includeStablecoin": true,
        "includeNativeTokens": true,
        "excludeSmFilter": []
      },
      "pagination": {
        "page": 1,
        "recordsPerPage": 100
      }
    })
});

const data = await response.json();

Python:

import json
import requests

response = requests.post(
    "https://api.nansen.ai/api/beta/smart-money/inflows",
    headers={"apiKey":"YOUR_API_KEY","Content-Type":"application/json"},
    data=json.dumps({
      "parameters": {
        "smFilter": [
          "180D Smart Trader",
          "Fund",
          "Smart Trader"
        ],
        "chains": [
          "ethereum",
          "solana"
        ],
        "includeStablecoin": True,
        "includeNativeTokens": True,
        "excludeSmFilter": []
      },
      "pagination": {
        "page": 1,
        "recordsPerPage": 100
      }
    })
)

data = response.json()

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

Next Steps

Checkout all the available endpoints:

Smart MoneyProfilerToken God ModePortfolio

Last updated

Was this helpful?