Tutorials
Examples of how to use web3.py and Web-Ethereum-Defi library.
Examples include
Reading live trades of different DEXes
Performing ERC-20 token transfers
Making swaps on Uniswap, Pancakeswap, others
Creating your own price feeds for ERC-20 tokens
Data research with Jupyter Notebooks and Pandas
Integrating DeFi protocols for backend and data research pipeline
For any questions please join to Discord chat.
Prerequisites
Command line: You need to know UNIX command line basics, like how to use environment variables. Microsoft Windows is fine, but we do not test or write any instructions for it, so please consult your local Windows expert for any Windows specific questions.
Python package management: Make sure you know how to install packages (pip, poetry) and use Python virtual environments. See Github README for details.
Jupyter notebook: For data science examples you need to know the basics of Jupyter notebooks
Tutorials and examples
- ERC-20 token transfer with web3.py
- Swap tokens on Uniswap v2 compatible DEXes
- Chainlink price feed reading
- Chainlink reading blockchain native token price
- Uniswap v2 live price with web3.py
- Uniswap v3 liquidity analysis
- Uniswap v3 OHCLV candle price analysis
- Uniswap v3 historical price estimation
- Uniswap v2 historical swaps and pairs event reading
- Uniswap v2 reading swaps real-time (minimal)
- Uniswap v2 reading real-time swaps and new pairs
- PancakeSwap follow live trades programmatically
- Aave V3 Interest Analysis
- Enzyme reading all vaults on a blockchain
- Enzyme vault deployment
- JSON-RPC node integrity verifier for EVM blockchains
- Solidity event high-speed multithread reading
- MEV protection and multiple JSON-RPCs configuration
For more examples, browse tests folder on Github. You can also search function names in the repository using Github search.