POST
/
api
/
v1
/
developer
/
wallet
/
pnl-by-token
/
history
Get Pnl By Token With Historical Breakdown
curl --request POST \
  --url https://api.allium.so/api/v1/developer/wallet/pnl-by-token/history \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "addresses": [
    {
      "address": "125Z6k4ZAxsgdG7JxrKZpwbcS1rxqpAeqM9GSCKd66Wp",
      "chain": "solana",
      "token_address": "So11111111111111111111111111111111111111112"
    }
  ],
  "end_timestamp": "2025-04-10T00:00:00Z",
  "granularity": "1h",
  "start_timestamp": "2025-04-01T00:00:00Z"
}'
{
  "data": {
    "chain": "<string>",
    "address": "<string>",
    "token_address": "<string>",
    "pnl": [
      "<any>"
    ]
  },
  "items": [
    {
      "chain": "<string>",
      "address": "<string>",
      "token_address": "<string>",
      "pnl": [
        "<any>"
      ]
    }
  ],
  "error": "<string>",
  "cursor": "<string>"
}
This endpoint provides the unrealized PnL and realized PnL for given wallet and token addresses at specified time periods and time granularity. Time range parameters:
  • start_timestamp: The beginning of the time range (inclusive)
  • end_timestamp: The end of the time range (exclusive)
  • Both timestamps are assumed to be in UTC if no timezone is specified
  • All returned data is in UTC
Granularity options:
  • 1d: Daily intervals
  • 1h: Hourly intervals
Supported Chains and Holdings

Authorizations

X-API-KEY
string
header
required

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.