API documentation

This is the API documentation for Python web3-ethereum-defi package. See the project README for an overview.

Core API

eth_defi.token

ERC-20 token information, deployment and manipulation.

eth_defi.balances

Token holding and portfolio for addresses.

eth_defi.abi

ABI loading from the precompiled bundle.

eth_defi.deploy

Deploy any precompiled contract.

eth_defi.event

Solidity events scalable fetch and reading.

eth_defi.gas

Gas price strategies.

eth_defi.confirmation

Transaction broadcasting, block confirmations and completion monitoring.

eth_defi.revert_reason

Revert reason extraction.

eth_defi.hotwallet

Utilities for managing hot wallets.

eth_defi.ganache

Ganache EVM test backend and mainnet forking.

eth_defi.middleware

Web3 middleware.

eth_defi.tx

Transaction parsing utilities.

eth_defi.utils

Bunch of random utilities.

Uniswap v2 API

eth_defi.uniswap_v2.deployment

Uniswap v2 and compatible DEX deployments.

eth_defi.uniswap_v2.pair

Uniswap v2 like pair info.

eth_defi.uniswap_v2.fees

Uniswap v2 price impact and fee calculations.

eth_defi.uniswap_v2.analysis

Uniswap v2 individual trade analysis.

eth_defi.uniswap_v2.utils

Uniswap v2 helper functions.

eth_defi.uniswap_v2.swap

Uniswap v2 swap helper functions.

eth_defi.uniswap_v2.liquidity

Liquidity measuring.

eth_defi.uniswap_v2.oracle

Price oracle implementation for Uniswap v2 pools.

eth_defi.uniswap_v2.token_tax

Querying the buy tax, transfer tax & sell tax of an ERC20 token

Uniswap v3 API

eth_defi.uniswap_v3.deployment

Uniswap v3 and compatible DEX deployments.

eth_defi.uniswap_v3.constants

Uniswap v3 constants.

eth_defi.uniswap_v3.utils

Uniswap v3 helper functions.

eth_defi.uniswap_v3.liquidity

Uniswap v3 liquidity events and depth estimation.

eth_defi.uniswap_v3.events

Uniswap v3 event reader.

eth_defi.uniswap_v3.price

Uniswap v3 price calculations.

eth_defi.uniswap_v3.pool

Uniswap v3 pool data.

eth_defi.uniswap_v2.oracle

Price oracle implementation for Uniswap v2 pools.

Aave v3 API

Price oracle

eth_defi.price_oracle.oracle

Price oracle core functionality.

Data research and science

eth_defi.research.candle

Create OHLCV candle charts.

Solidity event and log reader

eth_defi.event_reader.reader

High performance EVM event reader.

eth_defi.event_reader.logresult

Event reader output.

eth_defi.event_reader.conversion

Raw log event data conversion helpers.

eth_defi.event_reader.fast_json_rpc

JSON-RPC decoding optimised for web3.py.

Indices and tables