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

Latest commit

 

History

History
35 lines (22 loc) · 634 Bytes

README.md

File metadata and controls

35 lines (22 loc) · 634 Bytes

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

◼️