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 Token Balances

GEThttps://solana-gateway.moralis.io/account/:network/:address/tokens

Gets the token balances owned by a given network and address.

PATH PARAMS
networkstringrequired
The network to query
addressstringrequired
The address for which token balances will be checked
QUERY PARAMS
excludeSpamboolean
Should exclude spam tokens
Responses
API KEY
import 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);
}
Response Example
{
"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": ""
}