API ReferenceBalance APIGets portfolio by walletVersion: 2.2Gets portfolio by walletGEThttps://solana-gateway.moralis.io/account/:network/:address/portfolioGets the portfolio for a given network and address.PATH PARAMSnetworkstringrequiredThe network to querymainnetdevnetaddressstringrequiredThe address of the token contractResponses200 object400 objectAPI KEYTest Live APINode.jsPythoncURLGoPHPimport Moralis from 'moralis';try { await Moralis.start({ apiKey: "YOUR_API_KEY" }); const response = Moralis.SolApi.account.getPortfolio({ "network": "mainnet", "address": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6" }); console.log(response.raw);} catch (e) { console.error(e);}from moralis import sol_apiapi_key = "YOUR_API_KEY"params = { "network": "mainnet", "address": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6"}result = sol_api.account.get_portfolio( api_key=api_key, params=params,)print(result)curl --request GET \ --url 'https://solana-gateway.moralis.io/account/mainnet/EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6/portfolio' \ --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/portfolio" 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/portfolio', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 400 { "nativeBalance": { "solana": "", "lamports": "" }, "nfts": { "associatedTokenAddress": "", "mint": "", "name": "", "symbol": "" }, "tokens": { "associatedTokenAddress": "", "mint": "", "name": "", "symbol": "", "amount": "", "amountRaw": "", "decimals": "" }}