API ReferenceWallet APIGet Wallet PnLGet Wallet PnL BreakdownGet Wallet PnL BreakdownGEThttps://deep-index.moralis.io/api/v2.2/wallets/:address/profitabilityRetrieves profitability information for a specific wallet address. Can be filtered by one or more tokens.PATH PARAMSaddressstringrequiredThe wallet address for which profitability is to be retrieved.QUERY PARAMSdaysstringTimeframe in days for which profitability is calculated, Options include 'all', '7', '30', '60', '90' default is 'all'.chainstringThe chain to queryethmainnet0x1matic0x89polygonbase0x2105token_addressesarrayThe token addresses list to filter the result withNo items in the arrayAdd ItemResponses200Successful response with profitability data.400Bad Request404Not Found429Too Many Requests500Internal Server ErrorAPI KEYTest Live APIcURLNode.jsPythonGoPHPcurl --request GET \ --url 'https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/profitability?chain=eth' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' // Node.js v18+ has native fetch support// No additional dependencies requiredconst options = { method: 'GET', headers: { accept: 'application/json', 'X-API-Key': 'YOUR_API_KEY' },};fetch('https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/profitability?chain=eth', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));# Dependencies to install:# $ python -m pip install requestsimport requestsurl = "https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/profitability?chain=eth"headers = { "Accept": "application/json", "X-API-Key": "YOUR_API_KEY"}response = requests.request("GET", url, headers=headers)print(response.text)package mainimport ( "fmt" "net/http" "io")func main() { url := "https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/profitability?chain=eth" req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Accept", "application/json") req.Header.Add("X-API-Key", "YOUR_API_KEY") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}<?php// Dependencies to install:// $ composer require guzzlehttp/guzzlerequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('GET', 'https://deep-index.moralis.io/api/v2.2/wallets/0xcB1C1FdE09f811B294172696404e88E658659905/profitability?chain=eth', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 Successful response with profitability data.{ "result": { "token_address": "", "avg_buy_price_usd": "", "avg_sell_price_usd": "", "total_usd_invested": "", "total_tokens_sold": "", "total_tokens_bought": "", "total_sold_usd": "", "avg_cost_of_quantity_sold": "", "count_of_trades": 1, "realized_profit_usd": "", "realized_profit_percentage": 1, "total_buys": 1, "total_sells": 1, "name": "", "symbol": "", "decimals": "", "logo": "", "logo_hash": "", "thumbnail": "", "possible_spam": true }}