Track Token Price Change on Solana

Himanshu Singh
4 min readNov 17, 2024

Hello everyone đŸ‘‹,
My name is Himanshu Singh. I am an Engineer, and after working as a front-end engineer for over two years, I started doing full-stack.

Recently, I did a small side gig, where I had to build a price change tracker for tokens on Solana.

The team was already building something, and this was one of the requirements they needed someone to complete.

I wrote the code in Node.js, and in this blog, I will share what I did exactly, so you can do the same.

Let’s begin!

Get the tokens list

In the project, that the team was building, the users needed to paste the address in an input box, and the address was getting saved in the DB.

So, first I load the assets list from the DB, so whenever the server gets restarted (for whatever reason), we will start tracking the already existing addresses in the DB.

Second, to track the addresses that are getting saved in the DB in real-time (when a user is using the app), I used a WebSocket.

The project was already using a WebSocket to send the addresses to all the active connections in real-time, so I utilized the same implementation.

--

--

Himanshu Singh
Himanshu Singh

Written by Himanshu Singh

I write blogs around React JS, JavaScript, Web Dev, and Programming. Follow to read blogs around them.

No responses yet