Runnable code for every guide at solanatracker.io/resources.
All examples live in one repository: github.com/solanatracker/examples
git clone https://github.com/solanatracker/examples.git
cd examples/01-get-solana-token-price-api
cp .env.example .env
npm install
npm start| Variable | Used by | Where to get it |
|---|---|---|
ST_API_KEY |
REST Data API examples | Data API dashboard |
ST_DATASTREAM_KEY |
WebSocket Datastream examples | Data API dashboard → Datastream section |
YELLOWSTONE_GRPC_ENDPOINT |
gRPC examples | Yellowstone gRPC dashboard |
YELLOWSTONE_GRPC_TOKEN |
gRPC examples | Same dashboard (x-token value) |
WALLET_ADDRESS |
Wallet portfolio example | Any Solana wallet pubkey |
DEDICATED_RPC_URL |
RPC latency example | Dedicated Nodes |
From the main Solana Tracker repo:
node scripts/sync-resource-examples.mjs
npm run validate:resources
npm run run:resources