### Nansen API V1 Getting Started Source: https://docs.nansen.ai/v1-nansen-api/api/profiler/address-counterparties Guides users on how to make their first API call to the Nansen API V1 and provides templates for various use cases, from simple to complex. ```English Getting Started with Nansen API V1: - Make Your First API Call - Use case Templates: - Simple Use cases - Complex Use cases: - Use case 1: Automated Token Tracking & Smart Money Analysis - Use case 2: Identifying Related ``` -------------------------------- ### Nansen API V1 - Getting Started Source: https://docs.nansen.ai/v1-nansen-api/api/token-god-mode This snippet outlines the initial steps for interacting with the Nansen API V1, focusing on making your first API call. It's a foundational guide for new users. ```bash curl -X GET "https://api.nansen.ai/v1/some_endpoint" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```python import requests api_key = "YOUR_API_KEY" url = "https://api.nansen.ai/v1/some_endpoint" headers = { "Authorization": f"Bearer {api_key}" } response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### Nansen API V1 - Getting Started Source: https://docs.nansen.ai/v1-nansen-api/api/token-god-mode/token-screener This section guides users on how to make their first API call to the Nansen API V1. It serves as an entry point for new users to interact with the platform. ```bash curl -X GET "https://api.nansen.ai/v1/some_endpoint" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Nansen API V1 - Getting Started Source: https://docs.nansen.ai/api/token-god-mode/token-screener This section guides users on how to make their first API call to the Nansen API V1. It is a foundational step for interacting with the Nansen platform's data. ```Nansen API GET /v1/... ``` -------------------------------- ### Nansen AI Smart Money API Link Example Source: https://docs.nansen.ai/beta-nansen-api/api/smart-money An example of a link provided within the Smart Money API documentation, likely for related resources or getting started guides. ```json { "className": "flex flex-col md:flex-row mt-6 gap-2 max-w-3xl page-width-wide:max-w-screen-2xl mx-auto text-tint", "children": [ [ "$", "$L25", null, { "href": "/beta-nansen-api/getting-started/chain-coverage", "insights": { "type": "link_click", "link": { "target": { "kind": "page", "page": "QEg85cGMmx7effBJtGUF" }, "position": "content" } }, "className": "group text-sm p-2.5 flex gap-4 flex-1 flex-row-reverse items-center pl-4 border border-tint-subtle rounded-sm circular-corners:rounded-2xl straight-corners:rounded-none hover:border-primary text-pretty md:p-4 md:text-base", "children": [ [ "$", "span", null, { "className": "flex flex-col flex-1 text-right", "children": [ [ "$", "span", null, { "className": "text-xs" } ] ] } ] ] } ] ] } ``` -------------------------------- ### Make Your First Nansen API V1 Call Source: https://docs.nansen.ai/endpoints-overview This guide demonstrates how to make your initial API call to the Nansen API V1. It covers the basic steps and requirements to get you started with retrieving data. ```Python import requests api_key = "YOUR_API_KEY" url = "https://api.nansen.ai/v1/...") # Replace with the actual endpoint headers = { "Authorization": f"Bearer {api_key}" } response = requests.get(url, headers=headers) if response.status_code == 200: data = response.json() print(data) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Nansen API - Getting Started: Authentication Source: https://docs.nansen.ai/v1-nansen-api/api/smart-money/holdings Explains the authentication methods required to access the Nansen API. Covers necessary credentials and procedures. ```json { "title": "Authentication", "href": "/getting-started/authentication", "emoji": "1f513", "pathnames": [ "getting-started/authentication" ], "type": "document" } ``` -------------------------------- ### Example Usage (JavaScript) Source: https://docs.nansen.ai/api/profiler/address-related-wallets This JavaScript example demonstrates how to construct and send a request to the Nansen AI API to get address-related wallets data. It utilizes the `fetch` API to make a POST request. ```javascript async function getAddressRelatedWallets(address, chain = 'ethereum', page = 1, perPage = 10) { const url = 'https://api.nansen.ai/api/v1/profiler/address/related-wallets'; const requestBody = { address: address, chain: chain, pagination: { page: page, per_page: perPage }, order_by: [ { field: 'order', direction: 'ASC' } ] }; try { const response = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(requestBody) }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); return data; } catch (error) { console.error('Error fetching address related wallets:', error); return null; } } // Example usage: getAddressRelatedWallets('0x1234567890abcdef1234567890abcdef12345678') .then(data => { if (data) { console.log('Related Wallets Data:', data); } }); ``` -------------------------------- ### Nansen API Beta - Make Your First API Call Source: https://docs.nansen.ai/beta-nansen-api/api/smart-money A guide to making your first API call to the Nansen API Beta, with practical examples. ```text Make Your First API Call 1f680 /beta-nansen-api/getting-started/make-your-first-api-call getting-started/make-your-first-api-call document ``` -------------------------------- ### Get Address Related Wallets (Python Example) Source: https://docs.nansen.ai/v1-nansen-api/api/profiler/address-related-wallets Shows a Python example using the `requests` library to interact with the Nansen AI API for address-related wallets. Includes setting headers and the JSON payload. ```Python import requests import json url = "https://api.nansen.ai/api/v1/profiler/address/related-wallets" address = "0x28c6c06298d514db089934071355e5743bf21d60" chain = "ethereum" api_key = "YOUR_API_KEY" headers = { "accept": "application/json", "apiKey": api_key, "Content-Type": "application/json" } payload = { "address": address, "chain": chain, "pagination": { "page": 1, "per_page": 10 }, "order_by": [ { "field": "order", "direction": "ASC" } ] } response = requests.post(url, headers=headers, data=json.dumps(payload)) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Nansen API: Make Your First API Call Source: https://docs.nansen.ai/beta-nansen-api/api/smart-money/dex-trades This section guides users on how to make their initial API call to the Nansen API. It's a starting point for interacting with the Nansen platform programmatically. -------------------------------- ### Nansen API: Make Your First API Call Source: https://docs.nansen.ai/beta-nansen-api/api/profiler This section guides users on how to make their initial API call to the Nansen API. It's a starting point for interacting with the Nansen platform programmatically. -------------------------------- ### Get Address Related Wallets (JavaScript Example) Source: https://docs.nansen.ai/v1-nansen-api/api/profiler/address-related-wallets Illustrates how to use JavaScript (with `fetch`) to call the Nansen AI API for address-related wallets. It demonstrates setting up the request headers and body. ```JavaScript const address = "0x28c6c06298d514db089934071355e5743bf21d60"; const chain = "ethereum"; const apiKey = "YOUR_API_KEY"; fetch(`https://api.nansen.ai/api/v1/profiler/address/related-wallets`, { method: 'POST', headers: { 'accept': 'application/json', 'apiKey': apiKey, 'Content-Type': 'application/json' }, body: JSON.stringify({ address: address, chain: chain, pagination: { page: 1, per_page: 10 }, order_by: [ { field: 'order', direction: 'ASC' } ] }) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` -------------------------------- ### Example LLM Configuration Source: https://docs.nansen.ai/v1-nansen-api/api/token-god-mode/holders Provides an example of a complete LLM configuration, demonstrating how to set various parameters for optimal performance. ```text Example Configuration: ``` -------------------------------- ### Example LLM Configuration Source: https://docs.nansen.ai/api/token-god-mode/holders Provides an example of a complete LLM configuration, demonstrating how to set various parameters for optimal performance. ```text Example Configuration: ``` -------------------------------- ### Example Configuration Source: https://api-docs.nansen.ai/api/token-god-mode/holders An example configuration snippet demonstrating the structure and parameters for Nansen AI LLMs. ```json { "includeLabels": "Exchange" } ``` -------------------------------- ### Nansen API Documentation Structure Source: https://docs.nansen.ai/nansen-mcp/overview This snippet outlines the hierarchical structure of the Nansen API documentation. It includes main sections like 'About' and 'Getting Started', with sub-sections detailing specific topics such as 'Introduction', 'Endpoints Overview', 'Rate Limits', and 'Credits & Pricing Guide'. ```json { "id": "woFf6vVVdiFXSjM3cWfo", "title": "About", "descendants": [ { "id": "kzTlst3tKo255yz4YpDi", "title": "Introduction", "href": "/", "emoji": "2728", "pathnames": [ "", "about/readme" ], "type": "document" }, { "id": "7ZuApKABNjQJJ1dhO24J", "title": "Endpoints Overview", "href": "/about/endpoints-overview", "emoji": "1f4cc", "pathnames": [ "about/endpoints-overview" ], "type": "document" }, { "id": "8fxFtvcqUWo5jtI740CT", "title": "Rate Limits", "href": "/about/rate-limits", "emoji": "1f534", "pathnames": [ "about/rate-limits" ], "type": "document" }, { "id": "8K6YLpJknvwow2F3veKb", "title": "Credits \u0026 Pricing Guide", "href": "/about/credits-and-pricing-guide", "emoji": "1f4c8", "pathnames": [ "about/credits-and-pricing-guide" ], "type": "document" } ], "type": "group" }, { "id": "Zvukm7MAGL6ooitMTmpY", "title": "Getting Started", "descendants": [ { "id": "lda6P0yFZuyREyc3Clrd", "title": "Make Your First API Call", "href": "/getting-started/make-your-first-api-call", "emoji": "1f680", "pathnames": [ "getting-started/make-your-first-api-call" ], "type": "document" }, { "id": "sZ42YbN487lUkqjRYobp", "title": "Use case Templates", "href": "/getting-started/use-case-templates", "emoji": "1f4dc", "pathnames": [ "getting-started/use-case-templates" ], "descendants": [ // ... more descendants ] } ] } ``` -------------------------------- ### Get TGM Holders Data - Full HTTP Request Example Source: https://docs.nansen.ai/v1-nansen-api/api/token-god-mode/holders This snippet provides a complete HTTP POST request example for the 'Get TGM Holders Data' endpoint. It includes all necessary headers and a sample JSON request body specifying the chain, token address, and aggregation preference. ```http POST /api/v1/tgm/holders HTTP/1.1 Host: api.nansen.ai apiKey: YOUR_API_KEY Content-Type: application/json Accept: */* Content-Length: 376 { "chain": "solana", "token_address": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv", "aggregate_by_entity": false ``` -------------------------------- ### Nansen API V1 - Making Your First API Call Source: https://docs.nansen.ai/v1-nansen-api/api/token-god-mode/pnl-leaderboard This guide demonstrates how to make your initial API call to the Nansen API V1. It covers the basic setup and authentication required to interact with the API endpoints. ```Python import requests api_key = "YOUR_API_KEY" url = "https://api.nansen.ai/v1/" # Example: Fetching data for a specific address address = "0x1234567890abcdef1234567890abcdef12345678" endpoint = f"address/{address}/balances" headers = { "Authorization": f"Bearer {api_key}" } try: response = requests.get(url + endpoint, headers=headers) response.raise_for_status() # Raise an exception for bad status codes data = response.json() print(data) except requests.exceptions.RequestException as e: print(f"Error making API call: {e}") ``` -------------------------------- ### Get DeFi Holdings (JavaScript) Source: https://docs.nansen.ai/v1-nansen-api/api/portfolio Example of how to get simplified DeFi holdings for a wallet address using JavaScript. This code snippet shows how to make a POST request with the necessary headers and payload. ```JavaScript const fetch = require('node-fetch'); async function getDefiHoldings(walletAddress, apiKey) { const url = 'https://api.nansen.ai/api/v1/portfolio/defi-holdings'; const headers = { 'apiKey': apiKey, 'Content-Type': 'application/json' }; const body = JSON.stringify({ 'wallet_address': walletAddress }); try { const response = await fetch(url, { method: 'POST', headers: headers, body: body }); const data = await response.json(); return data; } catch (error) { console.error('Error fetching DeFi holdings:', error); throw error; } } // Example usage: // const apiKey = 'YOUR_API_KEY'; // const walletAddress = '0x4062b997279de7213731dbe00485722a26718892'; // getDefiHoldings(walletAddress, apiKey).then(holdings => console.log(holdings)); ``` -------------------------------- ### Make Your First API Call Source: https://docs.nansen.ai/v1-nansen-api/getting-started/use-case-templates/complex-use-cases/use-case-2-identifying-related-wallets-at-scale This section guides users on how to make their initial API call to the Nansen AI LLMs service. It likely covers basic request formatting and expected responses. -------------------------------- ### Get DeFi Holdings (JavaScript) Source: https://docs.nansen.ai/api/portfolio Example of how to get simplified DeFi holdings for a wallet address using JavaScript. This code snippet shows how to make a POST request with the necessary headers and payload. ```JavaScript const fetch = require('node-fetch'); async function getDefiHoldings(walletAddress, apiKey) { const url = 'https://api.nansen.ai/api/v1/portfolio/defi-holdings'; const headers = { 'apiKey': apiKey, 'Content-Type': 'application/json' }; const body = JSON.stringify({ 'wallet_address': walletAddress }); try { const response = await fetch(url, { method: 'POST', headers: headers, body: body }); const data = await response.json(); return data; } catch (error) { console.error('Error fetching DeFi holdings:', error); throw error; } } // Example usage: // const apiKey = 'YOUR_API_KEY'; // const walletAddress = '0x4062b997279de7213731dbe00485722a26718892'; // getDefiHoldings(walletAddress, apiKey).then(holdings => console.log(holdings)); ``` -------------------------------- ### Navigate to Previous Use Case Templates Source: https://docs.nansen.ai/v1-nansen-api/getting-started/use-case-templates/simple-use-cases Provides a link to navigate to the 'Use case Templates' section of the documentation. This is part of the site's navigation structure. ```HTML Previous Use case Templates ``` -------------------------------- ### Nansen API: Make Your First API Call Source: https://docs.nansen.ai/beta-nansen-api/api/portfolio This guide explains how to make your initial call to the Nansen API. It covers the fundamental steps and requirements to interact with the API successfully. ```N/A This section describes how to make your first API call, but does not contain a specific code snippet. ``` -------------------------------- ### Get TGM Flows Data Example Request Source: https://docs.nansen.ai/v1-nansen-api/api/token-god-mode/flows Example JSON payload for the POST /api/v1/tgm/flows endpoint, demonstrating how to specify chain, token address, date range, label, pagination, filters, and order. ```JSON { "chain": "solana", "token_address": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv", "date": { "from": "2025-05-01", "to": "2025-05-03" }, "label": "smart_money", "pagination": { "page": 1, "per_page": 10 }, "filters": { "price_usd": { "max": 1000, "min": 0.01 }, "value_usd": { "min": 10000 } }, "order_by": [ { "field": "date", "direction": "ASC" } ] } ``` -------------------------------- ### Nansen API Beta - Usage Example Source: https://docs.nansen.ai/v1-nansen-api/api/token-god-mode/token-screener Demonstrates how to interact with the beta version of the Nansen API. This is for users who want to test or utilize the latest features. ```javascript fetch('https://api.nansen.ai/beta/some_beta_endpoint', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_BETA_API_KEY', 'Content-Type': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)); ``` -------------------------------- ### Setup Nansen API in Cursor Source: https://context7_llms This snippet provides instructions on how to set up the Nansen API within the Cursor IDE. It involves creating a .env file for API credentials and settings, and generating a .cursorrules file to configure API access, authentication, and rate limiting. ```shell https://docs.nansen.ai/guides/vibecoding-with-nansen-api.md Setup Nansen API in my project following the steps mentioned in this link You need to: 1. Create a .env file 2. Generate cursorrules 3. Ingest API Docs ``` -------------------------------- ### Get Address Related Wallets (cURL Example) Source: https://docs.nansen.ai/v1-nansen-api/api/profiler/address-related-wallets Provides a cURL command to fetch address-related wallets from the Nansen AI API. This example shows how to include the API key and the JSON body in the request. ```cURL curl -X POST "https://api.nansen.ai/api/v1/profiler/address/related-wallets" \ -H "accept: application/json" \ -H "apiKey: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"address\": \"0x28c6c06298d514db089934071355e5743bf21d60\", \"chain\": \"ethereum\", \"pagination\": {\"page\": 1, \"per_page\": 10}, \"order_by\": [{\"field\": \"order\", \"direction\": \"ASC\"}]}" ``` -------------------------------- ### Nansen API V1 Introduction Source: https://docs.nansen.ai/v1-nansen-api/api/profiler/address-counterparties Provides an overview of the Nansen API V1, its capabilities, and how to get started with making your first API call. It also links to detailed endpoint information and rate limits. ```English This section covers the introduction to the Nansen API V1, including: - Overview of Nansen API V1 - Endpoints Overview - Rate Limits - Credits & Pricing Guide - Making Your First API Call - Use case Templates ``` -------------------------------- ### Get TGM Flows Data Example Request Source: https://api-docs.nansen.ai/api/token-god-mode/flows Example JSON payload for the POST /api/v1/tgm/flows endpoint, demonstrating how to specify chain, token address, date range, label, pagination, filters, and order. ```JSON { "chain": "solana", "token_address": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv", "date": { "from": "2025-05-01", "to": "2025-05-03" }, "label": "smart_money", "pagination": { "page": 1, "per_page": 10 }, "filters": { "price_usd": { "max": 1000, "min": 0.01 }, "value_usd": { "min": 10000 } }, "order_by": [ { "field": "date", "direction": "ASC" } ] } ``` -------------------------------- ### Get Address Related Wallets (Python Example) Source: https://docs.nansen.ai/api/profiler/address-related-wallets Shows a Python example using the `requests` library to interact with the Nansen AI API for address-related wallets. Includes setting headers and the JSON payload. ```Python import requests import json url = "https://api.nansen.ai/api/v1/profiler/address/related-wallets" address = "0x28c6c06298d514db089934071355e5743bf21d60" chain = "ethereum" api_key = "YOUR_API_KEY" headers = { "accept": "application/json", "apiKey": api_key, "Content-Type": "application/json" } payload = { "address": address, "chain": chain, "pagination": { "page": 1, "per_page": 10 }, "order_by": [ { "field": "order", "direction": "ASC" } ] } response = requests.post(url, headers=headers, data=json.dumps(payload)) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Get Address Related Wallets (cURL Example) Source: https://docs.nansen.ai/api/profiler/address-related-wallets Provides a cURL command to fetch address-related wallets from the Nansen AI API. This example shows how to include the API key and the JSON body in the request. ```cURL curl -X POST "https://api.nansen.ai/api/v1/profiler/address/related-wallets" \ -H "accept: application/json" \ -H "apiKey: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"address\": \"0x28c6c06298d514db089934071355e5743bf21d60\", \"chain\": \"ethereum\", \"pagination\": {\"page\": 1, \"per_page\": 10}, \"order_by\": [{\"field\": \"order\", \"direction\": \"ASC\"}]}" ``` -------------------------------- ### Configure GitBook AI Assistant Suggested Questions Source: https://docs.nansen.ai/v1-nansen-api/api/smart-money Provides predefined questions to guide users in interacting with the AI assistant. These suggestions cover general inquiries about the page content, recommendations for further reading, and requests for examples. ```javascript { "ai_chat_suggested_questions_title": "Suggested questions", "ai_chat_suggested_questions_about_this_page": "What is this page about?", "ai_chat_suggested_questions_read_next": "What should I read next?", "ai_chat_suggested_questions_example": "Can you give an example?" } ``` -------------------------------- ### Nansen API V1 - Making Your First API Call Source: https://api-docs.nansen.ai/api/token-god-mode/pnl-leaderboard This guide demonstrates how to make your initial API call to the Nansen API V1. It covers the basic setup and authentication required to interact with the API endpoints. ```Python import requests api_key = "YOUR_API_KEY" url = "https://api.nansen.ai/v1/" # Example: Fetching data for a specific address address = "0x1234567890abcdef1234567890abcdef12345678" endpoint = f"address/{address}/balances" headers = { "Authorization": f"Bearer {api_key}" } try: response = requests.get(url + endpoint, headers=headers) response.raise_for_status() # Raise an exception for bad status codes data = response.json() print(data) except requests.exceptions.RequestException as e: print(f"Error making API call: {e}") ``` -------------------------------- ### Get Address Transactions (Python) Source: https://docs.nansen.ai/v1-nansen-api/api/profiler/address-transactions Provides a Python example for calling the Nansen AI API to get address transaction data. It shows how to construct the request payload with necessary parameters like address, chain, and date. ```python import requests import json api_key = 'YOUR_API_KEY' address = '0x28c6c06298d514db089934071355e5743bf21d60' chain = 'ethereum' date_range = { "from": "2025-08-01T00:00:00Z", "to": "2025-08-10T23:59:59Z" } url = 'https://api.nansen.ai/api/v1/profiler/address/transactions' headers = { 'Content-Type': 'application/json', 'apiKey': api_key, 'Accept': '*/*' } payload = { "address": address, "chain": chain, "date": date_range, "hide_spam_token": True, "filters": { "volume_usd": { "min": 100 } }, "pagination": { "page": 1, "per_page": 20 }, "order_by": [ { "field": "block_timestamp", "direction": "ASC" } ] } response = requests.post(url, headers=headers, data=json.dumps(payload)) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Get Address Transactions (Python) Source: https://docs.nansen.ai/api/profiler/address-transactions Provides a Python example for calling the Nansen AI API to get address transaction data. It shows how to construct the request payload with necessary parameters like address, chain, and date. ```python import requests import json api_key = 'YOUR_API_KEY' address = '0x28c6c06298d514db089934071355e5743bf21d60' chain = 'ethereum' date_range = { "from": "2025-08-01T00:00:00Z", "to": "2025-08-10T23:59:59Z" } url = 'https://api.nansen.ai/api/v1/profiler/address/transactions' headers = { 'Content-Type': 'application/json', 'apiKey': api_key, 'Accept': '*/*' } payload = { "address": address, "chain": chain, "date": date_range, "hide_spam_token": True, "filters": { "volume_usd": { "min": 100 } }, "pagination": { "page": 1, "per_page": 20 }, "order_by": [ { "field": "block_timestamp", "direction": "ASC" } ] } response = requests.post(url, headers=headers, data=json.dumps(payload)) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Get Address PnL Summary Data (cURL) Source: https://docs.nansen.ai/api/profiler/address-pnl-and-trade-performance Example of how to call the Nansen AI LLM API's Profiler endpoint using cURL to get address PnL summary data. It demonstrates the POST request with JSON payload and API key authentication. ```cURL curl -X POST https://api.nansen.ai/api/v1/profiler/address/pnl-summary \ -H "Content-Type: application/json" \ -H "apiKey: YOUR_API_KEY" \ -d '{ "address": "0x..." }' ``` -------------------------------- ### Get Smart Money DEX Trades Data (cURL Example) Source: https://docs.nansen.ai/v1-nansen-api/api/smart-money/dex-trades This cURL command demonstrates how to make a POST request to the Nansen AI API to fetch smart money DEX trades data. It includes essential headers and a JSON body with example filters. ```cURL curl -X POST "https://api.nansen.ai/api/v1/smart-money/dex-trades" \ -H "accept: application/json" \ -H "Content-Type: application/json" \ -H "apiKey: YOUR_API_KEY" \ -d "{\"chains\": [\"ethereum\", \"solana\"], \"filters\": {\"exclude_smart_money_labels\": [\"30D Smart Trader\"], \"include_smart_money_labels\": [\"Fund\", \"Smart Trader\"], \"token_bought_age_days\": {\"max\": 30, \"min\": 1}, \"trade_value_usd\": {\"max\": 10000, \"min\": 1000}}, \"pagination\": {\"page\": 1, \"per_page\": 10}, \"order_by\": [{\"field\": \"chain\", \"direction\": \"ASC\"}]}" ``` -------------------------------- ### Nansen API V1 - Making Your First API Call Source: https://docs.nansen.ai/api/token-god-mode/pnl-leaderboard This guide demonstrates how to make your initial API call to the Nansen API V1. It covers the basic setup and authentication required to interact with the API endpoints. ```Python import requests api_key = "YOUR_API_KEY" url = "https://api.nansen.ai/v1/" # Example: Fetching data for a specific address address = "0x1234567890abcdef1234567890abcdef12345678" endpoint = f"address/{address}/balances" headers = { "Authorization": f"Bearer {api_key}" } try: response = requests.get(url + endpoint, headers=headers) response.raise_for_status() # Raise an exception for bad status codes data = response.json() print(data) except requests.exceptions.RequestException as e: print(f"Error making API call: {e}") ``` -------------------------------- ### Get Smart Money DEX Trades Data (cURL Example) Source: https://docs.nansen.ai/api/smart-money/dex-trades This cURL command demonstrates how to make a POST request to the Nansen AI API to fetch smart money DEX trades data. It includes essential headers and a JSON body with example filters. ```cURL curl -X POST "https://api.nansen.ai/api/v1/smart-money/dex-trades" \ -H "accept: application/json" \ -H "Content-Type: application/json" \ -H "apiKey: YOUR_API_KEY" \ -d "{\"chains\": [\"ethereum\", \"solana\"], \"filters\": {\"exclude_smart_money_labels\": [\"30D Smart Trader\"], \"include_smart_money_labels\": [\"Fund\", \"Smart Trader\"], \"token_bought_age_days\": {\"max\": 30, \"min\": 1}, \"trade_value_usd\": {\"max\": 10000, \"min\": 1000}}, \"pagination\": {\"page\": 1, \"per_page\": 10}, \"order_by\": [{\"field\": \"chain\", \"direction\": \"ASC\"}]}" ``` -------------------------------- ### Nansen API Beta - Usecase Templates Source: https://docs.nansen.ai/beta-nansen-api/api/smart-money Templates and examples for various use cases when using the Nansen API Beta. ```text Usecase Templates 1f4dc /beta-nansen-api/getting-started/usecase-templates getting-started/usecase-templates document ``` -------------------------------- ### Nansen API V1 - Navigation Structure Source: https://docs.nansen.ai/getting-started/authentication Defines the navigation structure for the Nansen API V1 documentation, including sections like 'About' and 'Getting Started'. It lists documents and groups within these sections. ```JavaScript { "pages": [ { "id": "woFf6vVVdiFXSjM3cWfo", "title": "About", "descendants": [ { "id": "kzTlst3tKo255yz4YpDi", "title": "Introduction", "href": "/", "emoji": "2728", "pathnames": [ "", "about/readme" ], "type": "document" }, { "id": "7ZuApKABNjQJJ1dhO24J", "title": "Endpoints Overview", "href": "/about/endpoints-overview", "emoji": "1f4cc", "pathnames": [ "about/endpoints-overview" ], "type": "document" }, { "id": "8fxFtvcqUWo5jtI740CT", "title": "Rate Limits", "href": "/about/rate-limits", "emoji": "1f534", "pathnames": [ "about/rate-limits" ], "type": "document" }, { "id": "8K6YLpJknvwow2F3veKb", "title": "Credits \u0026 Pricing Guide", "href": "/about/credits-and-pricing-guide", "emoji": "1f4c8", "pathnames": [ "about/credits-and-pricing-guide" ], "type": "document" } ], "type": "group" }, { "id": "Zvukm7MAGL6ooitMTmpY", "title": "Getting Started", "descendants": [ { "id": "lda6P0yFZuyREyc3Clrd", "title": "Make Your First API Call", "href": "/getting-started/make-your-first-api-call", "emoji": "1f680", "pathnames": [ "getting-started/make-your-first-api-call" ], "type": "document" }, { "id": "sZ42YbN487lUkqjRYobp", "title": "Use case Templates", "href": "/getting-started/use-case-templates", "emoji": "1f4dc", "pathnames": [ "getting-started/use-case-templates" ], "descendants": [ { "id": "VjlW6HaIQjTxvUK6PIt2", "title": "Simple Use cases", "href": "/getting-started/use-case-templates/simple-use-cases", "pathnames": [ "getting-started/use-case-templates/simple-use-cases" ], "type": "document" }, { "id": "nMMDfMzZQEnpE3LOn6TA", "title": "Complex Use cases", "href": "/getting-started/use-case-templates/complex-use-cases", "pathnames": [ "getting-started/use-case-templates/complex-use-cases" ], "descendants": [ { "id": "B7ZpMdJSA2w9fOgYspik", "title": "Use case 1: Automated Token Tracking ", "href": "/getting-started/use-case-templates/complex-use-cases/use-case-1-automated-token-tracking", "pathnames": [ "getting-started/use-case-templates/complex-use-cases/use-case-1-automated-token-tracking" ], "type": "document" } ], "type": "group" } ], "type": "group" } ], "type": "group" } ] } ``` -------------------------------- ### Nansen API - Getting Started: Chain Coverage Source: https://docs.nansen.ai/v1-nansen-api/api/smart-money/holdings Details the blockchain networks supported by the Nansen API. Lists all chains for which data is available. ```json { "title": "Chain Coverage", "href": "/getting-started/chain-coverage", "emoji": "26d3", "pathnames": [ "getting-started/chain-coverage" ], "type": "document" } ``` -------------------------------- ### SmartMoneyHoldingsRequest Example Source: https://context7_llms An example of a request body for the SmartMoneyHoldings endpoint, demonstrating how to specify chains, filters, pagination, and sorting. ```json { "chains": [ "ethereum", "arbitrum" ], "filters": { "value_usd": { "min": 100000, "max": 10000000 }, "token_sectors": [ "DeFi", "Infrastructure" ], "token_age_days": { "min": 30 } }, "pagination": { "page": 1, "per_page": 50 }, "order_by": [ { "field": "value_usd", "direction": "DESC" } ] } ``` -------------------------------- ### Nansen API Profiler Setup and Usage Source: https://docs.nansen.ai/beta-nansen-api/api/profiler This snippet demonstrates the basic structure and setup for the Nansen API Profiler. It includes essential links for styling and script loading, crucial for the profiler's functionality. ```javascript self.__next_f.push([1, "f:I[32292,[\"9421\",\"static/chunks/9421-5c674f9c95f7d380.js\",\"7582\",\"static/chunks/7582-ed84f88cf37ca35d.js\",\"2580\",\"static/chunks/2580-42913c9cbf6e0792.js\",\"5337\",\"static/chunks/5337-1bfad5dc8bf35ff4.js\",\"4856\",\"static/chunks/4856-0250bcc25d40be75.js\",\"7762\",\"static/chunks/7762-7c53d775e2ff3ff5.js\",\"5213\",\"static/chunks/5213-8303193ff5b3e0e8.js\",\"8617\",\"static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/(content)/%5BpagePath%5D/page-5eea57f9b7b868e0.js\"],\"SitePageNotFound\"]\n5:[\"$\",\"$Lf\",null,{}]\n"]) self.__next_f.push([1, "b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"color-scheme\",\"content\":\"dark\"}]]\n8:null\n9:null\n"]) self.__next_f.push([1, "d:[[\"$\",\"title\",\"0\",{\"children\":\"Profiler | Nansen API\"}],[\"$\",\"meta\",\"1\",{\"name\":\"generator\",\"content\":\"GitBook (177afa5)\"}]]) ```