Python package extracts detailed Uniswap trade and liquidity data
dexamine: A Python package for Uniswap event data on Ethereum
Software Engineering
Summary
Decentralized exchanges like Uniswap record every trade and liquidity change on the Ethereum blockchain. But this raw data is hard to read and connect to other transaction details. The authors built a Python tool called dexamine that turns these complex blockchain logs into easy-to-understand information about trades, tokens, and gas use. This helps people study how decentralized markets work using real data.
What this means in practice
- •For blockchain data analysts: Generate structured datasets from Ethereum Uniswap transactions for economic or financial analysis of decentralized markets.
- •For cryptocurrency developers: Create tools that integrate detailed Uniswap trading and liquidity data for portfolio management or trading algorithms.
Authors
Magnus Hansson
Abstract
Decentralized exchanges record trading and liquidity provision on public blockchains, but empirical analysis requires interpreting these records and linking them to execution metadata. dexamine is a Python package that parses Uniswap v2 and v3 events on Ethereum. It converts transaction receipt logs into observations of trades and liquidity changes, with token quantities, pool state, transaction order, and gas information. The package separates data retrieval, contract metadata, protocol interpretation, and output construction. The repository provides recorded Ethereum responses and an offline reproducible example, and version 1 has been used to construct data for an empirical study of price discovery in decentralized markets.