Uniswap V3

Examples

Note

These examples are crafted as a Jupyter notebook. You can download the original notebook file here.

Also note that inside Jupyter notebooks, await can be used freely outside of asyncio.run().

uniswap_v3

Reference

async ctc.protocols.uniswap_v3_utils.async_get_pool_metadata(pool_address, **rpc_kwargs)
async ctc.protocols.uniswap_v3_utils.async_get_pool_swaps(pool_address, *, start_block=None, end_block=None, start_time=None, end_time=None, include_timestamps=False, replace_symbols=False, normalize=True)
async ctc.protocols.uniswap_v3_utils.async_quote_exact_input_single(token_in, token_out, *, fee, amount_in, sqrt_price_limit_x96=0, provider=None, block=None)
async ctc.protocols.uniswap_v3_utils.async_quote_exact_output_single(token_in, token_out, *, fee, amount_out, sqrt_price_limit_x96=0, provider=None, block=None)