Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.2

Get Wallet PnL Summary

GEThttps://deep-index.moralis.io/api/v2.2/wallets/:address/profitability/summary

Retrieves a summary of wallet profitability based on specified parameters including optional token addresses.

PATH PARAMS
addressstringrequired
The wallet address for which profitability summary is to be retrieved.
QUERY PARAMS
daysstring
Timeframe in days for the profitability summary. Options include 'all', '7', '30', '60', '90' default is 'all'.
chainstring
The chain to query
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.EvmApi.wallets.getWalletProfitabilitySummary({
"chain": "0x1",
"address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
{
"total_count_of_trades": 1,
"total_trade_volume": "",
"total_realized_profit_usd": "",
"total_realized_profit_percentage": 1,
"total_buys": 1,
"total_sells": 1,
"total_sold_volume_usd": "",
"total_bought_volume_usd": ""
}