OneDeltaPriceHelper

Documentation for eth_defi.one_delta.price.OneDeltaPriceHelper Python class.

class OneDeltaPriceHelper

Bases: object

Internal helper class for price calculations.

Methods summary

__init__(one_delta)

get_amount_in(amount_out, path, fees[, ...])

Get how much token we are going to spend.

get_amount_out(amount_in, path, fees[, ...])

Get how much token we are going to receive.

__init__(one_delta)
Parameters

one_delta (eth_defi.one_delta.deployment.OneDeltaDeployment) –

get_amount_out(amount_in, path, fees, exchange=Exchange.UNISWAP_V3, *, slippage=0, block_identifier=None)

Get how much token we are going to receive.

Parameters
Return type

int

get_amount_in(amount_out, path, fees, exchange=Exchange.UNISWAP_V3, *, slippage=0, block_identifier=None)

Get how much token we are going to spend.

Parameters
Return type

int