Nansen API
  • ✨Introduction
  • 📌Endpoints Overview
  • 🔴Rate Limits and Quotas
  • Getting Started
    • ☑️Prerequisites
    • 🌐API Structure & Base URL
    • 🔓Authentication
    • 🟢Understanding Responses and Handling Errors
    • ⛓️Chain Coverage
  • API
    • Smart Money
    • Profiler
      • Balances
      • Transactions
      • Counterparties
      • Trade Performance
    • Token God Mode
      • Token Overview
      • Holders
      • Flows
      • Transactions
      • PnL Leaderboard
  • Guides
    • 💻Endpoint Showcase
    • 🙋Frequently Asked Questions
  • 🔗Useful Links
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. API
  2. Profiler

Trade Performance

PreviousCounterpartiesNextToken God Mode

Last updated 23 days ago

Was this helpful?

  • POSTprofiler/address/pnl-summary
  • POSTprofiler/address/pnl

profiler/address/pnl-summary

post

This table contains aggregate stats of overall realised pnl for the input wallet. It also lists the top 5 tokens by realised profit. Questions you can answer using this model are:

  1. What are the top profitable tokens for the input address? 2. What is the realised profit and roi over all tokens traded by the input address? 3. What is the winrate for the input address?

Authorizations
Body
Responses
200
Successful response
application/json
400
Bad request
application/json
401
Authentication error
application/json
403
Forbidden - Subscription tier required
application/json
500
Internal server error
application/json
post
POST /api/beta/profiler/address/pnl-summary HTTP/1.1
Host: api.nansen.ai
apiKey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 188

{
  "parameters": {
    "chain": "ethereum",
    "walletAddress": "0x28c6c06298d514db089934071355e5743bf21d60",
    "date": {
      "from": "2025-05-01",
      "to": "2025-05-03"
    }
  },
  "pagination": {
    "page": 1,
    "recordsPerPage": 100
  }
}
[
  {
    "top5Tokens": [
      [
        "text"
      ]
    ],
    "tradedToken": 1,
    "tradedTimes": 1,
    "realizedPnlUsd": 1,
    "realizedPnlPercent": 1,
    "winRate": 1,
    "averageRoiPerTrade": 1
  }
]

profiler/address/pnl

post

This question calculates, for each token traded by the input address, stats related to amounts sold and bought, realised and unrealised pnl and roi, cost basis and avg sell price. Questions you can answer using this model are:

  1. What is the realised and unrealised profits for each token traded by the input address? 2. What is the cost basis and average sale price of each token traded by the input address? 3. How many of a specific token was bought by the input address in the last 90 days, 1 year or all time?

Authorizations
Body
Responses
200
Successful response
application/json
400
Bad request
application/json
401
Authentication error
application/json
403
Forbidden - Subscription tier required
application/json
500
Internal server error
application/json
post
POST /api/beta/profiler/address/pnl HTTP/1.1
Host: api.nansen.ai
apiKey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 268

{
  "parameters": {
    "chain": "ethereum",
    "date": {
      "from": "2025-05-01",
      "to": "2025-05-03"
    },
    "walletAddress": "0x28c6c06298d514db089934071355e5743bf21d60",
    "showRealized": true,
    "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
  },
  "pagination": {
    "page": 1,
    "recordsPerPage": 100
  }
}
[
  {
    "tokenAddress": "text",
    "tokenSymbol": "text",
    "tokenPrice": 1,
    "roiPercentRealised": 1,
    "pnlUsdRealised": 1,
    "pnlUsdUnrealised": 1,
    "roiPercentUnrealised": 1,
    "boughtAmount": 1,
    "boughtUsd": 1,
    "costBasisUsd": 1,
    "soldAmount": 1,
    "soldUsd": 1,
    "avgSoldPriceUsd": 1,
    "holdingAmount": 1,
    "holdingUsd": 1,
    "nofBuys": "text",
    "nofSells": "text",
    "maxBalanceHeld": 1,
    "maxBalanceHeldUsd": 1
  }
]