Skip to main content
GET
/
portfolio
/
defi
Retrieve comprehensive DeFi portfolio data, including staking, liquidity pool (LP), and yield farming activities
curl --request GET \
  --url https://openapiv1.coinstats.app/portfolio/defi \
  --header 'X-API-KEY: <api-key>'
{
  "totalAssets": {
    "USD": 46.92,
    "ETH": 0.010799824088855844,
    "BTC": 0.0004264134046889636
  },
  "protocols": [
    {
      "id": "pancakeswap-amm-v3",
      "name": "PancakeSwap",
      "logo": "https://icons.llama.fi/pancakeswap-amm-v3.jpg",
      "url": "https://pancakeswap.finance/swap",
      "totalValue": {
        "USD": 46.92,
        "ETH": 0.010799824088855844,
        "BTC": 0.0004264134046889636
      },
      "blockchain": {
        "name": "Solana",
        "icon": "https://static.coinstats.app/portfolio_images/solana_dark.png"
      },
      "chain": "solana",
      "investments": [
        {
          "id": "liquidity",
          "name": "Liquidity",
          "value": {
            "USD": 46.92,
            "ETH": 0.010799824088855844,
            "BTC": 0.0004264134046889636
          },
          "symbols": "USDC + WSOL",
          "assets": [
            {
              "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "title": "Deposit",
              "coinId": "solana",
              "logo": "https://img-v1.raydium.io/icon/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v.png",
              "amount": 20.431941,
              "symbol": "USDC",
              "price": {
                "USD": 46.92,
                "ETH": 0.010799824088855844,
                "BTC": 0.0004264134046889636
              },
              "danger": true
            }
          ],
          "poolAddress": "pancakeswap-amm-v3",
          "healthRate": 123,
          "healthRateLink": "<string>",
          "poolProjectId": "PancakeSwap",
          "unlockAt": "2025-08-28T08:35:50.384Z",
          "endAt": "2025-08-28T08:35:50.384Z",
          "isProxy": true,
          "debtRatio": 0.01,
          "debtRatioLink": "https://pancakeswap.finance/swap"
        }
      ],
      "walletAddress": "wallet_address_here"
    }
  ]
}
400 credits per request
  • Detailed breakdown of DeFi assets and protocols
  • Track staked tokens, LP positions, and earned rewards
This endpoint is only available for users with a Degen plan subscription.
  • passcode: Passcode for accessing protected portfolio data (can be passed in header or query parameter)

Authorizations

X-API-KEY
string
header
required

API key needed to access the endpoints. Example: 'demo-api-key'

Headers

passcode
string

Passcode for accessing protected portfolio data

Example:

"123456"

Query Parameters

shareToken
string
required
passcode
string

Passcode for accessing protected portfolio data

Example:

"123456"

Response

Defi Response

totalAssets
object
required

Total value of all DeFi positions across all protocols

protocols
object[]
required

List of DeFi protocols with user positions

I