trade

Documentation for eth_defi.trade Python module.

Trade outcome analysis.

  • Data structures for analysis Uniswap trade outcomes

  • Can be used with both Uniswap v2 and Uniswap v3 style DEXes

  • Determine and calculate factors like realised price, slippage, paid trading fee

For usage see

Classes

TradeFail

Describe the result of a failed Uniswap swap.

TradeResult

A base class for Success/Fail trade result.

TradeSuccess

Describe the result of a successful Uniswap swap.