POST
/
api
/
v1
/
developer
/
wallet
/
pnl-by-token
Get Pnl By Token
curl --request POST \
  --url https://api.allium.so/api/v1/developer/wallet/pnl-by-token \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '[
  {
    "chain": "<string>",
    "address": "<string>",
    "token_address": "<string>"
  }
]'
{
  "data": {
    "chain": "<string>",
    "address": "<string>",
    "token_address": "<string>",
    "current_tokens": 123,
    "current_balance": "<any>",
    "current_price": "<any>",
    "unrealized_pnl": "<any>",
    "realized_pnl": "<any>",
    "average_cost": "<any>",
    "unrealized_pnl_ratio_change": 123,
    "historical_breakdown": [
      "<any>"
    ]
  },
  "items": [
    {
      "chain": "<string>",
      "address": "<string>",
      "token_address": "<string>",
      "current_tokens": 123,
      "current_balance": "<any>",
      "current_price": "<any>",
      "unrealized_pnl": "<any>",
      "realized_pnl": "<any>",
      "average_cost": "<any>",
      "unrealized_pnl_ratio_change": 123,
      "historical_breakdown": [
        "<any>"
      ]
    }
  ],
  "error": "<string>",
  "cursor": "<string>"
}
This endpoint provides the unrealized PnL, realized PnL, average cost, current balance, and current USD balance for given wallet and token addresses. Supported Chains and Holdings

Authorizations

X-API-KEY
string
header
required

Body

application/json · PayloadAddressHoldingsByToken · object[]

The body is of type PayloadAddressHoldingsByToken · object[].

Response

200
application/json

Successful Response

The response is of type object.