Skip to main content
POST
/
api
/
v1
/
developer
/
wallet
/
pnl
Get Pnl
curl --request POST \
  --url https://api.allium.so/api/v1/developer/wallet/pnl \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '[
  {
    "chain": "<string>",
    "address": "<string>"
  }
]'
{
  "items": [
    {
      "chain": "<string>",
      "address": "<string>",
      "tokens": [
        {
          "token_address": "<string>",
          "average_cost": {
            "currency": "USD",
            "amount": "<string>"
          },
          "raw_balance": "<string>",
          "current_price": {
            "currency": "USD",
            "amount": "<string>"
          },
          "current_balance": {
            "currency": "USD",
            "amount": "<string>"
          },
          "realized_pnl": {
            "currency": "USD",
            "amount": "<string>"
          },
          "unrealized_pnl": {
            "currency": "USD",
            "amount": "<string>"
          },
          "unrealized_pnl_ratio_change": 123,
          "attributes": {
            "total_liquidity_usd": {
              "amount": "<any>",
              "details": "<any>"
            }
          }
        }
      ],
      "total_balance": {
        "currency": "USD",
        "amount": "<string>"
      },
      "total_realized_pnl": {
        "currency": "USD",
        "amount": "<string>"
      },
      "total_unrealized_pnl": {
        "currency": "USD",
        "amount": "<string>"
      },
      "total_unrealized_pnl_ratio_change": 123
    }
  ],
  "error": "<string>"
}
This endpoint provides current PnL metrics for wallet addresses, including unrealized PnL, realized PnL, average cost, current balance, and current USD balance.
This is a beta endpoint currently under active development. We’re working to stabilize the API and will minimize breaking changes wherever possible, but they may still occur as we refine the interface.For production support or migration assistance, reach out at hello@allium.so.

Supported Chains

Authorizations

X-API-KEY
string
header
required

Query Parameters

min_liquidity
number
default:10000
min_volume_24h
number
default:10000

Body

application/json · PayloadAddressHoldings · object[]
chain
string
required
address
string
required

Response

Successful Response

items
Items · array
  • PnlByWallet
  • PnlError
error
string | null
I