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)

MethodDescription
.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

MethodProtocolsDescription
.token(*symbols)ERC20Token symbol(s) (USDT, USDC) or contract address. Accepts multiple known symbols for multi-token queries (multi-value).
.sender(*addrs)ERC20, NativeFilter by sender address (multi-value)
.receiver(*addrs)ERC20, NativeFilter by receiver address (multi-value)
.involving(*addrs)AllFilter by any involved address (multi-value)
.from_address(*addrs)ERC20, NativeAlias for .sender()
.to_address(*addrs)ERC20, NativeAlias for .receiver()
.min_amount(amt)ERC20, NativeMinimum transfer amount
.max_amount(amt)ERC20, NativeMaximum transfer amount
.eth_market_type(type)AAVEMarket type for ETH: ‘Core’, ‘Prime’, ‘EtherFi’
.symbol0(sym)UniswapFirst token symbol (required)
.symbol1(sym)UniswapSecond token symbol (required)
.fee(tier)UniswapFee tier: 100, 500, 3000, 10000 (required)

Binance Methods

MethodBuilderDescription
client.binance.trades(token)TradeStart a raw trades query
client.binance.ohlcv(token)TradeStart an OHLCV candle query
client.binance.book_depth()ExchangeDataStart a book depth query (365-day max)
client.binance.open_interest()ExchangeDataStart an open interest query
client.binance.funding_rate()ExchangeDataStart a funding rate query
client.binance.long_short_ratios()ExchangeDataStart a long/short ratios query

Trade builder methods:

MethodDescription
.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:

MethodDescription
.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.

MethodProtocolsDescription
.involving_label(label)AllFilter where any involved address matches a label substring (e.g., “Binance”)
.involving_category(cat)AllFilter where any involved address matches a category (e.g., “exchange”)
.sender_label(label)ERC20, NativeFilter sender by label substring
.sender_category(cat)ERC20, NativeFilter sender by category
.receiver_label(label)ERC20, NativeFilter receiver by label substring
.receiver_category(cat)ERC20, NativeFilter 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

MethodDescription
.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

MethodDescription
.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)