This guide will walk you through the process of creating live charts using the Solana Tracker Data API and TradingView Advanced Charts in a Next.js application.
Before you begin, you need to request access to TradingView Advanced Charts:
Fork the example repository:
git clone https://github.com/solanatracker/solana-chart-example.git cd solana-chart-example
Install dependencies:
npm install
Create a
.env
NEXT_PUBLIC_DATA_API_KEY=your_api_key_here NEXT_PUBLIC_DATASTREAM=your_datastream_url_here
Start the development server:
npm run dev
Visit
http://localhost:3000
You've now set up a live Solana chart using the Solana Tracker Data API and TradingView Advanced Charts in a Next.js application. This setup provides a foundation for building more complex charting applications with real-time data.
In the DataFeed.tsx you can make changes, if you don't have datastream access you can change DataFeed.tsx to update using the /price endpoint at an interval instead