Skip to content

quiknode-labs/get-portfolio-balance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get Portfolio Balance

Get the USD value of all tokens in a Solana wallet using Jupiter Price API v3.

Setup

Set your QuickNode Solana mainnet endpoint and Jupiter API key:

export QUICKNODE_SOLANA_MAINNET_ENDPOINT="https://your-endpoint.solana-mainnet.quiknode.pro/your-key/"
export JUPITER_API_KEY="your-jupiter-api-key"

Get a Jupiter API key at: https://portal.jup.ag

Install dependencies:

npm install

Usage

Run the script with a Solana address or .sol domain:

npm start <address-or-domain>

Examples:

npm start mikemaccana.sol
npm start dDCQNnDmNbFVi8cQhKAgXhyhXeJ625tvwsunRyRc7c8

Testing

Run the test suite:

npm test

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published