Historical DeFi data API client: per-block, point-in-time contract state as pandas DataFrames. Aave rates, Uniswap prices, USDC supply, aligned onto one time axis.
Project description
defipipe: historical DeFi data API, per block, as pandas DataFrames
What read functions actually returned at every Ethereum block: Aave borrow rates, Uniswap slot0 prices, USDC total supply. Reconstructed historically, indexed live, and aligned onto one clean time axis.
Most DeFi data is built from events. defipipe serves state: the result of calling a contract's read functions at a specific block. If you need to know what the Aave WETH borrow rate actually was at block 19,000,000, not an hourly average from a dashboard, this is the API for it.
Install
pip install defipipe
Five lines to an aligned DataFrame
from defipipe import Client
df = Client().data([
"eth:aave:v3:0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2/weth:call:getreservedata[currentvariableborrowrate]",
"eth:lido:v2:0xae7ab96520de3a18e5e111b5eaab095312d7fe84:call:gettotalpooledether",
], freq="1h", since="2026-07-07", until="2026-07-12")
df.corr()
df.attrs["units"] # scaling recipe per series: unit, decimals, kind
df.attrs["blocks"] # per-point source block per series
No API key needed for recent data at hourly bars. Full history and per-block
granularity: get a key at https://defipipe.io/pricing and set
DEFIPIPE_API_KEY (or pass api_key=).
Why quants use this
- Point-in-time correctness. Every value is the last observation at or before each interval boundary, resolved through the block↔timestamp map. No interpolation, no lookahead bias: safe for backtests.
- Exact raw values on demand.
data(..., raw=True)returns the exact on-chain integers as Python ints (arbitrary precision, uint256-safe); the default float path requests lean payloads and skips them. Scaling is metadata you can audit, not arithmetic you have to trust. - One key for everything. Canonical series IDs
(
{chain}:{protocol}:{version}:{instance}[/{scope}]:{kind}:{metric}) name every series across protocols; browse them at https://defipipe.io/datasets. - Per-block granularity back to each pool's deployment, from our own archive node, not sampled snapshots.
Per-block rows, exact integers
raw = Client(api_key="dp_...").data(
["eth:uniswap:v3:0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640:call:slot0[sqrtpricex96]"],
freq="block", since="2026-07-11", until="2026-07-12", raw=True,
)
raw.head() # one row per block; values are exact Python ints
Windows of any size work: the client pages through the API cursor transparently.
Coverage
Aave V3, Uniswap V3, Lido today; Morpho, GMX V2, Uniswap V4, Ethena, Maple next. Request a pool at https://defipipe.io/feature-requests; approved requests ship with full backfilled history.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file defipipe-0.4.1.tar.gz.
File metadata
- Download URL: defipipe-0.4.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94ac6979eb80eb06522949c499ae23fe8ea2c6b8e28778e665f3de2bcf29ab55
|
|
| MD5 |
9cae6008962ecf3d2844aecc27c473bc
|
|
| BLAKE2b-256 |
e0738e5c24c59a3aab67d11d2c00fdefb0b22856509a95804f2b9333c57a93de
|
File details
Details for the file defipipe-0.4.1-py3-none-any.whl.
File metadata
- Download URL: defipipe-0.4.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9378fc5116b3b2057bbd7c121e73ca35a82005d5244861f4f0f6ad8bcf5d8723
|
|
| MD5 |
de2be7f6ae6221cee48172000141ef83
|
|
| BLAKE2b-256 |
7cdb167a47415b7209f637520d19dcd5b53ea3c232f074590e74181e28245e0f
|