Optimism Transfers API: Token and ETH Transfers, Whale Alerts, Backfills
Every ERC-20, ERC-721, ERC-1155 and native ETH transfer on Optimism lands in the Transfers cube under EVM(network: optimism), with sender, receiver, amount, USD value where a price exists, the token's contract and symbol, and the transaction that carried it. The same filters run as a query for the latest rows or as a subscription for a live feed, and dataset: combined on the root reaches history. Every example runs in the IDE on a free account.
Large transfers of one token
USDT on Optimism, transfers of 10,000 or more in the last day. Saved as a live stream here; the query form below is the same filter with a window and a limit.
{
EVM(network: optimism) {
Transfers(
where: {
Transfer: {
Currency: { SmartContract: { is: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58" } }
Amount: { ge: "10000" }
}
Block: { Time: { since_relative: { hours_ago: 24 } } }
}
limit: { count: 10 }
orderBy: { descending: Block_Time }
) {
Block {
Time
}
Transfer {
Amount
AmountInUSD
Sender
Receiver
Currency {
Symbol
Name
SmartContract
}
}
Transaction {
Hash
}
}
}
}
For an alert, change query to subscription and drop Block, limit and orderBy; each qualifying transfer arrives as it is indexed.
Transfers of one wallet
Filter Sender or Receiver, or both with an any block, on the address. Saved stream here; a wallet that is idle streams nothing, so run the query form with dataset: combined first to see what it has done.
{
EVM(network: optimism, dataset: combined) {
Transfers(
where: { Transfer: { Sender: { is: "0xEbe80f029b1c02862B9E8a70a7e5317C06F62Cae" } } }
limit: { count: 10 }
orderBy: { descending: Block_Time }
) {
Block {
Time
}
Transfer {
Amount
AmountInUSD
Currency {
Name
SmartContract
Native
Symbol
}
Receiver
Sender
}
Transaction {
Hash
}
}
}
}
NFT transfers
Currency.Fungible: false keeps ERC-721 and ERC-1155 rows only; Id is the token id and URI the metadata link. Saved stream here; the Optimism NFT API page covers collections and holders.
{
EVM(network: optimism) {
Transfers(
where: { Transfer: { Currency: { Fungible: false } } }
limit: { count: 5 }
orderBy: { descending: Block_Time }
) {
Block {
Time
}
Transfer {
Currency {
Name
Symbol
SmartContract
}
Id
Sender
Receiver
}
}
}
}
Deterministic pagination for backfilling
To load transfers into your own index without gaps or repeats, page in a fixed order. The composite orderBy over block number, transaction index, call index, log index, transfer index and type positions every transfer uniquely; move offset by count on each request. A single request can return up to 25,000 rows. This ordering runs on the realtime window; on the archive dataset, order by Block_Number and page through one block range at a time instead. Saved here.
{
EVM(network: optimism) {
Transfers(
where: { Transfer: { Success: true } }
orderBy: {
ascending: [
Block_Number,
Transaction_Index,
Call_Index,
Log_Index,
Transfer_Index,
Transfer_Type
]
}
limit: { count: 10, offset: 0 }
) {
Block {
Time
Number
}
Transaction {
Hash
From
Index
}
Transfer {
Amount
AmountInUSD
Sender
Receiver
Index
Currency {
Symbol
Name
SmartContract
Decimals
Native
}
}
Call {
Index
}
Log {
LogAfterCallIndex
Index
}
Transfer {
Type
}
}
}
}
Bound each pass with Block: { Number: { ge: ..., le: ... } } so the offset stays small per range.
Frequently Asked Questions
How do I get token transfers on Optimism?
Query Transfers under EVM(network: optimism) with a filter on the token contract, the sender or the receiver. Each row has amount, USD value, both addresses, the token and the transaction hash; a subscription streams new rows.
How do I set up a whale alert on Optimism?
Filter Transfer.Amount with ge on the threshold and Currency.SmartContract on the token, then run it as a subscription. Each transfer above the threshold arrives as it is indexed.
Does the Transfers cube include native ETH transfers?
Yes. Native transfers carry Currency.Native true and Symbol ETH; internal transfers made by contracts are included as well.
How do I backfill all transfers without gaps?
Page in a fixed order with limit and offset: the composite orderBy over block, transaction, call, log, transfer index and type on the realtime window, or Block_Number with a block range per pass on the archive dataset.
How far back does Optimism transfer data go?
The realtime window holds recent hours; dataset: archive or combined reaches back to when Bitquery began indexing Optimism. The data coverage page lists the depth per cube.
Related pages
Ready to run this in production?
Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.