What is a key-value store in Quicknode?
Key value store is a very strong and reliable solution that enables you to manage individual pieces of information or units of data like we can store millions of datapoints using key-value store.
Using key-value stores we can easily update our lists and sets using the REST APIs.This works really well if we are dealing with large amounts of data, It also provides efficient storage and quick retrieval and it also integrates with streams without a hitch. This Key-Value store solution works really well when we want to track large amounts of data in real time like track and alert changes in the values over time.
Features of Key-Value Store
- Real time updates: The accessibility and real time updates of data.
Flexible Data Management: Ease of management, accessibility and evaluation of large amounts of data. - High Performance: Super fast accessibility and updates of data.
- REST API Access: Interaction of our list and sets through Rest api.
Key-Value Store with streams filter
What is Streams Filter?
Stream filters give the availability and accessibility of real time blockchain events. It also allows the monitoring and blockchain logs filtering and transaction filtering like you can easily monitor and access your high valued wallets.
The combination of stream filtering and Key Value store offers scalable solutions. You can create key-value sets or lists, add and remove items from your sets for lists and analyze your key-value against the streaming blockchain data.
Note: You cannot integrate the streams created in one Quicknode account and lists created in another Quicknode account. The lists and the stream should have the same Quicknode account.
Creating key-value store using Rest api
Adding, Updating and using the list becomes easy using Rest Api. It enables the flexibility of managing and accessing your lists and sets.
To use Rest api you have to create one api-key which will be set in the x-api-key header for your api request.
To create api key just create one Quicknode account and then go to the api key section and copy the api key.


List Creation:
List creation requires two body params
- Key: A unique name for your list.
Items: Array of items that need to be added to your list.

Pass your x-api-key as shown above.
And also pass the key and items in the body.

Status 200 shows the list is created successfully.
Retrieving the list is similar to the creation list api. You just need to send the key (identifier for your list) to the url params.

The patch list api is similar to the get api. You just have to add the body params.
So you can simultaneously send both the params or just one. Body params include addItems and removeItems array.

You can add both addItems and removeItems in body params as per your need. If you want to remove and add data simultaneously in your list then use both of them or else use only one.
Sets Creation:
To create key-value set you need two body params.
- Key: A unique name for your list.
- Value: Value associated with the specified key.
It also requires an x-api-key which should be provided in the headers.

Status 200 shows the key-value is created successfully.
Retrieve Set Value
Retrieving Set Value has a similar api like creating set. You just need to pass a key for the set value you want in the path parameters.

On successful set retrieving you will get a data object which contains a value array.
Conclusion:
The Key-Value Store in QuickNode is a powerful tool for handling and accessing large amounts of data quickly. It combines the speed of Key-Value storage with Stream Filters, making it easy to track and analyze blockchain events. This allows you to monitor changes, gets real-time transaction updates very easily. Tracking large amounts of data or managing large amounts of data, key-value stores becomes very reliable and easy for developers.

A Software Engineer with a B.Tech. degree, leveraging a strong foundation to tackle challenges and innovate in the ever-evolving tech landscape. When I’m not coding, I enjoy unwinding with a good playlist, allowing music to fuel my creativity and well-rounded approach to problem-solving.


