Skip to content

Evan-Kim2028/async_subgrounds_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Async Subgrounds Query Example

This notebook demonstrates how to use Subgrounds asynchronous queries to speed up your subgraph queries. Uniswapv3 subgraph is used in this example to asynchronously query the swaps entity, which is notoriously one of the largest subgraph entities.

Installation

First setup a virtual environment:

source .venv/bin/activate```

After the virutal environment is active, install the following repositories:

```pip install git+https://github.com/0xPlaygrounds/subgrounds.git@feat/async
   pip install polars
   pip install asyncio

Run the query with python async_swaps.py. Load the query results in a polars dataframe with python read_files.py