Skip to main content

ERC20 Token Transfers API

Track and analyze ERC20 token transfers across the Ethereum blockchain in real-time and historically. Monitor token movements, analyze transfer volumes, track wallet activity, and build comprehensive token transfer analytics using Bitquery's ERC20 Token Transfers API.

What are ERC20 Token Transfers?

ERC20 is the most widely adopted token standard on Ethereum, enabling fungible tokens that can be transferred between addresses. ERC20 token transfers represent the movement of tokens from one wallet to another, forming the foundation of DeFi, trading, and token-based applications.

Understanding ERC20 transfers is essential for:

  • Portfolio Tracking: Monitor token movements in and out of wallets
  • Tax & Accounting: Generate comprehensive transfer reports for crypto tax calculations, cost basis tracking, and token accounting reconciliation
  • Compliance & Auditing: Track token flows for regulatory requirements
  • DeFi Analytics: Analyze liquidity movements and protocol interactions
  • Token Analytics: Understand token distribution and holder behavior
  • Security Monitoring: Detect suspicious transfers and wallet activity

Ethereum APIs

EVM APIs

NFT & Other Token Standards

Solana APIs


📋 Table of Contents

  • Get Latest ERC20 Token Transfers - Query recent token transfers
  • Subscribe to Real-Time Transfers - WebSocket subscriptions for live data
  • Filter by Sender or Receiver - Query transfers involving specific addresses
  • Transfer Volume Analysis - Calculate sent and received volumes
  • Top Transfers - Get largest token transfers
  • Earliest Transfer Tracking - Find first transfers to addresses
  • Use Cases - Common applications and examples
  • API Response Fields - Complete field reference

Get Latest ERC20 Token Transfers

Query the most recent ERC20 token transfers for any token on Ethereum. This example retrieves the latest USDT (Tether) token transfers. The contract address for USDT is 0xdac17f958d2ee523a2206206994597c13d831ec7.

You can run this query here.

{
EVM(dataset: realtime, network: eth) {
Transfers(
where: {
Transfer: {
Currency: {
SmartContract: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" }
}
}
}
limit: { count: 10 }
orderBy: { descending: Block_Time }
) {
Transfer {
Amount
Currency {
Name
Symbol
}
Receiver
Sender
Type
}
}
}
}

Common ERC20 Token Addresses (Ethereum):

TokenContract AddressSymbol
USDT0xdac17f958d2ee523a2206206994597c13d831ec7USDT
USDC0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48USDC
WETH0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2WETH
DAI0x6b175474e89094c44da98b954eedeac495271d0fDAI
LINK0x514910771af9ca656af840dff83e8264ecf986caLINK

Query Multiple Tokens in a Single Query

Query transfers for multiple ERC20 tokens simultaneously using the in operator. This is useful for monitoring multiple tokens at once, building portfolio trackers that track several tokens, or analyzing transfers across a token basket.

The example below queries transfers for USDT, USDC, WETH, and native ETH (0x represents native ETH) in a single request:

{
EVM(dataset: realtime, network: eth) {
Transfers(
where: {
Transfer: {
Currency: {
SmartContract: {
in: [
"0xdac17f958d2ee523a2206206994597c13d831ec7"
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
"0x"
]
}
}
}
}
limit: { count: 10 }
orderBy: { descending: Block_Time }
) {
Transfer {
Amount
Currency {
Name
Symbol
}
Receiver
Sender
Type
}
}
}
}

Use Cases:

  • Monitor multiple stablecoins simultaneously (USDT, USDC, DAI)
  • Track transfers for a portfolio of tokens
  • Analyze token movements across a token basket
  • Build multi-token dashboards and analytics
Multi-Chain Support

Query Any EVM Network: Change the network parameter to query token transfers on other EVM-compatible blockchains:

  • eth - Ethereum Mainnet
  • bsc - BNB Smart Chain (BSC)
  • base - Base L2
  • arbitrum - Arbitrum One
  • matic - Polygon PoS
  • optimism - Optimism L2

Example for BSC:

{
EVM(dataset: realtime, network: bsc) {
Transfers(
where: {
Transfer: {
Currency: {
SmartContract: {
in: ["0x55d398326f99059fF775485246999027B3197955"] // USDT on BSC
}
}
}
}
limit: { count: 10 }
) {
Transfer {
Amount
Currency { Name Symbol }
Sender
Receiver
}
}
}
}

Solana Token Transfers: For SPL token transfers on Solana, see our Solana Transfers API documentation.


Subscribe to Real-Time ERC20 Token Transfers

Monitor ERC20 token transfers in real-time using GraphQL subscriptions. This is ideal for building live dashboards, alert systems, and real-time analytics applications.

This example subscribes to WETH (Wrapped Ethereum) token transfers. The contract address is 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.

You can test this subscription here.

subscription {
EVM(network: eth, trigger_on: head) {
Transfers(
where: {
Transfer: {
Currency: {
SmartContract: { is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" }
}
}
}
orderBy: { descending: Block_Time }
) {
Transaction {
Hash
}
Transfer {
Amount
Currency {
Name
Symbol
}
Receiver
Sender
Type
}
}
}
}
Real-Time Monitoring

For more information on setting up real-time subscriptions, see our GraphQL Subscriptions documentation.


Filter by Sender or Receiver

Query transfers where a specific address is either the sender or receiver. This uses the any filter to implement OR logic, allowing you to find all transfers involving a particular address regardless of direction.

You can find the query here.

query MyQuery {
EVM(dataset: archive, network: eth) {
Transfers(
where: {
any: [
{
Transfer: {
Sender: { is: "0x881d40237659c251811cec9c364ef91dc08d300c" }
}
}
{
Transfer: {
Receiver: { is: "0x881d40237659c251811cec9c364ef91dc08d300c" }
}
}
]
Block: { Number: { eq: "23814227" } }
}
limit: { count: 100 }
orderBy: { descending: Block_Time }
) {
Transfer {
Amount
Sender
Receiver
Currency {
Symbol
Name
}
}
Transaction {
Hash
From
To
Index
}
Block {
Number
Time
}
}
}
}

Addresses That Sent or Received from Multiple Addresses

Find addresses that have interacted with multiple addresses from a given list. This query uses the array_intersect function to identify addresses that have sent or received funds to/from every address in your list.

You can run the query here.

query ($addresses: [String!]) {
EVM(dataset: archive) {
Transfers(
where: {
any: [
{ Transfer: { Sender: { in: $addresses } } }
{ Transfer: { Receiver: { in: $addresses } } }
]
Block: { Date: { after: "2024-04-01" } }
}
) {
array_intersect(
side1: Transfer_Sender
side2: Transfer_Receiver
intersectWith: $addresses
)
}
}
}

Variables:

{
"addresses": [
"0x21743a2efb926033f8c6e0c3554b13a0c669f63f",
"0x107f308d85d5481f5b729cfb1710532500e40217"
]
}
Array Intersect Function

Learn more about the array_intersect function in our Array Intersect documentation.


Transfer Volume Analysis (Sent and Received)

Calculate the total amount of tokens sent and received by a specific address for a particular token over a time period. This is essential for portfolio analysis, tax reporting, and wallet analytics.

You can run this query here.

query MyQuery($address: String, $token: String) {
EVM {
Transfers(
where: {
Block: { Time: { since_relative: { years_ago: 1 } } }
Transfer: {
Currency: { SmartContract: { is: $token } }
any: [
{ Transfer: { Sender: { is: $address } } }
{ Transfer: { Receiver: { is: $address } } }
]
}
}
) {
Sent: sum(
of: Transfer_Amount
if: { Transfer: { Sender: { is: $address } } }
)
Received: sum(
of: Transfer_Amount
if: { Transfer: { Receiver: { is: $address } } }
)
}
}
}

Variables:

{
"address": "0x782c362fbf71f939445e6902a064f7e9384f47e2",
"token": "0x"
}
Native ETH Transfers

Use "0x" as the token address to query native ETH transfers. For ERC20 tokens, use the token's contract address.


Top Transfers of a Token

Retrieve the largest token transfers for any ERC20 token. This is useful for identifying whale movements, large transactions, and significant token flows.

Try the query here.

query MyQuery {
EVM(dataset: archive) {
Transfers(
where: {
Transfer: {
Currency: {
SmartContract: { is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" }
}
}
TransactionStatus: { Success: true }
Block: { Date: { is: "2024-06-29" } }
}
orderBy: { descending: Block_Time }
limit: { count: 10 }
) {
Transfer {
Amount
AmountInUSD
Currency {
Name
Symbol
SmartContract
}
Success
Sender
Receiver
Index
Id
}
Transaction {
To
Hash
Value
Type
GasPrice
Gas
From
Cost
}
Log {
Signature {
Signature
Name
}
SmartContract
}
Call {
From
To
Value
Signature {
Name
}
}
Block {
Number
Time
}
}
}
}

Earliest Transfer to a Wallet

Find the first transfer ever received by a specific wallet address. This is useful for wallet age analysis, first transaction tracking, and onboarding analytics.

Run Query.

query MyQuery {
EVM(network: eth, dataset: archive) {
Transfers(
limit: { count: 1 }
where: {
Transfer: {
Receiver: { is: "0xe37b87598134a2fc0Eda4d71a3a80ad28C751Ed7" }
}
}
) {
Block {
Time(minimum: Block_Number)
}
Transaction {
From
Hash
}
Transfer {
Amount
Currency {
Native
}
}
}
}
}

Use Cases

1. Portfolio Tracking & Analytics

Track all token transfers for a wallet to build comprehensive portfolio dashboards:

  • Monitor incoming and outgoing transfers
  • Calculate total sent/received volumes
  • Track transfer history over time
  • Build transaction timelines

Related APIs:

2. Tax & Accounting

Generate comprehensive transfer reports for tax calculations, accounting reconciliation, and financial reporting:

Tax Use Cases:

  • Calculate capital gains/losses from token transfers
  • Track cost basis for tax reporting (FIFO, LIFO, or specific identification)
  • Generate Form 8949 compatible reports
  • Calculate realized gains/losses by token and date
  • Export transfer history for tax software integration

Accounting Use Cases:

  • Reconcile token movements with accounting records
  • Track transfer volumes by token and time period
  • Generate audit trails for financial statements
  • Calculate token balances from transfer history
  • Export CSV/JSON reports for accounting systems

Key Features:

  • Export all transfers for a wallet with timestamps
  • Calculate transfer volumes by token
  • Track transfer dates and USD values
  • Generate comprehensive CSV/JSON reports
  • Filter transfers by date ranges for tax periods

3. DeFi Protocol Analytics

Analyze token flows in and out of DeFi protocols:

  • Monitor liquidity movements
  • Track protocol token distributions
  • Analyze user deposit/withdrawal patterns
  • Measure protocol adoption

Related APIs:

4. Token Distribution Analysis

Understand how tokens are distributed across addresses:

  • Track token holder changes
  • Analyze concentration metrics
  • Monitor whale movements
  • Identify distribution patterns

Related APIs:

5. Security & Fraud Detection

Monitor transfers for suspicious activity:

  • Detect large unexpected transfers
  • Track transfers to known scam addresses
  • Monitor wallet activity patterns
  • Set up real-time alerts

6. Wallet Analytics

Build comprehensive wallet analysis tools:

  • Calculate wallet age (earliest transfer)
  • Track transfer frequency
  • Analyze token diversity
  • Monitor wallet activity levels

API Response Fields

FieldDescription
Transfer.AmountAmount of tokens transferred
Transfer.AmountInUSDTransfer amount in USD (if available)
Transfer.SenderAddress that sent the tokens
Transfer.ReceiverAddress that received the tokens
Transfer.Currency.NameToken name (e.g., "Tether USD")
Transfer.Currency.SymbolToken symbol (e.g., "USDT")
Transfer.Currency.SmartContractToken contract address
Transfer.SuccessWhether the transfer was successful
Transfer.TypeType of transfer (e.g., "call")
Transaction.HashTransaction hash
Transaction.FromTransaction sender address
Transaction.ToTransaction recipient address
Block.NumberBlock number
Block.TimeBlock timestamp

Best Practices

  1. Use Appropriate Datasets:

    • realtime for recent data (last 8 hours)
    • archive for historical data
    • combined for comprehensive queries
  2. Filter by Token Contract: Always filter by SmartContract address when querying specific tokens to improve performance.

  3. Use Limit and OrderBy: Always specify limit and orderBy to control result size and ordering.

  4. Handle Large Result Sets: For large queries, use pagination or time-based filters to avoid timeouts.

  5. Subscribe for Real-Time Data: Use GraphQL subscriptions for live monitoring instead of polling.

  6. Combine with Other APIs: Enhance transfer data with balance, transaction, and event APIs for comprehensive analytics.


Getting Started

  1. Get API Access: Sign up at Bitquery to get your API key
  2. Try in IDE: Test queries in the Bitquery IDE
  3. Read Documentation: Explore our Getting Started Guide
  4. Check Examples: See more examples in Starter Queries

For more information on authentication and API usage, see our Authorization Guide.