Skip to content

0xBoringWozniak/UniswapV3TickCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UniswapPoolPrep

The script calculates the position's range for given params DP_COUNT (number of STD) and TIME_RANGE (period per each we need to calculate STD)

How to run

Install

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

How to use

usage: __main__.py [-h] [--read_data] pool_address time_range std_count node

positional arguments:
  pool_address  checksum pool address
  time_range    time range in hours to calculate std
  std_count     std count to calculate range
  node          Node connection (https://arb1.arbitrum.io/rpc)

optional arguments:
  -h, --help    show this help message and exit
  --read_data   Read data from storage instead loading from the graph

Example

python3 -m app 0xC31E54c7a869B9FcBEcc14363CF510d1c41fa443 24 8 https://arbitrum-mainnet.infura.io/v3/mynode
Lower tick, Upper tick: [-201250, -200820]

Notes

  • Sometimes you can get an error ValueError: Error in response: [{'message': 'Store error: database unavailable'}] which means that Uniswap V3 subgraph is unavailable now. Try to run app later or with another IP.
  • All available pools can be found here.
  • All data will be save in project root directory as a CSV, after that you can use --read_data

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages