uniswap_v2.fees

Documentation for eth_defi.uniswap_v2.fees module.

Uniswap v2 price impact and fee calculations.

Mostly lifted from Uniswap-v2-py MIT licensed by Asynctomatic.

Functions

estimate_buy_price(uniswap, base_token, ...)

Estimate how much we are going to need to pay when doing buy.

estimate_buy_price_decimals(uniswap, ...[, ...])

Estimate how much we are going to need to pay when doing buy.

estimate_buy_quantity(uniswap, base_token, ...)

Estimate how many tokens we are going to receive when doing a buy.

estimate_buy_received_amount_raw(uniswap, ...)

Estimate how much we receive for a certain cash amount.

estimate_sell_price(uniswap, base_token, ...)

Estimate how much we are going to get paid when doing a sell.

estimate_sell_price_decimals(uniswap, ...[, ...])

Estimate how much we are going to get paid when doing a sell.

estimate_sell_received_amount_raw(uniswap, ...)

Estimate how much cash we receive for a certain quantity of tokens sold.

Classes

UniswapV2FeeCalculator

A helper class to estimate Uniswap fees.

Exceptions