Getting Started

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

Prerequisites

Quick Start

1. Set Up Authentication

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

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

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

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

Last updated

Was this helpful?