Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Latest commit

 

History

History

uniswap-data

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Leveraging Uniswap subgraph to extract token pair information


In this notebook, we are using the following subgraph:

ENDPOINT = 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2'

Steps

  1. Define private methods for querying
  2. Query to find all token IDs for $UNI
  3. Query to find all token IDs for $WETH
  4. Query to find IDs of all combinations of a pair of tokens
  5. Query to find recent swaps between the pairs (by their pair IDs)
  6. Data cleaning and plotting

Installing dependencies

virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt

◼️