We're now supporting Polygon zkEVM!
Learn more here.
The API credit value for this method is 1 . To learn more about API credits and each method's value, visit the API Credits page.
Parameters:
Finalized - the node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized.
Confirmed - the node will query the most recent block that has been voted on by supermajority of the cluster.
Processed - the node will query its most recent block. Note that the block may not be complete.
minContextSlot - (optional) It sets the minimum slot at which the request can be evaluated.
Returns:
Code Examples:
const web3 = require("@solana/web3.js"); (async () => { const publicKey = new web3.PublicKey( "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg" ); const solana = new web3.Connection("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/"); console.log(await solana.getBalance(publicKey)); })();
curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0", "id":1, "method":"getBalance", "params":["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"]}'
from solana.rpc.api import Client from solana.publickey import PublicKey solana_client = Client("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/") print(solana_client.get_balance(PublicKey('vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg')))