Closed miohtama closed 2 years ago
Related Uniswap v3 in-house project
Search on Github and PyPI about Python and Uniswap v3 reveals that there isn't any one library that could do this at the moment. In short the code to get data out of Uniswap v3 is very fragmented for the time being. Some notable ones are:
pytest
tests (run on mainnet fork), MIT licenseGraphQL based solution can use existing subgraphs like:
There are several onchain oracle solutions too, might not be very useful for above purpose:
We need to decide if we take JSON-RPC event-based approach or GraphQL based approach.
Let's tackle the Uni v3 deployment first.
abi
folderSome notebooks dealing with Uniswap v3 backtesting
Also saw this
Also saw this
I added a test for that method this morning: https://github.com/tradingstrategy-ai/eth-hentai/pull/6/files#diff-59cf62830f8e4e3131187561bfa500d2fdf0a14a48a9c33d91fbc1867a44ad80R111-R115 There are some good insights in the answer though
Question that needs to be answered:
(chain id, Uniswap v3 deployment address)
(timestamp, trading pair, token0 quantity in)
->token1 quantity out
Can be a single pool price at milestone 1, later expanded to cover auto routing and multi-hop trades.