Builder Methods Reference
:::note[Range Limits]
The API enforces per-provider range limits. ERC-20 and Native Token: max 7 days / 1M blocks (10M for ARB). Aave, Uniswap, Lido, Stader, Threshold: max 31 days / 10M blocks. JSON format (.as_dict()): max 10,000 blocks for all providers. Exceeding these limits returns a 400 error.
:::
Common Methods (all protocols)
| Method | Description |
|---|
.network(net) | Set network (ETH, ARB, BASE, OP, POLYGON, etc.) |
.start_block(n) | Set starting block number |
.end_block(n) | Set ending block number |
.block_range(start, end) | Set both start and end blocks |
.start_time(ts) | Set starting time (ISO format or Unix timestamp) |
.end_time(ts) | Set ending time (ISO format or Unix timestamp) |
.time_range(start, end) | Set both start and end times |
.verbose() | Include all metadata fields |
.with_value() | Enrich events with USD value data (value_usd column) |
Protocol-Specific Parameters
| Method | Protocols | Description |
|---|
.token(*symbols) | ERC20 | Token symbol(s) (USDT, USDC) or contract address. Accepts multiple known symbols for multi-token queries (multi-value). |
.sender(*addrs) | ERC20, Native | Filter by sender address (multi-value) |
.receiver(*addrs) | ERC20, Native | Filter by receiver address (multi-value) |
.involving(*addrs) | All | Filter by any involved address (multi-value) |
.from_address(*addrs) | ERC20, Native | Alias for .sender() |
.to_address(*addrs) | ERC20, Native | Alias for .receiver() |
.min_amount(amt) | ERC20, Native | Minimum transfer amount |
.max_amount(amt) | ERC20, Native | Maximum transfer amount |
.eth_market_type(type) | AAVE | Market type for ETH: ‘Core’, ‘Prime’, ‘EtherFi’ |
.symbol0(sym) | Uniswap | First token symbol (required) |
.symbol1(sym) | Uniswap | Second token symbol (required) |
.fee(tier) | Uniswap | Fee tier: 100, 500, 3000, 10000 (required) |
Binance Methods
| Method | Builder | Description |
|---|
client.binance.trades(token) | Trade | Start a raw trades query |
client.binance.ohlcv(token) | Trade | Start an OHLCV candle query |
client.binance.book_depth() | ExchangeData | Start a book depth query (365-day max) |
client.binance.open_interest() | ExchangeData | Start an open interest query |
client.binance.funding_rate() | ExchangeData | Start a funding rate query |
client.binance.long_short_ratios() | ExchangeData | Start a long/short ratios query |
Trade builder methods:
| Method | Description |
|---|
.token(symbol) | Set token symbol (e.g. “BTC”) |
.window(size) | Set OHLCV window: 1m, 5m, 15m, 30m, 1h, 4h, 1d |
.start_time(ts) | Set start time (ISO 8601 or Unix) |
.end_time(ts) | Set end time |
.time_range(start, end) | Set both start and end times |
Exchange data builder methods:
| Method | Description |
|---|
.token(symbol) | Set token symbol (e.g. “BTC”) |
.start_time(ts) | Set start time (ISO 8601 or Unix) |
.end_time(ts) | Set end time |
.time_range(start, end) | Set both start and end times |
Exchange data endpoints return CSV/Parquet only. Calling .as_dict() will raise an error.
Address Label & Category Filters
Filter events by entity names or categories using the labels database. Available on all protocols.
| Method | Protocols | Description |
|---|
.involving_label(label) | All | Filter where any involved address matches a label substring (e.g., “Binance”) |
.involving_category(cat) | All | Filter where any involved address matches a category (e.g., “exchange”) |
.sender_label(label) | ERC20, Native | Filter sender by label substring |
.sender_category(cat) | ERC20, Native | Filter sender by category |
.receiver_label(label) | ERC20, Native | Filter receiver by label substring |
.receiver_category(cat) | ERC20, Native | Filter receiver by category |
Multi-value support: Pass multiple values as separate arguments (e.g., .sender_label("Binance", "Coinbase")) or as a comma-separated string (e.g., .sender_label("Binance,Coinbase")). Both forms are equivalent.
Mutual exclusivity: Within each slot (involving/sender/receiver), only one of address/label/category can be set. involving* filters cannot be combined with sender*/receiver* filters.
Aggregate Methods
| Method | Description |
|---|
.aggregate(group_by, period) | Transition to aggregate query. group_by: "time" or "block". period: bucket size (e.g. "1h", "100b"). Returns an AggregateQueryBuilder that supports all the same terminal and filter methods. |
client.aggregate_schema(protocol) | Get available aggregate fields for a protocol (e.g. "erc20", "aave_v3"). |
Terminal Methods
| Method | Description |
|---|
.as_df() | Execute and return pandas DataFrame |
.as_df("polars") | Execute and return polars DataFrame |
.as_file(path) | Execute and save to file (format from extension) |
.as_file(path, format="csv") | Execute and save with explicit format |
.as_dict() | Execute and return list of dicts (JSON, 10K block limit) |
.as_link() | Execute and return download link (CSV, 1hr expiry) |
.as_link(format="parquet") | Execute and return download link (Parquet) |
.calculate_cost() | Calculate query cost without executing (no quota deducted) |