Get PnL for Multiple Wallets - Wallet API
Get PnL for Multiple Wallets - The Wallet PnL (Profit and Loss) data is provided for entire wallets, aggregating all positions and tokens within each specified wallet address
Get PnL for Multiple Wallets - [Value: 334000CU]
The Wallet PnL (Profit and Loss) data is provided for entire wallets, aggregating all positions and tokens within each specified wallet address
POST https://lb.drpc.live/{chain}/{key}/lambda/v1/wallet-pnl-history
Use cases
- The user’s own funds are separated from rewards. This allows us to account for both Profit & Loss movements and rewards, while incoming transfers, top-ups, and withdrawals are not considered as sources of income or loss
- Support blue chip tokens and DeFi positions across major EVM chains.
Constraints
- The current version is limited to open DeFi positions, while the next update will support historical closed positions as well.
- Requires valid chain and wallet address
- Time range parameters affect response size
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl --request POST \
--url https://lb.drpc.live/{chain}/{key}/lambda/v1/wallet-pnl-history \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{}'Response
200
{
"data": [
{
"chain_id": "base",
"chain_name": "Base",
"chain_icon_url": "https://static.lambda.p2p.org/chains/base.png",
"category": "erc20",
"wallet_address": "0xdb6e9e7390e9acc34619e56efa48ade01cff6f12",
"position_id": "0xdbfefd2e8460a6ee4955a68582f85708baea60a3",
"summary": {
"start": "2025-08-06T00:00:01+00:00",
"end": "2025-09-05T08:30:01+00:00",
"pnl_usd": 2822871.721936092,
"tokens": [
{
"id": "0xdbfefd2e8460a6ee4955a68582f85708baea60a3",
"symbol": "superOETHb",
"name": "Super OETH",
"position_type": "supply",
"icon_url": "https://static.lambda.p2p.org/tokens/base/0xdbfefd2e8460a6ee4955a68582f85708baea60a3.png",
"defi_id": "erc20",
"defi_name": "Erc20",
"attributes": {
"address": "0xdbfefd2e8460a6ee4955a68582f85708baea60a3",
"decimals": 18,
"chain_id": "base",
"chain_name": "Base",
"chain_id_numeric": 8453
},
"start_balance": {
"balance": 2628.0887891055277,
"price": 3627.1475841511256
},
"end_balance": {
"balance": 4128.087289105528,
"price": 4310.9683282972
}
}
]
},
"pnl_history": [
{
"time": "2025-08-06T00:00:01+00:00",
"balance_usd": 9532465.902338771,
"reward_usd": 0,
"reward_usd_net": 0,
"pnl_usd": 0,
"profit_gains_usd": 0,
"token_amount": 2628.0887891055277
},
{
"time": "2025-08-06T10:04:08+00:00",
"balance_usd": 9532465.902338771,
"reward_usd": 0,
"reward_usd_net": 0,
"pnl_usd": 0,
"profit_gains_usd": 0,
"token_amount": 2628.0887891055277
}
],
"user_activities": [
{
"time": "2025-08-06T10:04:09+00:00",
"type": "deposit",
"symbol": "superOETHb",
"amount": 1499.9985000000001,
"value_usd": 5440715.935505313,
"transaction_hash": "0x8e7b341a70da11525d247928ee2894cd4b57ca7f8addf0d4a304c87d8588710f"
}
],
"reward_history": []
}
]
}Path params
chainstring
[Required] Chain name
keystring
[Required] Your dRPC API key
Query params
Request params
array of objects
start_timestampinteger
≥ 0. The start timestamp in milliseconds. Default: now - 30 days.
end_timestampinteger
≥ 0. The end timestamp in milliseconds. Default: now.
granularitystring
Granularity of PnL points. Defaults to day.
- month - null
- week - null
- day - null
- hour - null
- five_minutes - null
- any - null
points_limitinteger
2 to 100. The maximum number of points to return. Default: 100. Max: 100.
addressesarray_of_strings
List of wallet addresses to calculate PnL for. All positions within these wallets will be included in the aggregated calculation.
Response
200
Response params
object
dataarray
[Required] Returns historical records of Profit and Loss (PnL) over time.
object
chain_idstring
[Required] id of the chain
chain_namestring
[Required] name of the chain
chain_icon_urlstring
URL of the chain
categorystring
[Required] Category or DeFi id of the position.
- erc20 - null
- native - null
- aave-v3-supply - null
- aave-v3-borrow - null
- uni-v2-supply - null
- uni-v3-supply - null
- sushi-v2-supply - null
- sushi-v3-supply - null
- lido - null
- venus-supply - null
- venus-borrow - null
- venus-staking - null
- balancer-v2 - null
- aura - null
- morpho-vault - null
- morpho-market-supply - null
- morpho-market-borrow - null
- morpho-market-collateral - null
- renzo - null
- ether-fi - null
- rocket - null
- sky - null
wallet_addressstring
[Required] Wallet address of the position.
position_idstring
[Required] Position id of the position.
summaryobject
[Required] Summary of the PnL and tokens.
object
startstring
Start timestamp of the summary period.
endstring
End timestamp of the summary period.
pnl_usdnumber
Total PnL in USD.
tokensarray
List of tokens in the position.
object
idstring
Token ID.
symbolstring
Token symbol.
namestring
Token name.
position_typestring
Type of position (e.g., supply, borrow).
icon_urlstring
URL to download token icon.
defi_idstring
DeFi ID of the token.
defi_namestring
Community name of DeFi.
attributesobject
Token attributes.
object
addressstring
Token contract address.
decimalsnumber
Token decimals.
chain_idstring
Chain id.
chain_namestring
Chain name.
chain_id_numericnumber
Numeric chain id.
start_balanceobject
Starting token balance and price.
object
balancenumber
Balance at start.
pricenumber
Token price at start in USD.
end_balanceobject
Ending token balance and price.
object
balancenumber
Balance at end.
pricenumber
Token price at end in USD.
pnl_historyarray
[Required] List of asset changes over time.
object
timestring
[Required] Timestamp of the PnL entry.
balance_usdnumber
[Required] Position balance in USD at the given timestamp.
reward_usdnumber
[Required] Rewards earned in tokens converted to USD (current price).
reward_usd_netnumber
[Required] Rewards in tokens converted using latest price.
pnl_usdnumber
[Required] Total change in portfolio value compared to initial state.
profit_gains_usdnumber
[Required] Net change in token balance adjusted for price fluctuations.
token_amountnumber
[Required] Amount of tokens in the position.
user_activitiesarray
[Required] Withdrawal/Deposits in scope of PnL interval.
object
timestring
[Required] Timestamp of the user activity.
typestring
[Required] Type of user activity.
- deposit - null
- withdraw - null
symbolstring
[Required] Token symbol affected.
amountnumber
[Required] Amount of tokens changed.
value_usdnumber
[Required] Value of the token in USD.
transaction_hashstring
[Required] Transaction hash of the activity.
reward_historyarray
[Required] List of rewards earned during the PnL interval.
object
timestring
[Required] Timestamp of the reward.
typestring
[Required] Type of reward.
- supply - null
- borrow - null
- stake - null
- reward - null
symbolstring
[Required] Token symbol of the reward.
namestring
[Required] Token name of the reward.
icon_urlstring
URL to download icon of the token.
amountnumber
[Required] Amount of reward tokens.
pricenumber
[Required] Price of the reward token in USD.