API ReferenceToken APIGet Token Top TradersGet Top Profitable Wallets by TokenVersion: 2.2Get Top Profitable Wallets by TokenGEThttps://deep-index.moralis.io/api/v2.2/erc20/:address/top-gainersRetrieves a list of the top profitable wallets for a specific ERC20 token.PATH PARAMSaddressstringrequiredThe ERC20 token address.QUERY PARAMSdaysstringTimeframe in days for which profitability is calculated, can be 'all', '7d' or '30d'chainstringThe chain to queryethmainnet0x1matic0x89polygonbscbinance0x38fantomftm0xfaarbitrum0xa4b1optimism0xapulsechain0x171base0x2105linea0xe708Responses200 Successful response with top profitable wallets.objectAPI KEYTest Live APINode.jsPythoncURLGoPHPimport Moralis from 'moralis';try { await Moralis.start({ apiKey: "YOUR_API_KEY" }); const response = await Moralis.EvmApi.token.getTopProfitableWalletPerToken({ "chain": "0x1", "address": "0x7c9f4c87d911613fe9ca58b579f737911aad2d43" }); console.log(response.raw);} catch (e) { console.error(e);}from moralis import evm_apiapi_key = "YOUR_API_KEY"params = { "chain": "eth", "address": "0x7c9f4c87d911613fe9ca58b579f737911aad2d43"}result = evm_api.token.get_top_profitable_wallet_per_token( api_key=api_key, params=params,)print(result)curl --request GET \ --url 'https://deep-index.moralis.io/api/v2.2/erc20/0x7c9f4c87d911613fe9ca58b579f737911aad2d43/top-gainers?chain=eth' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://deep-index.moralis.io/api/v2.2/erc20/0x7c9f4c87d911613fe9ca58b579f737911aad2d43/top-gainers?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, _ := ioutil.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/erc20/0x7c9f4c87d911613fe9ca58b579f737911aad2d43/top-gainers?chain=eth', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 Successful response with top profitable wallets.{ "name": "Kylin Network", "symbol": "KYL", "decimals": 18, "logo": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png", "possible_spam": true, "result": { "avg_buy_price_usd": "", "avg_cost_of_quantity_sold": "", "avg_sell_price_usd": "", "count_of_trades": 2, "realized_profit_percentage": 1, "realized_profit_usd": "", "total_sold_usd": "", "total_tokens_bought": "", "total_tokens_sold": "", "total_usd_invested": "", "address": "" }}