Get the USD value of all tokens in a Solana wallet using Jupiter Price API v3.
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 installRun the script with a Solana address or .sol domain:
npm start <address-or-domain>Examples:
npm start mikemaccana.sol
npm start dDCQNnDmNbFVi8cQhKAgXhyhXeJ625tvwsunRyRc7c8Run the test suite:
npm testMIT