API ReferenceWallet APIGet Wallet Token BalancesVersion: 2.2Get Wallet Token BalancesGEThttps://solana-gateway.moralis.io/account/:network/:address/tokensGets the token balances owned by a given network and address.PATH PARAMSnetworkstringrequiredThe network to querymainnetdevnetaddressstringrequiredThe address for which token balances will be checkedQUERY PARAMSexcludeSpambooleanShould exclude spam tokensfalsetrueResponses200 Returns the complete portfolio of the wallet address, including native balance, tokens, and NFTsobject400 Bad request. Invalid address or other request error.objectAPI KEYTest Live APINode.jsPythoncURLGoPHPimport Moralis from 'moralis';try { await Moralis.start({ apiKey: "YOUR_API_KEY" }); const response = Moralis.SolApi.account.getSPL({ "excludeSpam": false, "network": "mainnet", "address": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6" }); console.log(response.raw);} catch (e) { console.error(e);}from moralis import sol_apiapi_key = "YOUR_API_KEY"params = { "exclude_spam": False, "network": "mainnet", "address": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6"}result = sol_api.account.get_spl( api_key=api_key, params=params,)print(result)curl --request GET \ --url 'https://solana-gateway.moralis.io/account/mainnet/EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6/tokens?excludeSpam=false' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://solana-gateway.moralis.io/account/mainnet/EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6/tokens?excludeSpam=false" 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://solana-gateway.moralis.io/account/mainnet/EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6/tokens?excludeSpam=false', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 Returns the complete portfolio of the wallet address, including native balance, tokens, and NFTs400 Bad request. Invalid address or other request error.{ "associatedTokenAddress": "BxemX7FdJo5msrC3aBi6JNafRjS2MfdmYcVr3yFPFvKn", "mint": "5ykhiPoUTcoqpieSnQ6w2tPbCERJawe9kAM6MuZJMcbP", "amountRaw": "3387402990000", "amount": "3387402.99", "decimals": 6, "name": "onchain dog ", "symbol": "OCD", "logo": "https://logo.moralis.io/solana-mainnet_5ykhiPoUTcoqpieSnQ6w2tPbCERJawe9kAM6MuZJMcbP_0442d558f20da42a000ba4469d8b7046.png", "isVerifiedContract": "", "possibleSpam": ""}