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": "ethereum",
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}
]
'{
"data": {
"chain": "<string>",
"address": "<string>",
"token_address": "<string>",
"current_tokens": "<string>",
"current_balance": {
"amount": "<string>",
"currency": "USD"
},
"current_price": {
"amount": "<string>",
"currency": "USD"
},
"unrealized_pnl": {
"amount": "<string>",
"currency": "USD"
},
"realized_pnl": {
"amount": "<string>",
"currency": "USD"
},
"average_cost": {
"amount": "<string>",
"currency": "USD"
},
"unrealized_pnl_ratio_change": 123,
"attributes": {
"total_liquidity_usd": {
"amount": 123,
"details": "<string>"
},
"price_diff_1d": 123,
"price_diff_pct_1d": 123,
"price_diff_1h": 123,
"price_diff_pct_1h": 123,
"total_supply": 123,
"fully_diluted_valuation_usd": 123,
"volume_1h": 123,
"volume_1d": 123,
"volume_usd_1h": 123,
"volume_usd_1d": 123,
"volume_24h": 123,
"volume_usd_24h": 123,
"trade_count_1h": 123,
"trade_count_1d": 123,
"all_time_high": 123,
"all_time_low": 123,
"image_url": "<string>",
"token_creation_time": "2023-11-07T05:31:56Z",
"holders_count": 123,
"stellar_fields": {}
},
"historical_breakdown": [
{
"trade": {
"token_address": "<string>",
"token_amount": "<string>",
"token_price_usd": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"average_cost": {
"amount": "<string>",
"currency": "USD"
},
"realized_pnl": {
"amount": "<string>",
"currency": "USD"
}
}
]
},
"items": [
{
"chain": "<string>",
"address": "<string>",
"token_address": "<string>",
"current_tokens": "<string>",
"current_balance": {
"amount": "<string>",
"currency": "USD"
},
"current_price": {
"amount": "<string>",
"currency": "USD"
},
"unrealized_pnl": {
"amount": "<string>",
"currency": "USD"
},
"realized_pnl": {
"amount": "<string>",
"currency": "USD"
},
"average_cost": {
"amount": "<string>",
"currency": "USD"
},
"unrealized_pnl_ratio_change": 123,
"attributes": {
"total_liquidity_usd": {
"amount": 123,
"details": "<string>"
},
"price_diff_1d": 123,
"price_diff_pct_1d": 123,
"price_diff_1h": 123,
"price_diff_pct_1h": 123,
"total_supply": 123,
"fully_diluted_valuation_usd": 123,
"volume_1h": 123,
"volume_1d": 123,
"volume_usd_1h": 123,
"volume_usd_1d": 123,
"volume_24h": 123,
"volume_usd_24h": 123,
"trade_count_1h": 123,
"trade_count_1d": 123,
"all_time_high": 123,
"all_time_low": 123,
"image_url": "<string>",
"token_creation_time": "2023-11-07T05:31:56Z",
"holders_count": 123,
"stellar_fields": {}
},
"historical_breakdown": [
{
"trade": {
"token_address": "<string>",
"token_amount": "<string>",
"token_price_usd": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"average_cost": {
"amount": "<string>",
"currency": "USD"
},
"realized_pnl": {
"amount": "<string>",
"currency": "USD"
}
}
]
}
],
"error": "<string>",
"cursor": "<string>"
}Holdings
Fetch current PnL by Wallet & Token
Get the PnL for a given wallet and token address.
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": "ethereum",
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}
]
'{
"data": {
"chain": "<string>",
"address": "<string>",
"token_address": "<string>",
"current_tokens": "<string>",
"current_balance": {
"amount": "<string>",
"currency": "USD"
},
"current_price": {
"amount": "<string>",
"currency": "USD"
},
"unrealized_pnl": {
"amount": "<string>",
"currency": "USD"
},
"realized_pnl": {
"amount": "<string>",
"currency": "USD"
},
"average_cost": {
"amount": "<string>",
"currency": "USD"
},
"unrealized_pnl_ratio_change": 123,
"attributes": {
"total_liquidity_usd": {
"amount": 123,
"details": "<string>"
},
"price_diff_1d": 123,
"price_diff_pct_1d": 123,
"price_diff_1h": 123,
"price_diff_pct_1h": 123,
"total_supply": 123,
"fully_diluted_valuation_usd": 123,
"volume_1h": 123,
"volume_1d": 123,
"volume_usd_1h": 123,
"volume_usd_1d": 123,
"volume_24h": 123,
"volume_usd_24h": 123,
"trade_count_1h": 123,
"trade_count_1d": 123,
"all_time_high": 123,
"all_time_low": 123,
"image_url": "<string>",
"token_creation_time": "2023-11-07T05:31:56Z",
"holders_count": 123,
"stellar_fields": {}
},
"historical_breakdown": [
{
"trade": {
"token_address": "<string>",
"token_amount": "<string>",
"token_price_usd": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"average_cost": {
"amount": "<string>",
"currency": "USD"
},
"realized_pnl": {
"amount": "<string>",
"currency": "USD"
}
}
]
},
"items": [
{
"chain": "<string>",
"address": "<string>",
"token_address": "<string>",
"current_tokens": "<string>",
"current_balance": {
"amount": "<string>",
"currency": "USD"
},
"current_price": {
"amount": "<string>",
"currency": "USD"
},
"unrealized_pnl": {
"amount": "<string>",
"currency": "USD"
},
"realized_pnl": {
"amount": "<string>",
"currency": "USD"
},
"average_cost": {
"amount": "<string>",
"currency": "USD"
},
"unrealized_pnl_ratio_change": 123,
"attributes": {
"total_liquidity_usd": {
"amount": 123,
"details": "<string>"
},
"price_diff_1d": 123,
"price_diff_pct_1d": 123,
"price_diff_1h": 123,
"price_diff_pct_1h": 123,
"total_supply": 123,
"fully_diluted_valuation_usd": 123,
"volume_1h": 123,
"volume_1d": 123,
"volume_usd_1h": 123,
"volume_usd_1d": 123,
"volume_24h": 123,
"volume_usd_24h": 123,
"trade_count_1h": 123,
"trade_count_1d": 123,
"all_time_high": 123,
"all_time_low": 123,
"image_url": "<string>",
"token_creation_time": "2023-11-07T05:31:56Z",
"holders_count": 123,
"stellar_fields": {}
},
"historical_breakdown": [
{
"trade": {
"token_address": "<string>",
"token_amount": "<string>",
"token_price_usd": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"average_cost": {
"amount": "<string>",
"currency": "USD"
},
"realized_pnl": {
"amount": "<string>",
"currency": "USD"
}
}
]
}
],
"error": "<string>",
"cursor": "<string>"
}This endpoint provides current PnL metrics for specific wallet and token address combinations, including unrealized PnL, realized PnL, average cost, current balance, and current USD balance.Documentation Index
Fetch the complete documentation index at: https://docs.allium.so/llms.txt
Use this file to discover all available pages before exploring further.
Supported Chains
Authorizations
Body
application/json
Response
Successful Response
Single item response data of type T
- PnlByToken
- PnlError
Show child attributes
Show child attributes
Response items of type T
- PnlByToken
- PnlError
Show child attributes
Show child attributes
Error message
Pagination cursor for next page
Was this page helpful?
⌘I