Developer Tools · Data & Analytics

Bitquery MCP

Bitquery MCP lets agents query on-chain blockchain data across EVM chains, Solana, Tron, Cardano, Hyperliquid and Polymarket, including token transfers, trades, holders, prices and address activity.

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • Matic transfers raw sql

    LAST RESORT — arbitrary READ-ONLY SQL against the Polygon transfers database. The Bitquery MCP specialized matic_* tools are the PRIORITY; use this ONLY when none of them can answer (e.g. an uncovered table). No query optimizer here — naive SQL full-scans huge tables and JOINs time out. Runs read-only ClickHouse SQL. SQL reference: https://clickhouse.com/docs/reference/home FAST-QUERY RULES: filter on the indexed key tables — `matic_api.transfers_sender` (by sender / outgoing), `matic_api.transfers_receiver` (by receiver / incoming), `matic_api.transfers_tx` (by tx hash); NEVER JOIN big tables — use `WHERE col IN (SELECT …)` (use `GLOBAL IN` when the subquery is referenced inside another subquery, otherwise its result is not available where it is used). A subquery that itself reads a transfers table (`IN (SELECT Transfer_Sender FROM …transfers_… WHERE …)`) is re-run for every shard and rescans that table — run it as its OWN query first, then pass the result back as a literal list (`IN (unhex('a'), unhex('b'))`). To filter transfers by a specific token, read `transfers_currency` (keyed by the token contract + `Block_Time`); `transfers_sender` / `transfers_receiver` are keyed by address, so filtering those by a token contract scans the table. Addresses are RAW BYTES `FixedString(20)` in `Transfer_Sender` / `Transfer_Receiver` (there are NO plain string address columns) → `Transfer_Sender = unhex(substring(lower('0x…'),3))`, output `concat('0x',lower(hex(col)))`. Tx hash is `Transaction_Hash` `FixedString(32)` (same unhex/hex pattern). A SET of hashes or addresses must have the column's exact type: `Transaction_Hash IN (SELECT toFixedString(unhex(h), 32) FROM …)`, `toFixedString(…, 20)` for an address. A plain `unhex(…)` set, or a JOIN on a String key, silently misses every value ending in `00`; `=` and a literal list `IN (unhex('a'), unhex('b'))` are safe. Currency symbol + decimals are INLINE columns (no dictionaries): amount = `toFloat64(Transfer_Amount) / pow(10, Transfer_Currency_Decimals)`; symbol = `Transfer_Currency_Symbol`; token contract = `Transfer_Currency_SmartContract` — itself RAW BYTES in a `String` column (not text), so filter it `= unhex('<40 hex, no 0x>')` and read it back `concat('0x',lower(hex(…)))`; a `'0x…'` text literal matches nothing. Always add `AND Transfer_Success = 1`. `Transfer_Type`: 'token' = a token transfer, 'transaction' = a plain native-coin send, 'call' = native coin moved by a call. A transaction's OWN value transfer is stored either as 'transaction' or as a 'call' with `Call_Index = 0`; only a 'call' with `Call_Index != 0` is an INTERNAL transfer (made by contract code deeper inside the transaction). For top-level transfers filter `(Transfer_Type IN ('token','transaction') OR (Transfer_Type = 'call' AND Call_Index = 0))` - `Transfer_Type IN ('token','transaction')` alone drops a large share of ordinary sends. Time = `Block_Time`. Date-time values come back as ISO-8601 UTC, e.g. 2026-09-21T15:04:18Z (toString() of a date-time gives 2026-09-21 15:04:18). Other `matic_api.*` tables (calls, transactions, balances) are reachable with an explicit db prefix. Counterparty labels are NOT in this database — use labels_for_addresses. Read-only; always add a LIMIT of at most 10,000 — a larger answer fails with an error, so aggregate (GROUP BY, count) instead. 64-bit integers come back as JSON numbers, exact only up to 2^53: return a hash such as cityHash64(...) or any other 64-bit id as toString(x). PREDICTION MARKETS (Polymarket) also live here, in `matic_api.prediction_trades_tx` (order fills), `prediction_managements_tx` (market created / resolved) and `prediction_settlements_tx` (redemption / split / merge) — but the polymarket_* tools cover them and are the PRIORITY. If you do query them raw: question id, condition id, buyer, seller, holder and marketplace are RAW BYTES in String columns (same unhex/hex pattern as above), outcome and asset ids are UInt256 (wrap in `toString`), price = `CollateralAmount / Amount`, USD = `CollateralAmount / 1e6`; trades and managements are keyed by question id, settlements by outcome-token asset id; and a fill whose buyer or seller equals its own marketplace contract is the taker's aggregate leg — counting it double counts volume. Exact table and column names first: chain_list_tables, chain_describe_table and chain_search_columns with database=matic_api.

  • Matic tx events

    ALL EVENT LOGS in one or more Polygon (matic, POL, MATIC, PoS) transactions, including decoded arguments plus raw topics and data. Use after matic_find_events identifies a transaction, or whenever a tx receipt's complete event payload is needed. NOT the value moved in a transaction → use matic_tx_transfers. Accepts up to 50 transaction hashes separated by "|". `Parsed=0` means no ABI matched: Event, Signature and Arguments can then be empty, but Topic0, Topics and Data remain usable. Arguments are named objects with Name, Type, string Value and Indexed; integer values are decimal strings to avoid JSON-number precision loss; use raw Topics/Data for values wider than the decoded numeric fields. Argument names come from one known ABI for the Signature and can be another contract's wording - Topics and Data are the log's own. By default, reverted call-frame logs, removed logs and failed transactions are excluded; set only_successful=0 to inspect them with the returned status fields.

  • Matic tx transfers

    All token & native transfers inside one or several Polygon (matic, POL, MATIC, PoS) transactions (sender → receiver, currency, amount, plus the Tx hash and the called Method). NOT the event logs of a transaction → use matic_tx_events. Entry point for tracing when you have a tx hash. Accepts a BATCH: pass several hashes separated by "|" to inspect them in one call (rows are grouped per Tx). For an address's flow over time use matic_transfers_out / matic_transfers_in. To identify the addresses, pass them to labels_for_addresses. FRESHNESS: transfers reach this data some minutes after the trade tools see a swap, so a hash that trader_trades or tx_trades already shows can return NO rows here yet - that is lag, not a missing transaction: retry in a few minutes. A transaction's own transfer is TOP-LEVEL, not internal, and is always included. Internal = 1 marks a transfer moved by contract code deeper inside a transaction; those are left out unless you pass include_internal=1.

  • New tokens

    NEWLY LAUNCHED tokens — every token whose FIRST trade landed inside the last `window_hours` (or inside a past period: after_time / before_time), ranked by volume, recency, gain or FDV. This is the launch scanner: "what just launched", "new tokens today", "fresh mints", "pump.fun launches in the last 6 hours", "new pairs on Base", "tokens launched on Sept 3 that reached $1M FDV". NOT a leaderboard of tokens that were already trading — use trending_tokens for that. NOT the wallets that bought a launch — use early_buyers. Covers rare / long-tail / newly-launched tokens. "New" means the token has NO USD-priced trade older than `lookback_days` (default 7, max 30) — that window is the depth of the novelty check, so a token that went quiet for longer than it and then resumed trading is reported as new; raise lookback_days when that matters. The two windows are reconciled automatically — lookback_days is widened to cover window_hours, and window_hours is capped one day short of it so there is always prior history to prove novelty against — and the values actually used come back as the Lookback_Days / Window_Hours / Window_Start / Window_End columns. Priced history reaches back about a month, so `window_hours` beyond ~700 leaves nothing to compare with. Arc trades begin on 2026-09-16, so until the lookback reaches past that day every Arc token counts as new: an Arc First_Seen on 2026-09-16 is the start of Arc coverage, not a launch. PAST PERIOD — pass after_time and/or before_time (UTC, "YYYY-MM-DD" or "YYYY-MM-DD HH:MM"): the launch window becomes [after_time, before_time) (only after_time = up to now; only before_time = the window_hours ending there), edges round outward to whole hours, and lookback_days counts back from before_time. Volume, prices and FDV are then measured up to before_time, i.e. as they stood at the end of the period; Age_Hours stays relative to now. A period too close to the 30-day history limit to prove novelty (or with after_time ≥ before_time) is an error, not an empty list. EXACT LAUNCH TIME — exact_age=1 (default 0) fills First_Trade_Time, the UTC second of each token's first USD-priced trade, and makes Age_Hours exact. Use it only when the user wants the launch time or the age to the minute ("launched 12 minutes ago", "what time did it start trading"): it makes the call noticeably more expensive, and the extra cost grows with limit, so it is accepted only with limit ≤ 50 and a launch window of at most 24 hours (window_hours ≤ 24, or an after_time / before_time period of at most one day) — larger requests are refused; keep limit small (10-20) when a few launch times are enough. The ranking itself stays hourly: with sort=newest, launches of the same hour are ordered by volume, not by First_Trade_Time, and an hour can hold more launches than limit. A row whose First_Trade_Time is null keeps the hour-based Age_Hours. Like First_Seen it follows the price bars, which can leave out a tiny pool-seeding swap made before the first priced trade; token_launch_stats gives one token's very first trade. Returns per token: First_Seen — the START of the UTC hour of its first USD-priced trade (hour resolution) — First_Trade_Time — the exact UTC second of that first trade, filled only with exact_age=1 (null otherwise) — and Age_Hours, counted from First_Seen and so an UPPER bound unless exact_age=1: without it the first trade was between Age_Hours − 1 and Age_Hours hours ago (say "about N hours", never an exact minute); with it Age_Hours is exact, counted from First_Trade_Time; Volume_Usd_Window (USD volume since the token first traded), First_Price_Usd (the open of its first hourly bar, ≈ the first trade — token_launch_stats has the exact one; for a bonding-curve launch about the curve's starting price), Last_Price_Usd, Peak_Price_Usd (the highest hourly AVERAGE price since the token first traded — each hour weighted by its volume, counting only hours that carried at least a thousandth of the token's own volume. It is NOT the highest price ever printed inside an hour and not the highest close: a single tiny or unusual swap prints an extreme price, high or low, that nobody could trade at, and a near-empty hour averages one, so the peak is the best price real volume actually changed hands at. It can therefore sit BELOW First_Price_Usd for a token that only fell, and BELOW Last_Price_Usd — the latest price is one swap, so a token climbing right now, or one whose newest print is an outlier, shows a last price above its peak; the drawdown then reads 0), Valuation_Price_Usd (the average price of the NEWEST hour that carried at least a thousandth of the token's own volume — the same volume gate as the peak, so it is the last price at which real volume changed hands. It never exceeds Peak_Price_Usd, and it equals it whenever the last hour of real volume was also the best one, which is the normal shape of a launch that has already died), Valuation_Change_Pct (Valuation_Price_Usd against First_Price_Usd — the move real volume made, not the move to the latest print; a token can therefore show a gain while Last_Price_Usd sits below First_Price_Usd. It replaces the old Price_Change_Pct of this tool and is named differently on purpose: it is NOT Last_Price_Usd against First_Price_Usd, and it is not the same measurement as the Price_Change_Pct of trending_tokens, which compares the window's first and last price directly), Drawdown_From_Peak_Pct (Last_Price_Usd against Peak_Price_Usd, never above 0 and 0 for a token at or above its peak hour; unlike an hour-against-hour comparison it shows a collapse inside the peak hour and a token that stopped trading after it — this is the column that says where the LATEST price is, and the one to read next to a healthy-looking Valuation_Change_Pct), market cap, FDV and PEAK FDV — Market_Cap_Usd and Fdv_Usd are Valuation_Price_Usd × the circulating and total supply, Peak_Fdv_Usd is Peak_Price_Usd × the total supply, so each valuation and its price always agree, and none of them can be set by a single swap. Last_Price_Usd × the supply is therefore NOT Fdv_Usd — that product is one swap's valuation and was reporting hundreds of millions out of hours that traded a few dollars. Fdv_Usd is therefore what the last hour of real volume valued the token at, and never exceeds Peak_Fdv_Usd unless the supply has grown: read Drawdown_From_Peak_Pct beside it for where the latest print actually is. A peak FDV far ABOVE Fdv_Usd means the token fell and kept trading; the two EQUAL with a deep drawdown means it collapsed inside its best hour or stopped trading there, and the two equal with a drawdown near 0 is a launch still at its high. Market cap, FDV and peak FDV are this token's own valuation: `null` for a token that stands for a multi-chain or bridged asset (a new WETH / USDC deployment, a bridged copy), whose supply in the data is the whole asset's. Asset_Currency_Id, Asset_Market_Cap_Usd, Asset_Fdv_Usd and Asset_Peak_Fdv_Usd always hold the asset's figures (equal to the token's own when the token is its own asset; when the asset exists on one chain only, effectively this token's); a bridged copy also gets a Valuation_Warning. Both are WITHHELD (`null`, with a non-empty `Valuation_Warning`) when the supply or valuation behind them is implausible — report them as unavailable; an implausible peak price or peak supply alone withholds only the peak FDV. `Symbol_Lookalike` = 1: the token carries the symbol of an established asset — one traded on this chain, or a major asset of ANY chain (look-alike letters such as a Cyrillic `О` count as the same) — but is a DIFFERENT token from the one that symbol denotes; never present it as that asset. A freshly launched token with a major ticker is the normal case here, not the exception. `Thin_Market` = 1: the token has traded less than 1% of its own FDV since it first traded, so that valuation is arithmetically correct but nothing has changed hands to support it — treat the FDV as unreliable and lead with the volume instead. A typical new token trades several times its FDV in a day, so this fires on about half a percent of launches, most of them tokens carrying a famous ticker on a round billion-token supply. `Symbol_NonAscii` = 1: the symbol is not plain ASCII (normal for CJK / emoji names). Look-alikes, thin markets, and tokens with an implausible supply or valuation that are not a recognised asset, are listed after all other rows — they are never dropped, and a filter that asks for them still returns them. Filter one launchpad family with `address_pattern`, a SQL LIKE pattern on the token address (`%pump` = pump.fun mints, `%bonk`; `%` matches any run, `_` one character). Pass blockchain='' to scan every chain at once. Screener filters (optional, combine freely): min_fdv_usd / max_fdv_usd (Fdv_Usd), min_peak_fdv_usd (highest FDV reached), min_price_change_pct / max_price_change_pct (Valuation_Change_Pct); the FDV filters and sort=fdv read the token's own figure, or the Asset_* one where that is null; a token without the needed figure is dropped while that filter is set. sort=fdv and sort=gainers rank on those same columns, so they too are measured at Valuation_Price_Usd and a single swap can no longer decide the first page; look-alikes and thin markets still come last whatever the sort. Trade and trader counts are not available here — token_launch_stats has them for one token or a list of up to 50 (`addresses`). Follow up on an address from this list with early_buyers (who sniped it), top_traders_by_token (who traded it), token_ohlcv (its candles) or token_dex_venues (where it trades). Cost grows linearly with lookback_days — leave it at 7 unless a deeper novelty check is needed. Names longer than 128 characters and symbols longer than 32 are cut and end in `…`; Name_Truncated / Symbol_Truncated = 1 marks a cut value.

  • Optimism address flow summary

    ADDRESS FLOW SUMMARY / top counterparties: who an Optimism (op, OP, OP Mainnet, L2) address sends funds TO and receives funds FROM, in one call — profile (sent/received transfer counts, distinct receivers/senders) + TOP receivers AND TOP senders. Collapses address_profile + trace_next_hop(out) + an incoming convergence into a single call — call this FIRST when triaging a hop. Returns a computed Role: receive_only (no outgoing transfer in the period) / send_only (no incoming one) / no_transfers (neither) / consolidator (senders ≫ receivers) / distributor (receivers ≫ senders) / hub (thousands of both — don't trace deeper) / relay. The profile counts and Role ALWAYS cover all tokens: currency and contract narrow only the top arrays (optimism_address_profile applies them to every count). Pass the returned counterparties to labels_for_addresses to identify them. For raw rows use optimism_transfers_in/out; for one direction's full ranking use optimism_trace_next_hop. READING THE TOP ARRAYS: one entry per (counterparty, TOKEN) — the same address repeats once per token it moved. Symbols are not unique; identify a token by `contract`. On a very high-traffic address (an exchange or bridge hub) this aggregates a lot of history and can take tens of seconds — narrow it with contract or currency to one token to make it far faster. Amounts here are TOKEN UNITS, never USD - no USD value is available in this data, so there is no usd filter and totals for different tokens must not be compared or added together. For a ranking you can reason about, pin ONE token with contract, or bound the range with min_amount / max_amount. `Symbol_NonAscii` = 1 flags a symbol that is not plain ASCII: normal for CJK / emoji names, but also how a scam token impersonates a major one with Cyrillic or Greek look-alike letters - never treat such a token as the asset it resembles. In the top arrays it is the `symbol_nonascii` field of each entry. after_time / before_time bound BOTH the profile counts and the top arrays to one period (without them both cover the whole history). Counts and arrays are the transfers OF THIS ADDRESS itself. A bot account signs its transactions while a contract it controls holds and moves the tokens - the contract its transactions go TO, or a separate one - so a very active trader (the trading tools' Trader_Address is the signer) can show few or no outgoing transfers here. To find the address that really moves its tokens, open one of its Tx_Hash values from trader_trades with optimism_tx_transfers, then trace that address (optimism_transactions lists where this account's transactions go). A transaction's own transfer is TOP-LEVEL, not internal, and is always counted. ETH moved by contract code deeper inside a transaction (an internal transfer) is left out unless you pass include_internal=1. For the full labelled list in USD, totals by label type, or a set of addresses → counterparties.

  • Optimism address profile

    Optimism (op, OP, OP Mainnet, L2) address STATISTICS — successful transfer counts out/in and distinct counterparties (receivers/senders), across all tokens. Fast triage of an address during tracing. For one-call triage that ALSO returns the top counterparties, prefer optimism_address_flow_summary. Role from the ratio (cheap triage before flow_edges): senders ≫ receivers = consolidator / sweep; receivers ≫ senders = distributor; ~1↔1 = relay (layering); thousands of both = mega-hub (exchange / treasury — don't trace deeper). No outgoing transfers at all = receive-only and no incoming = send-only, not a consolidator / distributor. First_Sent / Last_Sent / First_Received / Last_Received = first and last transfer in each direction. Bound a period with after_time / before_time; restrict to one token with contract (or currency) to also get Sent_Amount / Received_Amount in that token's units - without a token filter the amounts are NULL, because different tokens cannot be added. currency / contract (like after_time / before_time) narrow EVERY count, time and amount here - unlike optimism_address_flow_summary, whose profile counts always cover all tokens. The counts are the transfers OF THIS ADDRESS itself. A bot account signs its transactions while a contract it controls holds and moves the tokens - the contract its transactions go TO, or a separate one - so a very active trader (the trading tools' Trader_Address is the signer) can show few or no outgoing transfers here. To find the address that really moves its tokens, open one of its Tx_Hash values from trader_trades with optimism_tx_transfers, then trace that address (optimism_transactions lists where this account's transactions go). A transaction's own transfer is TOP-LEVEL, not internal, and is always counted. ETH moved by contract code deeper inside a transaction (an internal transfer) is left out unless you pass include_internal=1.

  • Optimism contract creator

    WHO CREATED an Optimism (op, OP, OP Mainnet, L2) contract, and what a creator deployed. Answers "who created / deployed this token", "who is behind this contract", "what else did this deployer launch", and "were these tokens made by the same person" (serial deployers, rug and clone farms). NOT who funded a wallet → use optimism_first_funder. On this chain a token IS a contract, so pass the TOKEN'S CONTRACT ADDRESS in contracts. TWO WAYS TO CALL IT, pick one - setting both is refused, because the two answer different questions and their shared-creator counters would be mixed: contracts="0x..|0x.." - up to 50 contracts, one row each: Creator (the address whose code ran CREATE), Signer, Created_At, Block_Number, Tx, Deploy_Value, Gas_Used and Deploy_Success. Rows whose creator or signer is SHARED come first: Creator_Shared / Signer_Shared count how many of the requested contracts have that same creator / signer, which is what exposes one person behind many tokens. A longer list is not an error: the first 50 distinct addresses are used and the rest ignored - compare Contracts_Requested with Contracts_Used and split a longer list into several calls. creator="0x.." - the contracts THAT address deployed, newest first, inside the window (days, after_time, before_time), at most `limit` rows. Use it on the Creator or Signer a first call returned, to see the rest of that deployer's output. Creator_Shared is empty in this form - every row has the same creator by construction, so the counter would only repeat the row count. Creator_Is_Contract = 1 means the contract was deployed BY OTHER CONTRACT CODE - a token factory, a launchpad or a DEX pair factory - and then Creator is that factory, which is the SAME address for every token it ever made, while Signer is the person who asked for it. On a factory-made token read Signer, not Creator. Deploy_Depth is how deep inside the transaction the deployment happened (0 = the transaction itself) and Call_Index is the deployment's position in that transaction - one transaction can deploy several contracts, and Call_Index is what tells those rows apart when everything else about them looks the same. Status = NOT_FOUND means no deployment is recorded for that address: it is a plain wallet, not a contract, or the deployment is older than the recorded history of this chain. Creations is normally 1; a higher number means the address was created more than once (destroyed and redeployed), and the row describes the EARLIEST creation. THE CREATOR'S STORY IS NOT IN THIS TOOL - build it from the returned addresses: labels_for_addresses (is the creator a known entity, exchange or scammer), optimism_first_funder (who funded the creator, and whether several creators share one sponsor), optimism_address_profile and optimism_transfers_in / optimism_transfers_out (what that wallet does), optimism_flows_between (what moved between the creator and the token). The token's own name, symbol, price and market cap come from find_token_by_address; its first buyers from early_buyers. Amounts are the native coin, never USD. COST: a contract lookup has to walk every call that address ever received, so a handful of ordinary tokens answer in a second or two while one exchange-scale contract can take ~20 s on its own. If you already know roughly when the contract appeared, bound it with after_time / before_time - that alone took one busy token from 21 s to 2 s. A row-limit error ("Limit for rows ... exceeded") means the batch is too busy: bound it that way, or split the list.

  • Optimism find calls

    FIND SMART-CONTRACT CALLS of a specific (rare) method on ONE Optimism (op, OP, OP Mainnet, L2) contract in a single filtered query — match by method name (e.g. "transfer"), full signature ("transfer(address,uint256)"), or raw 4-byte selector (e.g. "a9059cbb"), optionally narrowed to one caller. Answers "who called method X on contract Y, when, did it succeed". NOT what one address signed or received → use optimism_transactions. Returns up to limit calls (default 20, at most 10000), newest first; page back with the last row's Cursor - each page covers the days window ending there. Searches the last 7 days by default — set after_time to reach further back. For emitted event logs use optimism_find_events; for token movements use optimism_transfers_in / optimism_transfers_out. SCAN COST scales with the window, not with the limit: on a very high-traffic contract set days=1 and page back with cursor - several times cheaper than a 7-day window for the same page. Widen days for quiet contracts or rare matches. Calls inside one transaction come back in no particular order - sort them by CallPath if you need execution order. A call to a proxy contract is recorded twice here: once as the call itself and once as the DELEGATECALL the proxy runs for it. Only the first is returned by default; Delegated = 1 marks the repeats, which include_delegatecall=1 adds back. Each row carries the call's decoded input Arguments (Name, Type, Value; integers are decimal strings in raw units, NOT divided by token decimals; addresses as 0x-hex) - at most 32 per row: ArgumentCount is the full number and ArgumentsTruncated=1 marks a cut list (every array element counts as one). A method the decoder does not recognise has no Arguments. Value is the ETH attached to the call. Each row: Tx, Time, Block, Caller, Method, Signature, Selector, CallPath, Value, Success, Reverted, Error, GasUsed, Delegated, Cursor, Arguments, ArgumentCount, ArgumentsTruncated.

  • Optimism find events

    FIND EVENT LOGS for ONE Optimism (op, OP, OP Mainnet, L2) contract — match by event name (e.g. "Transfer") or full signature ("Transfer(address,address,uint256)"), optionally narrowed to one emitting contract (emitter). `contract` matches logs that contract EMITTED ITSELF (a proxy token is found by its public address), plus — when it is a proxy's implementation — the logs its code emitted for that proxy. Logs emitted by OTHER contracts it calls are NOT included: a DEX router's swaps are logged by the pair/pool it calls, not by the router, so contract=<router> with event=Swap returns NOTHING even when the router executed thousands of swaps. An empty result for a router, aggregator or smart wallet does NOT mean there was no activity. To get those logs, pass the pair/pool (or token) address as `contract`; if it is unknown, list the router's transactions with optimism_find_calls (contract=<router>) and pass their Tx hashes (up to 50, "|"-separated) to optimism_tx_events with event=Swap — its CallPath shows which call produced each log. Returns tx hash, time, emitter, event, log index and tx sender, newest first. Searches the last 7 days by default — set after_time to reach further back, or page back with cursor: pass the Cursor value of the LAST row of a page to get the next one, and that page covers the same number of days ending at that row. Unlike before_time, a cursor never skips rows that share a timestamp — a busy contract can emit hundreds of logs in one second. Can be slow on very busy contracts — narrow with event + after_time. For the calls themselves use optimism_find_calls; for token movements use optimism_transfers_in / optimism_transfers_out. Each row carries the log's decoded Arguments (Name, Type, Value, Indexed; integers are decimal strings in raw units, NOT divided by token decimals; addresses as 0x-hex) - at most 32 per row: ArgumentCount is the full number and ArgumentsTruncated=1 marks a cut list (every array element counts as one). Parsed=0 rows have no Arguments. Argument NAMES come from one known ABI for the Signature: a contract that emits the same Signature with other parameter names gets those names too, so a Name can be wrong for this contract - identify an argument by its position and Type, and check a doubtful one against the raw Topics/Data. For raw Topics/Data, or the rest of a cut list, pass the Tx to optimism_tx_events. Unrecognized events can be found here by `topic0`. ONE ROW = ONE EVENT LOG. A contract can be called many times inside a single transaction and each of those internal calls can emit its own logs, so the same event name legitimately repeats within one transaction - that is NOT duplication. Rows are told apart by CallIndex (which internal call emitted the log) together with LogInCall (the log's position inside that call); that pair is unique within a transaction. To COUNT events, count the returned rows - never de-duplicate on Tx/Event/Emitter, which would merge genuinely different logs into one. Rows inside one transaction come back in no particular order - sort them by CallIndex then LogInCall if you need emission order. SCAN COST scales with the window, not with the limit: on a very high-traffic contract set days=1 and page back with cursor - several times cheaper than a 7-day window for the same page. Widen days for quiet contracts or rare matches.

  • Optimism first funder

    FIRST FUNDER / COMMON SPONSOR of up to 50 Optimism (op, OP, OP Mainnet, L2) addresses: for each address the EARLIEST incoming transfer INSIDE THE WINDOW (by default the last 180 days - not necessarily the first ever, see WINDOW) - who sent it (Funder), who signed that transaction (Tx_From), when (First_Time), how much of which token, and the Tx. Answers "who funded these wallets" and "do these wallets share a sponsor" (sybil, sniper and airdrop-farming clusters). NOT who deployed a contract → use optimism_contract_creator. Pass the addresses separated by "|". A longer list is not an error: the first 50 distinct addresses are used and the rest are ignored - every row reports Addresses_Requested / Addresses_Used, so compare them and split a longer list into several calls. One row per used address, and rows whose funder is shared come FIRST: Funder_Shared = how many of the requested addresses have that same first funder, Tx_From_Shared = the same count for the transaction's signer - it catches wallets funded through a public batch-sending contract, where Funder is the contract and the signer is the real sponsor. Funder_In_Set = 1 when the funder is itself one of the requested addresses (a funding chain). Via_Internal_Call = 1 marks funding sent by contract code deeper inside a transaction; the transfer a transaction makes itself is top-level, so it reads 0. Incoming_In_Window = how many qualifying incoming transfers the address had in the window. WHAT COUNTS AS FUNDING: by default native ETH only (asset_type="native"), including ETH sent by contract code (include_internal=1); set asset_type="token" or "all", or pin one token with contract, to look at token funding instead. Zero-amount transfers, mints and self-transfers never count; raise min_amount to skip dust. WINDOW: the first funding INSIDE the last `days` days (default 180, at most 730) ending at before_time or now, or starting at after_time within the same limit. Status = FIRST_IN_WINDOW: the earliest qualifying funding between Window_From and Window_To. It is the address's first-ever funding ONLY if the address had no activity before Window_From, and this tool does not check that. To check one address, compare First_Time with the First_Received of optimism_address_profile for it (an earlier First_Received means it already received something before the window). To look further back, call again with before_time set to the row's Window_From. Status = NO_INCOMING_IN_WINDOW means nothing qualifying arrived in the window: call again for those addresses with before_time set to their Window_From to look further back. COST grows with the number of addresses times the length of the window: for dozens of addresses keep days at 180 and page back with before_time rather than widening days. A row-limit error ("Limit for rows ... exceeded") means an address in the list is too busy (an exchange, bridge or popular contract) or the window is too long - drop that address or shorten days. Amounts are TOKEN UNITS, never USD. To identify funders, pass them to labels_for_addresses; to see everything that moved between the funders and the wallets, use optimism_flows_between.

  • Optimism flow edges

    MONEYFLOW GRAPH EDGES out of an Optimism (op, OP, OP Mainnet, L2) address: one row per counterparty — Source → Target, total Amount, Currency. NOT choosing which counterparty to follow next → use optimism_trace_next_hop. Building block for a MoneyFlow DIAGRAM. HOW TO DRAW: call this per address/hop, collect the edges, and emit a Mermaid `graph LR` (one node per address; each edge labeled with Amount+Currency). Pass the Target addresses to labels_for_addresses to flag CEX / mixer / bridge nodes and STOP expanding those branches. Pass a currency to avoid spam-token noise; call WITHOUT a currency filter to spot a token → USDT off-ramp at the edge. For raw per-transfer rows use optimism_transfers_out. Each edge carries the token Contract — pin one exact token with the contract param. On a very high-traffic address (an exchange or bridge hub) this aggregates a lot of history and can take tens of seconds — narrow it with contract or currency to one token to make it far faster. Amounts here are TOKEN UNITS, never USD - no USD value is available in this data, so there is no usd filter and totals for different tokens must not be compared or added together. For a ranking you can reason about, pin ONE token with contract, or bound the range with min_amount / max_amount. `Symbol_NonAscii` = 1 flags a symbol that is not plain ASCII: normal for CJK / emoji names, but also how a scam token impersonates a major one with Cyrillic or Greek look-alike letters - never treat such a token as the asset it resembles. In the top arrays it is the `symbol_nonascii` field of each entry. Bound one period with after_time / before_time. First_Seen / Last_Seen give each edge's first and last transfer. A transaction's own transfer is TOP-LEVEL, not internal, and is always counted. ETH moved by contract code deeper inside a transaction (an internal transfer) is left out unless you pass include_internal=1.

  • Optimism flows between

    FLOWS BETWEEN TWO ADDRESS SETS on Optimism (op, OP, OP Mainnet, L2): every successful transfer (tokens and native ETH) from any address of set A to any address of set B, and back, in ONE call - "did these wallets ever pay those wallets", "how much moved between my suspects and the exchange wallets", "which of these deposit addresses sent to that hot wallet". Pass up to 50 addresses per set separated by "|" (0xabc…|0xdef…). A longer list is not an error: the first 50 distinct addresses of each set are used and the rest are ignored - every row reports A_Addresses_Requested / A_Addresses_Used and B_Addresses_Requested / B_Addresses_Used, so compare them and split a longer set into several calls. Leave addresses_b EMPTY to get every counterparty of the A set, both directions, grouped per A address - the multi-address form of optimism_flow_edges. mode="summary" (default) returns one row per (Direction, Sender, Receiver, token) with Transfers, total Amount, First_Time, Last_Time and the latest Tx, ordered by `sort`. mode="rows" returns the individual transfers newest first; page with cursor: pass the Cursor value of the LAST row, with all other arguments unchanged, to get the next page (a summary row carries no Cursor). A rows-mode row is a LEDGER LINE: besides the amount it carries Amount_Raw (the exact integer amount in the token's smallest unit) with Decimals, Block and Tx_Index, and Price_Usd (the token's USD price at the time of the transfer), Value_Usd = Amount x Price_Usd and Price_Status - "ok"; "no_price" = no price is known for this token at that time, so Price_Usd and Value_Usd are empty (never read that as zero); "suspect" = the stored price is more than twice the price one day earlier AND one day later, or less than half of both - a likely data glitch - so Value_Usd is left empty - check it with price_at. ETH and the major tokens are priced to 5 minutes, every other token has ONE price per day, so the value of a small token is approximate. On a summary row those seven columns are empty: a total over a period has no single price. Self = 1 (both modes) marks a movement whose counterparty is another address of set A - a move inside the set, not income and not spending. Direction A_TO_B = sent by an A address to a B address, B_TO_A = sent by a B address to an A address; an address listed in both sets appears in both directions. With addresses_b empty the same holds for a transfer between two A addresses: it is listed as A_TO_B for its sender AND as B_TO_A for its receiver, so never add rows of both directions together. WINDOW: the last `days` days (default 30, at most 366) ending at before_time, or now; after_time sets the start instead, within the same 366-day limit. Window_From / Window_To on every row show the range searched; for an older period set before_time. An empty result means no transfer between the sets in that window. COST: the search is keyed on set A, so put the SMALLER and less busy set in addresses_a - individual wallets, not exchange hot wallets, bridges or token contracts. If the call fails with a row-limit error ("Limit for rows ... exceeded"), swap the two sets, shorten days, or split set A. Cost also grows with the number of addresses in set A times the window. Each row carries the token Contract (empty for native ETH); a symbol alone can match look-alike clones, so pin one token with contract, or restrict to native or tokens with asset_type. Amount is in TOKEN UNITS: totals of different tokens must not be compared or added together, there is no usd filter (min_amount is in token units), and sort="amount" is only meaningful with one token pinned. To identify the addresses, pass them to labels_for_addresses. For the full labelled list in USD, totals by label type, or a set of addresses → counterparties.

  • Optimism native balances

    NATIVE COIN BALANCE of up to 50 Optimism (op, OP, OP Mainnet, L2) addresses you ALREADY HAVE: each address's current ETH balance (the coin that pays gas) - for filtering a known set of wallets down to the funded ones, e.g. an airdrop cohort. To discover holders you do not have yet, use optimism_token_holders. NOT one address's transfer history → use optimism_address_flow_summary. Pass the addresses separated by "|" (0x..) - up to 50; addresses after the 50th distinct one are ignored (compare Addresses_Requested with Addresses_Used), so split a longer list into several calls. WINDOW: only balances UPDATED within the last `since_days` days (default 7) are read, so an address that has not moved its native coin in that window returns NO row. Use the same window you searched for activity - e.g. the window of optimism_token_senders - because an active wallet's balance is always fresh there; a wider window costs more for no gain on active wallets. Native_Balance is in ETH (18 decimals); Native_Balance_Raw is the exact integer amount (wei); Balance_As_Of is when that balance was last updated. To identify the addresses, pass them to labels_for_addresses. Each row: Address, Native_Balance, Native_Balance_Raw, Balance_As_Of, Addresses_Requested, Addresses_Used.

  • Optimism token holders

    TOP HOLDERS of an Optimism (op, OP, OP Mainnet, L2) token by CURRENT on-chain balance — holder address + balance, largest first. Use for token analysis: whales, holder concentration, distribution. Pass the token CONTRACT address (not a wallet). Label the returned holders with labels_for_addresses to spot CEX / team / LP / bridge wallets. This is real on-chain balance, NOT DEX-trade PnL — for trader profitability use profitable_traders_by_token / trader_positions. Balances exclude NFTs (fungible only). SCOPE. days=0 (default) ranks EVERY holder over the token's whole history, and Holders_In_Window is then the token's holder count (positive balances). A very widely held token - a major stablecoin, for example - has too much history for that: the call answers at once with one Status=TOO_LARGE row instead of timing out. Then call with days=30 (days=7 if that is still TOO_LARGE): it ranks the holders whose balance CHANGED in that window, and their balances are still exact current balances. A holder that did not move the token in the window is absent, so on such a token the page is the top of the ACTIVE holders, not a guaranteed global top. To reach quieter holders pass Next_Cursor as cursor: each page covers the next older window of `days` and lists only holders whose LAST balance change falls inside it, so no holder appears on two pages and the top N of all pages merged is the global top N. Each page also checks all later activity up to today, so paging far back on a very busy token ends in TOO_LARGE - stop there and say the list covers only the windows read. Next_Cursor is empty when the token has nothing older. Window_From / Window_To are the dates a page covers (Window_From empty = whole history). A row with an empty Holder is a status row: read Status (TOO_LARGE / NO_HOLDERS / BAD_CURSOR). Balance is in the token's OWN units, never USD - no USD value is available in this data, so there is no usd filter and balances of different tokens are not comparable. `Decimals` gives the scale. Holders whose recorded balance is NEGATIVE are dropped and counted in Negative_Balances_Excluded: the transfer history behind them is inconsistent (typically a transfer recorded twice or missing), so that balance cannot be trusted - and the same kind of error can inflate a positive balance of that token. A balance far above the token's total supply is such an artifact, not a whale: check it with token_supply or the holder's transfers before reporting it. `Symbol_NonAscii` = 1 flags a symbol that is not plain ASCII: normal for CJK / emoji names, but also how a scam token impersonates a major one with Cyrillic or Greek look-alike letters - never treat such a token as the asset it resembles.

  • Optimism token senders

    TOKEN SENDERS COHORT on Optimism (op, OP, OP Mainnet, L2): the addresses that SENT a given token at least `min_transfers` times inside a time window, most recently active first - "wallets that actively use this token", "build a cohort or airdrop list of recent senders of this token". NOT one wallet's own outgoing transfers → use optimism_transfers_out. This counts SENDERS of the token, one row per sender; it does not value or label them - pass the returned addresses to labels_for_addresses, and to optimism_native_balances to keep only funded wallets. By default only normal user wallets (EOAs) that sent the token in their OWN transaction count (eoa_only=1); set eoa_only=0 to include contract senders. Pass the token's CONTRACT address in token (0x-hex (case-insensitive)); a symbol also matches clone tokens, so pin the exact contract. WINDOW: the last `days` days (default 1, at most 30) ending at before_time or now; after_time sets the start instead. A sender must reach `min_transfers` sends WITHIN this window, so a short recent window keeps only clearly-active wallets - the recency the cohort wants. There is no full-history mode: to go further back, page with before_time. PAGING: newest-active first, at most `limit` rows. If the result has `limit` rows there may be more - set before_time to the oldest Last_Transfer_Time returned and call again, then combine and de-duplicate the pages. COST grows with the token's volume times the window: widen `days` step by step. A row-limit error ("Limit for rows ... exceeded") means the token is too busy for that window - shorten days. Each row: Address, Transfers, First_Transfer_Time, Last_Transfer_Time.

  • Optimism trace dominant path

    AUTO-WALK the dominant (largest-total-amount) OUTGOING edge of ONE token from an Optimism (op, OP, OP Mainnet, L2) address, hop by hop, up to 5 hops — collapses ~5 manual optimism_trace_next_hop calls into one. Every hop returns Hop*_To (the address that received), Hop*_Token (the contract of the token that moved) and Hop*_Edge_Total, plus Hops_Found (how many hops resolved) and Path_Status for the walk itself. Hop*_Edge_Total is NOT the amount that travelled along the path: it is the ALL-TIME total of EVERY transfer of that token between that hop's sender and receiver, so it can be orders of magnitude larger than the sum you are tracing and the hop totals are not comparable with each other. To break one edge down — its transfer count (Transfers), first/last seen, and the full ranking of that address's edges — call optimism_trace_next_hop on the hop's sender. The walk NEVER goes back to an address it has already visited (the seed included), so it cannot bounce back and forth between the same two wallets — each hop is the largest edge to a NEW address. READ Path_Status FIRST — NO_MATCH means the token filter matched nothing (wrong symbol, or that symbol belongs to a different token — pass `contract`), PATH_END means the trail really ran out, DEPTH_LIMIT means it may continue past hop 5. All-NULL hops with NO_MATCH are a filter problem, not a dead end. Pass the hop addresses to labels_for_addresses and read down to the FIRST labeled address (CEX / mixer / bridge) — that's the destination. Pin the token with `contract` whenever you know it — a SYMBOL is not unique, clone tokens reuse popular symbols, and with a symbol alone the hops can drift between look-alike tokens; compare the per-hop token contract to spot that. LIMITS: follows only the single biggest edge per hop (misses splits / fan-outs), fixed depth 5, and transfers to the burn address are not followed. For branching / adaptive tracing call optimism_trace_next_hop hop by hop, identify each hop with labels_for_addresses and choose the next address yourself (prompt_playbook with playbook=money_flow returns the full step-by-step procedure); for one hop's full ranking use optimism_trace_next_hop. Heavy multi-hop walk — can time out on a very busy address; retry, or narrow it with `contract` / a less-busy token. A transaction's own transfer is TOP-LEVEL, not internal, and is always counted. ETH moved by contract code deeper inside a transaction (an internal transfer) is left out unless you pass include_internal=1.

  • Optimism trace next hop

    CONVERGENCE primitive for Optimism (op, OP, OP Mainnet, L2) tracing: aggregate an address's OUTGOING flow by counterparty (Σ amount, count, first/last seen), largest first. Answers "where did the bulk of the funds go" in one shot. Narrow with currency (recommended), after_time (= when funds reached this hop), min_amount. Pass the top counterparties to labels_for_addresses to spot a CEX / mixer / bridge (= the destination, stop there). One row per (counterparty, TOKEN); identify a token by Contract, not Currency. On a very high-traffic address (an exchange or bridge hub) this aggregates a lot of history and can take tens of seconds — narrow it with contract or currency to one token, and with after_time to one period, which is far faster than one wide call. NOT edges for a diagram → use optimism_flow_edges. NOT an automatic walk along the largest edge → use optimism_trace_dominant_path. Amounts here are TOKEN UNITS, never USD - no USD value is available in this data, so there is no usd filter and totals for different tokens must not be compared or added together. For a ranking you can reason about, pin ONE token with contract, or bound the range with min_amount / max_amount. A transaction's own transfer is TOP-LEVEL, not internal, and is always counted. ETH moved by contract code deeper inside a transaction (an internal transfer) is left out unless you pass include_internal=1. Returns up to top_n rows (default 10, at most 10000), largest Total_Amount first; no rows = nothing matched. `Symbol_NonAscii` = 1 flags a symbol that is not plain ASCII: normal for CJK / emoji names, also how a look-alike imitates a major token. For the full labelled list in USD, totals by label type, or a set of addresses → counterparties. Each row: Counterparty, Currency, Symbol_NonAscii, Contract, Total_Amount, Transfers, First_Seen, Last_Seen.

  • Optimism transactions

    Paginated TRANSACTION HISTORY of an Optimism (op, OP, OP Mainnet, L2) address — every transaction it sent or received directly (its own From or To; a token it received inside someone else's transaction is in optimism_transfers_in), newest first. Page back by passing the last Tx of the previous page as `before` (returns only strictly older transactions; an unknown hash yields an empty page). `until` bounds the other side (only transactions NEWER than that tx). NOT a token-transfer list — for token/native transfer rows use optimism_transfers_in / optimism_transfers_out; to inspect the transfers inside one transaction use optimism_tx_transfers. Value and Fee are in ETH. Each row also carries the exact fee: Fee_Wei is the fee in the smallest unit as a decimal string (Fee is the same amount in ETH, rounded to 8 decimals); Fee_Usd is its value at the ETH price at the time of the transaction. Fee_Price_Status says how far to trust that price: ok; no_price (Fee_Usd is empty - never read it as zero); suspect (the price is more than twice, or less than half, the price a day earlier AND a day later - a likely data glitch, so Fee_Usd is left empty). A failed transaction (Success = 0) still paid its fee: treat it as a fee-only row. The fee was paid by the sender (From): count it for this address only on rows where From is the address. Fee_Status tells whether the fee itself can be used: ok; may_omit_l1 = the recorded amount is the execution fee alone, the L1 data fee is missing from it, so the true fee is higher (a lower bound); unreliable = the transaction is recorded with a lower gas price than it was sent with, so the recorded fee is far too low and NOT usable - Fee_Wei and Fee_Usd are empty there, the Fee of such a row must be ignored, and the real fee has to come from the transaction's receipt. Returns up to limit transactions per page (default 25, at most 10000), newest first, failed transactions (Success = 0) included unless only_successful=1; a page shorter than limit is the last one. An unknown `until` hash is not applied (no lower bound); `before` and `until` together bound one range. With after_time / before_time only that period is read, so the cost follows the period, not the address's whole history; pass the same pair with every page. Each row: Tx, Time, Block, TxIndex, From, To, Value, Success, Fee, Fee_Status, Fee_Wei, Fee_Usd, Fee_Price_Status.

  • Optimism transfers in

    INCOMING Optimism (op, OP, OP Mainnet, L2) transfers to an address — where this wallet received funds from. NOT the opposite direction → use optimism_transfers_out. NOT totals per sender → use optimism_address_flow_summary. Returns up to limit transfers (default 20, at most 10000), newest first by default; page back with the last row's Cursor. Use to trace the source of funds backwards. For an address with many transfers set min_amount or sort='amount', else large sources hide behind recent dust. Query WITHOUT a currency filter to see where the bulk of funds originated. To identify counterparties, pass the returned addresses to labels_for_addresses. Each row carries the token Contract — a symbol alone can match look-alike clones, so pin the real token with the contract param. Amount is in TOKEN UNITS; amounts of different tokens must never be added together. Each row also carries Price_Usd - the token's USD price at the time of the transfer - and Value_Usd = Amount x Price_Usd, with Price_Status: "ok"; "no_price" = no price is known for this token at that time, so Price_Usd and Value_Usd are empty (never read that as zero); "suspect" = the stored price is more than twice the price one day earlier AND one day later, or less than half of both - a likely data glitch - so Value_Usd is left empty - check the price with price_at. ETH and the major tokens are priced to 5 minutes, every other token has ONE price per day, so the value of a small token is approximate. There is no usd filter: min_amount / max_amount are in token units. For a ranking you can reason about, pin ONE token with contract, or bound the range with min_amount / max_amount. Amount_Raw is the exact amount as an integer in the token's smallest unit and Decimals its scale (Amount = Amount_Raw / 10^Decimals); Block and Tx_Index place the row in the chain. A transaction's own transfer is TOP-LEVEL, not internal, and is always included. Internal = 1 marks a transfer moved by contract code deeper inside a transaction; those are left out unless you pass include_internal=1. `Symbol_NonAscii` = 1 flags a symbol that is not plain ASCII: normal for CJK / emoji names, also how a look-alike imitates a major token. Each row: Time, Sender, Currency, Symbol_NonAscii, Contract, Amount, Internal, Tx, Cursor, Amount_Raw, Decimals, Block, Tx_Index, Price_Status, Price_Usd, Value_Usd.

  • Optimism transfers out

    OUTGOING Optimism (op, OP, OP Mainnet, L2) transfers from an address — where this wallet sent funds. Narrow with after_time (flows after funds arrived), currency (follow one asset), min_amount (drop dust). For an aggregated "where did the bulk go" view use optimism_trace_next_hop; for incoming use optimism_transfers_in. For an address with many transfers set min_amount or sort='amount', else large counterparties hide behind recent dust. Query WITHOUT a currency filter to surface the token → USDT off-ramp. Page back through history with cursor: pass the Cursor value of the LAST row of a page to get the next one — unlike before_time it never skips rows that share a timestamp. To identify counterparties, pass the returned addresses to labels_for_addresses. Each row carries the token Contract — a symbol alone can match look-alike clones, so pin the real token with the contract param. Amount is in TOKEN UNITS; amounts of different tokens must never be added together. Each row also carries Price_Usd - the token's USD price at the time of the transfer - and Value_Usd = Amount x Price_Usd, with Price_Status: "ok"; "no_price" = no price is known for this token at that time, so Price_Usd and Value_Usd are empty (never read that as zero); "suspect" = the stored price is more than twice the price one day earlier AND one day later, or less than half of both - a likely data glitch - so Value_Usd is left empty - check the price with price_at. ETH and the major tokens are priced to 5 minutes, every other token has ONE price per day, so the value of a small token is approximate. There is no usd filter: min_amount / max_amount are in token units. For a ranking you can reason about, pin ONE token with contract, or bound the range with min_amount / max_amount. Amount_Raw is the exact amount as an integer in the token's smallest unit and Decimals its scale (Amount = Amount_Raw / 10^Decimals); Block and Tx_Index place the row in the chain. A transaction's own transfer is TOP-LEVEL, not internal, and is always included. Internal = 1 marks a transfer moved by contract code deeper inside a transaction; those are left out unless you pass include_internal=1.

PreviousPage 12 / 18Next