Notus API
Smart wallets

Get Smart Wallet Portfolio

Get the portfolio of a smart wallet by its account abstraction address. The portfolio is a list of the user's balances in different tokens.

GET
/api/v1/wallets/{walletAddress}/portfolio
x-api-key<token>

In: header

Path Parameters

walletAddressEVM Address | Bitcoin Address

Wallet address that you want to see the portfolio of Accepted formats:

  • EVM
    • pattern: ^0x[a-fA-F0-9]{40}$
    • example: 0xa7a9dcfcb65ed67e05d9c7eb49d2d74ce1f5f4f1
  • Bitcoin
    • pattern: ^(?:[13][a-km-zA-HJ-NP-Z1-9]{25,35}|bc1q[02-9ac-hj-np-z]{38}|bc1q[02-9ac-hj-np-z]{58}|bc1p[02-9ac-hj-np-z]{10,70})$
    • example: bc1qgv5fuheq50ghnju8lafqvps7h96ztfjtcvmsnd

Query Parameters

includeTokens?boolean

Include ERC20 tokens balances in the output

includeNFTs?boolean

Include NFTs in the output

includePnL?boolean

Include profit and loss data in the output

includeLendingPositions?boolean

Include DeFi borrow / debt positions (lending) in the output

timerange?string

Timerange used to calculate profit and loss values. Only applies when includePnL is true.

Default"1d"
Value in"1d" | "7d" | "1m" | "1a" | "all"

Response Body

curl -X GET "https://api.notus.team/api/v1/wallets/0xa7a9dcfcb65ed67e05d9c7eb49d2d74ce1f5f4f1/portfolio?includeTokens=true&includeNFTs=true&includePnL=true&includeLendingPositions=false&timerange=1d"
{
  "tokens": [
    {
      "address": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
      "name": "Wrapped Bitcoin",
      "symbol": "WBTC",
      "coingeckoId": "wrapped-bitcoin",
      "decimals": 8,
      "logo": "https://wbtclogo.com",
      "chain": {
        "id": 137,
        "name": "POLYGON",
        "logo": "https://logopolygon.com"
      },
      "balance": "100000000",
      "balanceFormatted": "1",
      "balanceUsd": "2.1522",
      "priceUsd": "1.0",
      "pnl": {
        "profitAbsUsd": "152.45",
        "roi": "0.026",
        "inflowUsd": "2400.0",
        "outflowUsd": "150.0",
        "averageBuyPriceUsd": "0.999",
        "timerange": "all"
      }
    }
  ],
  "nfts": [
    {
      "address": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
      "collection": {
        "name": "Uniswap V3 Positions NFT-V1",
        "symbol": "UNI-V3-POS",
        "logo": "https://univ3nft.com"
      },
      "tokenId": "2472425",
      "name": "Uniswap - 0.05% - USDT/WETH - 1517.8<>2550.4",
      "description": "This NFT represents a liquidity position in a Uniswap V3 USDT-WETH pool.",
      "image": "https://remilio.org/remilio/2830.png",
      "amount": "2450",
      "chain": {
        "id": 137,
        "name": "POLYGON",
        "logo": "https://logopolygon.com"
      }
    }
  ],
  "portfolio": [
    {
      "address": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
      "name": "Wrapped Bitcoin",
      "symbol": "WBTC",
      "coingeckoId": "wrapped-bitcoin",
      "decimals": 8,
      "logo": "https://wbtclogo.com",
      "chain": {
        "id": 137,
        "name": "POLYGON",
        "logo": "https://logopolygon.com"
      },
      "balance": "100000000",
      "balanceFormatted": "1",
      "balanceUsd": "2.1522",
      "priceUsd": "1.0",
      "pnl": {
        "profitAbsUsd": "152.45",
        "roi": "0.026",
        "inflowUsd": "2400.0",
        "outflowUsd": "150.0",
        "averageBuyPriceUsd": "0.999",
        "timerange": "all"
      }
    }
  ],
  "pnl": {
    "timerange": "all",
    "total": {
      "totalUsd": "129.35"
    }
  },
  "lendingPositions": [
    {
      "positionType": "borrow",
      "protocolGroupName": "Aave V3",
      "token": {
        "address": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
        "name": "USD Coin",
        "symbol": "USDC",
        "decimals": 6,
        "amount": "2.434262"
      },
      "contractName": "Aave Polygon USDC",
      "contractSymbol": "aPolUSDCn",
      "valueUsd": "125.50",
      "chain": {
        "id": 137,
        "name": "POLYGON",
        "logo": "https://logopolygon.com"
      }
    }
  ]
}
{
  "statusCode": 403,
  "id": "UNAVAILABLE_COMPUTE_UNITS",
  "message": "The project doesn't have enough compute units to perform this action. Please upgrade your plan."
}
{
  "statusCode": 500,
  "id": "NFT_METADATA_DECODE_FAILED",
  "message": "An error occurred when trying to decode the metadata for an NFT."
}