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": "ethereum",
    "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  },
  {
    "chain": "solana",
    "address": "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"
  }
]
'
{
  "data": {
    "items": [
      {
        "address": "125Z6k4ZAxsgdG7JxrKZpwbcS1rxqpAeqM9GSCKd66Wp",
        "chain": "solana",
        "tokens": [
          {
            "attributes": {
              "total_liquidity_usd": {
                "details": "LIQUIDITY_TOO_HIGH"
              }
            },
            "average_cost": {
              "amount": "127.643159342305505704",
              "currency": "USD"
            },
            "current_balance": {
              "amount": "1831.966741963714540927",
              "currency": "USD"
            },
            "current_price": {
              "amount": "90.881678182871411309",
              "currency": "USD"
            },
            "raw_balance": "20.157712518",
            "realized_pnl": {
              "amount": "-102.802362175169957013",
              "currency": "USD"
            },
            "token_address": "So11111111111111111111111111111111111111112",
            "unrealized_pnl": {
              "amount": "-741.027368947745798389",
              "currency": "USD"
            },
            "unrealized_pnl_ratio_change": -0.28800196852578236
          }
        ],
        "total_balance": {
          "amount": "1831.966741963714540927",
          "currency": "USD"
        },
        "total_realized_pnl": {
          "amount": "-102.802362175169957013",
          "currency": "USD"
        },
        "total_unrealized_pnl": {
          "amount": "-741.027368947745798389",
          "currency": "USD"
        },
        "total_unrealized_pnl_ratio_change": -0.28800196852578236
      }
    ]
  },
  "items": [
    {
      "items": [
        {
          "address": "125Z6k4ZAxsgdG7JxrKZpwbcS1rxqpAeqM9GSCKd66Wp",
          "chain": "solana",
          "tokens": [
            {
              "attributes": {
                "total_liquidity_usd": {
                  "details": "LIQUIDITY_TOO_HIGH"
                }
              },
              "average_cost": {
                "amount": "127.643159342305505704",
                "currency": "USD"
              },
              "current_balance": {
                "amount": "1831.966741963714540927",
                "currency": "USD"
              },
              "current_price": {
                "amount": "90.881678182871411309",
                "currency": "USD"
              },
              "raw_balance": "20.157712518",
              "realized_pnl": {
                "amount": "-102.802362175169957013",
                "currency": "USD"
              },
              "token_address": "So11111111111111111111111111111111111111112",
              "unrealized_pnl": {
                "amount": "-741.027368947745798389",
                "currency": "USD"
              },
              "unrealized_pnl_ratio_change": -0.28800196852578236
            }
          ],
          "total_balance": {
            "amount": "1831.966741963714540927",
            "currency": "USD"
          },
          "total_realized_pnl": {
            "amount": "-102.802362175169957013",
            "currency": "USD"
          },
          "total_unrealized_pnl": {
            "amount": "-741.027368947745798389",
            "currency": "USD"
          },
          "total_unrealized_pnl_ratio_change": -0.28800196852578236
        }
      ]
    }
  ],
  "error": "<string>",
  "cursor": "<string>"
}
This endpoint provides current PnL metrics for wallet addresses, including unrealized PnL, realized PnL, average cost, current balance, and current USD balance.

Supported Chains

Authorizations

X-API-KEY
string
header
required

Query Parameters

min_liquidity
number

Minimum liquidity of which tokens must have to be included in the response.

Body

application/json
Required array length: 1 - 20 elements
chain
string
required

Lowercase chain name

address
string
required

Wallet address

Response

Successful Response

data
PnlByWallet · object

Single item response data of type T

Example:
{
"items": [
{
"address": "125Z6k4ZAxsgdG7JxrKZpwbcS1rxqpAeqM9GSCKd66Wp",
"chain": "solana",
"tokens": [
{
"attributes": {
"total_liquidity_usd": { "details": "LIQUIDITY_TOO_HIGH" }
},
"average_cost": {
"amount": "127.643159342305505704",
"currency": "USD"
},
"current_balance": {
"amount": "1831.966741963714540927",
"currency": "USD"
},
"current_price": {
"amount": "90.881678182871411309",
"currency": "USD"
},
"raw_balance": "20.157712518",
"realized_pnl": {
"amount": "-102.802362175169957013",
"currency": "USD"
},
"token_address": "So11111111111111111111111111111111111111112",
"unrealized_pnl": {
"amount": "-741.027368947745798389",
"currency": "USD"
},
"unrealized_pnl_ratio_change": -0.28800196852578236
}
],
"total_balance": {
"amount": "1831.966741963714540927",
"currency": "USD"
},
"total_realized_pnl": {
"amount": "-102.802362175169957013",
"currency": "USD"
},
"total_unrealized_pnl": {
"amount": "-741.027368947745798389",
"currency": "USD"
},
"total_unrealized_pnl_ratio_change": -0.28800196852578236
}
]
}
items
(PnlByWallet · object | PnlError · object)[] | null

Response items of type T

Example:
{
"items": [
{
"address": "125Z6k4ZAxsgdG7JxrKZpwbcS1rxqpAeqM9GSCKd66Wp",
"chain": "solana",
"tokens": [
{
"attributes": {
"total_liquidity_usd": { "details": "LIQUIDITY_TOO_HIGH" }
},
"average_cost": {
"amount": "127.643159342305505704",
"currency": "USD"
},
"current_balance": {
"amount": "1831.966741963714540927",
"currency": "USD"
},
"current_price": {
"amount": "90.881678182871411309",
"currency": "USD"
},
"raw_balance": "20.157712518",
"realized_pnl": {
"amount": "-102.802362175169957013",
"currency": "USD"
},
"token_address": "So11111111111111111111111111111111111111112",
"unrealized_pnl": {
"amount": "-741.027368947745798389",
"currency": "USD"
},
"unrealized_pnl_ratio_change": -0.28800196852578236
}
],
"total_balance": {
"amount": "1831.966741963714540927",
"currency": "USD"
},
"total_realized_pnl": {
"amount": "-102.802362175169957013",
"currency": "USD"
},
"total_unrealized_pnl": {
"amount": "-741.027368947745798389",
"currency": "USD"
},
"total_unrealized_pnl_ratio_change": -0.28800196852578236
}
]
}
error
string | null

Error message

cursor
string | null

Pagination cursor for next page