# Table of Contents - [Bitquery API Product Comparison | Bitquery Docs](#bitquery-api-product-comparison-bitquery-docs) - [Generate a Bitquery API Token | Bitquery Docs](#generate-a-bitquery-api-token-bitquery-docs) - [How to Use Bitquery API Token - Authorization Examples](#how-to-use-bitquery-api-token-authorization-examples) - [Authenticate Bitquery WebSockets | Bitquery Docs](#authenticate-bitquery-websockets-bitquery-docs) - [Algorand Arguments API | Bitquery Docs](#algorand-arguments-api-bitquery-docs) - [Algorand Coinpath API | Bitquery Docs](#algorand-coinpath-api-bitquery-docs) - [Algorand Blocks API - Query Blocks by Proposer](#algorand-blocks-api-query-blocks-by-proposer) - [Algorand API Documentation | Bitquery Docs](#algorand-api-documentation-bitquery-docs) - [Optimism NFT API: ERC-721 Transfers, Collections and Owners](#optimism-nft-api-erc-721-transfers-collections-and-owners) - [Optimism Address Balance API | Bitquery Docs](#optimism-address-balance-api-bitquery-docs) - [Migrate from Bitquery API v1 to v2 | Bitquery Docs](#migrate-from-bitquery-api-v1-to-v2-bitquery-docs) - [Polygon (MATIC) API Documentation | Bitquery Docs](#polygon-matic-api-documentation-bitquery-docs) - [Polygon Matic Slippage API | Bitquery Docs](#polygon-matic-slippage-api-bitquery-docs) - [Polygon (MATIC) Address Balance API | Bitquery Docs](#polygon-matic-address-balance-api-bitquery-docs) - [Polygon Matic Liquidity API | Bitquery Docs](#polygon-matic-liquidity-api-bitquery-docs) - [Polygon Uniswap V4 API | Bitquery Docs](#polygon-uniswap-v4-api-bitquery-docs) - [Track Token Lock Unlock | Bitquery Docs](#track-token-lock-unlock-bitquery-docs) - [Polymarket API Vs Bitquery Polymarket | Bitquery Docs](#polymarket-api-vs-bitquery-polymarket-bitquery-docs) - [Algorand Transfers API - Track ALGO & ASA Token Transfers](#algorand-transfers-api-track-algo-asa-token-transfers) - [Algorand Transactions API | Bitquery Docs](#algorand-transactions-api-bitquery-docs) - [Bitcoin Coinpath API - Trace BTC Fund Flows Across Addresses](#bitcoin-coinpath-api-trace-btc-fund-flows-across-addresses) - [Bitcoin Inputs Outputs | Bitquery Docs](#bitcoin-inputs-outputs-bitquery-docs) - [Base Miner Balance Tracker | Bitquery Docs](#base-miner-balance-tracker-bitquery-docs) - [BNB Chain NFT API | Bitquery Docs](#bnb-chain-nft-api-bitquery-docs) - [Polygon Matic Uniswap API | Bitquery Docs](#polygon-matic-uniswap-api-bitquery-docs) - [esGMX (Escrowed) and vGLP (Vested) API | Bitquery Docs](#esgmx-escrowed-and-vglp-vested-api-bitquery-docs) - [Base NFT Trades and Metadata API | Bitquery Docs](#base-nft-trades-and-metadata-api-bitquery-docs) - [Bitcoin Address API - Get BTC Balance | Bitquery Docs](#bitcoin-address-api-get-btc-balance-bitquery-docs) - [Use Regular Expressions To Search Solana Logs](#use-regular-expressions-to-search-solana-logs) - [RWA (Real World Assets) API | Bitquery Docs](#rwa-real-world-assets-api-bitquery-docs) - [Token Transaction API | Bitquery Docs](#token-transaction-api-bitquery-docs) - [Usage API - Track Billing and Quota Programmatically](#usage-api-track-billing-and-quota-programmatically) - [Smart Contract Creation | Bitquery Docs](#smart-contract-creation-bitquery-docs) - [Ethereum Balance API | Bitquery Docs](#ethereum-balance-api-bitquery-docs) - [Analyze a Token ICO with the Transfers API: Mint, Distributor, Investors](#analyze-a-token-ico-with-the-transfers-api-mint-distributor-investors) - [NFT Token Transfers API: ERC-721 and ERC-1155 Transfers on Ethereum](#nft-token-transfers-api-erc-721-and-erc-1155-transfers-on-ethereum) - [Base Jump API: Trace a Launchpad Token on Base from Mint to First Trades](#base-jump-api-trace-a-launchpad-token-on-base-from-mint-to-first-trades) - [BSC Smart Contract Events API | Bitquery Docs](#bsc-smart-contract-events-api-bitquery-docs) - [BSC Smart Contract Calls API | Bitquery Docs](#bsc-smart-contract-calls-api-bitquery-docs) - [Robinhood Chain API: Trades, Pons Launchpad and Real-Time Streams](#robinhood-chain-api-trades-pons-launchpad-and-real-time-streams) - [EVM Token Supply API | Bitquery Docs](#evm-token-supply-api-bitquery-docs) - [APE Store API - Base Chain Token Trades & Transaction Data](#ape-store-api-base-chain-token-trades-transaction-data) - [Ethereum Eth Getlogs | Bitquery Docs](#ethereum-eth-getlogs-bitquery-docs) - [What are Internal Transactions & How to Get Them?](#what-are-internal-transactions-how-to-get-them-) - [Robinhood Transactions & Receipts API | Bitquery Docs](#robinhood-transactions-receipts-api-bitquery-docs) - [Arbitrum Token Market Cap API | Bitquery Docs](#arbitrum-token-market-cap-api-bitquery-docs) - [Base Chain Token Transfers API | Bitquery Docs](#base-chain-token-transfers-api-bitquery-docs) - [Ethereum NFT API | Bitquery Docs](#ethereum-nft-api-bitquery-docs) - [Ethereum NFT Transfer API | Bitquery Docs](#ethereum-nft-transfer-api-bitquery-docs) - [Ethereum Pancakeswap API | Bitquery Docs](#ethereum-pancakeswap-api-bitquery-docs) - [Base Slippage API | Bitquery Docs](#base-slippage-api-bitquery-docs) - [BSC Token Market Cap API: Market Cap, FDV and Supply of BNB Chain Tokens](#bsc-token-market-cap-api-market-cap-fdv-and-supply-of-bnb-chain-tokens) - [Ethereum Pepe API | Bitquery Docs](#ethereum-pepe-api-bitquery-docs) - [eth_getTransactionByHash | Bitquery Docs](#eth-gettransactionbyhash-bitquery-docs) - [Base Gas Balance Tracker: Fees Paid by Senders and Collected by Vaults](#base-gas-balance-tracker-fees-paid-by-senders-and-collected-by-vaults) - [Robinhood Token Supply API | Bitquery Docs](#robinhood-token-supply-api-bitquery-docs) - [Robinhood Calls & Traces API — WebSocket Streams](#robinhood-calls-traces-api-websocket-streams) - [trench.today API on Robinhood | Bitquery Docs](#trench-today-api-on-robinhood-bitquery-docs) - [BSC Miner Balance Tracker: Block Producer Rewards on BNB Chain](#bsc-miner-balance-tracker-block-producer-rewards-on-bnb-chain) - [Base Network Coins API | Bitquery Docs](#base-network-coins-api-bitquery-docs) - [debug_traceCall with Bitquery: Trace Internal Calls Without a Node](#debug-tracecall-with-bitquery-trace-internal-calls-without-a-node) - [Ethereum Self-Destruct Balance Tracker | Bitquery Docs](#ethereum-self-destruct-balance-tracker-bitquery-docs) - [Base Token Market Cap API: Market Cap, FDV and Supply for Tokens on Base](#base-token-market-cap-api-market-cap-fdv-and-supply-for-tokens-on-base) - [BNB Chain Gra Fun API | Bitquery Docs](#bnb-chain-gra-fun-api-bitquery-docs) - [Base API Documentation | Bitquery Docs](#base-api-documentation-bitquery-docs) - [BSC Transaction Balance Tracker: Balances Before and After a Transaction](#bsc-transaction-balance-tracker-balances-before-and-after-a-transaction) - [Ethereum Token Holder API | Bitquery Docs](#ethereum-token-holder-api-bitquery-docs) - [Base Transaction Balance Tracker: Balances Before and After a Transaction](#base-transaction-balance-tracker-balances-before-and-after-a-transaction) - [Base Liquidity API: Uniswap and PancakeSwap Pool Reserves in Real Time](#base-liquidity-api-uniswap-and-pancakeswap-pool-reserves-in-real-time) - [Aerodrome Finance API — Base DEX Trades & Liquidity](#aerodrome-finance-api-base-dex-trades-liquidity) - [Ethereum Uniswap v4 API: Swaps, PoolIds, Pool Stats, Traders and Reserves](#ethereum-uniswap-v4-api-swaps-poolids-pool-stats-traders-and-reserves) - [Uniswap V3 Position API: Mints, Burns, Liquidity Changes and Fee Collections](#uniswap-v3-position-api-mints-burns-liquidity-changes-and-fee-collections) - [BSC Mempool Stream - Real-Time Transaction Monitoring](#bsc-mempool-stream-real-time-transaction-monitoring) - [Cardano Coinpath API - Trace ADA Flows Across Multiple Hops](#cardano-coinpath-api-trace-ada-flows-across-multiple-hops) - [Polygon (MATIC) NFT API | Bitquery Docs](#polygon-matic-nft-api-bitquery-docs) - [Cardano Blocks API - Query Blocks by Height, Slot & Epoch](#cardano-blocks-api-query-blocks-by-height-slot-epoch) - [Cardano Transactions API - Fees, Inputs, Outputs & Mints](#cardano-transactions-api-fees-inputs-outputs-mints) - [Cardano Inputs and Outputs API | Bitquery Docs](#cardano-inputs-and-outputs-api-bitquery-docs) - [Cardano Mints API - Track Native Token Mints | Bitquery Docs](#cardano-mints-api-track-native-token-mints-bitquery-docs) - [Cardano Address API | Bitquery Docs](#cardano-address-api-bitquery-docs) - [Bitcoin Fee API | Bitquery Docs](#bitcoin-fee-api-bitquery-docs) - [Bitcoin Omni Transactions | Bitquery Docs](#bitcoin-omni-transactions-bitquery-docs) - [Algorand Smart Contract Calls API | Bitquery Docs](#algorand-smart-contract-calls-api-bitquery-docs) - [Algorand Address API | Bitquery Docs](#algorand-address-api-bitquery-docs) - [Bitcoin Blocks API | Bitquery Docs](#bitcoin-blocks-api-bitquery-docs) - [Optimism Transfers API: Token and ETH Transfers, Whale Alerts, Backfills](#optimism-transfers-api-token-and-eth-transfers-whale-alerts-backfills) - [Bitcoin Transactions API | Bitquery Docs](#bitcoin-transactions-api-bitquery-docs) - [Arbitrum Cross Chain API | Bitquery Docs](#arbitrum-cross-chain-api-bitquery-docs) - [Arbitrum Smart Contract Calls API | Bitquery Docs](#arbitrum-smart-contract-calls-api-bitquery-docs) - [Arbitrum Smart Contract Events API | Bitquery Docs](#arbitrum-smart-contract-events-api-bitquery-docs) - [Optimism API Documentation | Bitquery Docs](#optimism-api-documentation-bitquery-docs) - [Arbitrum TimeBoost API & Streams | Bitquery Docs](#arbitrum-timeboost-api-streams-bitquery-docs) - [Cardano API Documentation | Bitquery Docs](#cardano-api-documentation-bitquery-docs) - [GMX Staking API on Arbitrum | Bitquery Docs](#gmx-staking-api-on-arbitrum-bitquery-docs) - [Arbitrum Transactions API | Bitquery Docs](#arbitrum-transactions-api-bitquery-docs) - [Optimism DEX Trades API: Every Swap on Optimism, Pairs, Traders and Prices](#optimism-dex-trades-api-every-swap-on-optimism-pairs-traders-and-prices) - [Ethereum Blocks API | Bitquery Docs](#ethereum-blocks-api-bitquery-docs) - [Optimism Uniswap v4 API: Pools by PoolId, Swaps, Traders and Reserves](#optimism-uniswap-v4-api-pools-by-poolid-swaps-traders-and-reserves) - [SmartContract Calls API | Bitquery Docs](#smartcontract-calls-api-bitquery-docs) - [Polygon Transfers API: Token and POL Transfers, Whale Alerts, Backfills](#polygon-transfers-api-token-and-pol-transfers-whale-alerts-backfills) - [Bitcoin API Documentation | Bitquery Docs](#bitcoin-api-documentation-bitquery-docs) - [Get Supply and Marketcap of a Token | Bitquery Docs](#get-supply-and-marketcap-of-a-token-bitquery-docs) - [Ethereum Fees API | Bitquery Docs](#ethereum-fees-api-bitquery-docs) - [Cardano Djed Stablecoin API | Bitquery Docs](#cardano-djed-stablecoin-api-bitquery-docs) - [BNB Chain Transfers API | Bitquery Docs](#bnb-chain-transfers-api-bitquery-docs) - [Arbitrum Address Balance API | Bitquery Docs](#arbitrum-address-balance-api-bitquery-docs) - [BNB Chain Slippage API | Bitquery Docs](#bnb-chain-slippage-api-bitquery-docs) - [Base Clanker API | Bitquery Docs](#base-clanker-api-bitquery-docs) - [Polygon (Matic) Token Market Cap API | Bitquery Docs](#polygon-matic-token-market-cap-api-bitquery-docs) - [Lighter Perp DEX on Robinhood Chain API | Bitquery Docs](#lighter-perp-dex-on-robinhood-chain-api-bitquery-docs) - [Ethereum Transaction Balance Tracker | Bitquery Docs](#ethereum-transaction-balance-tracker-bitquery-docs) - [Ethereum NFT Calls API | Bitquery Docs](#ethereum-nft-calls-api-bitquery-docs) - [Getting Latest Pairs | Bitquery Docs](#getting-latest-pairs-bitquery-docs) - [Pair Creation Time API | Bitquery Docs](#pair-creation-time-api-bitquery-docs) - [Ethereum Transaction Balance Tracker API | Bitquery Docs](#ethereum-transaction-balance-tracker-api-bitquery-docs) - [Solana Fee Anatomy - Base, Priority and Jito Tips](#solana-fee-anatomy-base-priority-and-jito-tips) - [Ethereum NFT Balance API | Bitquery Docs](#ethereum-nft-balance-api-bitquery-docs) - [Ethereum Smartcontract Filterby | Bitquery Docs](#ethereum-smartcontract-filterby-bitquery-docs) - [Ethereum Mempool API | Bitquery Docs](#ethereum-mempool-api-bitquery-docs) - [Ethereum MEV Balance Tracker | Bitquery Docs](#ethereum-mev-balance-tracker-bitquery-docs) - [Ethereum Miner Balance Tracker: Block Producer Income After the Merge](#ethereum-miner-balance-tracker-block-producer-income-after-the-merge) - [Arbitrum Slippage API: How Much a Pool Can Absorb at Each Slippage Level](#arbitrum-slippage-api-how-much-a-pool-can-absorb-at-each-slippage-level) - [Ethereum Eth Gasprice | Bitquery Docs](#ethereum-eth-gasprice-bitquery-docs) - [debug_traceTransaction | Bitquery Docs](#debug-tracetransaction-bitquery-docs) - [Ethereum Fluid DEX API | Bitquery Docs](#ethereum-fluid-dex-api-bitquery-docs) - [Ethereum NFT Metadata API | Bitquery Docs](#ethereum-nft-metadata-api-bitquery-docs) - [Base MEV Balance Tracker | Bitquery Docs](#base-mev-balance-tracker-bitquery-docs) - [Ethereum Gas Balance Tracker | Bitquery Docs](#ethereum-gas-balance-tracker-bitquery-docs) - [Ethereum Validator Balance Tracker | Bitquery Docs](#ethereum-validator-balance-tracker-bitquery-docs) - [BNB Chain Uniswap API | Bitquery Docs](#bnb-chain-uniswap-api-bitquery-docs) - [Crypto Coin Ticker API | Bitquery Docs](#crypto-coin-ticker-api-bitquery-docs) - [eth_getTransactionReceipt | Bitquery Docs](#eth-gettransactionreceipt-bitquery-docs) - [Ethereum Eth Subscribe | Bitquery Docs](#ethereum-eth-subscribe-bitquery-docs) - [Ethereum Eth Getcode | Bitquery Docs](#ethereum-eth-getcode-bitquery-docs) - [eth_getBlockReceipts | Bitquery Docs](#eth-getblockreceipts-bitquery-docs) - [Ethereum Eth Getbalance API | Bitquery Docs](#ethereum-eth-getbalance-api-bitquery-docs) - [Arbitrum Liquidity API: Pool Reserves and Liquidity Changes in Real Time](#arbitrum-liquidity-api-pool-reserves-and-liquidity-changes-in-real-time) - [Base Address Balance API | Bitquery Docs](#base-address-balance-api-bitquery-docs) - [Ethereum NFT Collection API: Token List, Holders and Transfers](#ethereum-nft-collection-api-token-list-holders-and-transfers) - [Arbitrum API Documentation | Bitquery Docs](#arbitrum-api-documentation-bitquery-docs) - [Base Transfer Balance Tracker | Bitquery Docs](#base-transfer-balance-tracker-bitquery-docs) - [Balances API Documentation | Bitquery Docs](#balances-api-documentation-bitquery-docs) - [Ethereum Token Balance API: ERC-20 Balances, Supply and Market Cap](#ethereum-token-balance-api-erc-20-balances-supply-and-market-cap) - [Solana Raydium Cpmm API | Bitquery Docs](#solana-raydium-cpmm-api-bitquery-docs) - [Ethereum NFT Ownership API | Bitquery Docs](#ethereum-nft-ownership-api-bitquery-docs) - [BSC MEV Balance Tracker: Priority Fees and Block Producer Income](#bsc-mev-balance-tracker-priority-fees-and-block-producer-income) - [BSC Gas Balance Tracker: Gas Bought, Refunded and Collected on BNB Chain](#bsc-gas-balance-tracker-gas-bought-refunded-and-collected-on-bnb-chain) - [Pump.fun to PumpSwap API - Token Migration Tracking](#pump-fun-to-pumpswap-api-token-migration-tracking) - [BSC Validator Balance Tracker | Bitquery Docs](#bsc-validator-balance-tracker-bitquery-docs) - [BNB Chain Uniswap v4 API: Stablecoin Pools, Swaps, Traders and Reserves](#bnb-chain-uniswap-v4-api-stablecoin-pools-swaps-traders-and-reserves) - [Get the Latest Block Number with Bitquery Instead of eth_blockNumber](#get-the-latest-block-number-with-bitquery-instead-of-eth-blocknumber) - [Base Self-Destruct Balance Tracker: Why Base Shows None, and What to Watch](#base-self-destruct-balance-tracker-why-base-shows-none-and-what-to-watch) --- # Bitquery API Product Comparison | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/api-comparison/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Looking specifically for trading / DEX data? This page compares **delivery methods** (GraphQL Query vs Subscription vs Kafka). For the **trading-data product choice** (chain-level `DEXTrades` / `DEXTradeByTokens` vs the curated `Trading` cube), see the dedicated [**Trading Data Overview**](https://docs.bitquery.io/docs/trading/trading-data-overview/) . To choose the right Bitquery API offering, it helps to understand their differences. The table below summarizes key features and capabilities of GraphQL Query vs GraphQL Subscription vs Kafka Streams: | Feature / Method | GraphQL Query | GraphQL Subscription (WebSocket) | Kafka Streams (Protobuf) | | --- | --- | --- | --- | | **Use case** | On‑demand historical + real‑time via polling | Real-time pushes for new on-chain events | High‑throughput, event-driven pipelines | | **Data model** | Flexible GraphQL with filtering, aggregation | Same GraphQL query syntax, live updates | Topic-based structured streams with JSON or Protobuf | | **Latency** | ~1 sec | ~1 sec latency | Sub‑second; streamed within 500 ms, supports HFT | | **Delivery model** | Pull via REST/GraphQL | Push over WebSocket (GraphQL subscription) | Consumer‑driven pull from Kafka broker | | **Schema granularity** | Customizable projections | Customizable projection | Kafka topics per type (e.g., dextrades, transactions) | | **Ordering & duplication** | Strong consistency in query response | No guaranteed order; WebSocket delivery | Consumer logic needed | | **Authentication** | OAuth/API‑Key | OAuth token over WebSocket | SASL username, password | | **Ideal Implementation Language** | Any language | Any language except curl | Go, Java, Python, Rust | | **Best for** | Interactive apps, ad-hoc querying | Monitoring, alerts, dashboards, mempool events | Streaming pipelines, HFT, data lakes, analytics workloads | When to Use Each API[​](https://docs.bitquery.io/docs/api-comparison/#when-to-use-each-api "Direct link to When to Use Each API") ---------------------------------------------------------------------------------------------------------------------------------- ### GraphQL Queries[​](https://docs.bitquery.io/docs/api-comparison/#graphql-queries "Direct link to GraphQL Queries") **Best for on-demand, ad-hoc, and historical data needs:** * When you need to fetch past blockchain activity (trades, transfers, balances) * For dashboards, reports, and analytics that rely on filtering, sorting, and pagination * When requests are driven by user actions or scheduled jobs * Ideal for combining historical + near-real-time data via polling ### GraphQL Subscriptions (WebSocket)[​](https://docs.bitquery.io/docs/api-comparison/#graphql-subscriptions-websocket "Direct link to GraphQL Subscriptions (WebSocket)") **Ideal for lightweight real-time updates and UI integration:** * When you want push-based delivery of live on-chain events (e.g., swaps, transfers, new blocks) * For wallet trackers, price alerts, or monitoring dashboards * When you need low-latency updates (~500 ms) but don’t require ultra-high throughput * Perfect for embedding live feeds into web or mobile interfaces ### Kafka Streams (JSON / Protobuf)[​](https://docs.bitquery.io/docs/api-comparison/#kafka-streams-json--protobuf "Direct link to Kafka Streams (JSON / Protobuf)") **Perfect for high-throughput, fault-tolerant streaming pipelines:** * When you need sub-second end-to-end latency for trades, mempool events, or order books * For building scalable data lakes, HFT bots, or real-time analytics systems * When you require integration with Kafka-based ecosystems Pick Queries for flexibility and history, Subscriptions for easy real-time UI feeds, and Kafka Streams when you need industrial-scale, ultra-low-latency pipelines. How do I specify dataset: realtime vs archive in an API v1 query?[​](https://docs.bitquery.io/docs/api-comparison/#how-do-i-specify-dataset-realtime-vs-archive-in-an-api-v1-query "Direct link to How do I specify dataset: realtime vs archive in an API v1 query?") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This site documents **API V2** GraphQL, where you set **`dataset`** on the root field (for example **`EVM(dataset: archive)`** or **`Solana(dataset: combined)`**)—see [Dataset options](https://docs.bitquery.io/docs/graphql/dataset/options/) . **API V1** uses a **different endpoint and schema**; realtime/archive semantics are **not** expressed the same way. For V1 query shapes and examples, use **[Bitquery V1 documentation](https://docs.bitquery.io/v1/) ** and the [V1 examples catalog](https://docs.bitquery.io/v1/docs/category/examples) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [When to Use Each API](https://docs.bitquery.io/docs/api-comparison/#when-to-use-each-api) * [GraphQL Queries](https://docs.bitquery.io/docs/api-comparison/#graphql-queries) * [GraphQL Subscriptions (WebSocket)](https://docs.bitquery.io/docs/api-comparison/#graphql-subscriptions-websocket) * [Kafka Streams (JSON / Protobuf)](https://docs.bitquery.io/docs/api-comparison/#kafka-streams-json--protobuf) * [How do I specify dataset: realtime vs archive in an API v1 query?](https://docs.bitquery.io/docs/api-comparison/#how-do-i-specify-dataset-realtime-vs-archive-in-an-api-v1-query) --- # Generate a Bitquery API Token | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/authorization/how-to-generate/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section, we will see how OAuth is used to generate a token. Authorization menu (account UI)[​](https://docs.bitquery.io/docs/authorization/how-to-generate/#authorization-menu-account-ui "Direct link to Authorization menu (account UI)") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sign in at [account.bitquery.io](https://account.bitquery.io/) . In the top navigation bar, open **Authorization**. It is a dropdown with two entries: * **Applications** — list of your apps, token lifespan per app, **Tokens** / **Revoke** actions in each row, and **\+ New Application** to create one. * **Tokens** — generate and copy access tokens for a chosen application. The page below shows **Authorization** with **Applications** selected (active tab). A short doc link appears above the table; use **\+ New Application** to add an app. ![Authorization menu — Applications page at account.bitquery.io](https://docs.bitquery.io/assets/images/authorization-applications-144191acc2bc31e2b7c0e5505491f1c1.png) Direct links (same pages as the menu items): [Applications](https://account.bitquery.io/user/api_v2/applications) · [Access tokens](https://account.bitquery.io/user/api_v2/access_tokens) . The first step is to create an application: 1. **Create an Application**: Open **Authorization → Applications** (or go to the [Applications](https://account.bitquery.io/user/api_v2/applications) page) and click **\+ New Application**. Enter a name for your application and select an expiration time for the access tokens. Confirm creation. 2. **Generate Access Token**: We provide two methods to generate a token: * You can generate a token for your application with a set expiration time. * Or you can use your client ID-secret from your application to make a POST request to [https://oauth2.bitquery.io/oauth2/token](https://oauth2.bitquery.io/oauth2/token) and get a token programmatically. Example: curl -X POST "https://oauth2.bitquery.io/oauth2/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "grant_type=client_credentials" \ --data-urlencode "client_id=YOUR_CLIENT_ID" \ --data-urlencode "client_secret=YOUR_CLIENT_SECRET" \ --data-urlencode "scope=api" Sample response: {"access_token":"","expires_in":17999,"scope":"api","token_type":"bearer"} > **If you have no applications created, the `Bearer` token changes every 12 hours. If the token is invalid, you get "Unauthorized" message.** Generating a Token with Set Expiration Time[​](https://docs.bitquery.io/docs/authorization/how-to-generate/#generating-a-token-with-set-expiration-time "Direct link to Generating a Token with Set Expiration Time") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. Open **Authorization → Applications** and click **Tokens** on the row for your application (or use **Authorization → Tokens** / the [Access tokens](https://account.bitquery.io/user/api_v2/access_tokens) page and choose the application). You will land on that app’s token page (URL like `/user/api_v2/applications/`), which lists **Manually created access tokens**, the access token lifespan, and actions for each token. ![Application token page — manually created access tokens, Generate New Token](https://docs.bitquery.io/assets/images/authorization-application-tokens-514629f8f6d5f47c42a82402b14d596b.png) 2. Click **Generate New Token** (or **Generate Access Token**, depending on the UI label). 3. For the new **Active** token, click **Copy** next to the token value (or copy the value safely another way) and store it in a secure location. ![Manually created access tokens — Copy button next to an active token](https://docs.bitquery.io/assets/images/authorization-copy-token-31987f1b4fadd340319ba35a90bb17d8.png) **Using the token:** To utilize the token you've copied from the api\_v2/access\_tokens page, use the code generation feature on your IDE to obtain the code in your preferred programming language. However, **remember to paste the token you've copied from the api\_v2/access\_tokens page**. This is necessary because the IDE code generator only displays temporary tokens. ![temporary](https://docs.bitquery.io/assets/images/temporarytoken-6a9cfc7a75f7c20403ab81cfa5563acc.png) For example, you can include the token in the header as shown below: Authorization: Bearer Refer Postman examples [here](https://www.postman.com/interstellar-eclipse-270749/workspace/bitquery) **Revoking an Access Token** If you believe that your access token has been compromised, open **Authorization → Applications** and click **Revoke** on the row for that application (some rows also link to **Tokens** for that app). ![revoke](https://docs.bitquery.io/assets/images/revoke-321e71b951677df286e66c41dfe7d4f2.png) Generating a Token Programmatically[​](https://docs.bitquery.io/docs/authorization/how-to-generate/#generating-a-token-programmatically "Direct link to Generating a Token Programmatically") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Remember that this approach requires more effort to implement. It is suitable for applications with a high risk of token theft or misuse. This approach expects you to programmatically generate an access token using your client ID and client secret of an application. ![client](https://docs.bitquery.io/assets/images/clientid_secret-485d4af4a25b27954b2abc334f74556f.png) **Using curl** Replace `YOUR_CLIENT_ID` and `YOUR_CLIENT_SECRET` with your application's client ID and client secret: curl -X POST "https://oauth2.bitquery.io/oauth2/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "grant_type=client_credentials" \ --data-urlencode "client_id=YOUR_CLIENT_ID" \ --data-urlencode "client_secret=YOUR_CLIENT_SECRET" \ --data-urlencode "scope=api" **Using Python** Below is a code snippet in Python that shows you how to programmatically generate a token and use the API, replace the placeholders with actual information. Ensure that `scope=api` is mentioned in the payload, import requestsimport jsondef oAuth_example(): url = "https://oauth2.bitquery.io/oauth2/token" payload = 'grant_type=client_credentials&client_id=YOUR_ID_HERE&client_secret=YOUR_SECRET_HERE&scope=api' headers = {'Content-Type': 'application/x-www-form-urlencoded'} response = requests.request("POST", url, headers=headers, data=payload) resp = json.loads(response.text) print(resp) access_token=resp['access_token'] url_graphql = "https://streaming.bitquery.io/graphql" headers_graphql = { 'Content-Type': 'application/json', 'Authorization': f'Bearer {access_token}' } //use the token to send a requestoAuth_example() The response will include details on `scope` and `expiration time` of the token. A sample response looks like this: {'access_token': 'ory_at_sKK8sSq8', 'expires_in': 2627999, 'scope': 'api', 'token_type': 'bearer'} **Deleting an Application** If you no longer need an application, open **Authorization → Applications** and remove it using the action shown for that row (for example **Delete** or **Revoke**, depending on application type). All tokens for that application will stop working. **Billing Considerations** * Billing remains consistent across API v1 and v2. * Purchase points once and utilize them for either v1 or v2 in any combination. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Authorization menu (account UI)](https://docs.bitquery.io/docs/authorization/how-to-generate/#authorization-menu-account-ui) * [Generating a Token with Set Expiration Time](https://docs.bitquery.io/docs/authorization/how-to-generate/#generating-a-token-with-set-expiration-time) * [Generating a Token Programmatically](https://docs.bitquery.io/docs/authorization/how-to-generate/#generating-a-token-programmatically) --- # How to Use Bitquery API Token - Authorization Examples [Skip to main content](https://docs.bitquery.io/docs/authorization/how-to-use/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) Copy MD Regardless of how you obtain your token, whether generated directly in the IDE or using a client ID-secret combination, the process for using the token remains consistent. * You mention the token in the headers like this `'Authorization': f'Bearer {access_token}'` OR * You attach the token in the URL `https://streaming.bitquery.io/graphql?token=ory_at_...` For the `wss` endpoint, the 2nd method is the only way, read more [here](https://docs.bitquery.io/docs/authorization/websocket/) Below is an example in Python that mentions the token in the header. import requestsimport jsondef oAuth_example(): //access_token generated using either of the two approaches # Step 2: Make Streaming API query url_graphql = "https://streaming.bitquery.io/graphql" headers_graphql = { 'Content-Type': 'application/json', 'Authorization': f'Bearer {access_token}' } graphql_query = ''' { EVM(mempool: true, network: eth) { DEXTrades(limit: {count: 10}) { Transaction { Hash } Trade { Buy { Amount Currency { Name } Buyer } Sell { Amount Currency { Name } Buyer } } } } } ''' payload_graphql = json.dumps({'query': graphql_query}) # Step 3: Make request to Streaming API response_graphql = requests.post(url_graphql, headers=headers_graphql, data=payload_graphql) # Print the response print(response_graphql.text)oAuth_example() Remember to replace `{access_token}` with your actual access token. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) --- # Authenticate Bitquery WebSockets | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/authorization/websocket/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD When it comes to authenticating websockets the token can be included only in the following manner: `wss://streaming.bitquery.io/graphql?token=ory*at*..` with the token attached to the URL. The request should include only two headers: Sec-WebSocket-Protocol: graphql-wsContent-Type: application/json Refer this [this](https://www.postman.com/interstellar-eclipse-270749/workspace/bitquery/ws-raw-request/659811c95188ca95c7b9e569?action=share&creator=27392958&ctx=documentation) link for postman example of how to use OAuth with websockets. Example: connecting with graphql-ws (JavaScript)[​](https://docs.bitquery.io/docs/authorization/websocket/#example-connecting-with-graphql-ws-javascript "Direct link to Example: connecting with graphql-ws (JavaScript)") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Pass the OAuth token in the connection URL and use the `graphql-ws` subprotocol: import { createClient } from "graphql-ws";const client = createClient({ url: "wss://streaming.bitquery.io/graphql?token=ory_at_YOUR_TOKEN", // Bitquery expects the token in the URL (not an Authorization header) for WebSockets.}); * Generate the token in [Account → API Access Tokens](https://account.bitquery.io/user/api_v2/access_tokens) ; see [how to generate a token](https://docs.bitquery.io/docs/authorization/how-to-generate/) . * Revoking a token does **not** close an already-open socket — terminate running subscriptions from the account panel. Next steps[​](https://docs.bitquery.io/docs/authorization/websocket/#next-steps "Direct link to Next steps") ------------------------------------------------------------------------------------------------------------- * [WebSocket subscriptions](https://docs.bitquery.io/docs/subscriptions/websockets/) * [Rate limits & concurrency](https://docs.bitquery.io/docs/plans/rate-limits/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Example: connecting with graphql-ws (JavaScript)](https://docs.bitquery.io/docs/authorization/websocket/#example-connecting-with-graphql-ws-javascript) * [Next steps](https://docs.bitquery.io/docs/authorization/websocket/#next-steps) --- # Algorand Arguments API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-arguments-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD When Bitquery parses an Algorand smart contract call or event, the Arguments API exposes each argument's index, type, and value alongside transaction and block context. Use it to inspect app call payloads, filter calls by specific argument values, or build dashboards around on-chain program activity. Endpoint Algorand GraphQL queries are served at `https://graphql.bitquery.io`. List recent smart contract arguments[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-arguments-api/#list-recent-smart-contract-arguments "Direct link to List recent smart contract arguments") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the 10 most recent parsed arguments across Algorand, with transaction hash, sender, transaction type, and block timestamp. Each row includes the argument index and decoded value. { algorand(network: algorand) { arguments(options: {limit: 10, desc: "block.timestamp.iso8601"}) { argindex block { timestamp { iso8601 } } firstRound genesisId lastRound note transaction { hash } txSender { address annotation } txType value } }} Filter arguments by smart contract address[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-arguments-api/#filter-arguments-by-smart-contract-address "Direct link to Filter arguments by smart contract address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Narrow results to a specific application. You can also filter by `txType`, `txHash`, `argindex`, or `value` depending on what you're looking for. { algorand(network: algorand) { arguments( smartContractAddress: {is: "2TUBOBZ7CP7EZXFOWULEG5HE6WJ34TT7SBZ5AMHGR222O7RZNBK3I4BUMY"} options: {limit: 10, desc: "block.timestamp.iso8601"} ) { argindex value txType transaction { hash } txSender { address } smartContract { address { address } } } }} Related resources[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-arguments-api/#related-resources "Direct link to Related resources") ----------------------------------------------------------------------------------------------------------------------------------------------------- * [Algorand Smart Contract Calls API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/) — call counts and transaction-type filters * [Algorand Transactions API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/) — full transaction details and hash lookups Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [List recent smart contract arguments](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-arguments-api/#list-recent-smart-contract-arguments) * [Filter arguments by smart contract address](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-arguments-api/#filter-arguments-by-smart-contract-address) * [Related resources](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-arguments-api/#related-resources) --- # Algorand Coinpath API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Coinpath walks ALGO and ASA flows between Algorand addresses — forward to see where funds went, backward to see where they came from. The API returns senders, receivers, hop depth, amounts, currency metadata, and transaction details at each level. Common use cases: AML screening, treasury audits, exchange deposit tracing, and source-of-funds verification. Endpoint Algorand GraphQL queries are served at `https://graphql.bitquery.io`. Trace outgoing fund flows from a sender[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/#trace-outgoing-fund-flows-from-a-sender "Direct link to Trace outgoing fund flows from a sender") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the 10 most recent coinpath entries for transfers sent from a specific address after a given date. Swap `sender` for `receiver` to trace incoming flows instead. { algorand(network: algorand) { coinpath( date: {after: "2023-08-05"} options: {desc: "block.timestamp.iso8601", limit: 10} sender: {is: "SENDER_ADDRESS_HERE"} ) { amount block { timestamp { iso8601 } } currency { address name } depth receiver { address } transaction { hash value } } }} Count coinpath transactions received by an address[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/#count-coinpath-transactions-received-by-an-address "Direct link to Count coinpath transactions received by an address") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Counts total coinpath entries received by an address after a given date. Add a `sender` filter to narrow by source, or replace `count` with `amount(calculate: sum)` to get total value moved. { algorand(network: algorand) { coinpath( date: {after: "2023-08-01"} receiver: {is: "BWSNMG43TUYEOHE76J6KDWIY6MU4U6JFJYGAYCZA2RF5IS3XPO3P3G4FEI"} ) { count } }} Related resources[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/#related-resources "Direct link to Related resources") ---------------------------------------------------------------------------------------------------------------------------------------------------- * [Algorand Transfers API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/) — raw ALGO and ASA transfer history * [Algorand Address API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/) — wallet balances and contract bytecode Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Trace outgoing fund flows from a sender](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/#trace-outgoing-fund-flows-from-a-sender) * [Count coinpath transactions received by an address](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/#count-coinpath-transactions-received-by-an-address) * [Related resources](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/#related-resources) --- # Algorand Blocks API - Query Blocks by Proposer [Skip to main content](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-blocks-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Blocks API returns block-level data on Algorand: height, hash, protocol version, proposer, seed, reward, and timestamp. Use it to drive explorer front-ends, monitor chain progression, track validator participation, or aggregate block rewards over time. Endpoint Algorand GraphQL queries are served at `https://graphql.bitquery.io`. Get recent blocks proposed by an address[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-blocks-api/#get-recent-blocks-proposed-by-an-address "Direct link to Get recent blocks proposed by an address") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the 10 most recent blocks proposed by a specific address after a given date, ordered by timestamp descending. Swap the `proposer` filter for a height or time window when you need a broader scan. { algorand(network: algorand) { blocks( date: {after: "2023-08-05"} options: {desc: "timestamp.iso8601", limit: 10} proposer: {is: "PROPOSER_ADDRESS_HERE"} ) { currentProtocol hash height proposer { address } reward seed timestamp { iso8601 } } }} Remove the `proposer` filter to query all blocks in the date range, or adjust `limit` and `date` for different windows. Sum block rewards earned by a proposer[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-blocks-api/#sum-block-rewards-earned-by-a-proposer "Direct link to Sum block rewards earned by a proposer") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregates total block rewards for a proposer address. Add a `date` filter to limit the time range, or swap `sum` for `average` to get mean reward per block. { algorand(network: algorand) { blocks( proposer: {is: "PROPOSER_ADDRESS_HERE"} ) { reward(calculate: sum) } }} Related resources[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-blocks-api/#related-resources "Direct link to Related resources") -------------------------------------------------------------------------------------------------------------------------------------------------- * [Algorand Transactions API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/) — per-block transaction details and daily counts * [Algorand Address API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/) — proposer and wallet balances Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get recent blocks proposed by an address](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-blocks-api/#get-recent-blocks-proposed-by-an-address) * [Sum block rewards earned by a proposer](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-blocks-api/#sum-block-rewards-earned-by-a-proposer) * [Related resources](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-blocks-api/#related-resources) --- # Algorand API Documentation | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Algorand/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Overview[​](https://docs.bitquery.io/docs/blockchain/Algorand/#overview "Direct link to Overview") --------------------------------------------------------------------------------------------------- Bitquery's Algorand APIs let you query the chain through GraphQL — blocks, transactions, ALGO and ASA transfers, address balances, smart contract calls, parsed call arguments, and multi-hop fund flow. Replace the example addresses and asset IDs in any query with your own values to point them at real wallets and assets. If you get stuck or need a data point that isn't covered here, reach out on [Telegram](https://t.me/Bloxy_info) . Endpoint Algorand GraphQL queries are served at `https://graphql.bitquery.io`. ### What you can do with the Algorand API[​](https://docs.bitquery.io/docs/blockchain/Algorand/#what-you-can-do-with-the-algorand-api "Direct link to What you can do with the Algorand API") * Pull blocks by proposer, height, or time window with protocol version, rewards, and timestamps. * Get transactions with fees, types, senders, groups, and daily or per-address counts. * Track ALGO and ASA transfers filtered by asset ID, sender, receiver, or date range. * Look up native ALGO balances, multi-address snapshots, and smart contract bytecode. * Count and filter smart contract calls by transaction type (`pay`, `acfg`, and others). * Read parsed argument names, types, and values from smart contract calls and events. * Trace ALGO and ASA flows across multiple hops with Coinpath. ### How the Algorand API differs from running your own node[​](https://docs.bitquery.io/docs/blockchain/Algorand/#how-the-algorand-api-differs-from-running-your-own-node "Direct link to How the Algorand API differs from running your own node") | Algorand node / indexer | Bitquery Algorand API | | --- | --- | | Raw chain state — you build the indexer | Pre-indexed and parsed: blocks, txs, transfers, app calls | | No historical analytics out of the box | History, joins, aggregations, USD conversion on transfers | | You decode transaction types and app args yourself | GraphQL response — pick the fields you need | | Best for submitting transactions and full validation | Best for analytics, dashboards, wallet UIs, and compliance work | Quick start[​](https://docs.bitquery.io/docs/blockchain/Algorand/#quick-start "Direct link to Quick start") ------------------------------------------------------------------------------------------------------------ This query returns the 5 most recent Algorand blocks with height, hash, reward, proposer, and timestamp. { algorand(network: algorand) { blocks(options: {desc: "height", limit: 5}) { height hash reward proposer { address } timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } }} API reference[​](https://docs.bitquery.io/docs/blockchain/Algorand/#api-reference "Direct link to API reference") ------------------------------------------------------------------------------------------------------------------ ### Core data[​](https://docs.bitquery.io/docs/blockchain/Algorand/#core-data "Direct link to Core data") * [Algorand Blocks API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-blocks-api/) — block lookups by proposer, height, or time, plus reward aggregates. * [Algorand Transactions API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/) — transaction details, daily counts, unique senders, and hash lookups. * [Algorand Transfers API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/) — ALGO and ASA transfer history with USD amounts. ### Addresses and contracts[​](https://docs.bitquery.io/docs/blockchain/Algorand/#addresses-and-contracts "Direct link to Addresses and contracts") * [Algorand Address API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/) — ALGO balances, multi-address lookups, and smart contract bytecode. * [Algorand Smart Contract Calls API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/) — app call counts, transaction-type filters, and new asset creation tracking. * [Algorand Arguments API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-arguments-api/) — parsed argument names, types, and values from calls and events. ### Fund tracing[​](https://docs.bitquery.io/docs/blockchain/Algorand/#fund-tracing "Direct link to Fund tracing") * [Algorand Coinpath API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/) — multi-hop ALGO and ASA flow tracing for compliance and treasury work. More guides[​](https://docs.bitquery.io/docs/blockchain/Algorand/#more-guides "Direct link to More guides") ------------------------------------------------------------------------------------------------------------ * [Data Coverage & Retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) — how far back this chain's data goes * [Common errors and what to do](https://docs.bitquery.io/docs/start/errors/) * [Plans, Points & Limits](https://docs.bitquery.io/docs/plans/how-billing-works/) * [First query in 5 minutes](https://docs.bitquery.io/docs/start/first-query/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Overview](https://docs.bitquery.io/docs/blockchain/Algorand/#overview) * [What you can do with the Algorand API](https://docs.bitquery.io/docs/blockchain/Algorand/#what-you-can-do-with-the-algorand-api) * [How the Algorand API differs from running your own node](https://docs.bitquery.io/docs/blockchain/Algorand/#how-the-algorand-api-differs-from-running-your-own-node) * [Quick start](https://docs.bitquery.io/docs/blockchain/Algorand/#quick-start) * [API reference](https://docs.bitquery.io/docs/blockchain/Algorand/#api-reference) * [Core data](https://docs.bitquery.io/docs/blockchain/Algorand/#core-data) * [Addresses and contracts](https://docs.bitquery.io/docs/blockchain/Algorand/#addresses-and-contracts) * [Fund tracing](https://docs.bitquery.io/docs/blockchain/Algorand/#fund-tracing) * [More guides](https://docs.bitquery.io/docs/blockchain/Algorand/#more-guides) --- # Optimism NFT API: ERC-721 Transfers, Collections and Owners [Skip to main content](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD NFTs on Optimism are ERC-721 and ERC-1155 tokens, and Bitquery indexes every transfer of them in the `Transfers` cube under `EVM(network: optimism)` with `Currency.Fungible` set to `false`. Each row carries the collection contract, the token id, the sender, the receiver and the transaction, so one cube answers "what NFTs moved on Optimism just now", "who owns token 42 of this collection" and "every transfer of a collection since launch". Queries return the latest rows; changing `query` to `subscription` streams new transfers as they land. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. Latest NFT transfers on Optimism[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#latest-nft-transfers-on-optimism "Direct link to Latest NFT transfers on Optimism") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The most recent NFT transfers across all collections. Expect liquidity-position NFTs from DEXs such as Velodrome among them; they are ERC-721 tokens too. { 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 } } }} Transfers of one collection, as they happen[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#transfers-of-one-collection-as-they-happen "Direct link to Transfers of one collection, as they happen") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Filter on the collection contract. The example is the Velodrome Slipstream position NFT, a collection that moves every few seconds, so the stream shows rows at once; the saved IDE subscription [here](https://ide.bitquery.io/Transfers-of-a-particular-NFT#) uses another contract. A quiet collection can go hours between transfers, so test a filter as a query first with `limit` and `orderBy` added. subscription { EVM(network: optimism) { Transfers( where: { Transfer: { Currency: { Fungible: false SmartContract: { is: "0x416b433906b1b72fa758e166e239c43d68dc6f29" } } } } ) { Block { Hash Number } Transfer { Amount Currency { Name Symbol Native } Sender Receiver } } }} Current owner of each token[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#current-owner-of-each-token "Direct link to Current owner of each token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The Holders cube does not carry per-collection balances for NFTs on Optimism, so read ownership from transfers instead: the receiver of a token's latest transfer is its current owner. `limitBy` on the token id keeps one row per token, newest first. Filter `Id` to check one token. { EVM(network: optimism) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x416b433906b1b72fa758e166e239c43d68dc6f29" } } } } orderBy: { descending: Block_Time } limitBy: { by: Transfer_Id, count: 1 } limit: { count: 20 } ) { Block { Time } Transfer { Id Receiver Sender } } }} Useful filters[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#useful-filters "Direct link to Useful filters") ---------------------------------------------------------------------------------------------------------------------------------- * One token: `Id: { is: "42" }` inside `Transfer`. * Mints: `Sender: { is: "0x0000000000000000000000000000000000000000" }`. * One wallet: `Receiver` or `Sender` set to the address. * History: add `dataset: archive` or `combined` to the `EVM` root; without it the query reads the realtime window. Frequently Asked Questions -------------------------- How do I get NFT transfers on Optimism? Query Transfers under EVM(network: optimism) with Currency.Fungible set to false. Each row has the collection contract, token id, sender, receiver and transaction; use limit and orderBy for the latest rows or a subscription to stream them. How do I find who owns an Optimism NFT now? Take the latest transfer of that token id: the Receiver is the current owner. With limitBy on Transfer\_Id the same query returns the current owner of every token that moved inside the window. How do I find NFT mints on Optimism? Mints are transfers from the zero address, so add Sender is 0x0000000000000000000000000000000000000000 to the collection filter; the Receiver is the minter. Does the same query work on other EVM chains? Yes. Change the network name to eth, bsc, base, arbitrum, matic or robinhood and the same Transfers and Holders queries run there. Related pages[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------- * [Optimism API hub](https://docs.bitquery.io/docs/blockchain/Optimism/) * [Optimism transfers API](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/) * [Ethereum NFT collection API](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/) * [Transfers cube](https://docs.bitquery.io/docs/cubes/transfers-cube/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest NFT transfers on Optimism](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#latest-nft-transfers-on-optimism) * [Transfers of one collection, as they happen](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#transfers-of-one-collection-as-they-happen) * [Current owner of each token](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#current-owner-of-each-token) * [Useful filters](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#useful-filters) * [Related pages](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/#related-pages) --- # Optimism Address Balance API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Deprecated APIs On EVM, **`BalanceUpdates`** and **`TokenHolders`** were deprecated as of **20 May 2026** and removed on **15 June 2026**. Use **`EVM.Balances`** (this page) and **[Token Holders API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/) ** (`EVM.Holders`) instead. The **Balances** API returns current and historical token balances for an address on Optimism. To return only non-zero balances, add `Amount(selectWhere: { gt: "0" })` on the `Balance` field (not in `where`). Use `dataset: combined` or `dataset: archive` as follows: | Dataset | When to use | | --- | --- | | **`combined`** | Latest balances. Queries **realtime and archive** databases and merges results. | | **`archive`** | Historical snapshots with `Block.Date`, and balances for **addresses not recently active**. | Examples: [All Token Balances](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-of-an-address) · [Native ETH (Optimism)](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#native-eth-optimism-balance) · [Balance on a Date](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-on-a-specific-date) · [Specific Token](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-for-a-specific-token) · [Holder Snapshot](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#token-holder-snapshot) Balance of an Address[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-of-an-address "Direct link to Balance of an Address") --------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns token balances for a wallet address. Use `Amount(selectWhere: { gt: "0" })` to exclude zero balances. [Run in IDE](https://ide.bitquery.io/Optimism-Balance-of-an-Address) query { EVM(network: optimism, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xacD03D601e5bB1B275Bb94076fF46ED9D753435A" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Native ETH (Optimism) Balance[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#native-eth-optimism-balance "Direct link to Native ETH (Optimism) Balance") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the native ETH balance for a wallet on Optimism (not ERC-20 tokens). Filter with `Currency: { Native: true }` instead of a token contract address. [Run in IDE](https://ide.bitquery.io/optimism-native-balances-address) query { EVM(network: optimism, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xacD03D601e5bB1B275Bb94076fF46ED9D753435A" } } Currency: { Native: true } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} **Parameters** * `network: optimism`: Optimism mainnet. * `dataset: combined`: Merges realtime and archive data for the latest balance state. * `Balance.Address`: Wallet address to query. * `Currency.Native: true`: Native ETH on Optimism only (see [Native ETH (Optimism) Balance](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#native-eth-optimism-balance) ). **Returned fields** * `Currency.Symbol`, `Currency.SmartContract`: Token metadata. * `Balance.Amount`, `Balance.AmountInUSD`: Token balance and USD value (use `selectWhere` to filter non-zero amounts). Balance on a Specific Date[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-on-a-specific-date "Direct link to Balance on a Specific Date") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Use `Block.Date.till` for a point-in-time snapshot. Use `dataset: archive` for historical dates and addresses not recently active. [Run in IDE](https://ide.bitquery.io/optimism-balances-by-date) query { EVM(network: optimism, dataset: archive) { Balances( where: { Block: { Date: { till: "2026-05-01" } } Balance: { Address: { is: "0xacD03D601e5bB1B275Bb94076fF46ED9D753435A" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Balance for a Specific Token[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-for-a-specific-token "Direct link to Balance for a Specific Token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Add a `Currency.SmartContract` filter. Always use the contract address, not the token name. Use `0x` for native ETH on Optimism, or the ERC-20 contract address for a token. [Run in IDE](https://ide.bitquery.io/optimism-balances-specific-token) query { EVM(network: optimism, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xacD03D601e5bB1B275Bb94076fF46ED9D753435A" } } Currency: { SmartContract: { is: "0x23ee2343b892b1bb63503a4fabc840e0e2c6810f" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Token Holder Snapshot[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#token-holder-snapshot "Direct link to Token Holder Snapshot") --------------------------------------------------------------------------------------------------------------------------------------------------------------- The number of unique holders, token supply, and Gini coefficient for the balance amount before a specific timestamp can be derived using the query below. These stats provide a useful holder snapshot for any given time. [Run in IDE](https://ide.bitquery.io/token-holder-snapshot-optimism) Click to expand GraphQL query query { EVM(network: optimism, dataset: archive) { Holders( where: { Currency: { SmartContract: { is: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58" } } Balance: { Amount: { gt: "0" } LastChangeTime: { till: "2026-05-20T00:00:00Z" } } Holder: { Address: { not: "0x" } } } ) { Balance { LastChangeTime(maximum: Balance_LastChangeTime) } holders: uniq(of: Holder_Address) supply: sum(of: Balance_Amount) gini(of: Balance_Amount) } }} Balance History by Date[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-history-by-date "Direct link to Balance History by Date") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns balance snapshots over time for an address. Use `dataset: archive`. Order by `Block_Date` descending and use `limit` to paginate. Add `Currency.SmartContract` under `Currency` to filter by a specific token. [Run in IDE](https://ide.bitquery.io/optimism-balances-history-address) query { EVM(network: optimism, dataset: archive) { Balances( where: { Balance: { Address: { is: "0xacD03D601e5bB1B275Bb94076fF46ED9D753435A" } } Currency: {} } orderBy: { descending: Block_Date } limit: { count: 100 } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD } Block { Date } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Balance of an Address](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-of-an-address) * [Native ETH (Optimism) Balance](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#native-eth-optimism-balance) * [Balance on a Specific Date](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-on-a-specific-date) * [Balance for a Specific Token](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-for-a-specific-token) * [Token Holder Snapshot](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#token-holder-snapshot) * [Balance History by Date](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/#balance-history-by-date) --- # Migrate from Bitquery API v1 to v2 | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Overview[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#overview "Direct link to Overview") ------------------------------------------------------------------------------------------------------ V2 APIs are designed to provide real-time blockchain data without any delay. It combines both real-time and historical data. You can read more on the differences [here](https://docs.bitquery.io/v1/docs/graphql-ide/v1-and-v2) Below, you'll find key changes and instructions on how to adapt your existing v1 queries to the v2 format. Authentication in v1 vs v2[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#authentication-in-v1-vs-v2 "Direct link to Authentication in v1 vs v2") ------------------------------------------------------------------------------------------------------------------------------------------------------------ One of the major differences between v1 and v2 is the way API is authenticated. In v1, you use a API-KEY to authenticate your requests to `graphql.bitquery.io`. And in v2, you use OAuth token mentioned as `Bearer ory_...yourtoken` and authenticate your requests to `streaming.bitquery.io/graphql`. Read more on how to generate token [here](https://docs.bitquery.io/docs/authorization/how-to-generate/) . Changes in Network Specification[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#changes-in-network-specification "Direct link to Changes in Network Specification") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ * **v1:** Specified using a generic identifier within a function, e.g., `ethereum(network: ethereum)`. * **v2:** Now requires a more specific `network` identifier and inclusion of a `dataset`. Example: `EVM(network: eth, dataset: combined)`. **Example Conversion:** * **v1 Query:** query MyQuery { ethereum(network: ethereum) { blocks { count } }} * **v2 Query:** query { EVM(network: eth, dataset: combined) { Blocks { count } }} Schema and Data Access[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#schema-and-data-access "Direct link to Schema and Data Access") ------------------------------------------------------------------------------------------------------------------------------------------------ The v2 API maintains a similar schema structure but integrates new data cubes such as `balanceUpdates`, `tokenHolders`, and `DexTradeByTokens`. The ability to click-select in the schema builder is still available in v2, facilitating easier transition and query building. If you're new to v2, check more examples on: [TokenHolder APIs](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/) [balanceUpdates](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/) [DexTradeByTokens](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/token-trades-apis/) Smart Contract Interactions[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#smart-contract-interactions "Direct link to Smart Contract Interactions") --------------------------------------------------------------------------------------------------------------------------------------------------------------- * **v1:** Data is accessed through `smartContractCalls` and `smartContractEvents`. * **v2:** Simplified to `Calls` and `Events`. Handling Arguments and Values[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#handling-arguments-and-values "Direct link to Handling Arguments and Values") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- One of the major differences in v2 is how arguments and their values are handled and accessed. * **v1:** Arguments and values are accessed using filters based on the argument name. token0: any(of: argument_value, argument: { is: "token0" }) * **v2:** Arguments are explicitly defined by data type, providing more structured access and clearer query definitions. Arguments { Name Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } }} Aggregation : From v1 to v2[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#aggregation--from-v1-to-v2 "Direct link to Aggregation : From v1 to v2") -------------------------------------------------------------------------------------------------------------------------------------------------------------- Let's take this query in v1, where we get total number of unique currencies traded on Ethereum on a particular day. The `count` and `sum` aggregation is available in both v1 and v2. query MyQuery { ethereum(network: ethereum) { dexTrades(date: {is: "2024-01-01"}) { Unique_tokens_bought: count(uniq: buy_currency) Unique_tokens_sold: count(uniq: sell_currency) } }} * **Date Filtering**: Instead of a separate `date` field, v2 uses `Block.Date` for date filtering. * **Field Mapping**: The `buy_currency` and `sell_currency` fields in v1 are mapped to `Trade_Buy_Currency_SmartContract` and `Trade_Sell_Currency_SmartContract` respectively in v2. query MyQuery { EVM(network: eth, dataset: combined) { DEXTrades(where: {Block: {Date: {is: "2024-01-01"}}}) { Unique_tokens_bought:count(distinct: Trade_Buy_Currency_SmartContract) Unique_tokens_sold:count(distinct:Trade_Sell_Currency_SmartContract) } }} Decimals & Precision[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#decimals--precision "Direct link to Decimals & Precision") ----------------------------------------------------------------------------------------------------------------------------------------- In API v1, the decimal precision was low at the GraphQL layer. While the data was saved accurately with all decimals, it would lose precision when processed through GraphQL. To avoid this issue, in API v2, values are now represented as strings, allowing for exact precision up to 18 decimal places without any loss of accuracy. Migrating Complex Queries from v1 to v2[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#migrating-complex-queries-from-v1-to-v2 "Direct link to Migrating Complex Queries from v1 to v2") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Let's take the below query which fetches the latest token details including USD values. { ethereum(network: ethereum) { dexTrades( options: {desc: ["block.height", "tradeIndex"], limit: 1, offset: 0} buyCurrency: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"} ) { block { timestamp { time(format: "%Y-%m-%d %H:%M:%S") } height } tradeIndex protocol exchange { fullName } buyAmount buyCurrency { symbol } buy_amount_usd: buyAmount(in: USD) sellAmount sellCurrency { symbol } sell_amount_usd: sellAmount(in: USD) priceInUSD: expression(get: "buy_amount_usd / buyAmount") } }} Now to convert this to v2, let's first tackle the filters. options: {desc: ["block.height", "tradeIndex"], limit: 1, offset: 0} buyCurrency: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"} In v2, the same filters would be: limit: {count: 1}orderBy: {descending: Block_Number}where: {Trade: {Buy: {Currency: {SmartContract: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}}}}} There is no separate filter called `options` **Notice we use `.` in v1 to access inner fields while we use `_` in v2.** Next, we select the fields in the response { Block { Number Time } Transaction { From To Hash } Trade { Buy { Amount AmountInUSD Buyer Currency { Name Symbol SmartContract } Seller Price PriceInUSD } Sell { Amount AmountInUSD Buyer Currency { Name SmartContract Symbol } Seller Price PriceInUSD } } } In v1, we had fields labelled as `buyCurrency`, `sellAmount` and so on but in v2 we have nested schema, where we choose Buy{ Currency {}} The nested schema in v2 requires accessing fields through specific paths, e.g., `Trade.Buy.Currency.SmartContract`. Where do I find my Bitquery API v1 key?[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#where-do-i-find-my-bitquery-api-v1-key "Direct link to Where do I find my Bitquery API v1 key?") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- To find your Bitquery API v1 key, log in to your [Bitquery account](https://account.bitquery.io/) , navigate to [Applications](https://account.bitquery.io/user/api_v2/applications) , and create a new application if needed. Then, visit the [Access Tokens](https://account.bitquery.io/user/api_v2/access_tokens) page to generate a new access token. This token serves as your API key for authentication. When creating a token, be sure to set an appropriate lifespan to avoid unnecessary interruptions or the need for frequent regeneration. V1 vs V2 : Data Points[​](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#v1-vs-v2--data-points "Direct link to V1 vs V2 : Data Points") ----------------------------------------------------------------------------------------------------------------------------------------------- ![Bitquery v1 to v2 API comparison](https://docs.bitquery.io/assets/images/v1v2-55f53a18c97a3ba2e65d423c46995081.png) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Overview](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#overview) * [Authentication in v1 vs v2](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#authentication-in-v1-vs-v2) * [Changes in Network Specification](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#changes-in-network-specification) * [Schema and Data Access](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#schema-and-data-access) * [Smart Contract Interactions](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#smart-contract-interactions) * [Handling Arguments and Values](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#handling-arguments-and-values) * [Aggregation : From v1 to v2](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#aggregation--from-v1-to-v2) * [Decimals & Precision](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#decimals--precision) * [Migrating Complex Queries from v1 to v2](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#migrating-complex-queries-from-v1-to-v2) * [Where do I find my Bitquery API v1 key?](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#where-do-i-find-my-bitquery-api-v1-key) * [V1 vs V2 : Data Points](https://docs.bitquery.io/docs/API-Blog/migrate-v1-v2/#v1-vs-v2--data-points) --- # Polygon (MATIC) API Documentation | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Matic/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Discover everything you need to build powerful Polygon (MATIC) applications—from real-time DEX trading analytics, liquidity monitoring, slippage analysis, and token holder insights to NFT tracking and transaction monitoring. This comprehensive guide provides ready-to-use GraphQL APIs, live streaming data, and step-by-step examples for tracking swaps, balances, transfers, liquidity pools, and more across the Polygon ecosystem. Whether you're building trading bots, dashboards, or DeFi analytics tools, find all the Polygon data solutions you need right here. Need help crafting a query or subscription? Message us on [support](https://t.me/Bloxy_info) . What is the Bitquery Polygon (MATIC) API?[​](https://docs.bitquery.io/docs/blockchain/Matic/#what-is-the-bitquery-polygon-matic-api "Direct link to What is the Bitquery Polygon (MATIC) API?") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Building a trading app or DEX UI on Polygon (MATIC)? For **real-time trades and prices on Polygon (MATIC)** (and the last ~30 days), use the curated [**Trading cube**](https://docs.bitquery.io/docs/trading/trading-data-overview/) — [`Trading.Trades`](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) gives you clean, MEV-filtered swaps with **USD price, market cap, and supply on every row** across **9 chains in one API**. For **historical Polygon (MATIC) data older than ~30 days**, use the chain-level `DEXTrades` / `DEXTradeByTokens` APIs documented below. It's a GraphQL interface over curated, indexed Polygon (MATIC) data. Write concise queries instead of building and maintaining your own indexer. What can you build with it?[​](https://docs.bitquery.io/docs/blockchain/Matic/#what-can-you-build-with-it "Direct link to What can you build with it?") -------------------------------------------------------------------------------------------------------------------------------------------------------- Track wallet portfolios and token holders, monitor DEX price/volume, liquidity events, pool reserves, and slippage data, analyze gas and fees, stream mempool activity, compute KPIs over blocks/transactions, and power dashboards or trading systems with real‑time data. How is it different from raw Polygon (MATIC) RPC?[​](https://docs.bitquery.io/docs/blockchain/Matic/#how-is-it-different-from-raw-polygon-matic-rpc "Direct link to How is it different from raw Polygon (MATIC) RPC?") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Feature | Polygon (MATIC) RPC | Bitquery Polygon (MATIC) API | | --- | --- | --- | | **Data Format** | Raw JSON-RPC responses | Pre-indexed, enriched GraphQL | | **Historical Data** | No built-in history | Full historical data since genesis | | **Analytics** | Manual aggregation required | Built-in joins, aggregations, and KPIs | | **Real-time** | Basic subscription support | Rich streaming with filtering | | **Use Case** | Transaction submission, node ops | Analytics, monitoring, dashboards | | **Infrastructure** | Run your own nodes | Fully managed, auto-scaling | WebSockets and Webhooks[​](https://docs.bitquery.io/docs/blockchain/Matic/#websockets-and-webhooks "Direct link to WebSockets and Webhooks") --------------------------------------------------------------------------------------------------------------------------------------------- Most queries can be turned into live streams by switching `query` to `subscription`, and consumed over WebSocket. See examples and code snippets [here](https://docs.bitquery.io/docs/subscriptions/websockets/) . DEX Trades[​](https://docs.bitquery.io/docs/blockchain/Matic/#dex-trades "Direct link to DEX Trades") ------------------------------------------------------------------------------------------------------ * [Polygon (MATIC) Dex Trades](https://docs.bitquery.io/docs/blockchain/Matic/matic-dextrades/) * [Polygon (MATIC) Uniswap API](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/) Query and subscribe to on‑chain swaps, OHLCV, liquidity events, pools, and per‑wallet trading activity across major Polygon DEXes. Polygon (MATIC) Slippage API[​](https://docs.bitquery.io/docs/blockchain/Matic/#polygon-matic-slippage-api "Direct link to Polygon (MATIC) Slippage API") ---------------------------------------------------------------------------------------------------------------------------------------------------------- * [Polygon (MATIC) Slippage API](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/) Get slippage and price impact data for Polygon DEX pools. Understand price impact and liquidity depth for token swaps, calculate maximum input amounts at different slippage tolerances, and monitor real-time slippage data across all DEX pools on Polygon. Polygon (MATIC) Liquidity API[​](https://docs.bitquery.io/docs/blockchain/Matic/#polygon-matic-liquidity-api "Direct link to Polygon (MATIC) Liquidity API") ------------------------------------------------------------------------------------------------------------------------------------------------------------- * [Polygon (MATIC) Liquidity API](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/) Monitor real-time liquidity changes, track pool reserves, and analyze liquidity depth for token pairs on Polygon DEX pools. Track when liquidity is added or removed, monitor pool health and depth, and analyze liquidity patterns across different pools. Transfers[​](https://docs.bitquery.io/docs/blockchain/Matic/#transfers "Direct link to Transfers") --------------------------------------------------------------------------------------------------- * [Polygon (MATIC) Transfers API](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/) Follow ERC‑20 token flows and compute supply‑side metrics on Polygon. Balances[​](https://docs.bitquery.io/docs/blockchain/Matic/#balances "Direct link to Balances") ------------------------------------------------------------------------------------------------ * [Polygon (MATIC) Address Balance API](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/) — token and [native MATIC](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#native-matic-balance) balances (`EVM.Balances`) Get real‑time and historical balances for addresses and tokens on Polygon. NFT[​](https://docs.bitquery.io/docs/blockchain/Matic/#nft "Direct link to NFT") --------------------------------------------------------------------------------- * [Polygon (MATIC) NFT API](https://docs.bitquery.io/docs/blockchain/Matic/matic-nft/) Fetch collections, ownership, transfers, trades, and metadata on Polygon. Videos[​](https://docs.bitquery.io/docs/blockchain/Matic/#videos "Direct link to Videos") ------------------------------------------------------------------------------------------ ### Polygon (MATIC) API | How to Get Real-time & Historical Matic (Polygon) Data[​](https://docs.bitquery.io/docs/blockchain/Matic/#polygon-matic-api--how-to-get-real-time--historical-matic-polygon-data "Direct link to Polygon (MATIC) API | How to Get Real-time & Historical Matic (Polygon) Data") More guides[​](https://docs.bitquery.io/docs/blockchain/Matic/#more-guides "Direct link to More guides") --------------------------------------------------------------------------------------------------------- * [Data Coverage & Retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) — how far back this chain's data goes * [Common errors and what to do](https://docs.bitquery.io/docs/start/errors/) * [Plans, Points & Limits](https://docs.bitquery.io/docs/plans/how-billing-works/) * [First query in 5 minutes](https://docs.bitquery.io/docs/start/first-query/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [What is the Bitquery Polygon (MATIC) API?](https://docs.bitquery.io/docs/blockchain/Matic/#what-is-the-bitquery-polygon-matic-api) * [What can you build with it?](https://docs.bitquery.io/docs/blockchain/Matic/#what-can-you-build-with-it) * [How is it different from raw Polygon (MATIC) RPC?](https://docs.bitquery.io/docs/blockchain/Matic/#how-is-it-different-from-raw-polygon-matic-rpc) * [WebSockets and Webhooks](https://docs.bitquery.io/docs/blockchain/Matic/#websockets-and-webhooks) * [DEX Trades](https://docs.bitquery.io/docs/blockchain/Matic/#dex-trades) * [Polygon (MATIC) Slippage API](https://docs.bitquery.io/docs/blockchain/Matic/#polygon-matic-slippage-api) * [Polygon (MATIC) Liquidity API](https://docs.bitquery.io/docs/blockchain/Matic/#polygon-matic-liquidity-api) * [Transfers](https://docs.bitquery.io/docs/blockchain/Matic/#transfers) * [Balances](https://docs.bitquery.io/docs/blockchain/Matic/#balances) * [NFT](https://docs.bitquery.io/docs/blockchain/Matic/#nft) * [Videos](https://docs.bitquery.io/docs/blockchain/Matic/#videos) * [Polygon (MATIC) API | How to Get Real-time & Historical Matic (Polygon) Data](https://docs.bitquery.io/docs/blockchain/Matic/#polygon-matic-api--how-to-get-real-time--historical-matic-polygon-data) * [More guides](https://docs.bitquery.io/docs/blockchain/Matic/#more-guides) --- # Polygon Matic Slippage API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will see how to get Matic DEX pool slippage information using our API. The slippage API helps you understand price impact and liquidity depth for token swaps on Matic DEX pools. Understanding Slippage and Price Impact[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#understanding-slippage-and-price-impact "Direct link to Understanding Slippage and Price Impact") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Slippage refers to the difference between the expected price of a trade and the actual execution price. When swapping tokens in a DEX pool, larger trades can move the price due to limited liquidity, resulting in slippage. The DEXPoolSlippages API provides detailed information about: * Maximum input amounts that can be swapped at different slippage tolerances * Minimum output amounts guaranteed at each slippage level * Average execution prices for different trade sizes * Price impact calculations for both swap directions (A to B and B to A) For a comprehensive explanation of how DEX pools work, liquidity calculations, and price tables, refer to the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/) . Realtime Slippage Monitoring[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#realtime-slippage-monitoring "Direct link to Realtime Slippage Monitoring") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription query returns real-time slippage data for all DEX pools on Matic. You can monitor price impact and liquidity depth as trades occur. You can find the query [here](https://ide.bitquery.io/realtime-slippage-on-matic) subscription { EVM(network: matic) { DEXPoolSlippages { Price { BtoA { Price MinAmountOut MaxAmountIn } AtoB { Price MinAmountOut MaxAmountIn } Pool { PoolId SmartContract Pair { Decimals SmartContract Name } CurrencyB { Symbol SmartContract Name Decimals } CurrencyA { Symbol SmartContract Name Decimals } } Dex { SmartContract ProtocolVersion ProtocolName ProtocolFamily } SlippageBasisPoints } Block { Time Number } } }} Latest Slippage for a Specific Pool[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#latest-slippage-for-a-specific-pool "Direct link to Latest Slippage for a Specific Pool") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query retrieves the latest slippage data for a specific DEX pool on Matic. Use this to check current liquidity depth and price impact for a particular token pair. You can find the query [here](https://ide.bitquery.io/Latest-slippage-of-a-pool-on-Uniswap-v3) query { EVM(network: matic) { DEXPoolSlippages( where: {Price: {Pool: {SmartContract: {is: "0x42161084d0672e1d3f26a9b53e653be2084ff19c"}}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Price { BtoA { Price MinAmountOut MaxAmountIn } AtoB { Price MinAmountOut MaxAmountIn } Pool { PoolId SmartContract Pair { Decimals SmartContract Name } CurrencyB { Symbol SmartContract Name Decimals } CurrencyA { Symbol SmartContract Name Decimals } } Dex { SmartContract ProtocolVersion ProtocolName ProtocolFamily } SlippageBasisPoints } Block { Time Number } } }} > **Note:** This query can be converted to a subscription to monitor in real-time. Simply replace `query` with `subscription` to receive live updates whenever the pool's liquidity changes. Realtime Slippage Data via Kafka Streams[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#realtime-slippage-data-via-kafka-streams "Direct link to Realtime Slippage Data via Kafka Streams") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Slippage data can also be obtained via Kafka streams for lower latency and better reliability. The Kafka topic for Matic DEX pools is: **`matic.dexpools.proto`** Kafka streams provide the same slippage data as GraphQL subscriptions but with several advantages: * Lower latency due to shorter data pipeline * Better reliability with persistent connections * Ability to read from latest offset without gaps * Better scalability with multiple consumers For detailed information on how to connect to Kafka streams, subscribe to topics, and parse messages, refer to the [Kafka Streaming Concepts documentation](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/) . > **Note:** IDE credentials will not work with Kafka Streams. You need separate Kafka credentials. Please contact sales on our official telegram channel or fill out the [form on our website](https://bitquery.io/forms/api) > . Understanding the Response[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#understanding-the-response "Direct link to Understanding the Response") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `DEXPoolSlippages` API response contains the following information: * **`Price`**: Price information for swaps at a specific slippage tolerance * **`AtoB`**: Price data for swapping CurrencyA to CurrencyB * `Price`: Average execution price for swaps at this slippage level * `MinAmountOut`: Minimum output amount guaranteed at this slippage level * `MaxAmountIn`: Maximum input amount that can be swapped at this slippage level * **`BtoA`**: Price data for swapping CurrencyB to CurrencyA (same structure as AtoB) * **`SlippageBasisPoints`**: Slippage tolerance in basis points (100 = 1%) * **`Pool`**: Pool information including token pair details * **`Dex`**: DEX protocol information (Uniswap V2, V3, V4, etc.) * **`Block`**: Block information when the slippage data was recorded * `Time`: Timestamp of the block * `Number`: Block number For more details on how slippage is calculated and when new pool records are emitted, see the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/#when-is-a-new-dexpool-record-emitted-in-the-apis--streams) . Use Cases[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#use-cases "Direct link to Use Cases") ---------------------------------------------------------------------------------------------------------------------- ### Liquidity Depth Analysis[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#liquidity-depth-analysis "Direct link to Liquidity Depth Analysis") Use the slippage API to analyze which pools can handle large trades without significant price impact. By examining `MaxAmountIn` values at different slippage levels, you can: * Identify pools with sufficient liquidity for your trade size * Determine optimal slippage tolerance settings * Estimate price impact before executing trades ### Multi-Pool Price Comparison[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#multi-pool-price-comparison "Direct link to Multi-Pool Price Comparison") Compare execution prices across different pools and slippage scenarios to: * Find the best pool for your specific trade size * Understand price differences between DEX protocols * Optimize trade execution strategies ### Trading Applications[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#trading-applications "Direct link to Trading Applications") #### Live Execution Testing[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#live-execution-testing "Direct link to Live Execution Testing") Use the slippage API to test and validate trade execution strategies in real-time: * **Pre-trade validation**: Check if your intended trade size can be executed within acceptable slippage bounds before submitting * **Execution simulation**: Calculate expected price impact and minimum output amounts for different trade sizes * **Strategy backtesting**: Monitor historical slippage data to validate trading algorithms and optimize entry/exit points * **Risk assessment**: Evaluate maximum position sizes that can be entered without exceeding your slippage tolerance #### Detecting Liquidity Shocks and Toxic Order Flow[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#detecting-liquidity-shocks-and-toxic-order-flow "Direct link to Detecting Liquidity Shocks and Toxic Order Flow") The slippage API helps identify temporary price dislocations and liquidity shocks that can be exploited or avoided: * **Flow toxicity detection**: Monitor sudden changes in `MaxAmountIn` values to detect when pools experience large outflows or inflows * **Price impact analysis**: Track how `MinAmountOut` changes relative to `MaxAmountIn` to identify when pools become less liquid * **Mean reversion opportunities**: Identify pools where large swaps have created temporary price dislocations that may revert * **Toxic order flow avoidance**: Use slippage data to avoid entering positions when liquidity is thin or when large trades are likely to move price against you For a practical implementation example of using slippage data for automated trading strategies, including flow toxicity detection and mean-reversion trading, see the [AMM Flow Toxicity Alpha Engine](https://github.com/Divyn/amm-flow-toxicity-alpha-engine) repository. This system demonstrates how to: * Detect large swaps that move price significantly (50-500 basis points) * Verify isolation from trending markets * Execute fade trades against temporary price impacts * Manage positions with dynamic stop losses and take profits based on slippage data For more advanced use cases, refer to the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/#advanced-use-cases-and-processing-patterns) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Understanding Slippage and Price Impact](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#understanding-slippage-and-price-impact) * [Realtime Slippage Monitoring](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#realtime-slippage-monitoring) * [Latest Slippage for a Specific Pool](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#latest-slippage-for-a-specific-pool) * [Realtime Slippage Data via Kafka Streams](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#realtime-slippage-data-via-kafka-streams) * [Understanding the Response](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#understanding-the-response) * [Use Cases](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#use-cases) * [Liquidity Depth Analysis](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#liquidity-depth-analysis) * [Multi-Pool Price Comparison](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#multi-pool-price-comparison) * [Trading Applications](https://docs.bitquery.io/docs/blockchain/Matic/matic-slippage-api/#trading-applications) --- # Polygon (MATIC) Address Balance API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Deprecated APIs On EVM, **`BalanceUpdates`** and **`TokenHolders`** were deprecated as of **20 May 2026** and removed on **15 June 2026**. Use **`EVM.Balances`** (this page) and **[Token Holders API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/) ** (`EVM.Holders`) instead. Balance lookups like these are productized in the [Address & Balance API](https://bitquery.io/products/address-apis) — native and token balances, labels and history on 9 core chains. The **Balances** API returns current and historical token balances for an address on Polygon (MATIC). To return only non-zero balances, add `Amount(selectWhere: { gt: "0" })` on the `Balance` field (not in `where`). Use `dataset: combined` or `dataset: archive` as follows: | Dataset | When to use | | --- | --- | | **`combined`** | Latest balances. Queries **realtime and archive** databases and merges results. | | **`archive`** | Historical snapshots with `Block.Date`, and balances for **addresses not recently active**. | Examples: [All Token Balances](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-of-an-address) · [Native MATIC](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#native-matic-balance) · [Balance on a Date](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-on-a-specific-date) · [Specific Token](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-for-a-specific-token) ProductUsing this in production? See the [Address & Balance API](https://bitquery.io/products/address-apis) page for plans, free trial and enterprise delivery options. Balance of an Address[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-of-an-address "Direct link to Balance of an Address") --------------------------------------------------------------------------------------------------------------------------------------------------------- Returns token balances for a wallet address. Use `Amount(selectWhere: { gt: "0" })` to exclude zero balances. [Run in IDE](https://ide.bitquery.io/matic-balances-address) query { EVM(network: matic, dataset: combined) { Balances( where: { Balance: { Address: { is: "0x4c569c1e541A19132AC893748E0ad54C7c989FF4" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Native MATIC Balance[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#native-matic-balance "Direct link to Native MATIC Balance") ------------------------------------------------------------------------------------------------------------------------------------------------------ Returns the native MATIC balance for a wallet (not ERC-20 tokens). Filter with `Currency: { Native: true }` instead of a token contract address. [Run in IDE](https://ide.bitquery.io/matic-native-balances-address) query { EVM(network: matic, dataset: combined) { Balances( where: { Balance: { Address: { is: "0x4c569c1e541A19132AC893748E0ad54C7c989FF4" } } Currency: { Native: true } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} **Parameters** * `network: matic`: Polygon mainnet. * `dataset: combined`: Merges realtime and archive data for the latest balance state. * `Balance.Address`: Wallet address to query. * `Currency.Native: true`: Native MATIC only (see [Native MATIC Balance](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#native-matic-balance) ). **Returned fields** * `Currency.Symbol`, `Currency.SmartContract`: Token metadata. * `Balance.Amount`, `Balance.AmountInUSD`: Token balance and USD value (use `selectWhere` to filter non-zero amounts). Balance on a Specific Date[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-on-a-specific-date "Direct link to Balance on a Specific Date") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Use `Block.Date.till` for a point-in-time snapshot. Use `dataset: archive` for historical dates and addresses not recently active. [Run in IDE](https://ide.bitquery.io/matic-balances-by-date) query { EVM(network: matic, dataset: archive) { Balances( where: { Block: { Date: { till: "2026-05-01" } } Balance: { Address: { is: "0x4c569c1e541A19132AC893748E0ad54C7c989FF4" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Balance for a Specific Token[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-for-a-specific-token "Direct link to Balance for a Specific Token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Add a `Currency.SmartContract` filter. Always use the contract address, not the token name. Use `0x` for native MATIC on Polygon, or the ERC-20 contract address for a token. [Run in IDE](https://ide.bitquery.io/matic-balances-specific-token) query { EVM(network: matic, dataset: combined) { Balances( where: { Balance: { Address: { is: "0x4c569c1e541A19132AC893748E0ad54C7c989FF4" } } Currency: { SmartContract: { is: "0x" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Token Holder Snapshot[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#token-holder-snapshot "Direct link to Token Holder Snapshot") --------------------------------------------------------------------------------------------------------------------------------------------------------- The number of unique holders, token supply, and Gini coefficient for the balance amount before a specific timestamp can be derived using the query below. These stats provide a useful holder snapshot for any given time. [Run in IDE](https://ide.bitquery.io/token-holder-snapshot-matic) Click to expand GraphQL query query MyQuery($network: evm_network!, $address: String!) { EVM(network: $network, dataset: archive) { Holders( where: { Currency: {SmartContract: {is: $address}}, Balance: { Amount: {gt: "0"}, LastChangeTime: {till: "2026-05-20T00:00:00Z"} }, Holder: {Address: {not: "0x"}}} ) { Balance { LastChangeTime(maximum: Balance_LastChangeTime) } holders: uniq(of: Holder_Address) supply: sum(of: Balance_Amount) gini(of: Balance_Amount) } }} { "network": "matic", "address": "0x99a57e6c8558bc6689f894e068733adf83c19725"} Balance History by Date[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-history-by-date "Direct link to Balance History by Date") --------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns balance snapshots over time for an address. Use `dataset: archive`. Order by `Block_Date` descending and use `limit` to paginate. Add `Currency.SmartContract` under `Currency` to filter by a specific token. [Run in IDE](https://ide.bitquery.io/matic-balances-history) query { EVM(network: matic, dataset: archive) { Balances( where: { Balance: { Address: { is: "0x4c569c1e541A19132AC893748E0ad54C7c989FF4" } } Currency: {} } orderBy: { descending: Block_Date } limit: { count: 100 } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD } Block { Date } } }} Wallet Balance for a Specific Token on a Date[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#wallet-balance-for-a-specific-token-on-a-date "Direct link to Wallet Balance for a Specific Token on a Date") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get a wallet's balance for a specific token with `Balance.Address` and `Currency.SmartContract`. This example uses native MATIC (`SmartContract: "0x"`) with `dataset: combined`. For a balance on a calendar date, use [Balance on a Specific Date](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-on-a-specific-date) with `dataset: archive` and `Block.Date.till`. [Run in IDE](https://ide.bitquery.io/matic-wallet-balance-token-at-date) query { EVM(network: matic, dataset: combined) { Balances( where: { Balance: { Address: { is: "0x4c569c1e541A19132AC893748E0ad54C7c989FF4" } } Currency: { SmartContract: { is: "0x" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Balance of an Address](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-of-an-address) * [Native MATIC Balance](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#native-matic-balance) * [Balance on a Specific Date](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-on-a-specific-date) * [Balance for a Specific Token](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-for-a-specific-token) * [Token Holder Snapshot](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#token-holder-snapshot) * [Balance History by Date](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#balance-history-by-date) * [Wallet Balance for a Specific Token on a Date](https://docs.bitquery.io/docs/blockchain/Matic/matic-balance-api/#wallet-balance-for-a-specific-token-on-a-date) --- # Polygon Matic Liquidity API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will see how to get Matic DEX pool liquidity information using Bitquery API. The liquidity API helps you monitor real-time liquidity changes, track pool reserves, and analyze liquidity depth for token pairs on Matic DEX pools. Understanding Liquidity and Pool Reserves[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#understanding-liquidity-and-pool-reserves "Direct link to Understanding Liquidity and Pool Reserves") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Liquidity in DEX pools refers to the amount of tokens available for trading. Pool reserves (the balance of each token in the pool) determine the pool's ability to handle trades without significant price impact. Monitoring liquidity changes helps you: * Track when liquidity is added or removed from pools * Monitor pool health and depth * Identify liquidity events that may affect trading * Analyze liquidity patterns across different pools The DEXPoolEvents API provides real-time information about: * Current liquidity reserves for both tokens in the pool * Spot prices for both swap directions * Pool and token pair information * Transaction details for liquidity-changing events For a comprehensive explanation of how DEX pools work, liquidity calculations, and when pool events are emitted, refer to the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/) . Realtime Liquidity Stream[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#realtime-liquidity-stream "Direct link to Realtime Liquidity Stream") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription query returns real-time liquidity data for all DEX pools on Matic. You can monitor liquidity changes, pool reserves, and spot prices as trades and liquidity modifications occur across all pools. You can find the query [here](https://ide.bitquery.io/Realtime-Liquidity-Stream_5#) subscription MyQuery { EVM(network: matic) { DEXPoolEvents { Block { Time Number } PoolEvent { AtoBPrice BtoAPrice Dex { SmartContract ProtocolName } Liquidity { AmountCurrencyA AmountCurrencyB } Pool { CurrencyA { Name SmartContract Symbol } CurrencyB { Name SmartContract Symbol } PoolId SmartContract } } Transaction { Gas Hash } } }} Latest Liquidity Changes of a Specific Pool[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#latest-liquidity-changes-of-a-specific-pool "Direct link to Latest Liquidity Changes of a Specific Pool") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query retrieves the latest liquidity events for a specific DEX pool on Matic. Use this to check current pool reserves, spot prices, and recent liquidity changes for a particular token pair. You can find the query [here](https://ide.bitquery.io/Latest-Liquidity-Changes-of-a-Specific-Pool_6#) query MyQuery { EVM(network: matic) { DEXPoolEvents( limit: { count: 10 } orderBy: { descending: Block_Time } where: { PoolEvent: { Pool: { SmartContract: { is: "0x35afbb9d4dbe49f7579ccfd659ee6854a387faa0" } } } } ) { Block { Time Number } PoolEvent { AtoBPrice BtoAPrice Dex { SmartContract ProtocolName } Liquidity { AmountCurrencyA AmountCurrencyB } Pool { CurrencyA { Name SmartContract Symbol } CurrencyB { Name SmartContract Symbol } PoolId SmartContract } } Transaction { Gas Hash } } }} Realtime Liquidity Stream of a Specific Pool[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#realtime-liquidity-stream-of-a-specific-pool "Direct link to Realtime Liquidity Stream of a Specific Pool") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription query monitors real-time liquidity changes for a specific DEX pool on Matic. Use this to track liquidity events, pool reserves, and spot prices for a particular pool as they occur. You can find the query [here](https://ide.bitquery.io/Realtime-Liquidity-Stream-of-a-Specific-Pool_5#) subscription MyQuery { EVM(network: matic) { DEXPoolEvents( where: { PoolEvent: { Pool: { SmartContract: { is: "0x35afbb9d4dbe49f7579ccfd659ee6854a387faa0" } } } } ) { Block { Time Number } PoolEvent { AtoBPrice BtoAPrice Dex { SmartContract ProtocolName } Liquidity { AmountCurrencyA AmountCurrencyB } Pool { CurrencyA { Name SmartContract Symbol } CurrencyB { Name SmartContract Symbol } PoolId SmartContract } } Transaction { Gas Hash } } }} Latest Liquidity Changes of Pools in a Specific DEX Protocol - Uniswap V4[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#latest-liquidity-changes-of-pools-in-a-specific-dex-protocol---uniswap-v4 "Direct link to Latest Liquidity Changes of Pools in a Specific DEX Protocol - Uniswap V4") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription query monitors real-time liquidity changes for all pools in a specific DEX protocol on Matic. Here we have taken example of Uniswap V4. You can find the query [here](https://ide.bitquery.io/Latest-Liquidity-Changes-of-Pools-in-a-Specific-DEX-Protocol---Uniswap-V4_7#) subscription MyQuery { EVM(network: matic) { DEXPoolEvents( where: { PoolEvent: { Dex: { ProtocolName: { is: "uniswap_v4" } } } } ) { Block { Time Number } PoolEvent { AtoBPrice BtoAPrice Dex { SmartContract ProtocolName } Liquidity { AmountCurrencyA AmountCurrencyB } Pool { CurrencyA { Name SmartContract Symbol } CurrencyB { Name SmartContract Symbol } PoolId SmartContract } } Transaction { Gas Hash } } }} > **Important Note:** In Uniswap V4, all pools' liquidity is stored in the PoolManager contract, so the DEX smart contract address will be the same for all pairs. Use `PoolId` to differentiate between different pools. The `PoolId` field uniquely identifies each pool within the PoolManager. Realtime Liquidity Data via Kafka Streams[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#realtime-liquidity-data-via-kafka-streams "Direct link to Realtime Liquidity Data via Kafka Streams") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Liquidity data can also be obtained via Kafka streams for lower latency and better reliability. The Kafka topic for Matic DEX pools is: **`matic.dexpools.proto`** Kafka streams provide the same liquidity data as GraphQL subscriptions but with several advantages: * Lower latency due to shorter data pipeline * Better reliability with persistent connections * Ability to read from latest offset without gaps * Better scalability with multiple consumers For detailed information on how to connect to Kafka streams, subscribe to topics, and parse messages, refer to the [Kafka Streaming Concepts documentation](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/) . > **Note:** IDE credentials will not work with Kafka Streams. You need separate Kafka credentials. Please contact sales on our official telegram channel or fill out the [form on our website](https://bitquery.io/forms/api) > . Understanding the Response[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#understanding-the-response "Direct link to Understanding the Response") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `DEXPoolEvents` API response contains the following information: * **`PoolEvent`**: Pool event information * **`Liquidity`**: Current pool reserves * `AmountCurrencyA`: Current balance of CurrencyA in the pool (in raw units) * `AmountCurrencyB`: Current balance of CurrencyB in the pool (in raw units) * **`AtoBPrice`**: Current spot price for swapping CurrencyA to CurrencyB * **`BtoAPrice`**: Current spot price for swapping CurrencyB to CurrencyA * **`Pool`**: Pool information * `SmartContract`: Pool contract address * `PoolId`: Unique pool identifier * `CurrencyA`: First token in the pair (name, symbol, smart contract address) * `CurrencyB`: Second token in the pair (name, symbol, smart contract address) * **`Dex`**: DEX protocol information * `SmartContract`: DEX router/factory contract address * `ProtocolName`: Protocol name (e.g., Uniswap V2, Uniswap V3, Uniswap V4) * **`Block`**: Block information when the liquidity event occurred * `Time`: Timestamp of the block * `Number`: Block number * **`Transaction`**: Transaction information * `Hash`: Transaction hash * `Gas`: Gas used for the transaction For more details on when new pool events are emitted and how liquidity is calculated, see the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/#when-is-a-new-dexpool-record-emitted-in-the-apis--streams) . Use Cases[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#use-cases "Direct link to Use Cases") ----------------------------------------------------------------------------------------------------------------------- ### Real-Time Liquidity Monitoring[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#real-time-liquidity-monitoring "Direct link to Real-Time Liquidity Monitoring") Use the liquidity API to monitor pool reserves in real-time: * Track when large amounts of liquidity are added or removed * Monitor pool health and detect potential liquidity issues * Alert on significant liquidity changes that may affect trading ### Liquidity Depth Analysis[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#liquidity-depth-analysis "Direct link to Liquidity Depth Analysis") Analyze which pools have sufficient liquidity for your needs: * Compare liquidity reserves across different pools * Identify pools with deep liquidity for large trades * Monitor liquidity trends over time ### Trading Applications[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#trading-applications "Direct link to Trading Applications") #### Pre-Trade Liquidity Checks[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#pre-trade-liquidity-checks "Direct link to Pre-Trade Liquidity Checks") Before executing large trades, check current pool reserves: * Verify sufficient liquidity exists for your trade size * Monitor liquidity changes that may affect execution * Identify optimal pools with best liquidity depth #### Liquidity Event Detection[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#liquidity-event-detection "Direct link to Liquidity Event Detection") Track liquidity events that may create trading opportunities: * Detect when new liquidity is added to pools * Monitor liquidity removals that may signal pool abandonment * Identify pools experiencing rapid liquidity growth For more advanced use cases, refer to the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/#advanced-use-cases-and-processing-patterns) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Understanding Liquidity and Pool Reserves](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#understanding-liquidity-and-pool-reserves) * [Realtime Liquidity Stream](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#realtime-liquidity-stream) * [Latest Liquidity Changes of a Specific Pool](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#latest-liquidity-changes-of-a-specific-pool) * [Realtime Liquidity Stream of a Specific Pool](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#realtime-liquidity-stream-of-a-specific-pool) * [Latest Liquidity Changes of Pools in a Specific DEX Protocol - Uniswap V4](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#latest-liquidity-changes-of-pools-in-a-specific-dex-protocol---uniswap-v4) * [Realtime Liquidity Data via Kafka Streams](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#realtime-liquidity-data-via-kafka-streams) * [Understanding the Response](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#understanding-the-response) * [Use Cases](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#use-cases) * [Real-Time Liquidity Monitoring](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#real-time-liquidity-monitoring) * [Liquidity Depth Analysis](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#liquidity-depth-analysis) * [Trading Applications](https://docs.bitquery.io/docs/blockchain/Matic/matic-liquidity-api/#trading-applications) --- # Polygon Uniswap V4 API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Need real-time Uniswap V4 (Polygon) data or anything from the last ~30 days? For **real-time + last ~30 days**, use the [**Trading cube**](https://docs.bitquery.io/docs/trading/trading-data-overview/) — [`Trading.Trades`](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) gives you clean, MEV-filtered Uniswap V4 (Polygon) swaps with **USD price, market cap, and supply on every row** across **9 chains in one API**. Use this page when you need **historical Uniswap V4 (Polygon) data older than ~30 days**, raw per-swap detail, or call / event context. Uniswap v4 introduces a major shift in protocol architecture. Instead of deploying a separate smart contract for each liquidity pool, Uniswap v4 uses a singleton PoolManager contract that manages all pools internally as structured state. Each pool in Uniswap v4 is uniquely identified by a `PoolId`, which is derived from the pool configuration (token pair, fee, tick spacing, and optional hooks), rather than a dedicated contract address. Using Bitquery's Uniswap v4 APIs, you can track: * DEX trades across all v4 pools * Trades by specific traders * Token-level trade activity * Real-time trade metrics The Uniswap v4 PoolManager contract emits all pool-related events, including pool initialization, swaps, and liquidity modifications, and serves as the single on-chain source of truth for Uniswap v4 activity on Matic. Real time Trades on Uniswap V4[​](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#real-time-trades-on-uniswap-v4 "Direct link to Real time Trades on Uniswap V4") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Real-time-trades-for-uniswap-v4-matic) subscription allows user to stream trades on Uniswap V4 in real time on Matic. subscription { EVM(network: matic) { DEXTrades(where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v4"}}}}) { Block{ Time } Trade { PoolId Buy { Currency { Name Symbol SmartContract Decimals } Buyer Amount AmountInUSD Price PriceInUSD Seller } Sell { Currency { Name Symbol SmartContract Decimals } Buyer Amount AmountInUSD Price PriceInUSD Seller } } Transaction { From To Hash } } }} Get All Pool Ids for a Currency[​](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#get-all-pool-ids-for-a-currency "Direct link to Get All Pool Ids for a Currency") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Using [this](https://ide.bitquery.io/get-virtual-pool-address-for-a-token-on-uniswap-v4-matic) API we can get all the virtual pool addresses (`PoolId`) for a currency on Matic. query MyQuery { EVM(network: matic) { DEXTradeByTokens( where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v4"}}, Currency: {SmartContract: {is: "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063"}}}} ) { Trade { PoolId } count } }} Latest Trades for a Specific Currencies Pair[​](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#latest-trades-for-a-specific-currencies-pair "Direct link to Latest Trades for a Specific Currencies Pair") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Latest-Trades-for-a-currency-pair-on-matic_1) API endpoint allows us to filter out the latest trades for a specific pair on Matic, using `PoolId` as a filter option. { EVM(network: matic) { DEXTrades( orderBy: {descending: Block_Time} limit: {count: 100} where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v4"}}, PoolId: {is: "0x23bf8c631d30c092865d2f583f601a7080b7e3f4cb3dcbf29e622a693087a916"}}} ) { Block { Time } Trade { PoolId Buy { Currency { Name Symbol SmartContract Decimals } Amount AmountInUSD Price PriceInUSD Seller } Sell { Currency { Name Symbol SmartContract Decimals } Buyer Amount AmountInUSD Price PriceInUSD } } Transaction { From To Hash } } }} Uniswap V4 Pair Trade Stats[​](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#uniswap-v4-pair-trade-stats "Direct link to Uniswap V4 Pair Trade Stats") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Using [this](https://ide.bitquery.io/trade-stats-for-a-token-pair-on-uniswap-v4-matic_1) query get pool stats (volume, bought, sold) for a specific Uniswap V4 pool on Matic. query pairTopTraders { EVM(network: matic, dataset: realtime) { DEXTradeByTokens( orderBy: { descendingByField: "volumeUsd" } where: { Block:{ Time: {since_relative: {days_ago: 1}} } Trade: { Dex: { ProtocolName: {is: "uniswap_v4"} } PoolId: {is: "0x23bf8c631d30c092865d2f583f601a7080b7e3f4cb3dcbf29e622a693087a916"} } } ) { Trade { Currency{ Name Symbol SmartContract } } bought: sum( of: Trade_Amount if: { Trade: { Side: { Type: { is: buy } } } } ) sold: sum( of: Trade_Amount if: { Trade: { Side: { Type: { is: sell } } } } ) volume: sum(of: Trade_Amount) volumeUsd: sum(of: Trade_Side_AmountInUSD) } }} Top Buyers of a Token on Uniswap V4[​](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#top-buyers-of-a-token-on-uniswap-v4 "Direct link to Top Buyers of a Token on Uniswap V4") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [This](https://ide.bitquery.io/top-buyers-of-a-currency-on-uniswap-v4-matic) API returns the top buyers of a token on Uniswap V4 virtual pool on Matic, along with the amount bought in token denominations and USD. { EVM(network: matic) { DEXTrades( orderBy: {descendingByField: "bought_in_usd"} limit: {count: 100} where: { Trade: { Dex: {ProtocolName: {is: "uniswap_v4"}}, Buy: {Currency: {SmartContract: {is: "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063"}}} PoolId: {is: "0x23bf8c631d30c092865d2f583f601a7080b7e3f4cb3dcbf29e622a693087a916"} } } ) { Trade { Sell { Currency { Name Symbol SmartContract Decimals } Buyer } } bought:sum(of: Trade_Buy_Amount) bought_in_usd:sum(of: Trade_Buy_AmountInUSD) } }} Top Sellers of a Token on Uniswap V4[​](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#top-sellers-of-a-token-on-uniswap-v4 "Direct link to Top Sellers of a Token on Uniswap V4") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/top-sellers-of-a-token-on-uniswap-v4-pool-matic) API returns the top sellers of a token on Uniswap V4 virtual pool on Matic, along with the amount sold in token denominations and USD. { EVM(network: matic) { DEXTrades( orderBy: {descendingByField: "sold_in_usd"} limit: {count: 10} where: { Trade: { Dex: {ProtocolName: {is: "uniswap_v4"}}, Sell: {Currency: {SmartContract: {is: "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063"}}} PoolId: {is: "0x23bf8c631d30c092865d2f583f601a7080b7e3f4cb3dcbf29e622a693087a916"} } } ) { Trade { Buy { Currency { Name Symbol SmartContract Decimals } Seller } } sold:sum(of: Trade_Buy_Amount) sold_in_usd:sum(of: Trade_Buy_AmountInUSD) } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Real time Trades on Uniswap V4](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#real-time-trades-on-uniswap-v4) * [Get All Pool Ids for a Currency](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#get-all-pool-ids-for-a-currency) * [Latest Trades for a Specific Currencies Pair](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#latest-trades-for-a-specific-currencies-pair) * [Uniswap V4 Pair Trade Stats](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#uniswap-v4-pair-trade-stats) * [Top Buyers of a Token on Uniswap V4](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#top-buyers-of-a-token-on-uniswap-v4) * [Top Sellers of a Token on Uniswap V4](https://docs.bitquery.io/docs/blockchain/Matic/uniswap-v4-api/#top-sellers-of-a-token-on-uniswap-v4) --- # Track Token Lock Unlock | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this article, we are going to understand why tracking token lock and unlock events is necessary for investors and project teams in the quickly changing crypto space. Token lockups provide the project with stability and confidence by restricting token sales or transfers for a certain amount of time. The sudden release of a large number of tokens, however, may result in market instability. Tracking these occurrences allows stakeholders to anticipate market movements and make informed decisions. Anyone can follow this guide to understand how to use Bitquery APIs to track vested tokens and receive alerts when unlocking events are about to occur. Understanding Token Locks and Unlocks[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#understanding-token-locks-and-unlocks "Direct link to Understanding Token Locks and Unlocks") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### What Are Token Locks?[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#what-are-token-locks "Direct link to What Are Token Locks?") Token locks are methods applied by blockchain projects to limit the ability to transfer of tokens for a certain duration. They're frequently used for: Vesting Periods: Tokens are gradually released to team members or early investors to ensure long-term commitment. This can help prevent immediate sell-offs that could negatively impact the token's price. Liquidity Locks: A certain amount of tokens is kept in liquidity pools for a defined duration to aid in market stability. This ensures there is always sufficient liquidity available, which is crucial for the smooth functioning of decentralized exchanges (DEXs) and other financial mechanisms within the ecosystem. ### Why Track Token Unlocks?[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#why-track-token-unlocks "Direct link to Why Track Token Unlocks?") Tracking token unlocks is necessary for: Investors: To predict possible adjustments in token supply that may affect market values. Knowing when big sums of tokens will be released might assist investors make informed purchases or sales. Project Teams: To oversee token distributions and maintain transparency with stakeholders. Transparency about token unlock schedules can build trust within the community and among investors. Key Data Points to Track[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#key-data-points-to-track "Direct link to Key Data Points to Track") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- When tracking token lock and unlock events, the following data points are essential: * Token Name and Symbol: Identify the token in question. * Unlock Date: When the tokens will be unlocked. * Amount to be Unlocked: The quantity of tokens that will be released. * Vesting Schedule: Details of the vesting period and intervals. * Contract Address: The smart contract address governing the lockup. * Transaction History: Past lock and unlock transactions for context. ### Adding Liquidity Event[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#adding-liquidity-event "Direct link to Adding Liquidity Event") In decentralized finance (DeFi), adding liquidity means putting tokens into a pool on a decentralized exchange (DEX). This process ensures that there are enough tokens available for trading, which is essential for maintaining market stability and enabling smooth transactions. #### Why It's Important[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#why-its-important "Direct link to Why It's Important") Adding liquidity can earn rewards for those who contribute tokens. It also helps keep the market running smoothly. By adding liquidity, token holders can participate in the ecosystem, earn transaction fees, and support the overall health of the market. #### How to Track[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#how-to-track "Direct link to How to Track") Use Bitquery APIs to see when large amounts of tokens are added to pools. This can indicate important moves by project teams or big investors. By monitoring these events, you can gain insights into market behavior and anticipate potential price changes based on liquidity movements. #### Example Query[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#example-query "Direct link to Example Query") To track liquidity events, you can use a query similar to the one for tracking token unlocks, but focusing on transactions related to liquidity pools. Here’s a sample query to track [liquidity additions](https://ide.bitquery.io/liquidity-additions) on the Ethereum network: subscription { EVM(network: eth) { Events( where: {LogHeader: {Address: {is: "0x663A5C229c09b049E36dCc11a9B0d4a8Eb9db214"}}, Log: {Signature: {Name: {is: "onDeposit"}}}} ) { Block { Number Time } Arguments { Name Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Transaction { From } } }} This query helps identify significant liquidity additions, providing insights into market dynamics. ### Removing Liquidity Event[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#removing-liquidity-event "Direct link to Removing Liquidity Event") Removing liquidity means taking tokens out of a pool. This action can have a significant impact on the market, as it reduces the available liquidity, which can lead to price volatility and affect the overall market stability. #### Why It's Important[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#why-its-important-1 "Direct link to Why It's Important") Removing a lot of liquidity can make the market less stable and cause price swings. It can signal that investors or project teams are withdrawing support from the market, which might indicate upcoming price drops or market corrections. #### How to Track[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#how-to-track-1 "Direct link to How to Track") In order to see when large amounts of tokens are taken out of pools, we can use Bitquery Event APIs. This can help predict potential market changes. By monitoring these events, you can stay ahead of market movements and adjust your strategies accordingly. #### Example Query[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#example-query-1 "Direct link to Example Query") To track liquidity removal events, use a query similar to the one for tracking liquidity additions, but focus on transactions related to liquidity removals. Here’s a sample query to [track liquidity removals](https://ide.bitquery.io/liquidity-removals) on the Ethereum network: { EVM(dataset: combined, network: eth) { Events( where: { LogHeader: { Address: { is: "0x663A5C229c09b049E36dCc11a9B0d4a8Eb9db214" } } Log: { Signature: { Name: { is: "onWithdraw" } } } } limit: { count: 50 } orderBy: { descending: Block_Time } ) { Block { Number Time } Arguments { Name Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Transaction { From } } }} This query helps identify significant liquidity removals, providing insights into market behavior. * Detailed Steps to Track Token Unlocks * Identify the Token and Smart Contract * First, find out which token and smart contract you're dealing with. * Query the Lockup Transactions In order to search for transactions that lock tokens, we can use Bitquery real-time APIs to get alerts in realtime. Here’s a sample query for [locked tokens](https://ide.bitquery.io/realtime-token-lock) on the Ethereum network: subscription { EVM( network: eth) { Calls(where: {Call: {Signature: {Signature: {is: "lock()"}}}}) { Call { LogCount InternalCalls } Transaction { Gas Hash From To } Block { Date Number } } }} This query fetches transactions related to the lockup, providing details such as the date, transaction hash, gas price, and gas used. It helps in understanding the initial lockup conditions and timelines. ### Monitor Unlock Events[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#monitor-unlock-events "Direct link to Monitor Unlock Events") Set up a query to keep an eye on upcoming [token unlock events](https://ide.bitquery.io/token-unlock) . For example: subscription { EVM(network: eth) { Calls(where: {Call: {Signature: {Signature: {is: "unlock()"}}}}) { Call { LogCount InternalCalls } Transaction { Gas Hash From To } Block { Date Number } } }} This subscription query tracks transactions that signal token unlocks, providing details about the dates, transaction hash, gas price, and gas used. It helps in predicting when tokens will become available for trading. 4. Set Up Notifications [Create notifications to alert](https://docs.bitquery.io/docs/usecases/monitoring-solana-blockchain-real-time-tutorial/) you when tokens are about to be unlocked. You can use email alerts, websockets, or messaging platforms like Slack. Setting up notifications ensures you stay informed about important events and can react promptly to market changes. ### Tracking Token Lock/ Unlock Without Knowing Log Signatures[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#tracking-token-lock-unlock-without-knowing-log-signatures "Direct link to Tracking Token Lock/ Unlock Without Knowing Log Signatures") In any query if you are not sure about the event name or signature, use the `includes` filter to filter the events. In the below example, let's track latest token lock and unlock events on Optimism by using `includes: "locked"` filter for Log Signatures. You can run the query [here](https://ide.bitquery.io/Optimism-token-unlocked) { EVM(dataset: archive, network: optimism) { Events( where: {Log: {Signature: {Name: {includes: "locked"}}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { ChainId Transaction { Hash } Log { Signature { Name Signature } } Fee { SenderFee } Block { Time Number } } }} ### Arbitrum Token Unlock[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#arbitrum-token-unlock "Direct link to Arbitrum Token Unlock") Arbitrum, a solution to help Ethereum scale better, has a schedule for when its tokens will be unlocked. Tracking these events helps investors predict market behavior and price impacts. By monitoring Arbitrum's token unlock schedule, investors can anticipate changes in token supply and adjust their strategies accordingly. You can run the query [here](https://ide.bitquery.io/Arbitrum-Token-Unlock_1) query ($network: evm_network, $limit: Int, $method: String) { EVM(dataset: archive, network: $network) { Events( where: {Log: {Signature: {SignatureHash: {is: $method}}}} limit: {count: $limit} orderBy: {descending: Block_Time} ) { ChainId Transaction { Hash } Log { Signature { Name } } Fee { SenderFee } Block { Time Number } } }}{ "limit": 10, "network": "arbitrum", "method": "c42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67"} ### Solana Token Unlock Schedule[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#solana-token-unlock-schedule "Direct link to Solana Token Unlock Schedule") Solana, known for its fast and cheap transactions, has important token unlock events. Tracking these can help understand its market dynamics and potential price movements. You can run the query [here](https://ide.bitquery.io/Solana-Token) { Solana { Instructions( where: {Instruction: {Program: {Name: {is: "timelock"}}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Instruction { Accounts { Address IsWritable Token { Mint Owner ProgramId } } Program { AccountNames Address Name Method } Logs } Transaction { Signature Signer } } }} Conclusion[​](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#conclusion "Direct link to Conclusion") ---------------------------------------------------------------------------------------------------------------------- Token lockups are becoming common in the cryptocurrency world. They help prevent price volatility and ensure long-term success for projects. This builds trust between investors and development teams. However, choosing the right lockup structure is crucial. It should fit the project's goals and objectives. Tracking token locks and unlocks is essential for managing cryptocurrencies effectively. Bitquery APIs offer powerful tools to monitor these events, providing detailed data and customizable queries. By using Bitquery, investors and project teams can stay informed about token movements, make well-informed decisions, and maintain market confidence. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Understanding Token Locks and Unlocks](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#understanding-token-locks-and-unlocks) * [What Are Token Locks?](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#what-are-token-locks) * [Why Track Token Unlocks?](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#why-track-token-unlocks) * [Key Data Points to Track](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#key-data-points-to-track) * [Adding Liquidity Event](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#adding-liquidity-event) * [Removing Liquidity Event](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#removing-liquidity-event) * [Monitor Unlock Events](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#monitor-unlock-events) * [Tracking Token Lock/ Unlock Without Knowing Log Signatures](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#tracking-token-lock-unlock-without-knowing-log-signatures) * [Arbitrum Token Unlock](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#arbitrum-token-unlock) * [Solana Token Unlock Schedule](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#solana-token-unlock-schedule) * [Conclusion](https://docs.bitquery.io/docs/API-Blog/track-token-lock-unlock/#conclusion) --- # Polymarket API Vs Bitquery Polymarket | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD If you are building on Polymarket—whether a dashboard, a trading bot, a research tool, or a wallet leaderboard—you have two very different data stacks to choose from. Polymarket publishes a set of **official REST and WebSocket APIs** that serve the [polymarket.com](https://polymarket.com/) application itself. Bitquery offers an **on-chain-derived GraphQL API** for the same Polymarket markets on Polygon, plus subscriptions and Kafka streams. Both give you Polymarket data. They are built for different jobs. This article walks through what each one does well, what it does not do, and when to combine them. TL;DR[​](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#tldr "Direct link to TL;DR") ------------------------------------------------------------------------------------------------------------------------ The official Polymarket APIs are the right tool when you need to **place orders**, read the **live order book**, or fetch Polymarket's own metadata (events, tags, user profiles, positions, bridge status). Those are off-chain order-book concerns. They are useful for execution and application views, but they stop where the trader's real questions begin. Bitquery's Polymarket API is the right tool for **traders and researchers**: on-chain-grounded trades, realized P&L, wallet histories, whale filtering, top-trader leaderboards, settlement flows, and cross-market analytics. An off-chain order book can tell you the current bid and your own fills; it cannot tell you **who the best traders on Polymarket are, how much every wallet has won or lost, which markets are seeing whale accumulation, or how flows move between outcomes across the protocol**. That is what on-chain trade data, exposed as GraphQL, subscriptions, and Kafka streams, is for. In most serious production stacks the two complement each other: CLOB for execution and event/market metadata, Bitquery for trader analytics, P&L, streaming, history, and anything that needs GROUP BY. Polymarket's official API surface[​](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#polymarkets-official-api-surface "Direct link to Polymarket's official API surface") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Polymarket splits its public surface into three REST APIs plus two WebSocket streams. The **Gamma API** at gamma-api.polymarket.com is the market-discovery layer. It indexes every event, market, tag, sports category, and series on the platform, and exposes endpoints such as /events, /markets, /public-search, /tags, /series, and /sports, along with lookups by market ID or slug. It requires no authentication, supports filtering by active/closed and tag, sorting by 24h volume, liquidity, start/end date, and returns Polymarket's canonical structure: events are top-level questions, markets are tradable binary outcomes nested inside them. Rate limits are generous for read traffic, at roughly 4,000 requests per 10 seconds overall, with per-endpoint caps such as /events at 500/10s and /markets at 300/10s. Gamma does not serve price history, on-chain balances, or order placement. The **CLOB API** at clob.polymarket.com is the trading layer. It handles order submission, order-book reads, price history (/prices-history), trade history, and user order management. Authenticated endpoints use API-key credentials derived from wallet signatures (Ethereum/Polygon private key signing with HMAC-SHA256 request signing), while order-book and price endpoints are public. Order submission is rate-limited in the order of 10 requests per second, and WebSocket connections are capped at around 5 concurrent per IP. The CLOB is also where you subscribe to the real-time market and user channels at wss://ws-subscriptions-clob.polymarket.com/ws/market and /ws/user. The **Data API** at data-api.polymarket.com is the user-data layer. Endpoints like GET /positions, GET /activity, and GET /trades fetch a wallet's current positions (size, average price, cash PnL, % PnL), trade history, and activity feed. Profile fields (name, pseudonym, bio, profile image) are joined inline. Polymarket also runs a public-profile endpoint on Gamma (`GET /public-profile?address=`) and a Bridge API for deposits/withdrawals. Finally, the **Real-Time Data Socket** at wss://ws-live-data.polymarket.com broadcasts activity and trades. In practice it is most useful for fills and order-book deltas; filtering by market\_slug or event\_slug has known gaps, and Polymarket does not currently support unsubscribing from channels mid-session. A few characteristics fall out of this design. The official APIs reflect the [polymarket.com](https://polymarket.com/) application view: canonical market metadata, your own positions, and real-time fills, at high rate limits. They are tightly scoped to single-entity reads. They do not natively support aggregate queries like "top 100 wallets by Polymarket volume in the last 5 days" or "largest whale trades across every Bitcoin market", and they do not expose on-chain-level fields like transaction hash, block time, log signature, condition ID events, or split/merge settlements in a single query. Historical data depth is whatever the CLOB has persisted, which is fine for order history but less convenient for ad-hoc aggregates. Bitquery's Polymarket API[​](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#bitquerys-polymarket-api "Direct link to Bitquery's Polymarket API") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Bitquery takes a different approach. It indexes the Polymarket contracts on Polygon directly, normalizes the events into a GraphQL schema, and exposes the same operations as REST queries, GraphQL subscriptions (WebSocket), or Kafka streams. Every Polymarket query lives under EVM(network: matic) with dataset: realtime, and filters on Marketplace.ProtocolName: "polymarket". The pages under **`docs/examples/polymarket-api/`** in this repo correspond to these guides: * [Polymarket API overview](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-api/) : the entry point, covering the core PredictionTrades query, live subscriptions, whale trades, and top buyers and sellers. * [Polymarket Markets API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-markets-api/) : filter markets by market\_slug, condition\_id, or token\_id through PredictionManagements. * [Polymarket Wallet & User Activity API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-api/) : recent trade counts, collateral totals, and distinct-market counts for any wallet, plus guidance on which fields belong to Polymarket's Profile, Gamma, or Bridge APIs. * [Polymarket Advanced Analytics API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-advanced-analytics-api/) : USDC TVL in core contracts, daily volume, maker/taker splits, order flow by market, whale subscriptions, settlement flows, and top markets by volume. * [Polymarket Sports API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-sports-api/) : cricket, sports, and esports markets filtered by ResolutionSource, description, or outcome label. * [Polymarket Commodity API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-commodity-api/) : oil, gold, and commodity-linked prediction markets. * [Bitcoin Up or Down Polymarket API](https://docs.bitquery.io/docs/examples/polymarket-api/bitcoin-polymarket-api/) : BTC direction markets, live odds, and top winners from settlements. * [Polymarket Wallet Realized PnL](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-realized-pnl/) : PnL derived from on-chain fills. Underneath, Bitquery's primary operations are PredictionTrades (buys and sells with buyer, seller, amount, price, USD-denominated collateral, and full market metadata), PredictionManagements (creation, resolution, and other lifecycle events), and PredictionSettlements (splits, merges, redemptions). Each can be run as a query for history or as a subscription for live streaming; swapping the single keyword is the only change required. For low-latency pipelines, Bitquery also publishes Kafka topics matic.predictions.proto and matic.broadcasted.predictions.proto (mempool), which require separate credentials. Because everything is GraphQL, aggregations, limitBy, orderBy: descendingByField, and computed expressions (e.g. `calculate(expression: "$buyUSD + $sellUSD")`) are first-class. That is what makes queries like "top 100 Polymarket markets by volume over a window" or "all whale trades above $10k across Polymarket in real time" one query instead of a client-side batch job over the CLOB. The one caveat is retention on the live endpoint: dataset: realtime holds roughly the **last 7 days**. For longer windows, a **full historical dataset is available via [Bitquery Cloud](https://docs.bitquery.io/docs/cloud/) on request**, with no need to self-persist the stream. Side-by-side comparison[​](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#side-by-side-comparison "Direct link to Side-by-side comparison") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Capability | Polymarket official APIs | Bitquery Polymarket API | | --- | --- | --- | | **Place orders** | Yes, via CLOB /order with signed requests | No (read-only) | | **Live order book (bids/asks/depth)** | Yes, via CLOB REST + WS market channel | No; trades and settlements, not the L2 book | | **Event, market, tag, series metadata** | Yes, via Gamma API, canonical | Partial: market ID, question, outcomes, condition ID, resolution source (on-chain derived) | | **User positions / PnL** | Yes, via Data API /positions | Derivable from trades + settlements; [realized PnL example](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-realized-pnl/) | | **User activity feed** | Yes, via Data API /activity | Yes, via [Wallet API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-api/) | | **Price history per token** | Yes, via CLOB /prices-history | Yes, via PredictionTrades with time filter | | **On-chain fields** (tx hash, block time, log signatures, condition ID events) | Limited | Yes, native on every row | | **Aggregations** (top N markets by volume, top wallets, maker/taker split) | Client-side | Native GraphQL: sum, count(distinct:), limitBy, orderBy: descendingByField | | **Whale trade filtering across all markets** | Manual | One subscription; see the [whale trades example](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-api/) | | **Real-time streaming** | WebSocket (ws-subscriptions-clob, ws-live-data), cannot unsubscribe, some filter gaps | GraphQL subscriptions plus Kafka matic.predictions.proto | | **Settlement (split / merge / redeem) analytics** | Indirect | Native; see [Advanced Analytics](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-advanced-analytics-api/) | | **Cross-market vertical APIs** (sports, commodity, BTC up/down) | Filter manually on Gamma | Purpose-built: [Sports](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-sports-api/)
, [Commodity](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-commodity-api/)
, [Bitcoin Up or Down](https://docs.bitquery.io/docs/examples/polymarket-api/bitcoin-polymarket-api/) | | **TVL / USDC custody balances** | Not exposed | Yes, via TransactionBalances on Conditional Tokens + neg-risk collateral | | **Historical depth** | Full CLOB history | realtime dataset ~last 7 days; full historical dataset available via [Bitquery Cloud](https://docs.bitquery.io/docs/cloud/)
on request | | **Auth** | API-key + HMAC-SHA256 (CLOB); none (Gamma) | Bitquery API token; Kafka requires separate creds | | **Rate limits** | 4,000/10s (Gamma), ~10 orders/sec (CLOB) | No data or rate limits on streams; Kafka for enterprise streaming and scaling to 1,000+ simultaneous users | When to use which[​](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#when-to-use-which "Direct link to When to use which") ------------------------------------------------------------------------------------------------------------------------------------------------------------- Reach for the **official APIs** when you are executing orders, showing a user their own positions and PnL as Polymarket displays them, reading live order-book depth for market-making or pricing, pulling the canonical event tree (tags, series, sports categories, cover images, resolution links), or wiring into Polymarket's deposit/withdrawal bridge. These are the authoritative source for "what does [polymarket.com](https://polymarket.com/) show right now for this account." Reach for **Bitquery** when you need GraphQL aggregations, server-side filtering, and on-chain fields in a single request. Typical use cases include: * Leaderboards of top buyers and sellers by USD volume over a rolling window. * Whale monitors streaming every trade above a USD threshold across all markets from a single subscription. * Volume rankings for the top 100 Polymarket markets by buy-plus-sell USD in the last 24 hours. * Category dashboards for BTC up/down, sports, or commodity markets with live odds. * Settlement flow analytics using split/merge/redeem totals as a liquidity and open-interest proxy. * Low-latency pipelines consuming matic.predictions.proto from Kafka for mempool-level insight. * Cross-wallet clustering for forensic tracing of Polymarket activity. More advanced (alpha-focused) use cases: * **Alpha signals from order flow**: net buy-pressure imbalance per market as a directional signal, with USD-weighted buy vs sell sums over rolling windows. * **Smart-money tracking**: identify historically profitable wallets via realized PnL and copy their live trades through whale subscriptions filtered on Buyer/Seller. * **Mean-reversion on odds dislocations**: detect markets where outcome price moves sharply against thin liquidity by joining trade size to pre-trade mid-price. * **Momentum from whale accumulation**: flag condition IDs where top-N wallets turn net-long above a threshold within the last hour. * **News-vs-odds divergence**: cross-reference ResolutionSource updates against live odds subscriptions to surface mispriced markets around breaking events. * **Event-driven alpha**: pre-load markets by slug or tag (elections, earnings, fights, matches) and subscribe to whale trades as the event unfolds. * **Cross-market arbitrage**: correlate implied probabilities between related Polymarket markets (e.g. winner vs margin-of-victory) and flag inconsistent pricing. * **Settlement/redemption signals**: watch PredictionSettlements for large merges or redeems as a leading indicator that informed traders are closing positions. * **Mempool front-running detection**: use matic.broadcasted.predictions.proto to spot pending whale trades before they confirm, useful for both MEV research and defensive execution. * **Cohort-based backtests**: segment wallets by realized-PnL percentile over a window, replay their trades against historical odds, and test whether following the top cohort produces alpha. * **Liquidity-migration detection**: track USDC TVL changes across Conditional Tokens and neg-risk collateral to flag when capital is rotating between market clusters. * **Sentiment indices**: roll up weighted outcome probabilities across a category (macro, geopolitics, crypto) into a single index consumable by trading models. * **Risk and exposure monitoring**: for funds or market makers, aggregate position exposure across every condition ID a wallet has touched in real time. A reasonable production architecture looks like this: * **Gamma** for canonical market catalogs. * **CLOB** for execution and order-book depth. * **Data API** for user-facing account screens. * **Bitquery** for analytics, alerting, long-running streams, and any query that needs GROUP BY. A practical starting set[​](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#a-practical-starting-set "Direct link to A practical starting set") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- If you are new to Bitquery's Polymarket coverage, four queries exercise most of the surface area: 1. The basic recent-trades query from the [Polymarket API overview](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-api/) , which confirms your API token and shows the shape of a PredictionTrade. 2. The volume-ranking query from the same doc, which demonstrates limitBy, orderBy: descendingByField, and the computed sumBuyAndSell expression. 3. A live whale-trade subscription: swap the query keyword for subscription and filter on `CollateralAmountInUSD: { gt: "10000" }` to push events as they happen. 4. The daily volume and maker/taker split from the [Advanced Analytics page](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-advanced-analytics-api/) , which shows how far GraphQL takes you before any client-side aggregation is required. All of these are runnable from the Bitquery IDE (linked inline from each docs page) before you ever issue an API token. See it live[​](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#see-it-live "Direct link to See it live") ------------------------------------------------------------------------------------------------------------------------------------------- If you want a visual reference for what Bitquery's Polymarket data looks like rendered as a live dashboard—showing top markets, whale trades, odds, and volumes—the [DexRabbit Polymarket Predictions dashboard](https://dexrabbit.bitquery.io/polymarket-predictions) runs directly on these APIs. Each panel ships with a "Get API" button that exposes the exact GraphQL query behind the chart, which you can copy into your own stack. Bottom line[​](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#bottom-line "Direct link to Bottom line") ------------------------------------------------------------------------------------------------------------------------------------------- The two APIs are not rivals; they answer different questions. The official Polymarket APIs tell you **what Polymarket the application knows about your account and the current book**. Bitquery tells you **what actually happened on-chain across every Polymarket market, in a shape you can aggregate, stream, and replay**. Picking the right one, or more often using both, comes down to whether your next query starts with "place this order" or "across all markets…". Further reading[​](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#further-reading "Direct link to Further reading") ------------------------------------------------------------------------------------------------------------------------------------------------------- Canonical Bitquery Polymarket references: * [Polymarket API, Trade, Prices & Market Data](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-api/) * [Polymarket Markets API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-markets-api/) for CTF Exchange, condition\_id, and token\_id lookups * [Polymarket Wallet & User Activity API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-api/) * [Polymarket Advanced Analytics API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-advanced-analytics-api/) Vertical guides: * [Polymarket Sports API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-sports-api/) * [Polymarket Commodity API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-commodity-api/) * [Bitcoin Up or Down Polymarket API](https://docs.bitquery.io/docs/examples/polymarket-api/bitcoin-polymarket-api/) * [Polymarket Wallet Realized PnL](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-realized-pnl/) Infrastructure and live reference: * [Kafka Streaming Concepts](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/) * [DexRabbit Polymarket Predictions dashboard](https://dexrabbit.bitquery.io/polymarket-predictions) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [TL;DR](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#tldr) * [Polymarket's official API surface](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#polymarkets-official-api-surface) * [Bitquery's Polymarket API](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#bitquerys-polymarket-api) * [Side-by-side comparison](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#side-by-side-comparison) * [When to use which](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#when-to-use-which) * [A practical starting set](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#a-practical-starting-set) * [See it live](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#see-it-live) * [Bottom line](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#bottom-line) * [Further reading](https://docs.bitquery.io/docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api/#further-reading) --- # Algorand Transfers API - Track ALGO & ASA Token Transfers [Skip to main content](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Transfers API returns ALGO and ASA (Algorand Standard Asset) movements with amounts in native units and USD, sender and receiver addresses, block context, and transaction hashes. Filter by asset ID, date range, or address to build wallet history feeds, treasury monitors, and token analytics dashboards. Endpoint Algorand GraphQL queries are served at `https://graphql.bitquery.io`. Get transfers for a specific asset in a date range[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/#get-transfers-for-a-specific-asset-in-a-date-range "Direct link to Get transfers for a specific asset in a date range") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns transfers for asset ID `31566704` between two dates, ordered by block height descending. Swap the `currency` filter for any ASA ID or ALGO. [Run query](https://ide.bitquery.io/All-the-transfers-of-an-asset-on-Algorand-Mainnet-in-a-specific-timeframe) query MyQuery { algorand(network: algorand) { transfers( options: {desc: "block.height", limit: 10, offset: 0} currency: {is: 31566704} date: {since: "2024-07-01", till: "2024-07-09"} ) { amount amount_usd: amount(in: USD) currency { tokenType tokenId symbol name decimals address } receiver { address annotation } sender { address annotation } block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } transferType transaction { hash } } }} Get transfers to or from an address for a specific asset[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/#get-transfers-to-or-from-an-address-for-a-specific-asset "Direct link to Get transfers to or from an address for a specific asset") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Uses the `any` filter to match transfers where the address appears as either sender or receiver. [Run query](https://ide.bitquery.io/traansfers-where-a-currency-is-sent-from-or-sent-to-a-particular-address) query MyQuery { algorand(network: algorand) { transfers( date: {since: "2024-07-01", till: "2024-07-09"} currency: {is: 849191641} any: [ {sender: {in: ["OLP2LMN4NDMT6FKRFCMV5J7U3LTUFXKOHOMGWYBMIA675FSRVWT4C5HWVI"]}} {receiver: {in: ["OLP2LMN4NDMT6FKRFCMV5J7U3LTUFXKOHOMGWYBMIA675FSRVWT4C5HWVI"]}} ] ) { block { timestamp { time(format: "%Y-%m-%d %H:%M:%S") } height } sender { address annotation } receiver { address annotation } currency { address symbol } amount amount_usd: amount(in: USD) transaction { hash } } }} Video: Algorand transfer data with Bitquery[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/#video-algorand-transfer-data-with-bitquery "Direct link to Video: Algorand transfer data with Bitquery") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Related resources[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/#related-resources "Direct link to Related resources") ----------------------------------------------------------------------------------------------------------------------------------------------------- * [Algorand Address API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/) — wallet balances and contract bytecode * [Algorand Coinpath API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/) — multi-hop fund flow tracing Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get transfers for a specific asset in a date range](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/#get-transfers-for-a-specific-asset-in-a-date-range) * [Get transfers to or from an address for a specific asset](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/#get-transfers-to-or-from-an-address-for-a-specific-asset) * [Video: Algorand transfer data with Bitquery](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/#video-algorand-transfer-data-with-bitquery) * [Related resources](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/#related-resources) --- # Algorand Transactions API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Transactions API returns transaction-level data on Algorand: block context, fees, types, senders, groups, and currency metadata. Use it for paginated transaction feeds, daily activity dashboards, sender analytics, and hash-based lookups. Endpoint Algorand GraphQL queries are served at `https://graphql.bitquery.io`. Get the latest Algorand transactions[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#get-the-latest-algorand-transactions "Direct link to Get the latest Algorand transactions") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the 10 most recent transactions after a given date with block height, timestamp, currency, fee, group, hash, sender, subtype, and type. { algorand(network: algorand) { transactions( date: {after: "2023-08-05"} options: {desc: "block.timestamp.iso8601", limit: 10} ) { block { height timestamp { iso8601 } } currency { address name } fee group hash index sender { address } subtype type } }} Get transactions in a date range[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#get-transactions-in-a-date-range "Direct link to Get transactions in a date range") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Paginated query for all transactions in a specific window. [Run query](https://ide.bitquery.io/All-Transactions-on-Algorand#) query MyQuery { algorand(network: algorand) { transactions( options: {desc: "block.height", limit: 10, offset: 0} date: {since: "2024-07-08", till: "2024-07-09"} ) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } currency { tokenType tokenId symbol name decimals address } fee firstRound poolerror note lastRound index hash group genesisId genesisHash subtype type sender { address annotation } } }} Get daily transaction counts for recent days[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#get-daily-transaction-counts-for-recent-days "Direct link to Get daily transaction counts for recent days") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the number of transactions per day over the last 10 days, ordered by date descending. [Run query](https://ide.bitquery.io/Daily-Transaction-Count-for-last-10-days#) query MyQuery { algorand(network: algorand) { transactions(options: {desc: "date.date", limit: 10}) { date { date } count } }} Count unique senders for a single day[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#count-unique-senders-for-a-single-day "Direct link to Count unique senders for a single day") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Counts distinct transaction senders on a specific date. [Run query](https://ide.bitquery.io/Daily-Unique-Txn-Senders-on-algorand#) query MyQuery { algorand(network: algorand) { transactions(date: {is: "2024-07-08"}) { Unique_senders: count(uniq: senders) } }} Count transactions sent from an address[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#count-transactions-sent-from-an-address "Direct link to Count transactions sent from an address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the total number of transactions sent by a specific address. { algorand(network: algorand) { transactions( txSender: {is: "ADDRESS_HERE"} ) { count } }} Look up a transaction by hash[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#look-up-a-transaction-by-hash "Direct link to Look up a transaction by hash") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns block context, currency, sender, subtype, and type for a single transaction hash. { algorand(network: algorand) { transactions( txHash: {is: "TXN_HASH_HERE"} ) { block { height timestamp { iso8601 } } currency { address name } sender { address } subtype type } }} Video: Algorand transaction data with Bitquery[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#video-algorand-transaction-data-with-bitquery "Direct link to Video: Algorand transaction data with Bitquery") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Related resources[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#related-resources "Direct link to Related resources") -------------------------------------------------------------------------------------------------------------------------------------------------------- * [Algorand Transfers API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/) — ALGO and ASA transfer history * [Algorand Blocks API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-blocks-api/) — block-level context for each transaction Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get the latest Algorand transactions](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#get-the-latest-algorand-transactions) * [Get transactions in a date range](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#get-transactions-in-a-date-range) * [Get daily transaction counts for recent days](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#get-daily-transaction-counts-for-recent-days) * [Count unique senders for a single day](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#count-unique-senders-for-a-single-day) * [Count transactions sent from an address](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#count-transactions-sent-from-an-address) * [Look up a transaction by hash](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#look-up-a-transaction-by-hash) * [Video: Algorand transaction data with Bitquery](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#video-algorand-transaction-data-with-bitquery) * [Related resources](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/#related-resources) --- # Bitcoin Coinpath API - Trace BTC Fund Flows Across Addresses [Skip to main content](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Coinpath walks Bitcoin fund flows between addresses — forward to see where funds went, backward to see where they came from. Use it for AML investigations, source-of-funds verification, exchange deposit tracing, and mapping transaction paths across wallets. Video Tutorial | Investigate Bitcoin Address Fund flow Visually | Bitquery Coinpath API[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#video-tutorial--investigate-bitcoin-address-fund-flow-visually--bitquery-coinpath-api "Direct link to Video Tutorial | Investigate Bitcoin Address Fund flow Visually | Bitquery Coinpath API") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Endpoint Bitcoin GraphQL queries are served at `https://graphql.bitquery.io`. Trace outbound fund flow from a Bitcoin address[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#trace-outbound-fund-flow-from-a-bitcoin-address "Direct link to Trace outbound fund flow from a Bitcoin address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns direct recipients of an address with USD amounts, block heights, and transaction hashes. The `seed` option controls the starting point for repeated runs when you want consistent samples. [Run query](https://ide.bitquery.io/Destination-of-Funds-from-a-Specific-Address-on-Bitcoin) . { bitcoin(network: bitcoin) { coinpath( initialAddress: {is: "bc1p4kufll9uhnpkgzuc65slcxd2qaw2hl9xecket3h8yyu4awglcsqslqaztd"} date: {after: "2023-10-10"} options: {limit: 10, asc: "block.height", seed: 10} ) { amount(in: USD) block { height } sender { address } receiver { address } transaction { hash } currency { name address } } }} For multi-hop tracing, add `depth: {lteq: N}` (typically 3–5; deeper for forensic work). Switch direction with `options: {direction: inbound}` to walk backward instead. Track all incoming fund paths to a Bitcoin address[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#track-all-incoming-fund-paths-to-a-bitcoin-address "Direct link to Track all incoming fund paths to a Bitcoin address") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Use the `receiver` filter to see who sent BTC to a specific wallet. Returns sender addresses, USD amounts, and transaction hashes — the standard "who funded this wallet?" query. query ($network: BitcoinNetwork!) { bitcoin(network: $network) { coinpath( date: {after: "2023-10-10"} options: {limit: 10, desc: "block.height"} receiver: {is: "bc1p4kufll9uhnpkgzuc65slcxd2qaw2hl9xecket3h8yyu4awglcsqslqaztd"} ) { amount(in: USD) block { height } sender { address } receiver { address } transaction { hash } } }} Swap `receiver` for `sender` to trace outflows instead, or add `initialAddress` to find paths between two specific addresses. Verify a path between two specific Bitcoin addresses[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#verify-a-path-between-two-specific-bitcoin-addresses "Direct link to Verify a path between two specific Bitcoin addresses") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Combine `initialAddress` and `receiver` to check whether BTC moved from address A to address B — useful for chain-of-custody verification and direct flow auditing. query ($network: BitcoinNetwork!) { bitcoin(network: $network) { coinpath( date: {after: "2023-10-10"} options: {limit: 10, desc: "block.height"} receiver: {is: "bc1p4kufll9uhnpkgzuc65slcxd2qaw2hl9xecket3h8yyu4awglcsqslqaztd"} initialAddress: {is: "bc1pu349c0fvmqnv5s0aj3aracrsvn696hzhuyyukn6r5c9h03y88plql53h5h"} ) { amount(in: USD) block { height } sender { address } receiver { address } transaction { hash } } }} Raise `limit` for more rows and add `depth: {lteq: N}` to follow multi-hop paths between the two addresses. Related resources[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#related-resources "Direct link to Related resources") -------------------------------------------------------------------------------------------------------------------------------------------------- * [Bitcoin Address API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/) — balances and activity stats * [Bitcoin Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/) — UTXO-level inflows and outflows * [Bitcoin Transactions API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/) — per-tx detail Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Video Tutorial | Investigate Bitcoin Address Fund flow Visually | Bitquery Coinpath API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#video-tutorial--investigate-bitcoin-address-fund-flow-visually--bitquery-coinpath-api) * [Trace outbound fund flow from a Bitcoin address](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#trace-outbound-fund-flow-from-a-bitcoin-address) * [Track all incoming fund paths to a Bitcoin address](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#track-all-incoming-fund-paths-to-a-bitcoin-address) * [Verify a path between two specific Bitcoin addresses](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#verify-a-path-between-two-specific-bitcoin-addresses) * [Related resources](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/#related-resources) --- # Bitcoin Inputs Outputs | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Bitcoin runs on an unspent-transaction-output (UTXO) model — every transaction consumes previous outputs (inputs) and creates new ones (outputs). These APIs give you direct access to that UTXO data with BTC and USD values, block context, transaction hashes, and per-address filtering. They're the foundation for balance reconstruction, miner reward tracking, historical price lookups, and detailed wallet activity feeds. Endpoint Bitcoin GraphQL queries are served at `https://graphql.bitquery.io`. Get the BTC price on a given date[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#get-the-btc-price-on-a-given-date "Direct link to Get the BTC price on a given date") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Pulls the BTC/USD price implied by any output on a given date — Bitquery stores the spot value at the time of each transaction, so you can derive a historical price by dividing USD value by BTC value. [Run query](https://ide.bitquery.io/btc-price-in-2016) . query MyQuery { bitcoin { outputs(date: {is: "2016-01-01"}) { value usd: value(in: USD) expression(get: "usd/value") } }} Get a Bitcoin balance at a specific block height[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#get-a-bitcoin-balance-at-a-specific-block-height "Direct link to Get a Bitcoin balance at a specific block height") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sum outputs and subtract inputs with a `height: {lteq: N}` cap to get the wallet's balance at a specific point on-chain. Useful for audits, tax snapshots, and point-in-time portfolio reporting. [Run query](https://ide.bitquery.io/bitcoin-balance-on-a-given-block-height) . { bitcoin(network: bitcoin) { inputs( height: {lteq: 919195} inputAddress: {is: "bc1ppu6akjngyvpxwz0w38n4evcygwh08tjtmcc0dx6ft2zzgkxtd97stwehcq"} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) } outputs( height: {lteq: 919195} outputAddress: {is: "bc1ppu6akjngyvpxwz0w38n4evcygwh08tjtmcc0dx6ft2zzgkxtd97stwehcq"} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) } }} List UTXO inputs and outputs for an address inside a block range[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#list-utxo-inputs-and-outputs-for-an-address-inside-a-block-range "Direct link to List UTXO inputs and outputs for an address inside a block range") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns spent and received UTXOs for a specific address between two block heights, with date, transaction hash, block height, address annotation, and value. [Run query](https://ide.bitquery.io/bitcoin-inputs-and-outputs-for-address) . { bitcoin(network: bitcoin) { spendvolumes: inputs( inputAddress: {is: "bc1p4kufll9uhnpkgzuc65slcxd2qaw2hl9xecket3h8yyu4awglcsqslqaztd"} height: {between: [822372, 822376]} ) { date { date } any(of: amount) block { height } transaction { hash } inputAddress { annotation address } value } recievevolumes: outputs( height: {between: [822372, 822376]} outputAddress: {is: "bc1p4kufll9uhnpkgzuc65slcxd2qaw2hl9xecket3h8yyu4awglcsqslqaztd"} ) { date { date } any(of: amount) transaction { hash } block { height } outputAddress { annotation address } value } }} The same shape works with `date: {since: ..., till: ...}` instead of `height: {between: [...]}` when you want to filter by time rather than block range. Get daily miner block rewards on Bitcoin[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#get-daily-miner-block-rewards-on-bitcoin "Direct link to Get daily miner block rewards on Bitcoin") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Mining rewards live in coinbase outputs (the first transaction in every block, `txIndex: 0`) with `outputDirection: mining`. This query returns daily reward totals per miner address along with the number of unique blocks they mined — the standard view for tracking mining pool activity and reward distribution. [Run query](https://ide.bitquery.io/bitcoin-miners-rewards) . query ($network: BitcoinNetwork!, $dateFormat: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) { bitcoin(network: $network) { outputs( options: {asc: "date.date"} date: {since: $from, till: $till} txIndex: {is: 0} outputDirection: {is: mining} outputScriptType: {notIn: ["nulldata", "nonstandard"]} ) { address: outputAddress { address annotation } date { date(format: $dateFormat) } reward: value count(uniq: blocks) } }} Count miner activity in a time window[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#count-miner-activity-in-a-time-window "Direct link to Count miner activity in a time window") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Pulls the activity count per miner address inside a date range. Drop or extend the date window to size the cohort however you need. [Run query](https://ide.bitquery.io/get-miners-activity-in-a-specific-timeframe) . query MyQuery { bitcoin(network: bitcoin) { outputs( outputDirection: {is: mining} date: {since: "2025-01-01", till: "2025-01-10"} outputScriptType: {notIn: ["nulldata", "nonstandard"]} ) { outputAddress { address } count } }} Find a miner's first mining activity[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#find-a-miners-first-mining-activity "Direct link to Find a miner's first mining activity") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ For a specific set of miner addresses, this query returns the first block each one mined. Useful for cohort analysis, miner onboarding studies, or building "first seen" timelines. [Run query](https://ide.bitquery.io/get-miners-first-activity) . query MyQuery { bitcoin(network: bitcoin) { outputs( outputDirection: {is: mining} options: {asc: "block.timestamp.iso8601", limitBy: {each: "outputAddress.address", limit: 1}} outputAddress: {in: ["1K6KoYC69NnafWJ7YgtrpwJxBLiijWqwa6", "1KGG9kvV5zXiqyQAMfY32sGt9eFLMmgpgX"]} outputScriptType: {notIn: ["nulldata", "nonstandard"]} ) { outputAddress { address } block { timestamp { iso8601 } } } }} Video tutorial: daily miner rewards[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#video-tutorial-daily-miner-rewards "Direct link to Video tutorial: daily miner rewards") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Related resources[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#related-resources "Direct link to Related resources") ---------------------------------------------------------------------------------------------------------------------------------------------------- * [Bitcoin Address API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/) — balances and activity stats per address * [Bitcoin Coinpath API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/) — multi-hop fund flow tracing * [Bitcoin Transactions API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/) — transaction-level totals and fees * [Bitcoin Kafka stream](https://docs.bitquery.io/docs/streams/protobuf/chains/Bitcoin-protobuf/) — real-time UTXO delivery Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get the BTC price on a given date](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#get-the-btc-price-on-a-given-date) * [Get a Bitcoin balance at a specific block height](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#get-a-bitcoin-balance-at-a-specific-block-height) * [List UTXO inputs and outputs for an address inside a block range](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#list-utxo-inputs-and-outputs-for-an-address-inside-a-block-range) * [Get daily miner block rewards on Bitcoin](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#get-daily-miner-block-rewards-on-bitcoin) * [Count miner activity in a time window](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#count-miner-activity-in-a-time-window) * [Find a miner's first mining activity](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#find-a-miners-first-mining-activity) * [Video tutorial: daily miner rewards](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#video-tutorial-daily-miner-rewards) * [Related resources](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/#related-resources) --- # Base Miner Balance Tracker | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Base Miner Balance Tracker API provides real-time balance updates for Base miners, tracking their mining rewards, uncle block rewards, and transaction fee rewards. Track Miner Balance Updates[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#track-miner-balance-updates "Direct link to Track Miner Balance Updates") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor balance changes for Base miners, including block rewards, uncle block rewards, and transaction fee rewards. Try the API [here](https://ide.bitquery.io/Track-Miner-Balance-Updates-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [1, 2, 5] } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} **Balance Change Reason Codes for Miners:** * **Code 1**: `BalanceIncreaseRewardMineUncle` - Reward for mining an uncle block * **Code 2**: `BalanceIncreaseRewardMineBlock` - Reward for mining a block * **Code 5**: `BalanceIncreaseRewardTransactionFee` - Transaction tip increasing block builder's balance Track Block Mining Rewards[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#track-block-mining-rewards "Direct link to Track Block Mining Rewards") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Track rewards received by miners for successfully mining blocks: Try the API [here](https://ide.bitquery.io/Track-Block-Mining-Rewards-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 2 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Track Uncle Block Rewards[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#track-uncle-block-rewards "Direct link to Track Uncle Block Rewards") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor rewards for mining uncle blocks: Try the API [here](https://ide.bitquery.io/Track-Uncle-Block-Rewards-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 1 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Track Transaction Fee Rewards[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#track-transaction-fee-rewards "Direct link to Track Transaction Fee Rewards") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor transaction fee rewards received by miners: Try the API [here](https://ide.bitquery.io/Track-Transaction-Fee-Rewards-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Filter by Miner Address[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#filter-by-miner-address "Direct link to Filter by Miner Address") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track balance changes for a specific miner address: Try the API [here](https://ide.bitquery.io/Filter-by-Miner-Address-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { Address: { is: "0xMinerAddressHere" } BalanceChangeReasonCode: { in: [1, 2, 5] } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track Miner Balance Updates](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#track-miner-balance-updates) * [Track Block Mining Rewards](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#track-block-mining-rewards) * [Track Uncle Block Rewards](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#track-uncle-block-rewards) * [Track Transaction Fee Rewards](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#track-transaction-fee-rewards) * [Filter by Miner Address](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-miner-balance-tracker/#filter-by-miner-address) --- # BNB Chain NFT API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/bsc-nft/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we'll have a look at some examples using the BSC NFT API. Track Transfers of a specific NFT on BSC in Realtime[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-nft/#track-transfers-of-a-specific-nft-on-bsc-in-realtime "Direct link to Track Transfers of a specific NFT on BSC in Realtime") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This query subscribes you to the real time non-fungible token (NFT) transfers of a specific nft contract on the BSC network. You can find the query [here](https://ide.bitquery.io/Track-realtime-NFT-Transfers-of-a-specific-NFT-on-BSC-chain) subscription { EVM(network: bsc) { Transfers( where: {Transfer: {Currency: {Fungible: false, SmartContract: {is: "0x3d2c83bbbbfb54087d46b80585253077509c21ae"}}}} ) { Block { Hash Number } Transfer { Amount Currency { Name SmartContract Symbol Native } Sender Receiver } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track Transfers of a specific NFT on BSC in Realtime](https://docs.bitquery.io/docs/blockchain/BSC/bsc-nft/#track-transfers-of-a-specific-nft-on-bsc-in-realtime) --- # Polygon Matic Uniswap API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD This section provides you with a set of queries that provides an insight about the Uniswap DEX on MATIC. Live Uniswap v3 Trades on Polygon (Trading API — recommended)[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#live-uniswap-v3-trades-on-polygon-trading-api--recommended "Direct link to Live Uniswap v3 Trades on Polygon (Trading API — recommended)") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This subscription streams every Uniswap v3 trade on Polygon in real time with **USD price and USD amounts on every row**, MEV-filtered. Run it [in the IDE](https://ide.bitquery.io/Trading-API-Uniswap-v3-Trades-Matic) . subscription { Trading { Trades( where: {Pair: {Market: {Network: {is: "Matic"}, Protocol: {is: "uniswap_v3"}}}} ) { Block { Time } Price PriceInUsd AmountsInUsd { Base Quote } Trader { Address } Pair { Token { Symbol } QuoteToken { Symbol } Market { Protocol } } } }} Get Latest Trades on Uniswap v3[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-latest-trades-on-uniswap-v3 "Direct link to Get Latest Trades on Uniswap v3") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Below query will subscribe you to the latest DEX Trades on MATIC Uniswap v3. Try out the API [here](https://ide.bitquery.io/uniswap-v3-trades-matic) query MyQuery { EVM(dataset: realtime, network: matic) { DEXTrades( where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v3"}}}} limit: {count: 10} orderBy:{descending:Block_Time} ) { Transaction { From To } Trade { Dex { ProtocolName SmartContract } Buy { Currency { Name } Price Amount } Sell { Amount Currency { Name } Price } } Block { Time } } }} Get Top Traders of a token on uniswap v3[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-top-traders-of-a-token-on-uniswap-v3 "Direct link to Get Top Traders of a token on uniswap v3") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This query will fetch you top traders of a token for the selected network. You can test the query [here](https://ide.bitquery.io/top-traders-of-a-token-on-uniswapv3-matic) . query topTraders($network: evm_network, $token: String) { EVM(network: $network) { DEXTradeByTokens( orderBy: {descendingByField: "volumeUsd"} limit: {count: 100} where: {Trade: {Currency: {SmartContract: {is: $token}}, Dex: {ProtocolName: {is: "uniswap_v3"}}}} ) { Trade { Dex { OwnerAddress ProtocolFamily ProtocolName } Buyer } bought: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: buy}}}}) sold: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}}) volume: sum(of: Trade_Amount) volumeUsd: sum(of: Trade_Side_AmountInUSD) } }}{ "network": "matic", "token": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"} OHLC in USD of a Token[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#ohlc-in-usd-of-a-token "Direct link to OHLC in USD of a Token") ------------------------------------------------------------------------------------------------------------------------------------------------------------ This query retrieves the Open, High, Low, and Close (OHLC) prices in USD for a specific token traded on Uniswap v3 over a defined time period and interval. You can try out the API [here](https://ide.bitquery.io/OHLCV-on-MATIC-uniswap-v3#) on Bitquery IDE. { EVM(network: bsc, dataset: realtime) { DEXTradeByTokens( orderBy: {descendingByField: "Block_testfield"} where: {Trade: {Currency: {SmartContract: {is: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}}, PriceAsymmetry: {lt: 0.1}, Dex: {ProtocolName: {is: "uniswap_v3"}}, Side: {Currency: {SmartContract: {is: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"}}, Type: {is: buy}}}} limit: {count: 10} ) { Block { testfield: Time(interval: {in: hours, count: 1}) } volume: sum(of: Trade_Amount) Trade { high: Price(maximum: Trade_Price) low: Price(minimum: Trade_Price) open: Price(minimum: Block_Number) close: Price(maximum: Block_Number) } count } }} Get trading volume, buy volume, sell volume of a token[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-trading-volume-buy-volume-sell-volume-of-a-token "Direct link to Get trading volume, buy volume, sell volume of a token") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query fetches you the traded volume, buy volume and sell volume of a token `0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270`. Try out the API [here](https://ide.bitquery.io/trade_volume_matic_uniswapv3) . query MyQuery { EVM(network: matic) { DEXTradeByTokens( where: {Trade: {Currency: {SmartContract: {is: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}}}, TransactionStatus: {Success: true}, Block: {Time: {since: "2025-02-12T00:00:00Z"}}} ) { Trade { Currency { Name Symbol SmartContract Decimals } } traded_volume_in_usd: sum(of: Trade_Side_AmountInUSD) sell_volume_in_usd: sum( of: Trade_Side_AmountInUSD if: {Trade: {Side: {Type: {is: buy}}}} ) buy_volume_in_usd: sum( of: Trade_Side_AmountInUSD if: {Trade: {Side: {Type: {is: sell}}}} ) } }} Get top bought tokens on uniswap v3[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-top-bought-tokens-on-uniswap-v3 "Direct link to Get top bought tokens on uniswap v3") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query will fetch you the top bought tokens on uniswap v3. Try out the query [here](https://ide.bitquery.io/top-bought-tokens-on-matic-uniswap-v3_4) . query timeDiagram($network: evm_network) { EVM(network: $network) { DEXTradeByTokens( orderBy: {descendingByField: "buy"} limit: {count: 100} where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v3"}}}} ) { Trade { Currency { Symbol Name SmartContract } Dex{ ProtocolName } } buy: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}}) sell: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}}) } }}{ "network": "matic"} Get top sold tokens on uniswap v3[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-top-sold-tokens-on-uniswap-v3 "Direct link to Get top sold tokens on uniswap v3") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query will fetch you the top bought tokens on uniswap v3. Try out the query [here](https://ide.bitquery.io/top-sold-tokens-on-matic-uniswap-v3) . query timeDiagram($network: evm_network) { EVM(network: $network) { DEXTradeByTokens( orderBy: {descendingByField: "sell"} limit: {count: 100} where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v3"}}}} ) { Trade { Currency { Symbol Name SmartContract } Dex{ ProtocolName } } buy: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}}) sell: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}}) } }}{ "network": "matic"} Frequently Asked Questions -------------------------- How do I get Uniswap trades on Polygon? Query EVM.DEXTrades with network matic filtered to Uniswap protocol names. Can I filter by token pair? Yes — filter Buy and Sell Currency MintAddress or Symbol in your where clause. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Live Uniswap v3 Trades on Polygon (Trading API — recommended)](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#live-uniswap-v3-trades-on-polygon-trading-api--recommended) * [Get Latest Trades on Uniswap v3](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-latest-trades-on-uniswap-v3) * [Get Top Traders of a token on uniswap v3](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-top-traders-of-a-token-on-uniswap-v3) * [OHLC in USD of a Token](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#ohlc-in-usd-of-a-token) * [Get trading volume, buy volume, sell volume of a token](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-trading-volume-buy-volume-sell-volume-of-a-token) * [Get top bought tokens on uniswap v3](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-top-bought-tokens-on-uniswap-v3) * [Get top sold tokens on uniswap v3](https://docs.bitquery.io/docs/blockchain/Matic/matic-uniswap-api/#get-top-sold-tokens-on-uniswap-v3) --- # esGMX (Escrowed) and vGLP (Vested) API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD When a wallet stakes GMX tokens in the GMX protocol, they are escrowed and earn Escrowed GMX (esGMX) tokens as rewards. "GMX Rewards provide benefits for long-term users of the protocol; these rewards come in the form of Escrowed GMX and Multiplier Points." The GLP pool is where all trades on the platform are settled. Regardless of trading outcomes, GLP holders are rewarded with 70% of platform fees, offering a substantial yield opportunity based on revenue rather than token emissions. This section covers how to retrieve staking information on esGMX and vGLP. Latest esGMX Transfers[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/#latest-esgmx-transfers "Direct link to Latest esGMX Transfers") ------------------------------------------------------------------------------------------------------------------------------------------------------- The following query retrieves the latest esGMX transfers on the Arbitrum network: { EVM(network: arbitrum) { Events( where: { Log: { SmartContract: { is: "0xf42ae1d54fd613c9bb14810b0588faaa09a426ca" }, Signature: { Name: { is: "Transfer" } } } } orderBy: { descending: Block_Time } limit: { count: 10 } ) { Arguments { Name Type Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } } } Block { Time } Transaction { Hash } } }} Latest esGMX Claims[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/#latest-esgmx-claims "Direct link to Latest esGMX Claims") ---------------------------------------------------------------------------------------------------------------------------------------------- By tracking the "claim" smartcontract calls, you can get info on any pending GMX tokens from esGMX that have been vested and converted to GMX tokens. The following query retrieves the latest esGMX claims on the Arbitrum network: [Run the query here](https://ide.bitquery.io/latest-esGMX-Claims) { EVM(network: arbitrum, dataset: archive) { Calls( limit: { count: 100 } where: { Call: { To: { is: "0xf42ae1d54fd613c9bb14810b0588faaa09a426ca" }, Signature: { Name: { is: "claim" } } } } orderBy: { descending: Block_Time } ) { Call { Signature { Name } To } Transaction { Hash From Cost Gas To } Block { Time } Arguments { Name Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } } } } }} Latest vGLP Withdrawals[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/#latest-vglp-withdrawals "Direct link to Latest vGLP Withdrawals") ---------------------------------------------------------------------------------------------------------------------------------------------------------- The following query retrieves the latest vGLP withdrawals on the Arbitrum network: [Run the query here](https://ide.bitquery.io/latest-vGLP-Withdraw-Events) { EVM(network: arbitrum, dataset: archive) { Events( where: { Log: { Signature: { Name: { is: "Withdraw" } }, SmartContract: { is: "0xa75287d2f8b217273e7fcd7e86ef07d33972042e" } } } orderBy: { descending: Block_Time } limit: { count: 100 } ) { Arguments { Name Type Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Block { Time } Transaction { Hash } Log { Signature { Name } } } }} Latest vGLP Deposits[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/#latest-vglp-deposits "Direct link to Latest vGLP Deposits") ------------------------------------------------------------------------------------------------------------------------------------------------- The following query retrieves the latest vGLP deposits on the Arbitrum network: [Run the query here](https://ide.bitquery.io/latest-vGLP-Deposit-Events) { EVM(network: arbitrum, dataset: archive) { Events( where: { Log: { Signature: { Name: { is: "Deposit" } }, SmartContract: { is: "0xa75287d2f8b217273e7fcd7e86ef07d33972042e" } } } orderBy: { descending: Block_Time } limit: { count: 100 } ) { Arguments { Name Type Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Block { Time } Transaction { Hash } Log { Signature { Name } } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest esGMX Transfers](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/#latest-esgmx-transfers) * [Latest esGMX Claims](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/#latest-esgmx-claims) * [Latest vGLP Withdrawals](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/#latest-vglp-withdrawals) * [Latest vGLP Deposits](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/#latest-vglp-deposits) --- # Base NFT Trades and Metadata API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/base-nft/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we'll have a look at some examples on how to get NFT information on Base using the NFT API. Track transfers of an NFT[​](https://docs.bitquery.io/docs/blockchain/Base/base-nft/#track-transfers-of-an-nft "Direct link to Track transfers of an NFT") ----------------------------------------------------------------------------------------------------------------------------------------------------------- This query subscribes you to the real time transfers of a specific non-fungible token (NFT) on the Base network. You can find the query [here](https://ide.bitquery.io/Transfers-of-a-particular-NFT_1#) subscription { EVM(network: base) { Transfers( where: { Transfer: { Currency: { Fungible: false SmartContract: { is: "0x1195Cf65f83B3A5768F3C496D3A05AD6412c64B7" } } } } ) { Block { Hash Number } Transfer { Amount Currency { Name Symbol Native } Sender Receiver } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track transfers of an NFT](https://docs.bitquery.io/docs/blockchain/Base/base-nft/#track-transfers-of-an-nft) --- # Bitcoin Address API - Get BTC Balance | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Bitcoin doesn't store account balances on-chain — there is no `getBalance` call. The reliable way to get an address balance is to sum every UTXO the address received (outputs) and subtract every UTXO it has spent (inputs). Bitquery indexes that UTXO data and pairs every value with the BTC/USD price at the time of the transaction, so you can pull current balances, historical balances at a specific block, or full activity timelines in a single request. Endpoint Bitcoin GraphQL queries are served at `https://graphql.bitquery.io`. Get a Bitcoin address balance from UTXOs (recommended)[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#get-a-bitcoin-address-balance-from-utxos-recommended "Direct link to Get a Bitcoin address balance from UTXOs (recommended)") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns total BTC sent (inputs) and received (outputs) for an address, along with USD-equivalent values and first / last activity dates. Subtract `inputs.value` from `outputs.value` to get the current balance. { bitcoin(network: bitcoin) { inputs( inputAddress: {is: "bc1ppu6akjngyvpxwz0w38n4evcygwh08tjtmcc0dx6ft2zzgkxtd97stwehcq"} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) } outputs( outputAddress: {is: "bc1ppu6akjngyvpxwz0w38n4evcygwh08tjtmcc0dx6ft2zzgkxtd97stwehcq"} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) } }} Get a Bitcoin address balance via addressStats[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#get-a-bitcoin-address-balance-via-addressstats "Direct link to Get a Bitcoin address balance via addressStats") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `addressStats` is a pre-aggregated view — fast, but it can lag the chain. Use it for quick lookups and dashboards; use the UTXO sum above when you need exact, up-to-the-block accuracy. [Run query](https://ide.bitquery.io/Bitcoin-balance_5) . caution `addressStats` is pre-aggregated and may occasionally be out of date. For precise balance math, use the inputs / outputs query above. { bitcoin(network: bitcoin) { addressStats(address: {is: "bc1q6xra3s8c5c4vr8m5f9htkuc3neyn4zykv5seua"}) { address { balance inboundTransactions firstActive { time } address annotation outflows lastActive { time } uniqueSenders uniqueReceivers } } }} Get a Bitcoin balance at a specific block height[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#get-a-bitcoin-balance-at-a-specific-block-height "Direct link to Get a Bitcoin balance at a specific block height") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Need to know what a wallet held at a particular point in time? The `height` filter caps inputs and outputs at a given block number, which is exactly what you need for audits, tax reporting, and point-in-time portfolio snapshots. Balance at that height equals `outputs.value - inputs.value`. [Run query](https://ide.bitquery.io/bitcoin-balance-at-a-given-height) . { bitcoin(network: bitcoin) { inputs( inputAddress: {is: "bc1ppu6akjngyvpxwz0w38n4evcygwh08tjtmcc0dx6ft2zzgkxtd97stwehcq"} height: {lteq: 944000} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) } outputs( outputAddress: {is: "bc1ppu6akjngyvpxwz0w38n4evcygwh08tjtmcc0dx6ft2zzgkxtd97stwehcq"} height: {lteq: 944000} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) } }} Aggregate balances for multiple Bitcoin addresses in one call[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#aggregate-balances-for-multiple-bitcoin-addresses-in-one-call "Direct link to Aggregate balances for multiple Bitcoin addresses in one call") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Pass an array of addresses to `inputAddress` and `outputAddress` with `{in: [...]}` to get per-wallet totals in a single request. Useful for exchanges, custodians, and portfolio dashboards that monitor many wallets at once. [Run query](https://ide.bitquery.io/BTC-balance-API-for-multiple-addresses) . { bitcoin(network: bitcoin) { inputs( inputAddress: {in: ["bc1ppu6akjngyvpxwz0w38n4evcygwh08tjtmcc0dx6ft2zzgkxtd97stwehcq", "bc1p2gel5e7ny42epalps3vddqrwedqh8ca4v6fdjem3pa3930ltl90s2cfg6e"]} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) inputAddress { address } } outputs( outputAddress: {in: ["bc1ppu6akjngyvpxwz0w38n4evcygwh08tjtmcc0dx6ft2zzgkxtd97stwehcq", "bc1p2gel5e7ny42epalps3vddqrwedqh8ca4v6fdjem3pa3930ltl90s2cfg6e"]} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) outputAddress { address } } }} Get a Bitcoin address's first and last active timestamps[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#get-a-bitcoin-addresss-first-and-last-active-timestamps "Direct link to Get a Bitcoin address's first and last active timestamps") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Quick way to find when a wallet first appeared on-chain and the last time it transacted. Useful for wallet age analysis, dormant-address screening, and compliance checks. caution `addressStats` is pre-aggregated and may occasionally be inaccurate. For precise timestamps, query inputs and outputs directly with `minimum(of: date)` and `maximum(of: date)`. query ($network: BitcoinNetwork!) { bitcoin(network: $network) { addressStats(address: {is: "ADDRESS_HERE"}) { address { firstActive { year month dayOfMonth } lastActive { year month dayOfMonth } } } }} Replace `ADDRESS_HERE` with the Bitcoin address you want to inspect. List inputs and outputs for an address over a date range[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#list-inputs-and-outputs-for-an-address-over-a-date-range "Direct link to List inputs and outputs for an address over a date range") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns every UTXO an address spent or received inside a time window, with block height, timestamp, transaction hash, output index, BTC value, and USD-equivalent. Use it for transaction reports, payment reconciliation, and per-period wallet activity feeds. [Run query](https://ide.bitquery.io/Input-and-outputs-of-a-bitcoin-address) . { bitcoin(network: bitcoin) { outputs( date: {since: "2024-03-19", till: "2024-03-26"} outputAddress: {is: "bc1p2gel5e7ny42epalps3vddqrwedqh8ca4v6fdjem3pa3930ltl90s2cfg6e"} options: {desc: ["block.height", "outputIndex"], limit: 10, offset: 0} ) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } transaction { hash } outputIndex outputDirection value value_usd: value(in: USD) } inputs( date: {since: "2024-03-19", till: "2024-03-26"} inputAddress: {is: "bc1p2gel5e7ny42epalps3vddqrwedqh8ca4v6fdjem3pa3930ltl90s2cfg6e"} options: {desc: ["block.height", "transaction.index"], limit: 10, offset: 0} ) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } outputTransaction { hash index } transaction { hash index } inputIndex value value_usd: value(in: USD) } }} Related resources[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#related-resources "Direct link to Related resources") ------------------------------------------------------------------------------------------------------------------------------------------------- * [Bitcoin Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/) — more UTXO patterns, miner rewards, and historical BTC price * [Bitcoin Transactions API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/) — per-tx detail and pagination * [Bitcoin Coinpath API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/) — multi-hop fund tracing Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get a Bitcoin address balance from UTXOs (recommended)](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#get-a-bitcoin-address-balance-from-utxos-recommended) * [Get a Bitcoin address balance via addressStats](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#get-a-bitcoin-address-balance-via-addressstats) * [Get a Bitcoin balance at a specific block height](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#get-a-bitcoin-balance-at-a-specific-block-height) * [Aggregate balances for multiple Bitcoin addresses in one call](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#aggregate-balances-for-multiple-bitcoin-addresses-in-one-call) * [Get a Bitcoin address's first and last active timestamps](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#get-a-bitcoin-addresss-first-and-last-active-timestamps) * [List inputs and outputs for an address over a date range](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#list-inputs-and-outputs-for-an-address-over-a-date-range) * [Related resources](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/#related-resources) --- # Use Regular Expressions To Search Solana Logs [Skip to main content](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this article, we are going to understand how we can track events like token lock and burn, which are necessary for investors and project teams in the quickly changing crypto space. Token lockups and token burning provide the project with stability and confidence by restricting token sales or transfers for a certain amount of time and reducing the overall availability. The sudden release of a large number of tokens, however, may result in market instability. Tracking these occurrences allows stakeholders to anticipate market movements and make informed decisions. Anyone can follow this guide to understand how to use Bitquery APIs to track vested tokens and receive alerts when unlocking events are about to occur. ​Understanding Token Minting and Burning[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#understanding-token-minting-and-burning "Direct link to ​Understanding Token Minting and Burning") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### What is Token Burn ?[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#what-is-token-burn- "Direct link to What is Token Burn ?") Token burning is the process of permanently removing tokens from circulation, reducing the total supply. This mechanism is employed for several reasons. * Supply Control: By burning tokens, projects can manage and control the token supply, potentially increasing the value of remaining tokens. This is akin to a share buyback in traditional finance, aimed at benefiting holders by reducing supply. * Economic Stability: Token burning can help stabilize the token's price by creating scarcity. It can also be used as a method to combat inflation within the ecosystem, ensuring long-term sustainability. ### Why Track Token Mint and Burn?​[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#why-track-token-mint-and-burn "Direct link to Why Track Token Mint and Burn?​") Tracking token minting and burning is crucial for: * Investors: Understanding when new tokens are minted or burned helps investors anticipate changes in supply that could impact token prices. This knowledge can guide their investment decisions and trading strategies. * Project Teams: Monitoring these processes ensures transparency and accountability. Clear communication about minting and burning schedules builds trust with the community and stakeholders, showcasing a commitment to sustainable and responsible token management. Key Data Points to Track​[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#key-data-points-to-track "Direct link to Key Data Points to Track​") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- When tracking token mint and burn events, the following data points are essential: * Token Name and Address: Identify the token in question. * Method Called: The method called from the token. * Transaction Signer: The address that called the method in question. * TimeStamp: UTC Time at which the method is called. * Transaction Signature: Transaction signature to double check the results. Minting Token Method[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#minting-token-method "Direct link to Minting Token Method") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In decentralized finance (DeFi), tokens are minted to reward participants within the network, to encourage the continued participation and support in the network's growth and security. ### Why It's Important​[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#why-its-important "Direct link to Why It's Important​") Projects often mint tokens to raise capital during initial coin offerings (ICOs) or token sales. These funds are typically used for further development, marketing, and expanding the project's reach. ### How to Track​[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#how-to-track "Direct link to How to Track​") Use Bitquery APIs to see when methods that include “mint” are called from the Solana Instruction Logs. This can indicate important moves by project teams or big investors. By monitoring these events, you can gain insights into market behavior and anticipate potential price changes. ### Example Query​[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#example-query "Direct link to Example Query​") To track token minting, you can use a query shared below. Here’s a sample query to track [token minting](https://ide.bitquery.io/MInt-Token-Tracking-on-Solana-Logs) on the Solana network: subscription{ Solana { Instructions( where: {Instruction: {Program: {Method: {includes: "mint"}}}} ) { Transaction { Signature Signer } Block { Time } Instruction { Logs Program { Method Name Address } } } }} This query helps identify token minting events, providing insights into market dynamics. Token Burn Method[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#token-burn-method "Direct link to Token Burn Method") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- In decentralized finance (DeFi), tokens are burnt to manage and control the token supply,potentially increasing the value of remaining tokens. ### How to Track​[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#how-to-track-1 "Direct link to How to Track​") Use Bitquery APIs to see when methods that include “burn” are called from the Solana Instruction Logs. This can indicate important moves by project teams or big investors. By monitoring these events, you can gain insights into market behavior and anticipate potential price changes. ### Example Query​[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#example-query-1 "Direct link to Example Query​") To track token liquidity burn, you can use a query shared below. Here’s a sample query to track [token LP burn](https://ide.bitquery.io/Copy-of-Copy-of-Burn-Token-Tracking-on-Solana-Logs) on the Solana network: { Solana(network: solana) { Instructions( where: {Instruction: {Program: {Method: {includes: "burn"}}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Transaction { Signature Signer } Block { Time } Instruction { Logs Program { Method Name Address } Accounts { Address Token { Mint } } } } }} This query helps identify token burning events, providing insights about the project team's next move and the progress of the project. Check the Programs with Paid Royalty[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#check-the-programs-with-paid-royalty "Direct link to Check the Programs with Paid Royalty") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Set up a query to filter out the programs where some non-zero [royalty is paid](https://ide.bitquery.io/Query-solana-logs) with the help of regular expressions like “includes” and “not includes”. For example: query { Solana { Instructions(where: { Instruction: { Logs: { includes: { includes: "royalty_paid" notIncludes: "\"royalty_paid\":0" } } } }) { Transaction { Signature } Instruction { Logs } } }} This query returns instructions that signal non-zero royalty payment, providing details about transaction hash and instructions logs. Tracking trades on an Exchange without knowing anything about it​[​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#tracking-trades-on-an-exchange-without-knowing-anything-about-it "Direct link to Tracking trades on an Exchange without knowing anything about it​") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- If you need to filter out the instructions from Solana logs that involve a particular exchange but you don’t have any information, like address and protocol, then you can use the “includes” keyword on Logs. For example, you can run this query to get the [Solana Zeta Market Logs](https://ide.bitquery.io/Solana-Zeta-Market-logs) . query { Solana { Instructions( where: {Instruction: {Logs: {includes: {includes: "ZETA"}}}} limit: {count: 10} ) { Transaction { Signature } Instruction { Logs } } }} This query will return the Solana Instructions Logs and transaction signature to double check the results and get more info. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [​Understanding Token Minting and Burning](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#understanding-token-minting-and-burning) * [What is Token Burn ?](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#what-is-token-burn-) * [Why Track Token Mint and Burn?​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#why-track-token-mint-and-burn) * [Key Data Points to Track​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#key-data-points-to-track) * [Minting Token Method](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#minting-token-method) * [Why It's Important​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#why-its-important) * [How to Track​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#how-to-track) * [Example Query​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#example-query) * [Token Burn Method](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#token-burn-method) * [How to Track​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#how-to-track-1) * [Example Query​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#example-query-1) * [Check the Programs with Paid Royalty](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#check-the-programs-with-paid-royalty) * [Tracking trades on an Exchange without knowing anything about it​](https://docs.bitquery.io/docs/API-Blog/use-regular-expressions-to-search-solana-logs/#tracking-trades-on-an-exchange-without-knowing-anything-about-it) --- # RWA (Real World Assets) API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/rwa-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section, we will explore some of the APIs that help us obtain information about Real World Assets (RWAs) on Ethereum, Arbitrum, and other EVM chains. These APIs can be executed on any EVM chain simply by changing the `network: eth` parameter to the appropriate chain and using the correct address. We have written about analyzing RWA data in the blog [here](https://bitquery.io/blog/real-world-asset-tracking-arbitrum-bitquery-apis) and how it has influenced tokenized real-estate [here](https://bitquery.io/blog/tokenized-real-estate-transforming-property-investment) . Top Holders of an RWA[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/rwa-api/#top-holders-of-an-rwa "Direct link to Top Holders of an RWA") ------------------------------------------------------------------------------------------------------------------------------------------------------------ You can view and execute the query for the top holders of an RWA using the following examples: * [Top holder stats for Mountain's USDM](https://ide.bitquery.io/top-holder-stats-for-Mountains-USDM) * [Top holder stats for Backed Finance’s blB01](https://ide.bitquery.io/top-holder-stats-for-Backed-Finances-blB01) { EVM(dataset: archive, network: eth) { Holders( date: "2025-04-22" limit: { count: 10 } orderBy: { descending: Balance_Amount }, where: { Currency: { SmartContract: { is: "0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C" } } } ) { Holder { Address } Balance { UpdateCount } Balance { Amount } } }} This query retrieves the top 10 holders of the specified token contract, ranked by their balance amount. Real-time Transfers of RWAs on Arbitrum[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/rwa-api/#real-time-transfers-of-rwas-on-arbitrum "Direct link to Real-time Transfers of RWAs on Arbitrum") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ You can monitor real-time transfers of RWAs using the stream link below: [Real-time Transfers of Xend Real World Asset Token](https://ide.bitquery.io/Subscribe-to-Latest-Xend-Real-World-Asset-token-transfers) subscription { EVM(network: arbitrum) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x3096e7BFd0878Cc65be71f8899Bc4CFB57187Ba3" } } } } ) { Transaction { Hash } Transfer { Amount Currency { Name Symbol } Receiver Sender Type } } }} This subscription continuously monitors and provides real-time updates on token transfers for the specified token contract. Latest Issuance of an RWA[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/rwa-api/#latest-issuance-of-an-rwa "Direct link to Latest Issuance of an RWA") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This query filters for recent `Issue` events on Ethereum and displays logs emitted by the fund’s smart contract (`0x7712c34205737192402172409a8F7ccef8aA2AEc`) and extracts structured event data. You can use the same as a `subscription` to monitor issuances in real-time. You can run the query [here](https://ide.bitquery.io/BlackRock-USD-Institutional-Digital-Liquidity-Fund-Latest-Issuance) { EVM(dataset: realtime, network: eth) { Events( limit: {count: 20} where: {LogHeader:{Address:{is:"0x7712c34205737192402172409a8F7ccef8aA2AEc"}}, Log:{ Signature:{Name:{is:"Issue"}} }} ) { Block { Time Number Hash } Receipt { ContractAddress } Topics { Hash } TransactionStatus { Success } LogHeader { Address Index Data } Transaction { Hash From To Index } Log { EnterIndex ExitIndex Index LogAfterCallIndex Pc SmartContract Signature { Name Signature } } Arguments { Name Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Call { Signature { Name } } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Top Holders of an RWA](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/rwa-api/#top-holders-of-an-rwa) * [Real-time Transfers of RWAs on Arbitrum](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/rwa-api/#real-time-transfers-of-rwas-on-arbitrum) * [Latest Issuance of an RWA](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/rwa-api/#latest-issuance-of-an-rwa) --- # Token Transaction API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Transaction API provides access to transaction data on the blockchain. Transactions are the fundamental unit of account on a blockchain and represent the transfer of value from one address to another. The Transaction API allows users to query for transaction data by specifying filters such as transaction hash, sender or receiver address, gas price, and more. The API also provides information about the block that the transaction was included in, including block number and block timestamp. Latest Transactions[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#latest-transactions "Direct link to Latest Transactions") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- This query is using the Transactions API to retrieve transaction data from the Binance Smart Chain (BSC) blockchain network in real-time. You can find the query [here](https://ide.bitquery.io/Last-transactions-with-cost) Click to expand GraphQL query query { EVM(dataset: realtime, network: bsc) { Transactions( limit: { count: 100 } orderBy: [{ descending: Block_Number }, { descending: Transaction_Index }] ) { Block { Time Number } Transaction { Hash Cost } } }} **Parameters:** * `dataset`: The data source to be used by the query (in this case, "realtime") * `network`: The blockchain network to be queried (in this case, "bsc") * `limit`: Limits the number of returned results to 100. * `orderBy`: Sorts the results by two fields, in descending order: `Block_Number` and `Transaction_Index`. **Results:** * `Block`: The block information of each transaction, including the block number and timestamp. * `Transaction`: The transaction hash and cost (gas used multiplied by the gas price) Latest Transactions From or To an Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#latest-transactions-from-or-to-an-address "Direct link to Latest Transactions From or To an Address") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query retrieves 100 recent transactions where the specified address is either the sender (`From`) or the receiver (`To`). It is achieved by using the `any` filter which serves as the OR condition. It can help monitor incoming and outgoing transactions of a particular address. You can run the query [here](https://ide.bitquery.io/Latest-Transactions-fromto-address) Click to expand GraphQL query { EVM(dataset: archive, network: eth) { Transactions( limit: {count: 100} where: {any: [{Transaction: {From: {is: "0x21a31ee1afc51d94c2efccaa2092ad1028285549"}}}, {Transaction: {To: {is: "0x21a31ee1afc51d94c2efccaa2092ad1028285549"}}}]} ) { Block { Time Number } Transaction { Hash Cost To From } } }} Get Transaction Details using Hash[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#get-transaction-details-using-hash "Direct link to Get Transaction Details using Hash") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The below query retrieves transaction details using the transaction hash. The `where` clause filters transactions based on the `Hash` field, which is set to `0xc3684c0ea63c0e081fb779bb8feaa5e5109ccc70ef30f17f4eea041ec5ea0bc7`. You can find the query [here](https://ide.bitquery.io/Get-a-transaction-by-hash) query MyQuery { EVM(dataset: combined, network: eth) { Transactions( where: {Transaction: {Hash: {is: "0xc3684c0ea63c0e081fb779bb8feaa5e5109ccc70ef30f17f4eea041ec5ea0bc7"}}} ) { Block { Time Number } Transaction { From To Hash Value } } }} Next available nonce[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#next-available-nonce "Direct link to Next available nonce") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- The following query helps you determine the next available nonce for an Ethereum account by getting the latest transaction in the mempool (broadcasted transactions). The returned nonce is the highest nonce used by the account in the mempool. To get the next available nonce for a new transaction, you should increment this value by 1. You can find the query [here](https://ide.bitquery.io/get-next-available-nonce) query MyQuery { EVM(mempool: true, network: eth) { Transactions(limit: {count: 1}, orderBy: {descending: Block_Time}) { Transaction { Nonce } } }} Transaction Value in USD[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#transaction-value-in-usd "Direct link to Transaction Value in USD") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In the below query we will use the field `Transaction_ValueInUSD` to get the total amount sent to a particular address in USD. You can find the query [here](https://ide.bitquery.io/Transaction-value-in-USD) query MyQuery { EVM(network: eth) { in_txs: Transactions( where: {Transaction: {To: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}}} ) { sum(of: Transaction_ValueInUSD) } }} Internal Transactions[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#internal-transactions "Direct link to Internal Transactions") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- A single transaction on a smart contract can result in multiple internal transactions, which interact with different smart contracts. The below query gets all internal transactions for a particular tx filtered using hash. You can run the query [here](https://ide.bitquery.io/internal-transactions-for-a-particular-tx) query MyQuery { EVM(network: eth) { Calls( where: {Transaction: {Hash: {is: "0xd1a49976cb217c92eea2bf897d8fe760333047fb555c261f7d2c96ea52901434"}}} ) { Call { Create Index From To ValueInUSD Value Output Signature { Signature Name } } Transaction { Hash } } }} **Response** * **Call** * **Create**: Indicates if the call created a contract. * **Index**: The index of the call within the transaction. * **From**: The address from which the internal transaction was sent. * **To**: The recipient address of the internal transaction. * **Output**: The output data of the call. * **Signature**: Contains signature information. * **Signature**: The signature of the call. * **Name**: The name of the function called. * **Transaction** * **Hash**: The hash of the main transaction. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest Transactions](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#latest-transactions) * [Latest Transactions From or To an Address](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#latest-transactions-from-or-to-an-address) * [Get Transaction Details using Hash](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#get-transaction-details-using-hash) * [Next available nonce](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#next-available-nonce) * [Transaction Value in USD](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#transaction-value-in-usd) * [Internal Transactions](https://docs.bitquery.io/docs/blockchain/Ethereum/transactions/transaction-api/#internal-transactions) --- # Usage API - Track Billing and Quota Programmatically [Skip to main content](https://docs.bitquery.io/docs/authorization/usage-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The **Usage API** exposes OAuth2-authenticated endpoints on [account.bitquery.io](https://account.bitquery.io/) so you can **programmatically track billing period status, plan limits, and consumption** for your Bitquery account. Open the interactive reference and copy a bearer token from **[Authorization → Usage API](https://account.bitquery.io/user/api) **. To create or manage tokens, see [How to Generate a Token](https://docs.bitquery.io/docs/authorization/how-to-generate/) . Keep your token secret Authenticate every request with your account bearer token in the `Authorization` header. The token identifies your account — do not expose it in client-side code, public repos, or logs. Authentication[​](https://docs.bitquery.io/docs/authorization/usage-api/#authentication "Direct link to Authentication") ------------------------------------------------------------------------------------------------------------------------- Send your account bearer token on every request: curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ https://account.bitquery.io/api/usage Replace `YOUR_ACCESS_TOKEN` with a token from [Access tokens](https://account.bitquery.io/user/api_v2/access_tokens) or the token shown on the [Usage API](https://account.bitquery.io/user/api) page. Token format is typically `ory_at_...` with an expiration date. Billing plan usage[​](https://docs.bitquery.io/docs/authorization/usage-api/#billing-plan-usage "Direct link to Billing plan usage") ------------------------------------------------------------------------------------------------------------------------------------- **`GET /api/usage`** Returns your **current billing period** — its plan, limits, usage recorded against them, and an overall status. * **Team members** receive their **team manager's** billing period (`payer_id` is the manager's account id). * When no period is active, the **most recent** period is returned instead. ### Period status[​](https://docs.bitquery.io/docs/authorization/usage-api/#period-status "Direct link to Period status") | Status | Description | | --- | --- | | **`active`** | The period currently covers the present time. | | **`grace`** | The period ended but is still within the grace window. | | **`blocked`** | The period or account is blocked. | | **`expired`** | The period ended and the grace window has passed. | ### Response fields[​](https://docs.bitquery.io/docs/authorization/usage-api/#response-fields "Direct link to Response fields") | Field | Type | Description | | --- | --- | --- | | `account_id` | integer | Your account id. | | `payer_id` | integer | Account that owns the billing period — the team manager for team members, otherwise the same as `account_id`. | | `status` | string | `active`, `grace`, `blocked`, or `expired` (see above). | | `billing_period.started_at` | datetime | Period start (ISO 8601, UTC). | | `billing_period.ended_at` | datetime | Period end (ISO 8601, UTC). | | `billing_period.plan_name` | string | Display name of the plan. | | `billing_period.product` | object \| null | Linked product as `{ "name": "..." }`, or `null` when the period has no product (e.g. free plans). Use `plan_name` for a label that is always present. | | `billing_period.limits` | object | Plan limits: `points_limit`, `rate_limit`, `session_limit`, `subscription_limit`, `time_sec_limit`, `traffic_bytes_limit`, `team_slots_limit`. | | `billing_period.usage` | object | Usage so far this period: `points_usage`, `requests_usage`, `time_sec_usage`, `traffic_bytes_usage`. | | `billing_period.description` | object | Full raw period description (all plan attributes). | ### Example response[​](https://docs.bitquery.io/docs/authorization/usage-api/#example-response "Direct link to Example response") { "account_id": 12345, "payer_id": 12345, "status": "active", "billing_period": { "started_at": "2026-06-24T00:00:00Z", "ended_at": "2026-07-23T23:59:59Z", "plan_name": "Paid plan", "product": null, "limits": { "points_limit": 100000000000, "rate_limit": 10000, "session_limit": 1000, "subscription_limit": 1000, "time_sec_limit": 0, "traffic_bytes_limit": 0, "team_slots_limit": 5 }, "usage": { "points_usage": 4458, "requests_usage": 184, "time_sec_usage": 301, "traffic_bytes_usage": 3763747 }, "description": { "points_limit": 100000000000, "rate_limit": 10000, "session_limit": 1000, "subscription_limit": 1000 } }} Example: Python[​](https://docs.bitquery.io/docs/authorization/usage-api/#example-python "Direct link to Example: Python") --------------------------------------------------------------------------------------------------------------------------- import requestsACCESS_TOKEN = "YOUR_ACCESS_TOKEN"response = requests.get( "https://account.bitquery.io/api/usage", headers={"Authorization": f"Bearer {ACCESS_TOKEN}"},)response.raise_for_status()data = response.json()period = data["billing_period"]print(f"Status: {data['status']}")print(f"Plan: {period['plan_name']}")print(f"Points used: {period['usage']['points_usage']} / {period['limits']['points_limit']}")print(f"Requests: {period['usage']['requests_usage']}") Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Authentication](https://docs.bitquery.io/docs/authorization/usage-api/#authentication) * [Billing plan usage](https://docs.bitquery.io/docs/authorization/usage-api/#billing-plan-usage) * [Period status](https://docs.bitquery.io/docs/authorization/usage-api/#period-status) * [Response fields](https://docs.bitquery.io/docs/authorization/usage-api/#response-fields) * [Example response](https://docs.bitquery.io/docs/authorization/usage-api/#example-response) * [Example: Python](https://docs.bitquery.io/docs/authorization/usage-api/#example-python) --- # Smart Contract Creation | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Smart contract creators can use these queries to track the deployment of their own smart contracts and to monitor the deployment of new smart contracts by others. Subscription to track new smart contract creation in real-time[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#subscription-to-track-new-smart-contract-creation-in-real-time "Direct link to Subscription to track new smart contract creation in real-time") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription will return information on each new smart contract created on Ethereum. You can create a [websocket](https://docs.bitquery.io/docs/subscriptions/websockets/) to monitor the same in real-time. subscription { eth_creates: EVM(network: eth) { creates: Calls( where: { Call: { Create: true }}) { Block { Time } Transaction{ Hash From } Call { Input To Output } } }} This subscription has information on * The block time in which the smart contract was created * The transaction hash that created the smart contract * The address of the sender of the transaction that created the smart contract * The address of the newly created smart contract * The input data for the transaction that created the smart contract * The output data from the transaction that created the smart contract Track new smart contract creation since a specific date[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#track-new-smart-contract-creation-since-a-specific-date "Direct link to Track new smart contract creation since a specific date") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This query below, will return the number of new smart contracts created on the Ethereum and Binance Smart Chain networks since a particular date. It will also return the date of each day on which new smart contracts were created. You can find the query [here](https://ide.bitquery.io/ETHBSC-SC-creates-count-over-date) query { eth_creates: EVM(dataset: archive network: eth) { creates: Calls( where: { Block: {Date: {after: "2023-06-01"}} Call: { Create: true }}) { count Block { Date } } } bsc_creates: EVM(dataset: archive network: bsc) { creates: Calls( where: { Block: {Date: {after: "2023-06-01"}} Call: { Create: true }}) { count Block { Date } } }} Get Code of the Token Contract[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#get-code-of-the-token-contract "Direct link to Get Code of the Token Contract") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query will return the most recent transaction that created the token contract. The `Output` field of the Call object in the transaction contains the encoded bytecode of the contract. Replace `0xc923D39fA2d97fb4B660Fc66DAdB1421605975E0` with the token contract address that you want to get the code for. You can find the query [here](https://ide.bitquery.io/ByteCode-of-A-Token) { eth_creates: EVM(dataset: archive, network: eth) { creates: Calls( where: {Call: {Create: true, To: {is: "0xc923D39fA2d97fb4B660Fc66DAdB1421605975E0"}}} limit: {count: 1} orderBy: {descending: Block_Time} ) { Block { Time } Transaction { Hash From To } Call { Output } } }} Creator/Deployer of a smart contract[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#creatordeployer-of-a-smart-contract "Direct link to Creator/Deployer of a smart contract") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- You can use calls api to get smart contract creator or deployer of a smart contract. In the following example, where we getting deployer of deployer of `0xcd80c916b1194beb48abf007d0b79a7238436d56`. Try this query [here](https://ide.bitquery.io/creator--deployer-of-an-address_1) . { EVM(dataset: combined) { Calls( where: {Call: {Create: true}, Receipt: {ContractAddress: {is: "0xcd80c916b1194beb48abf007d0b79a7238436d56"}}} ) { Transaction { Hash From To } Block { Time Number } } }} Get Contract Type of a Contract[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#get-contract-type-of-a-contract "Direct link to Get Contract Type of a Contract") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ To determine the type of a contract and its details, we can use the Transfer API. By fetching the earliest transfer to the contract, we can get relevant details that indicate the contract type. `Abi`: Provides the contract function ABI, describing its inputs and structure. For example, `"Name": "swap",` tells us the given address has a **`swap`** function. This suggests the contract is likely a **DEX (Decentralized Exchange) or token swap contract**. You can run the query [here](https://ide.bitquery.io/Get-Contract-Type-in-v2) query MyQuery { EVM(network: eth) { Transfers( limit: {count: 1} orderBy: {ascending: Block_Time} where: {Transfer: {Receiver: {is: "0x881d40237659c251811cec9c364ef91dc08d300c"}}} ) { Call { Create Signature { SignatureType Signature Parsed Name Abi } } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Subscription to track new smart contract creation in real-time](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#subscription-to-track-new-smart-contract-creation-in-real-time) * [Track new smart contract creation since a specific date](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#track-new-smart-contract-creation-since-a-specific-date) * [Get Code of the Token Contract](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#get-code-of-the-token-contract) * [Creator/Deployer of a smart contract](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#creatordeployer-of-a-smart-contract) * [Get Contract Type of a Contract](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/contract-creation/#get-contract-type-of-a-contract) --- # Ethereum Balance API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Deprecated API `EVM.BalanceUpdates` was deprecated as of **20 May 2026** and removed on **15 June 2026**. Use **`EVM.Balances`** (this page) instead. The **Balances** API returns current and historical token balances for an address on Ethereum. To return only non-zero balances, add `Amount(selectWhere: { gt: "0" })` on the `Balance` field (not in `where`). Use `dataset: combined` or `dataset: archive` as follows: | Dataset | When to use | | --- | --- | | **`combined`** | Latest balances. Queries **realtime and archive** databases and merges results. | | **`archive`** | Historical snapshots with `Block.Date`, and balances for **addresses not recently active**. | Balance of an Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-of-an-address "Direct link to Balance of an Address") --------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns token balances for a wallet address. Use `Amount(selectWhere: { gt: "0" })` to exclude zero balances. [Run in IDE](https://ide.bitquery.io/Ethereum-Balance-of-an-Address) query { EVM(network: eth, dataset: combined) { Balances( where: { Balance: { Address: { is: "0x76147fd7891731e01f35cc18f87ae8e95bf06869" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} **Parameters** * `network: eth`: Ethereum mainnet. * `dataset: combined`: Merges realtime and archive data for the latest balance state. * `Balance.Address`: Wallet address to query. **Returned fields** * `Currency.Symbol`, `Currency.SmartContract`: Token metadata. * `Balance.Amount`, `Balance.AmountInUSD`: Token balance and USD value (use `selectWhere` to filter non-zero amounts). Balance on a Specific Date[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-on-a-specific-date "Direct link to Balance on a Specific Date") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Use `Block.Date.till` for a point-in-time snapshot. Use `dataset: archive` for historical dates and addresses not recently active. [Run in IDE](https://ide.bitquery.io/ethereum-balances-address-by-date) { EVM(network: eth, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xf9D48e42d0FEb477a0286B206eDbafefA3577F63" } } Block: { Date: { till: "2026-04-01" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD } } }} Balance for a Specific Token[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-for-a-specific-token "Direct link to Balance for a Specific Token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Add a `Currency.SmartContract` filter. Always use the contract address, not the token name. [Run in IDE](https://ide.bitquery.io/ethereum-balances-specific-token) query { EVM(network: eth, dataset: combined) { Balances( where: { Balance: { Address: { is: "0x3416cf6c708da44db2624d63ea0aaef7113527c6" } } Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Balance History by Date[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-history-by-date "Direct link to Balance History by Date") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns balance snapshots over time for an address. Use `dataset: archive`. Order by `Block_Date` descending and use `limit` to paginate. Add `Currency.SmartContract` under `Currency` to filter by a specific token. [Run in IDE](https://ide.bitquery.io/ethereum-balances-history) query { EVM(network: eth, dataset: archive) { Balances( where: { Balance: { Address: { is: "0x5646c5b4845e565706ef107f62887145a51a3127" } } Currency: {} } orderBy: { descending: Block_Date } limit: { count: 100 } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD } Block { Date } } }} Wallet Balance for a Specific Token on a Date[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#wallet-balance-for-a-specific-token-on-a-date "Direct link to Wallet Balance for a Specific Token on a Date") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Use `dataset: archive`, `Block.Date.till`, `orderBy: { descending: Block_Date }`, and `limit: { count: 1 }` to get the balance as of that date. [Run in IDE](https://ide.bitquery.io/ethereum-wallet-balance-token-at-date) query { EVM(network: eth, dataset: archive) { Balances( where: { Block: { Date: { till: "2026-05-05" } } Balance: { Address: { is: "0xA46320Aa0b4877b9a46a07B4F3DB93719bd422dE" } } Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } } limit: { count: 1 } orderBy: { descending: Block_Date } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Frequently Asked Questions -------------------------- How do I check an Ethereum wallet balance? Query EVM balance APIs with the wallet address. Add a token contract filter for ERC-20 balances. Can I track balance changes over time? Use balance update APIs or historical queries documented on this page. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Balance of an Address](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-of-an-address) * [Balance on a Specific Date](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-on-a-specific-date) * [Balance for a Specific Token](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-for-a-specific-token) * [Balance History by Date](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-history-by-date) * [Wallet Balance for a Specific Token on a Date](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#wallet-balance-for-a-specific-token-on-a-date) --- # Analyze a Token ICO with the Transfers API: Mint, Distributor, Investors [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD A token sale leaves a clean trail in transfer data. The token is minted to a distributor contract, the contract sends tokens to each buyer as the sale's conditions are met, and the set of receivers is the investor list. Three `Transfers` queries on the `combined` dataset rebuild that trail for any ERC-20 sale: the mint from the zero address tells you where the supply went, transfers from that address list the buyers, and `count` with `uniq` size the sale. The worked example is the PEPU token, `0x906cc2ad139eb6637e28605f908903c8adce566a`, whose sale ran in 2024; put another token contract in its place for a current one. Every query runs in the [IDE](https://ide.bitquery.io/) on a free account. Step 1: find where the supply was minted[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#step-1-find-where-the-supply-was-minted "Direct link to Step 1: find where the supply was minted") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- A mint is a transfer from the zero address. The `Receiver` of the mint is the contract that distributes the sale. Saved query [here](https://ide.bitquery.io/Get-Minted-Address-of-the-ICO-Token) . query MyQuery { EVM(network: eth, dataset: combined) { Transfers( where: {Transfer: {Currency: {SmartContract: {is: "0x906cc2ad139eb6637e28605f908903c8adce566a"}}, Success: true, Sender: {is: "0x0000000000000000000000000000000000000000"}}} ) { Transfer { Amount Currency { Name Symbol SmartContract } Receiver Sender } } }} For PEPU the mint went to `0xf0163c18f8d3fc8d5b4ca15e07d0f9f75460335f`, the distributor used in the next two queries. Step 2: list the buyers[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#step-2-list-the-buyers "Direct link to Step 2: list the buyers") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Every transfer sent by the distributor is a delivery to a buyer. The `Receiver` column is the investor list, with the amount each one received. Saved query [here](https://ide.bitquery.io/Get-all-Holders-Address-of-the-ICO-Token_1) . query MyQuery { EVM(network: eth, dataset: combined) { Transfers( where: {Transfer: {Currency: {SmartContract: {is: "0x906cc2ad139eb6637e28605f908903c8adce566a"}}, Success: true, Sender: {is: "0xf0163c18f8d3fc8d5b4ca15e07d0f9f75460335f"}}} ) { Transfer { Amount Currency { Name Symbol SmartContract } Receiver Sender } count } }} Step 3: size the sale[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#step-3-size-the-sale "Direct link to Step 3: size the sale") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The same filter with `count` and `uniq` gives the number of deliveries and the number of distinct buyers in one row. Saved query [here](https://ide.bitquery.io/Number-of-Purchasers-in-ICO#) . query MyQuery { EVM(network: eth, dataset: combined) { Transfers( where: {Transfer: {Amount: {gt: "0"}, Currency: {SmartContract: {is: "0x906cc2ad139eb6637e28605f908903c8adce566a"}}, Sender: {is: "0xf0163c18f8d3fc8d5b4ca15e07d0f9f75460335f"}}} ) { count buyers: uniq(of: Transfer_Receiver) Transfer { Currency { Name Symbol SmartContract } } } }} Where to go from here[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#where-to-go-from-here "Direct link to Where to go from here") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Did buyers hold or sell? Run the [Balances and Holders cubes](https://docs.bitquery.io/docs/cubes/balances-cube/) on the buyer list, or filter `DEXTrades` on the token to see the first sells. * What did the sale raise? The ETH or stablecoin transfers into the distributor, or the `Calls` into it with `Value`, give the other side of each purchase. * Watching a live sale: change `query` to `subscription`, drop the dataset argument, and keep the distributor as `Sender` to see each delivery as it happens. Video tutorial on analyzing the PEPU sale[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#video-tutorial-on-analyzing-the-pepu-sale "Direct link to Video tutorial on analyzing the PEPU sale") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Frequently Asked Questions -------------------------- How do I find the addresses that bought a token in its ICO? Find the mint (a transfer from the zero address) to get the distributor contract, then list transfers sent by that contract on the combined dataset. The receivers are the buyers and the amounts are what each received. How do I count unique ICO participants? Use count and uniq(of: Transfer\_Receiver) on the transfers sent by the distributor. count is deliveries, uniq is distinct buyers, since one address can buy several times. Why use dataset combined? A sale is usually weeks or months old. The realtime window holds only recent hours, while combined reaches back through the archive and includes the latest rows. Can I do this for a token on BSC or Base? Yes. Change the network name in EVM(network: ...). The Transfers cube has the same fields on every EVM chain Bitquery indexes. Related pages[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#related-pages "Direct link to Related pages") --------------------------------------------------------------------------------------------------------------------------------------------------------- * [Ethereum transfers API](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/erc20-token-transfer-api/) * [Balances and Holders cubes](https://docs.bitquery.io/docs/cubes/balances-cube/) * [Transfers cube](https://docs.bitquery.io/docs/cubes/transfers-cube/) * [Ethereum API hub](https://docs.bitquery.io/docs/blockchain/Ethereum/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Step 1: find where the supply was minted](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#step-1-find-where-the-supply-was-minted) * [Step 2: list the buyers](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#step-2-list-the-buyers) * [Step 3: size the sale](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#step-3-size-the-sale) * [Where to go from here](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#where-to-go-from-here) * [Video tutorial on analyzing the PEPU sale](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#video-tutorial-on-analyzing-the-pepu-sale) * [Related pages](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/ico-token-ownership-transfer/#related-pages) --- # NFT Token Transfers API: ERC-721 and ERC-1155 Transfers on Ethereum [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD NFT transfers on Ethereum live in the same `Transfers` cube as token transfers, marked by `Currency.Fungible: false` and carrying the token `Id`, the collection contract, sender, receiver and, for ERC-1155, the amount. That means one cube answers the collection question, the wallet question and the mint question, and the same filter runs as a query over history or as a live subscription. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The worked collection is CryptoKitties, `0x06012c8cf97bead5deae237070f9587f8e7a266d`, which still changes hands a few times a day, nine years after launch. For collection-level views such as token lists and holders see the [NFT collection API](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/) . Latest transfers of one collection[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#latest-transfers-of-one-collection "Direct link to Latest transfers of one collection") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The `combined` dataset reaches history, so this works for a collection whether it moved a minute ago or a year ago. Saved query [here](https://ide.bitquery.io/Cryptokitties-Token-Transfers) . { EVM(dataset: combined, network: eth) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x06012c8cf97bead5deae237070f9587f8e7a266d" } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time Number } Transfer { Id Sender Receiver Currency { Name Symbol SmartContract } } Transaction { Hash } } }} Every NFT transfer on Ethereum, live[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#every-nft-transfer-on-ethereum-live "Direct link to Every NFT transfer on Ethereum, live") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Drop the contract and keep `Fungible: false` to stream all ERC-721 and ERC-1155 transfers as blocks are indexed. Saved stream [here](https://ide.bitquery.io/ERC721-token-transfers) . subscription { EVM(network: eth) { Transfers(where: { Transfer: { Currency: { Fungible: false } } }) { Block { Time } Transfer { Id Amount Sender Receiver Currency { Name Symbol SmartContract } } Transaction { Hash } } }} Add the collection contract back into the filter to stream one collection; a quiet collection can then go hours between messages, so check it with the query above first. One wallet's NFT activity[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#one-wallets-nft-activity "Direct link to One wallet's NFT activity") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- An `any` block matches transfers where the wallet is the sender or the receiver. The example is a large BAYC holder. { EVM(dataset: combined, network: eth) { Transfers( where: { Transfer: { Currency: { Fungible: false } } any: [ { Transfer: { Sender: { is: "0x29469395eaf6f95920e59f858042f0e28d98a20b" } } } { Transfer: { Receiver: { is: "0x29469395eaf6f95920e59f858042f0e28d98a20b" } } } ] } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Transfer { Id Sender Receiver Currency { Name SmartContract } } Transaction { Hash } } }} Mints[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#mints "Direct link to Mints") --------------------------------------------------------------------------------------------------------------------------- A mint is a transfer from the zero address; the receiver is the minter. For CryptoKitties a mint is a kitty being born. { EVM(dataset: combined, network: eth) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x06012c8cf97bead5deae237070f9587f8e7a266d" } } Sender: { is: "0x0000000000000000000000000000000000000000" } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Transfer { Id Receiver } Transaction { Hash } } }} Fields worth knowing[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#fields-worth-knowing "Direct link to Fields worth knowing") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ * `Transfer.Id` is the token id; `Transfer.Amount` is 1 for ERC-721 and the quantity for ERC-1155. * `Transfer.URI` is the metadata link when the contract exposes one; fetch it yourself for the image and attributes. * `Currency.Fungible` is the ERC-721/1155 flag; `Currency.HasURI` says whether a URI exists. * `dataset: combined` on the `EVM` root joins archive and realtime; without it a query reads the realtime window only. Frequently Asked Questions -------------------------- How do I get NFT transfers on Ethereum? Query Transfers on EVM(network: eth) with Currency.Fungible false, plus the collection contract, a wallet or the zero address as sender for mints. Use dataset combined for history or a subscription for a live feed. Does the same query cover ERC-1155? Yes. ERC-1155 transfers are rows in the same cube with the token Id and the Amount moved; ERC-721 rows carry an Amount of 1. How do I stream every NFT transfer on Ethereum? Subscribe to Transfers with Currency.Fungible false and no other filter. Each message is a transfer as its block is indexed. How do I see a wallet's NFT history? Use an any block with the wallet as Sender in one branch and Receiver in the other, together with Currency.Fungible false, on the combined dataset. How do I find who minted an NFT? Filter the collection contract with Sender set to the zero address; the Receiver of that transfer is the minter and the transaction hash leads to the mint call. Related pages[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#related-pages "Direct link to Related pages") --------------------------------------------------------------------------------------------------------------------------------------------------- * [Ethereum NFT collection API](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/) * [Ethereum NFT API](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/) * [Ethereum token transfers API](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/erc20-token-transfer-api/) * [Transfers cube](https://docs.bitquery.io/docs/cubes/transfers-cube/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest transfers of one collection](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#latest-transfers-of-one-collection) * [Every NFT transfer on Ethereum, live](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#every-nft-transfer-on-ethereum-live) * [One wallet's NFT activity](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#one-wallets-nft-activity) * [Mints](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#mints) * [Fields worth knowing](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#fields-worth-knowing) * [Related pages](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/nft-token-transfer-api/#related-pages) --- # Base Jump API: Trace a Launchpad Token on Base from Mint to First Trades [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Base Jump was a token launchpad on Base. Its contract, `0x31C0282Fa6D0A82aD22ab63BbaCd87F62B2a9bfD`, receives no calls in the current realtime window, and the token the original guide used, SIBU at `0xEfC79f30b56f36bc49Bf47e8Dccf969fFF214EeD`, was minted, distributed and traded within a few minutes on 28 October 2024 and has not moved since. The launch still makes a clean worked example, because the steps are the same for any launchpad on Base: find the launchpad contract from the token's first transfers, pull the launch trades, and read the contract's methods while it is live. Every query runs in the [IDE](https://ide.bitquery.io/) on a free account. For launchpads active on Base today see the [Clanker](https://docs.bitquery.io/docs/blockchain/Base/base-clanker-api/) , [Zora](https://docs.bitquery.io/docs/blockchain/Base/base-zora-api/) , [Bankr](https://docs.bitquery.io/docs/blockchain/Base/base-bankr-api/) and [APE Store](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/) pages. One coverage fact shapes the page. On Base the `Transfers` and `DEXTradeByTokens` cubes reach years back on the `combined` dataset, while `Calls` and `Events` cover the realtime window only. So the mint and the trades of a 2024 launch are still queryable, but method-level analysis of a contract only works while it is active. Step 1: find the launchpad contract from the token[​](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/#step-1-find-the-launchpad-contract-from-the-token "Direct link to Step 1: find the launchpad contract from the token") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The first transfers of a token show where it was minted and who distributed it. The `Transaction.To` on those rows is the contract the deployer called. For SIBU the mint from the zero address went to the Base Jump contract, which then sent the supply on in the same transaction. Saved query [here](https://ide.bitquery.io/base-jump-token-event) . { EVM(network: base, dataset: combined) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0xEfC79f30b56f36bc49Bf47e8Dccf969fFF214EeD" } } } } limit: { count: 10 } orderBy: { ascending: Block_Time } ) { Block { Time } Transfer { Sender Receiver Amount Currency { Symbol Name } } Transaction { Hash From To } } }} Step 2: pull the launch trades[​](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/#step-2-pull-the-launch-trades "Direct link to Step 2: pull the launch trades") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `DEXTradeByTokens` on the `combined` dataset returns every trade of the token with the venue and the other side. For SIBU that is a short burst of Uniswap v3 trades against WETH. Saved query [here](https://ide.bitquery.io/base-jump-buys) . { EVM(network: base, dataset: combined) { DEXTradeByTokens( where: { Trade: { Currency: { SmartContract: { is: "0xEfC79f30b56f36bc49Bf47e8Dccf969fFF214EeD" } } } } limit: { count: 50 } orderBy: { ascending: Block_Time } ) { Block { Time } Trade { Dex { ProtocolName } Amount Side { Amount Currency { Symbol } } } Transaction { Hash From } } }} Replace the selection with `count`, `uniq(of: Transaction_From)` and `Block { first: Time(minimum: Block_Time) last: Time(maximum: Block_Time) }` to size a launch in one row: trades, distinct traders, first and last trade. Step 3: read a live contract's methods[​](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/#step-3-read-a-live-contracts-methods "Direct link to Step 3: read a live contract's methods") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- For a launchpad that is active, group the `Calls` into its contract by signature to see what it exposes and which methods carry the volume. The example is the Clanker contract that emits `TokenCreated` on Base; put the Base Jump contract in its place and the result is empty, which is how you confirm a launchpad has gone quiet. Saved query [here](https://ide.bitquery.io/methods-for-base-jump) . { EVM(network: base) { Calls( where: { Transaction: { To: { is: "0x375C15db32D28cEcdcAB5C03Ab889bf15cbD2c5E" } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "count" } limit: { count: 20 } ) { Call { Signature { Name Signature } } count } }} From there, filter `Calls` on one signature name and select `Arguments` to decode the parameters of each call; the [Clanker page](https://docs.bitquery.io/docs/blockchain/Base/base-clanker-api/) shows that shape for token creation events. Frequently Asked Questions -------------------------- Is the Base Jump launchpad still active? Not on-chain. Its contract receives no calls in the realtime window, and the example token's only activity was on its launch day in October 2024. The queries here work as a pattern for any Base launchpad. How do I find which launchpad deployed a token on Base? Query the token's earliest Transfers on the combined dataset. The mint comes from the zero address, and Transaction.To on that row is the contract the deployer called, which is the launchpad or its factory. Why does a Calls query for a 2024 contract return nothing on Base? Calls and Events on Base cover the realtime window only. Transfers and DEXTradeByTokens reach history on the combined dataset, so use those cubes for anything older than the window. Which Base launchpads have current guides? Clanker, Zora, Bankr and APE Store each have a page with live queries for token creation, trades and traders. Related pages[​](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/#related-pages "Direct link to Related pages") --------------------------------------------------------------------------------------------------------------------------------- * [Base API hub](https://docs.bitquery.io/docs/blockchain/Base/) * [Base Clanker API](https://docs.bitquery.io/docs/blockchain/Base/base-clanker-api/) * [Base DEX trades API](https://docs.bitquery.io/docs/blockchain/Base/base-dextrades/) * [Base transfers API](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Step 1: find the launchpad contract from the token](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/#step-1-find-the-launchpad-contract-from-the-token) * [Step 2: pull the launch trades](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/#step-2-pull-the-launch-trades) * [Step 3: read a live contract's methods](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/#step-3-read-a-live-contracts-methods) * [Related pages](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/#related-pages) --- # BSC Smart Contract Events API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/bsc-events-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will see how to get BSC Smart Contract Events information using our API. Track Newly Created Pools on BSC[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-events-api/#track-newly-created-pools-on-bsc "Direct link to Track Newly Created Pools on BSC") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription websocket lets you track the newly created pools on Uniswap V3 `0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7`. And we are listening for a particular event here named as `PoolCreated` because whenever a new pool is created on Uniswap V3 this event is fired. You can get the newly created pool address in the response in `arguments`. You can find the query [here](https://ide.bitquery.io/Newly-Created-Pools-on-Uniswap-v3-on-BSC-network_3#) subscription { EVM(network: bsc) { Events( where: {Log: {SmartContract: {is: "0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7"}, Signature: {Name: {is: "PoolCreated"}}}, TransactionStatus: {Success: true}} ) { Log { Signature { Name Parsed Signature } SmartContract } Transaction { Hash } Block { Date Number } Arguments { Type Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Integer_Value_Arg { integer } } Name } } }} Video Tutorial on BSC API | How to Track Newly Created Tokens & Pools in Realtime on BSC[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-events-api/#video-tutorial-on-bsc-api--how-to-track-newly-created-tokens--pools-in-realtime-on-bsc "Direct link to Video Tutorial on BSC API | How to Track Newly Created Tokens & Pools in Realtime on BSC") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track Newly Created Pools on BSC](https://docs.bitquery.io/docs/blockchain/BSC/bsc-events-api/#track-newly-created-pools-on-bsc) * [Video Tutorial on BSC API | How to Track Newly Created Tokens & Pools in Realtime on BSC](https://docs.bitquery.io/docs/blockchain/BSC/bsc-events-api/#video-tutorial-on-bsc-api--how-to-track-newly-created-tokens--pools-in-realtime-on-bsc) --- # BSC Smart Contract Calls API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/bsc-calls-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will see how to get BSC Smart contract calls information using our API. Track Latest Calls on BNB[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-calls-api/#track-latest-calls-on-bnb "Direct link to Track Latest Calls on BNB") --------------------------------------------------------------------------------------------------------------------------------------------------------------- The below query retrieves the latest successful smart contract calls on the BNB Smart Chain (BSC). It fetches details about contract interactions, transaction metadata, and associated block information. You can run it [here](https://ide.bitquery.io/Latest-Calls-on-BSC-network) { EVM(network: bsc) { Calls( where: {Arguments: {length: {ne: 0}}, TransactionStatus: {Success: true}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Arguments { Name Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } } } Transaction { Hash To Type From } Receipt { ContractAddress } Block { Time } } }} Track Latest Created Tokens on BSC[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-calls-api/#track-latest-created-tokens-on-bsc "Direct link to Track Latest Created Tokens on BSC") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This subscription websocket lets you track the newly created tokens on BSC network. You will find the newly created token contract address in the response under `Receipt: ContractAddress` field. You can find the query [here](https://ide.bitquery.io/Newly-Created-Tokens-on-BSC-network_2#) subscription { EVM(network: bsc) { Calls( where: {Call: {Create: true}, Arguments: {length: {ne: 0}}, Receipt: {ContractAddress: {not: "0x0000000000000000000000000000000000000000"}}, TransactionStatus: {Success: true}} ) { Arguments { Name Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } } } Transaction { Hash } Receipt { ContractAddress } Block { Time } } }} Video Tutorial on BSC API | How to Track Newly Created Tokens & Pools in Realtime on BSC[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-calls-api/#video-tutorial-on-bsc-api--how-to-track-newly-created-tokens--pools-in-realtime-on-bsc "Direct link to Video Tutorial on BSC API | How to Track Newly Created Tokens & Pools in Realtime on BSC") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track Latest Calls on BNB](https://docs.bitquery.io/docs/blockchain/BSC/bsc-calls-api/#track-latest-calls-on-bnb) * [Track Latest Created Tokens on BSC](https://docs.bitquery.io/docs/blockchain/BSC/bsc-calls-api/#track-latest-created-tokens-on-bsc) * [Video Tutorial on BSC API | How to Track Newly Created Tokens & Pools in Realtime on BSC](https://docs.bitquery.io/docs/blockchain/BSC/bsc-calls-api/#video-tutorial-on-bsc-api--how-to-track-newly-created-tokens--pools-in-realtime-on-bsc) --- # Robinhood Chain API: Trades, Pons Launchpad and Real-Time Streams [Skip to main content](https://docs.bitquery.io/docs/blockchain/robinhood/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD **Robinhood Chain** (`network: robinhood`, chain ID **4663**) is Robinhood's EVM Layer 2, built with the Arbitrum Orbit stack and live on mainnet since July 2026. Gas is paid in ETH, the chain carries the **USDG** stablecoin and Robinhood's **tokenized stocks and ETFs**, and it hosts a dense cluster of meme-coin launchpads, led by **Pons**. Bitquery indexes the whole chain — blocks, transactions, internal calls, decoded events, token transfers, balances, DEX trades and pool liquidity — and serves it through one GraphQL endpoint where any query can run as a live WebSocket stream. This page is the map. Use it to pick the cube that answers your question, then jump to the linked guide. The **[Pons Launchpad API](https://docs.bitquery.io/docs/blockchain/robinhood/#pons) ** has its own section below because it is the launchpad developers ask about most. API Key Required To query or stream data outside the Bitquery IDE, you need an API access token. Follow the steps here: [How to generate Bitquery API token ➤](https://docs.bitquery.io/docs/authorization/how-to-generate/) * * * Robinhood Chain at a glance[​](https://docs.bitquery.io/docs/blockchain/robinhood/#network-facts "Direct link to Robinhood Chain at a glance") ----------------------------------------------------------------------------------------------------------------------------------------------- | Property | Value | | --- | --- | | Bitquery network name | `robinhood` in `EVM(network: robinhood)`; `bid:robinhood` in the `Trading` cubes | | Chain ID | `4663` | | Stack | EVM, Arbitrum Orbit rollup | | Gas token | ETH | | Public explorer | [robinhoodchain.blockscout.com](https://robinhoodchain.blockscout.com/)
— Bitquery is an indexed data API, not an explorer or an RPC node | | WETH | `0x0bd7d308f8e1639fab988df18a8011f41eacad73` | | USDG (Global Dollar, 6 decimals) | `0x5fc5360d0400a0fd4f2af552add042d716f1d168` | | Uniswap v4 PoolManager | `0x8366a39cc670b4001a1121b8f6a443a643e40951` — the chain-wide v4 singleton that Pons and pools.trade pools route through | | GraphQL endpoint | `https://streaming.bitquery.io/graphql` for queries and subscriptions | * * * Quick start: stream every trade on Robinhood Chain[​](https://docs.bitquery.io/docs/blockchain/robinhood/#quick-start "Direct link to Quick start: stream every trade on Robinhood Chain") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `Trading` cubes carry live swaps with USD prices for Robinhood Chain and eight other chains in one schema. Paste this into the [Bitquery IDE](https://ide.bitquery.io/) to watch the network trade in real time: subscription { Trading { Trades( where: {Pair: {Market: {NetworkBid: {is: "bid:robinhood"}}}} ) { Block { Time } Trader { Address } Pair { Token { Name Symbol Address } QuoteToken { Name Symbol Address } } Amounts { Base Quote } AmountsInUsd { Base } } }} Change `subscription` to `query`, add `limit: {count: 10}` and `orderBy: {descending: Block_Time}`, and the same selection set returns the latest trades instead. Prices, OHLCV candles, market cap, whale trades and top-trader leaderboards are on the [Robinhood Trades API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-trades/) page. Trading cubes for live data, DEXTrades for deep history `Trading.Trades` / `Tokens` / `Pairs` cover real-time plus roughly the last 30 days with USD pricing baked in. Use the chain-level `DEXTrades` cube for older history or when you need the call and event context around a swap. See the [Trading data overview](https://docs.bitquery.io/docs/trading/trading-data-overview/) . * * * Pick the right API[​](https://docs.bitquery.io/docs/blockchain/robinhood/#pick-the-right-api "Direct link to Pick the right API") ---------------------------------------------------------------------------------------------------------------------------------- | What you want | Use this | Guide | | --- | --- | --- | | Live swaps, USD prices, OHLCV, market cap, top traders | `Trading` cubes; `DEXTrades` for older history | [Robinhood Trades API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-trades/) | | New pools, trending tokens, pair lookup, token search | `Events` (`Initialize`, `PoolCreated`) and `Trading` cubes | [New Pools & Trending Tokens API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-new-pools-trending/) | | Every new token, across all launchpads | `Transfers` (launch mints) and `Events` | [Robinhood Meme Coin Launches API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/) | | Pons launches, curve trades, graduations, liquidity lock | `Events`, `Calls`, `Trading` | [Pons Launchpad API](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/) | | Who sent what to whom, whale alerts, wallet ledgers | `Transfers` | [Robinhood Transfers API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) | | A wallet's portfolio and balance history | `Balances` | [Robinhood Balances API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-balances-api/) | | Holder rankings, counts and distribution | `Holders` | [Robinhood Token Holders API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-holders-api/) | | Total supply of a token or watchlist | `TransactionBalances` | [Robinhood Token Supply API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/) | | Pool reserves, TVL, per-swap slippage | `DEXPools` | [Robinhood Liquidity & Slippage API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-liquidity/) | | Any decoded contract event, an `eth_getLogs` replacement | `Events` | [Robinhood Events API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) | | Method calls, internal traces, contract deployments, reverts | `Calls` | [Robinhood Calls & Traces API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/) | | Transactions, receipts, status, gas and fees | `Transactions` | [Robinhood Transactions & Receipts API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/) | | Perp margin deposits and withdrawals on Lighter | `Transfers`, `Events`, `Calls` | [Lighter Perp DEX API](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/) | * * * Pons Launchpad API on Robinhood Chain[​](https://docs.bitquery.io/docs/blockchain/robinhood/#pons "Direct link to Pons Launchpad API on Robinhood Chain") ---------------------------------------------------------------------------------------------------------------------------------------------------------- **[Pons](https://www.ponsfamily.com/launchpad) ** (Pons Family) is the bonding-curve launchpad on Robinhood Chain. Every launch mints a fixed **1 billion** supply into its own curve contract. Traders buy and sell against that curve until it takes in its graduation threshold (**4.2 ETH** for native-quoted launches; a per-asset amount for other quotes), at which point the curve is swept, the proceeds seed a **Uniswap v4 pool behind the Pons meme hook**, and the liquidity position is **permanently locked**. A creator can quote a launch in **ETH, USDG, cbBTC, or a tokenized stock or ETF** such as TSLA, NVDA or SPY. The [Pons Launchpad API guide](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/) covers the full lifecycle with runnable queries: * **New launches** — the decoded `TokenLaunched` event, a `Calls`\-based launch feed with full archive history, and the on-chain token metadata (name, symbol, image, description, socials). See [Newly launched tokens](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#newly-launched-tokens) and [Token metadata](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#token-metadata) . * **Bonding-curve trades** — `CurveBuy` and `CurveSell` events with snipe-tax fields, plus the same trades as `Protocol: pons_v2` rows in the `Trading` cube for USD prices and OHLCV. See [Bonding-curve trades](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#bonding-curve-trades) . * **Graduations** — `LaunchSwept` and `PoolGraduated`, the graduated v4 pool, and how to find the Pons pool of one token without picking up copycat pools. See [Graduation](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#graduation) . * **Locked liquidity** — verifying the lock in `PonsV2LaunchLocker`. See [Verifying the Pons liquidity lock](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#liquidity-lock) . * **Contract addresses and event reference** — every factory, curve, hook, router and locker event with its topic0. See [Contract addresses](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#contract-addresses) and [Event reference](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#event-reference) . * **After graduation** — holders, supply, pool liquidity and slippage for graduated tokens. See [Holders and supply](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#holders-and-supply) . | Pons V2 contract | Address | | --- | --- | | Launch factory (`PonsV2LaunchFactory`) | `0x7ed598bcef8bd9edd8c97a195c6d13f40801ec7e` | | Launch router (`PonsV2LaunchAndBuy`) | `0xe33e9e479df8802cb0866d5d05258bec4cf62948` | | Meme hook (`PonsV2MemeHook`), on every graduated pool | `0xe5e702641ea86f4ae6cc3cdaed2b886f976be044` | | Launch locker (`PonsV2LaunchLocker`) | `0x267444d099b10fb5ed7c3cc7b7c767adca574952` | | Bonding curve | one contract per token — the receiver of the launch mint | Stream every new Pons launch as it happens: subscription { EVM(network: robinhood) { Calls( where: { Call: { To: {in: [ "0x7ed598bcef8bd9edd8c97a195c6d13f40801ec7e", "0xe33e9e479df8802cb0866d5d05258bec4cf62948" ]} Input: {startsWith: ["0xf35abbcf", "0xa72101af", "0xf85f8e41"]} Success: true } } ) { Block { Time } Transaction { Hash From } Call { To Value Input Output } } }} `Transaction.From` is the creator, and the first two 32-byte words of `Call.Output` are the new token and its curve. The [guide](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#newly-launched-tokens) explains the selectors, the decoding, and why `launchTokenFor` is deliberately left out of the filter. Pons and pools.trade are opposites Pons has a real bonding curve and a graduation event. [pools.trade](https://docs.bitquery.io/docs/blockchain/robinhood/pools-trade-api/) tokens trade in a Uniswap v4 pool from block one with no curve and no graduation. Queries written for one return nothing on the other — see [How Pons differs from pools.trade](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#pons-vs-poolstrade) . * * * Other launchpads on Robinhood Chain[​](https://docs.bitquery.io/docs/blockchain/robinhood/#launchpads "Direct link to Other launchpads on Robinhood Chain") ------------------------------------------------------------------------------------------------------------------------------------------------------------ Robinhood Chain launchpads are **not interchangeable**. Each has its own factory contracts, its own event signatures, and a different relationship to the DEX it trades on. Four more have dedicated guides: | Launchpad | Model | Guide | | --- | --- | --- | | **pools.trade** | Uniswap v4 pool from block one, no curve and no graduation event; Crowd Launch auctions | [Pools.trade API on Robinhood](https://docs.bitquery.io/docs/blockchain/robinhood/pools-trade-api/) | | **Flap.sh** | Bonding curve with per-token tax and progress events, graduates to a DEX; emits a decoded `TokenCreated` | [Flap.sh API on Robinhood](https://docs.bitquery.io/docs/blockchain/robinhood/flap-sh-api/) | | **trench.today** | Bonding-curve launchpad run from a single factory proxy; `TokenCreate`, `TokenPurchase`, `TokenSale` and `Sync` events expose launches, trades and live curve reserves | [trench.today API on Robinhood](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/) | | **Bags.fm** | Creator-fee launchpad | [Bags.fm API on Robinhood](https://docs.bitquery.io/docs/blockchain/robinhood/bags-fm-api/) | For a **cross-launchpad feed** — every new token on the network regardless of which factory minted it — use the [Robinhood Meme Coin Launches API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/) . It also carries per-launchpad launch queries for [hood.fun](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/#hoodfun) , [LaunchHood](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/#launchhood) , [Virtuals](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/#virtuals) , [Klik Finance](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/#klik-finance) , [Doppler](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/#doppler-airlock) (the Airlock that Bankr and other front-ends launch through), [Ape.store](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/#apestore) and [Clanker](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/#clanker) , and a query that [compares launch activity across launchpads](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/#compare-launchpad-activity) . Feed for discovery, launchpad page for depth The cross-launchpad feed answers _"what launched?"_. The per-launchpad guides answer _"what is this token doing?"_ — curve trades, graduation progress, fee splits and pool state. Most production pipelines use the feed for discovery and one launchpad guide for depth. * * * Perpetual futures: Lighter on Robinhood Chain[​](https://docs.bitquery.io/docs/blockchain/robinhood/#perps "Direct link to Perpetual futures: Lighter on Robinhood Chain") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [Lighter](https://lighter.xyz/) is the perp DEX behind in-app perpetuals in Robinhood Wallet. Its ZkLighter rollup contract lives on Robinhood Chain and receives every USDG margin deposit, pays every withdrawal, and records the rollup's batch lifecycle. The [Lighter Perp DEX API](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/) shows how to track deposits, withdrawals, batch commits and the contract's flow history. * * * Real-time streams: WebSocket, Kafka and MCP[​](https://docs.bitquery.io/docs/blockchain/robinhood/#streaming "Direct link to Real-time streams: WebSocket, Kafka and MCP") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **WebSocket** — every query on every page above runs as a subscription: swap `query` for `subscription` and keep the same selection set. See [WebSocket subscriptions](https://docs.bitquery.io/docs/subscriptions/websockets/) and [authorizing a WebSocket connection](https://docs.bitquery.io/docs/authorization/websocket/) . * **Kafka** — for firehose-scale workloads, Robinhood Chain is published as protobuf topics: `robinhood.transactions.proto` (transactions, calls, events), `robinhood.tokens.proto` (transfers, balances), `robinhood.dextrades.proto` (DEX trades), `robinhood.dexpools.proto` (pool liquidity) and `robinhood.raw.proto` (raw blocks). See [Kafka streaming concepts](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/) and the [streams overview](https://docs.bitquery.io/docs/streams/) . * **MCP** — the [Bitquery MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) exposes Robinhood Chain trades, prices and wallet history to AI agents alongside the other Trading-cube chains. * * * Datasets and history[​](https://docs.bitquery.io/docs/blockchain/robinhood/#datasets "Direct link to Datasets and history") ---------------------------------------------------------------------------------------------------------------------------- Robinhood Chain queries accept a `dataset` argument that decides how far back you can reach and how fresh the tail is. * [`realtime`](https://docs.bitquery.io/docs/graphql/dataset/realtime/) — lowest latency, holds only the most recent days * [`archive`](https://docs.bitquery.io/docs/graphql/dataset/archive/) — history back to when Bitquery started indexing Robinhood Chain, higher latency * [`combined`](https://docs.bitquery.io/docs/graphql/dataset/combined/) — both, stitched * [Data coverage and retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) — what each window actually holds Two rules of thumb. If a query works on recent data but returns nothing for older blocks, the dataset argument is almost always the reason. And a few cubes — `Transactions`, `DEXPools` and `TransactionBalances` — are realtime-only on Robinhood Chain; each guide's dataset section says what applies to it. History is sold per chain. The free trial includes complete history; paid self-service plans are real-time only and add it through the Robinhood archive add-on on the [pricing page](https://bitquery.io/pricing) , which unlocks `archive` and `combined` on `DEXTrades`, `DEXTradeByTokens`, `Calls` and `Events`. A second add-on covers historical `Transfers`, `Balances` and `Holders`. The Pons guide's [historical data section](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/#historical-data) walks through it. * * * FAQ --- Is Robinhood Chain EVM-compatible, and what is its chain ID? Yes. Robinhood Chain is an EVM Layer 2 built with Arbitrum Orbit, chain ID **4663**, with gas paid in ETH. In Bitquery it is `EVM(network: robinhood)`, and `bid:robinhood` in the `Trading` cubes. Solidity ABIs, topic0 hashes and 4-byte selectors work exactly as they do on Ethereum. Does Bitquery have a Pons API? Yes. The [Pons Launchpad API](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/) covers new launches, bonding-curve trades, snipe tax, graduations, the liquidity lock, contract addresses and the full event reference, and Pons curve trades also appear as `Protocol: pons_v2` rows in the `Trading` cube with USD prices. The [Pons section above](https://docs.bitquery.io/docs/blockchain/robinhood/#pons) has the contract addresses and a live launch stream. The guide documents **Pons V2** (`PonsV2LaunchFactory`); the V1 factory (`PonsLaunchFactory`) is a different protocol with different event signatures, called out in the same guide. How do I get every new token launched on Robinhood Chain? Use the cross-launchpad stream on the [Robinhood Meme Coin Launches API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/) page for discovery, then the launchpad's own guide ([Pons](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/) , [pools.trade](https://docs.bitquery.io/docs/blockchain/robinhood/pools-trade-api/) , [Flap.sh](https://docs.bitquery.io/docs/blockchain/robinhood/flap-sh-api/) , [trench.today](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/) , [Bags.fm](https://docs.bitquery.io/docs/blockchain/robinhood/bags-fm-api/) ) for curve trades, graduation and pool state. Is this the Robinhood brokerage trading API? No. These pages document **on-chain data for Robinhood Chain**, the public blockchain. They do not place stock or crypto orders in a Robinhood account, and they do not cover Robinhood's off-chain products such as prediction markets. Does Bitquery provide a Robinhood Chain RPC endpoint or block explorer? No. Bitquery is an indexed data API; the public explorer is [robinhoodchain.blockscout.com](https://robinhoodchain.blockscout.com/) . Every explorer lookup has an API equivalent here, and each is queryable in bulk and streamable: address history ([Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) , [Balances](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-balances-api/) ), token holders ([Token Holders](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-holders-api/) ), transaction receipts ([Transactions & Receipts](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/) ), contract logs ([Events](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) ) and internal traces ([Calls](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/) ). Can I get new pools, trending tokens and pair lookups for Robinhood Chain, like GeckoTerminal or DexScreener? Yes — the [New Pools & Trending Tokens API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-new-pools-trending/) maps each of those endpoints to a Bitquery query: new pools from the Uniswap v4 `Initialize` and v3 `PoolCreated` events, trending tokens and pools from the `Trading` cubes, plus pair lookup by pool address and token search by symbol or name. Pool reserves and TVL are on the [Liquidity API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-liquidity/) . How far back does Robinhood Chain data go? The `archive` dataset reaches back to when Bitquery began indexing the chain, and the `Trading` cubes hold roughly the last 30 days. The `realtime` dataset holds only the most recent days, so add `dataset: archive` or `dataset: combined` to any historical query. Details are on the [data coverage and retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) page. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Robinhood Chain at a glance](https://docs.bitquery.io/docs/blockchain/robinhood/#network-facts) * [Quick start: stream every trade on Robinhood Chain](https://docs.bitquery.io/docs/blockchain/robinhood/#quick-start) * [Pick the right API](https://docs.bitquery.io/docs/blockchain/robinhood/#pick-the-right-api) * [Pons Launchpad API on Robinhood Chain](https://docs.bitquery.io/docs/blockchain/robinhood/#pons) * [Other launchpads on Robinhood Chain](https://docs.bitquery.io/docs/blockchain/robinhood/#launchpads) * [Perpetual futures: Lighter on Robinhood Chain](https://docs.bitquery.io/docs/blockchain/robinhood/#perps) * [Real-time streams: WebSocket, Kafka and MCP](https://docs.bitquery.io/docs/blockchain/robinhood/#streaming) * [Datasets and history](https://docs.bitquery.io/docs/blockchain/robinhood/#datasets) --- # EVM Token Supply API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Track real-time and historical token supply data across all EVM-compatible blockchains including Ethereum, BNB Chain (BSC), Base, Arbitrum, Polygon, and more using Bitquery's Token Supply API. Looking for Solana Token Supply? Bitquery also provides comprehensive **[Solana Token Supply API](https://docs.bitquery.io/docs/blockchain/Solana/token-supply-cube/) ** with features including: * Real-time token supply changes and market cap tracking * Pump.fun and Moonshot token creation monitoring * Token burn event tracking * Top tokens by market cap queries ➡️ **[View Solana Token Supply Documentation](https://docs.bitquery.io/docs/blockchain/Solana/token-supply-cube/) ** What is Token Supply?[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#what-is-token-supply "Direct link to What is Token Supply?") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- Token supply refers to the total number of tokens that exist for a particular cryptocurrency or token. Understanding token supply is crucial for: * **Market Cap Calculation**: Total Supply × Token Price = Market Capitalization * **Inflation/Deflation Analysis**: Monitor minting and burning events * **DeFi Protocol Analysis**: Track liquidity and TVL changes * **Stablecoin Monitoring**: Verify backing and supply changes for USDT, USDC, DAI, etc. * **Investment Research**: Evaluate tokenomics and supply dynamics How do I get the total supply or circulating supply of a token?[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#how-do-i-get-the-total-supply-or-circulating-supply-of-a-token "Direct link to How do I get the total supply or circulating supply of a token?") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **Total supply on EVM:** Use Bitquery `EVM.TransactionBalances` (or streaming equivalents) and read `TokenBalance.TotalSupply` for the token contract, setting `network` to `eth`, `bsc`, `base`, or another supported chain. **Circulating supply** is not a single on-chain field: it is usually derived as total supply minus known treasury or locked wallets, or adjusted for burns—use mint/burn and transfer patterns from the same API family if you define it that way. 🔗 Related APIs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#-related-apis "Direct link to 🔗 Related APIs") ---------------------------------------------------------------------------------------------------------------------------------------------------- ### EVM APIs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#evm-apis "Direct link to EVM APIs") * **[EVM Balance Updates API](https://docs.bitquery.io/docs/schema/evm/balances/) ** - Track wallet balance changes * **[EVM Token Holders API](https://docs.bitquery.io/docs/schema/evm/token-holders/) ** - Get top holders of any token * **[EVM Transfers API](https://docs.bitquery.io/docs/schema/evm/transfers/) ** - Monitor token transfers * **[EVM DEX Trades API](https://docs.bitquery.io/docs/schema/evm/dextrades/) ** - Track trading activity ### Solana APIs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#solana-apis "Direct link to Solana APIs") * **[Solana Token Supply API](https://docs.bitquery.io/docs/blockchain/Solana/token-supply-cube/) ** - Track SPL token supply, market cap, and burn events * **[Solana Balance Updates API](https://docs.bitquery.io/docs/blockchain/Solana/solana-balance-updates/) ** - Monitor Solana wallet balances * **[Solana DEX Trades API](https://docs.bitquery.io/docs/blockchain/Solana/solana-dextrades/) ** - Track Solana DEX trading activity * * * Real-Time Token Supply Stream (WebSocket)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#real-time-token-supply-stream-websocket "Direct link to Real-Time Token Supply Stream (WebSocket)") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Latest Token Supply on BNB Chain[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#latest-token-supply-on-bnb-chain "Direct link to Latest Token Supply on BNB Chain") Subscribe to real-time token supply updates across all tokens on the BNB Chain (BSC). This WebSocket subscription provides continuous updates as token supplies change due to minting or burning. You can run this query [here](https://ide.bitquery.io/latest-token-supply-on-BSC-chain) . subscription { EVM(network: bsc) { TransactionBalances( limitBy: { by: TokenBalance_Currency_SmartContract, count: 1 } where: { TokenBalance: { Currency: { SmartContract: { not: "0x" } } } } ) { TokenBalance { TotalSupply Currency { Name Symbol SmartContract } } } }} **Key Parameters:** * `limitBy: { by: TokenBalance_Currency_SmartContract, count: 1 }` - Returns only the latest supply for each unique token * `SmartContract: { not: "0x" }` - Excludes native currency (BNB) to focus on ERC-20 tokens Multi-Chain Support Change the `network` parameter to query other EVM chains: * `eth` - Ethereum * `bsc` - BNB Chain * `base` - Base * `arbitrum` - Arbitrum * `matic` - Polygon * `optimism` - Optimism * * * Token Supply Queries (GraphQL)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#token-supply-queries-graphql "Direct link to Token Supply Queries (GraphQL)") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Latest Token Supply of Specific Tokens on Ethereum[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#latest-token-supply-of-specific-tokens-on-ethereum "Direct link to Latest Token Supply of Specific Tokens on Ethereum") Get the current total supply for specific tokens like USDC and USDT on Ethereum or any EVM network. This is ideal for stablecoin tracking and portfolio applications. You can run this query [here](https://ide.bitquery.io/latest-token-supply-on-USDT-and-USDC-on-ethereum-chain) . { EVM(network: eth) { TransactionBalances( orderBy: { descending: Block_Time } limitBy: { by: TokenBalance_Currency_SmartContract, count: 1 } where: { TokenBalance: { Currency: { SmartContract: { in: [ "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" "0xdac17f958d2ee523a2206206994597c13d831ec7" ] } } } } ) { TokenBalance { TotalSupply Currency { Name Symbol SmartContract } } } }} **Common Token Addresses (Ethereum):** | Token | Contract Address | | --- | --- | | USDT | `0xdac17f958d2ee523a2206206994597c13d831ec7` | | USDC | `0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48` | | DAI | `0x6b175474e89094c44da98b954eedeac495271d0f` | | WETH | `0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2` | | LINK | `0x514910771af9ca656af840dff83e8264ecf986ca` | * * * ### Latest Token Supply of All Active Tokens on Base[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#latest-token-supply-of-all-active-tokens-on-base "Direct link to Latest Token Supply of All Active Tokens on Base") Retrieve the latest total supply for all active tokens on the Base blockchain. This query is useful for market analytics, portfolio trackers, and DeFi dashboards. You can run this query [here](https://ide.bitquery.io/latest-token-supply-of-all-active-tokens-on-base-chain) . { EVM(network: base) { TransactionBalances( orderBy: { descending: Block_Time } limitBy: { by: TokenBalance_Currency_SmartContract, count: 1 } where: { TokenBalance: { Currency: { SmartContract: { not: "0x" } } } } ) { TokenBalance { TotalSupply Currency { Name Symbol SmartContract } } } }} * * * Use Cases[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#use-cases "Direct link to Use Cases") ------------------------------------------------------------------------------------------------------------------------------------ ### 1\. Stablecoin Supply Monitoring[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#1-stablecoin-supply-monitoring "Direct link to 1. Stablecoin Supply Monitoring") Track stablecoin supplies to monitor market dynamics and potential de-pegging risks: * Monitor USDT, USDC, DAI supply changes in real-time * Detect large minting or burning events * Compare supply across different chains ### 2\. Market Cap Calculation[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#2-market-cap-calculation "Direct link to 2. Market Cap Calculation") Calculate accurate market capitalization by combining supply data with price feeds: Market Cap = Total Supply × Current Price ### 3\. Token Inflation Analysis[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#3-token-inflation-analysis "Direct link to 3. Token Inflation Analysis") Analyze token inflation rates by comparing supply changes over time: * Track new token emissions * Monitor burning mechanisms * Calculate inflation/deflation rates ### 4\. DeFi Protocol Analytics[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#4-defi-protocol-analytics "Direct link to 4. DeFi Protocol Analytics") Monitor supply changes for DeFi governance tokens and LP tokens to understand protocol health and user activity. ### 5\. Compliance & Auditing[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#5-compliance--auditing "Direct link to 5. Compliance & Auditing") Maintain audit trails of supply changes for regulatory compliance and financial reporting. * * * API Response Fields[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#api-response-fields "Direct link to API Response Fields") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Field | Description | | --- | --- | | `TokenBalance.TotalSupply` | Current total supply of the token | | `TokenBalance.Currency.Name` | Token name (e.g., "USD Coin") | | `TokenBalance.Currency.Symbol` | Token symbol (e.g., "USDC") | | `TokenBalance.Currency.SmartContract` | Token contract address | | `TokenBalance.Currency.Decimals` | Number of decimal places | | `Block.Number` | Block number of the supply update | | `Block.Time` | Timestamp of the supply update | * * * Supported Networks[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#supported-networks "Direct link to Supported Networks") --------------------------------------------------------------------------------------------------------------------------------------------------------------- | Network | Parameter | Description | | --- | --- | --- | | Ethereum | `eth` | Ethereum Mainnet | | BNB Chain | `bsc` | BNB Smart Chain | | Base | `base` | Base L2 | | Arbitrum | `arbitrum` | Arbitrum One | | Polygon | `matic` | Polygon PoS | | Optimism | `optimism` | Optimism L2 | | Robinhood | `robinhood` | Robinhood network | * * * Best Practices[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#best-practices "Direct link to Best Practices") --------------------------------------------------------------------------------------------------------------------------------------------------- 1. **Use `limitBy` for Latest Data**: Always use `limitBy: { by: TokenBalance_Currency_SmartContract, count: 1 }` to get only the most recent supply for each token. 2. **Filter by Smart Contract**: When querying specific tokens, use the `SmartContract: { is: "..." }` filter to improve query performance. 3. **Use Archive Dataset for History**: For historical queries, specify `dataset: archive` to access complete blockchain history. 4. **Handle Decimals Properly**: Remember to divide `TotalSupply` by `10^Decimals` to get the human-readable supply value. * * * Getting Started[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#getting-started "Direct link to Getting Started") ------------------------------------------------------------------------------------------------------------------------------------------------------ 1. **Get API Access**: Sign up at [Bitquery](https://bitquery.io/) to get your API key 2. **Try in IDE**: Test queries in the [Bitquery IDE](https://ide.bitquery.io/) 3. **Integrate**: Use the GraphQL endpoint in your application For more information on authentication and API usage, see our [Getting Started Guide](https://docs.bitquery.io/docs/start/first-query/) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [What is Token Supply?](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#what-is-token-supply) * [How do I get the total supply or circulating supply of a token?](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#how-do-i-get-the-total-supply-or-circulating-supply-of-a-token) * [🔗 Related APIs](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#-related-apis) * [EVM APIs](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#evm-apis) * [Solana APIs](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#solana-apis) * [Real-Time Token Supply Stream (WebSocket)](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#real-time-token-supply-stream-websocket) * [Latest Token Supply on BNB Chain](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#latest-token-supply-on-bnb-chain) * [Token Supply Queries (GraphQL)](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#token-supply-queries-graphql) * [Latest Token Supply of Specific Tokens on Ethereum](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#latest-token-supply-of-specific-tokens-on-ethereum) * [Latest Token Supply of All Active Tokens on Base](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#latest-token-supply-of-all-active-tokens-on-base) * [Use Cases](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#use-cases) * [1\. Stablecoin Supply Monitoring](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#1-stablecoin-supply-monitoring) * [2\. Market Cap Calculation](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#2-market-cap-calculation) * [3\. Token Inflation Analysis](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#3-token-inflation-analysis) * [4\. DeFi Protocol Analytics](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#4-defi-protocol-analytics) * [5\. Compliance & Auditing](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#5-compliance--auditing) * [API Response Fields](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#api-response-fields) * [Supported Networks](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#supported-networks) * [Best Practices](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#best-practices) * [Getting Started](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/evm-token-supply/#getting-started) --- # APE Store API - Base Chain Token Trades & Transaction Data [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will see how we can use the [Transaction](https://docs.bitquery.io/docs/cubes/transaction-cube/) and [Calls](https://docs.bitquery.io/docs/schema/evm/calls/) API from Bitquery to get info about trades on APE Store using one of the token address traded on the platform. For this section the token address is the following - `0xb2779752b8abe50e2a06bddd774bf0a40353f867`. Get APE Store Address[​](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-ape-store-address "Direct link to Get APE Store Address") -------------------------------------------------------------------------------------------------------------------------------------------------------- Firstly, we can find the smart contract address of the APE Store using [this](https://ide.bitquery.io/ape-store-token-event_1#) query. query MyQuery { EVM(network: base) { Events( where: {Arguments: {includes: {Value: {Address: {is: "0xb2779752b8abe50e2a06bddd774bf0a40353f867"}}}}} ) { Arguments { Name Type Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Transaction { From Hash To } count } }} The address labeled as `To` under the `Transaction` block is the smart contract address of APE Store. The APE Store address is - `0x0bf8edd756ff6caf3f583d67a9fd8b237e40f58a`. Get All the Methods for APE Store[​](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-all-the-methods-for-ape-store "Direct link to Get All the Methods for APE Store") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- We need to get all methods for the APE Store for better understanding of its functionality and get the `signatures` used for buying tokens. [This](https://ide.bitquery.io/methods-for-ape-store#) query returns all the methods associated with the APE Store. query MyQuery { EVM(network: base) { Calls( where: {Transaction: {To: {is: "0x0bf8edd756ff6caf3f583d67a9fd8b237e40f58a"}}} orderBy: {descendingByField: "count"} ) { Call { Signature { Name Signature } } count } }} From the results we get a signature named `buy` that will be analyzed to get the trades on APE Store. Get Trades for APE Store[​](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-trades-for-ape-store "Direct link to Get Trades for APE Store") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/ape-store-buys_1#) query returns the `buy` method Calls to the APE Store that are potentially the trades on the APE Store. query MyQuery { EVM(network: base) { Calls( where: {Transaction: {To: {is: "0x0bf8edd756ff6caf3f583d67a9fd8b237e40f58a"}}, Call: {Signature: {Name: {is: "buy"}}}} ) { Arguments { Name Type Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Transaction { Cost From Hash Time GasPrice } } }} Get Trades of a Trader[​](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-trades-of-a-trader "Direct link to Get Trades of a Trader") ----------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/ape-store-buys-from-a-wallet) query returns the trades by a particular trader on APE Store. In this example the trader wallet address is - `0x2870cbffae4cf005dd1c3587e2f0db3cb00dbafd`. query MyQuery { EVM(network: base) { Calls( where: {Transaction: {To: {is: "0x0bf8edd756ff6caf3f583d67a9fd8b237e40f58a"}, From: {is: "0x2870cbffae4cf005dd1c3587e2f0db3cb00dbafd"}}, Call: {Signature: {Name: {is: "buy"}}}} ) { Arguments { Name Type Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Transaction { Cost From Hash Time GasPrice } } }} Get Trades of a Token[​](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-trades-of-a-token "Direct link to Get Trades of a Token") -------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/ape-store-token-trades) query returns the trades of a token on APE Store. In this example the token is - `0x442a62e390e16cec26998dd965c606efbd06b8ed`. query MyQuery { EVM(network: base) { Calls( where: {Transaction: {To: {is: "0x0bf8edd756ff6caf3f583d67a9fd8b237e40f58a"}}, Call: {Signature: {Name: {is: "buy"}}}, Arguments: {includes: {Value: {Address: {is: "0x442a62e390e16cec26998dd965c606efbd06b8ed"}}}}} ) { Arguments { Name Type Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Transaction { Cost From Hash Time GasPrice } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get APE Store Address](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-ape-store-address) * [Get All the Methods for APE Store](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-all-the-methods-for-ape-store) * [Get Trades for APE Store](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-trades-for-ape-store) * [Get Trades of a Trader](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-trades-of-a-trader) * [Get Trades of a Token](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/#get-trades-of-a-token) --- # Ethereum Eth Getlogs | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section, we will see how we can use Bitquery APIs as an alternative to the eth\_getLogs JSON RPC method and return an array of `Logs` object matching the filter object(\*optional). The Logs object consist of the following data. * `removed`: (boolean) true when the log was removed, due to a chain reorganization. false if it's a valid log. * `logIndex`: Log index position in the block. Null when it is a pending log. * `transactionIndex`: Hexadecimal of the transactions index position from which the log created. Null when it is a pending log. * `transactionHash`: 32 bytes. Hash of the transactions from which this log was created. Null when it is a pending log. * `blockHash`: 32 bytes. Hash of the block where this log was in. Null when it is a pending log. * `blockNumber`: Block number where this log was in. Null when it is a pending log. * `address`: 20 bytes. Address from which this log originated. * `data`: Contains one or more 32-bytes non-indexed arguments of the log. * `topics`: An array of 0 to 4 indexed log arguments, each 32 bytes. Get Latest Logs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#get-latest-logs "Direct link to Get Latest Logs") --------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/eth_getLogs_1) subscription API returns the stream of thelatest logs for the `Ethereum Mainnet`. Now note that there is currently no filter in place. subscription { EVM { Events { Block { Hash Number } Transaction { Hash Index } LogHeader { Address Data Index Removed } Topics { Hash } } }} Get Logs with Filteration[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#get-logs-with-filteration "Direct link to Get Logs with Filteration") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Now, just like the orignal eth\_getLogs method, Bitquery APIs provides the option to filter out the `Logs` based on the following parameeters. * `address`: (optional) Contract address (20 bytes) or a list of addresses from which logs should originate. * `topics`: (optional) Array of 32 bytes DATA topics. Topics are order-dependent. * `blockhash`: (optional) Restricts the logs returned to the single block referenced in the 32-byte hash blockHash. ### Get Logs Originated From an Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#get-logs-originated-from-an-address "Direct link to Get Logs Originated From an Address") [This](https://ide.bitquery.io/eth_getLogs-with-filters) API returns the logs originated from a fixed address, which is `0x7d4a7be025652995364e0e232063abd9e8d65e6e` in this case. Also, unlike the JSON RPC method you can fiter out the `Logs` from multiple addresses using [this](https://ide.bitquery.io/eth_getLogs-with-filters_1) API. { EVM { Events( where: {LogHeader: {Address: {is: "0x7d4a7be025652995364e0e232063abd9e8d65e6e"}}} limit: {count: 10} ) { Block { Hash Number } Transaction { Hash Index } LogHeader { Address Data Index Removed } Topics { Hash } } }} ### Filter Logs on Topics[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#filter-logs-on-topics "Direct link to Filter Logs on Topics") [This](https://ide.bitquery.io/eth_getLogs-with-filters_2) query filters outs the `Logs` based on the `topics`. Also, [this](https://ide.bitquery.io/eth_getLogs-with-filters_3) query filters out the Logs based on multiple `Topics`. { EVM { Events( where: { Topics: { includes: { Hash: { is:"e1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c" } } } } ) { Block { Hash Number } Transaction { Hash Index } LogHeader { Address Data Index Removed } Topics { Hash } } }} ### Get Logs from a Block[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#get-logs-from-a-block "Direct link to Get Logs from a Block") Using [this](https://ide.bitquery.io/eth_getLogs-with-filters_4) query, you can get the `logs` that belong to a particular `block` by using `blockHash` as a filter. Here `0xa0e1c15b905f4ed6f4e466b2693791ffc6be6ccd3a2a95d403585799ab5fecd9` is the parameter used for filteration. { EVM { Events( where: { Block: { Hash: { is: "0xa0e1c15b905f4ed6f4e466b2693791ffc6be6ccd3a2a95d403585799ab5fecd9" } } } ) { Block { Hash Number } Transaction { Hash Index } LogHeader { Address Data Index Removed } Topics { Hash } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Latest Logs](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#get-latest-logs) * [Get Logs with Filteration](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#get-logs-with-filteration) * [Get Logs Originated From an Address](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#get-logs-originated-from-an-address) * [Filter Logs on Topics](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#filter-logs-on-topics) * [Get Logs from a Block](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/#get-logs-from-a-block) --- # What are Internal Transactions & How to Get Them? [Skip to main content](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In blockchain a transaction is the transfer of value between two participants, recorded on a digital ledger. Not all transactions involve the direct sending of funds from one wallet to another, some transactions occur within smart contracts. These transactions are known as internal transactions. Internal transactions are decoded calls — the [Smart Contract API](https://bitquery.io/products/smart-contract-api) page covers decoded events and calls with plans and trial access. Internal transactions are important in smart contract interactions, and having an understanding of how they work and how to trace them is essential for ensuring the transparency and security of smart contracts. This article will explain what internal transactions are, how to trace them using [Bitquery](https://bitquery.io/) APIs, and how to use Bitquery's tools for detailed blockchain analysis. ProductUsing this in production? See the [Smart Contract API](https://bitquery.io/products/smart-contract-api) page for plans, free trial and enterprise delivery options. What are Internal Transactions?[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#what-are-internal-transactions "Direct link to What are Internal Transactions?") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Internal transactions are different from regular transactions as they happen between smart contracts. These transactions are not visible directly as they occur when a smart contract calls another smart contract or sends funds within itself. Some use cases of internal transactions are: * DeFi Operations: Internal transactions can be used in the management of activities such as lending, borrowing, and staking of funds between different contracts in decentralized finance applications. * Batch Processing for Efficiency: With internal transactions, multiple actions can be taken in a single step, thus making the transaction cost-effective and efficient. * Automated Withdrawals: With internal transactions, contracts can be configured to send funds to users based on specific conditions, such as rewards or payouts from a staking contract. * Fee Management: Internal transactions can also assist in fee management, allowing smart contracts to automatically deduct and transfer fees for services or transactions, thereby automating fee collection and distribution. The outcomes of internal transactions are recorded on the blockchain, but the transactions themselves are not directly traceable. Special tools and methods are required to track these outcomes. What are Internal Transfers?[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#what-are-internal-transfers "Direct link to What are Internal Transfers?") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Internal transfers occur as part of the execution of smart contract functions rather than through external transactions. There is no difference between tokens received via an internal transfer and those received through a standard token transfer. The transfer of funds is reflected in the account's overall balance. Tracing Internal Transfer with APIs[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#tracing-internal-transfer-with-apis "Direct link to Tracing Internal Transfer with APIs") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ In this example we are querying all transfers happening as a part of this `0x9c78b80a02c882db9d3d9add2d98243e4aeadb035fe9aacf82d04d51092db7fc` transaction by using the `Transfers` cube and setting `Call-> Index` to greater than 0. Run the query [here](https://ide.bitquery.io/Get-internal-transfers-of-tx) query MyQuery { EVM(dataset: archive, network: bsc) { Transfers( where: {Call: {Index: {gt: 0}}, Transaction: {Hash: {is: "0x9c78b80a02c882db9d3d9add2d98243e4aeadb035fe9aacf82d04d51092db7fc"}}} ) { Transfer { Amount Currency { Name } AmountInUSD } } }} Tracing Internal Transactions with APIs[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#tracing-internal-transactions-with-apis "Direct link to Tracing Internal Transactions with APIs") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ### Ethereum[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#ethereum "Direct link to Ethereum") query MyQuery { EVM(dataset: archive, network: eth) { in: Calls( where: {Call: {Depth: {gt: 0}}, Transaction: {Hash: {is: "0xd70c784ca3000da707d29c662d3a5dbe3d6bbade73686e1c73b4a24979d9e8c4"}}} ) { Transaction { Hash } Call { From Depth Value Success } } }} [Try the above query here.](https://ide.bitquery.io/internal-tx-eth_1) The link above is an example that shows how an internal transaction on Ethereum is tracked. It shows the patterns of internal transactions within a single Ethereum transaction. It shows the layers of internal calls, the Ethereum addresses involved, the status of each call, and the amount of Ether transferred in each case. Query Components * In: This array contains a series of transactions occurring within the bigger transaction. * Call: This shows specific details of the transaction, such as the depth of the call, the address that initiated the call, the value of tokens transferred, and if the entire process was successful or not. * Depth: This simply shows how far we are looking into the transactions. Each Call has a "Depth" value that indicates how far it is away from the original transaction. A depth of 1 means it's a direct call, while Calls higher than 1 shows nested calls. * From: This is the Ethereum address that initiated the call. * Success: Shows if the call was successful (true) or not (false). * Value: This is the amount of Ether (ETH) transferred during the call. * Hash: This identifies the main transaction that contains these internal calls. Explaining the query data * The first part of the query shows a Call from the address [0x2d6adce390953535e02d338dd2998c81170c06e3](https://explorer.bitquery.io/ethereum/smart_contract/0x2d6adce390953535e02d338dd2998c81170c06e3) with a value of 0.000380422043696798 ETH. * This Call has a Depth of 1 meaning it is the primary internal transaction that occurred directly within the main transaction. * The subsequent calls have depths ranging from 2 to 7, which means they are deeply nested internal transactions. * All the internal transactions have the same transaction hash: [0xd70c784ca3000da707d29c662d3a5dbe3d6bbade73686e1c73b4a24979d9e8c4](https://explorer.bitquery.io/ethereum/tx/0xd70c784ca3000da707d29c662d3a5dbe3d6bbade73686e1c73b4a24979d9e8c4/tracing) . Which means they are part of a single and larger Ethereum transaction. * The Calls all have different purposes based on the amount of Ether they transfer. For example, some transfer a small amount of Ether like 0.000380422043696798 ETH, while others transfer 0 ETH. This means some calls execute functions without transferring value or performing complex operations that require several steps. ### BNB[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#bnb "Direct link to BNB") query MyQuery { EVM(dataset: archive, network: bsc) { in: Calls( where: {Call: {Depth: {gt: 0}}, Transaction: {Hash: {is: "0x9c78b80a02c882db9d3d9add2d98243e4aeadb035fe9aacf82d04d51092db7fc"}}} ) { Transaction { Hash } Call { From Depth Value Success } } }} [Try the above query here.](https://ide.bitquery.io/internal-tx-bnb_1) This query is aimed at analyzing the execution flow of a transaction, showing all the internal calls, their success, and the interactions between different addresses in the same transaction. Components * in: This array contains a series of transactions occurring within the bigger transaction. * Call: This shows specific details of the transaction, such as the depth of the call, the address that initiated the call, the value of tokens transferred, and if the entire process was successful or not. * Depth: This simply shows how far we are looking into the transactions. Each call has a "Depth" value that indicates how far it is from the original transaction. A depth of 1 means it's a direct call, while Calls higher than 1 shows nested calls. * From: This is the BNB address that initiated the call. For example, two addresses in the query; [0xa188bd0af8b5f8d5c935d062ddb422bd96dcf65c](https://explorer.bitquery.io/bsc/smart_contract/0xa188bd0af8b5f8d5c935d062ddb422bd96dcf65c) and [0xc844ea097634f43ac7333bd7515eefda8afeec34](https://explorer.bitquery.io/bsc/smart_contract/0xc844ea097634f43ac7333bd7515eefda8afeec34/transactions) are repeatedly making calls. * Success: This shows if the call was successful (true) or not (false). In this query, all calls are labeled true, meaning they were successful. * Value: This is the amount of tokens transferred during the call. * Hash: This identifies the main transaction that contains these internal calls. ### BASE[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#base "Direct link to BASE") query MyQuery { EVM(dataset: archive, network: base) { in: Calls( where: {Call: {Depth: {gt: 0}}, Transaction: {Hash: {is: "0x85dc2c0eac54d090ac7e1b50bd47ec686ba764870b61714937b32524a96ed2b6"}}} ) { Transaction { Hash } Call { From Depth Value Success } } }} [Try the above query here.](https://ide.bitquery.io/Base-internal--transaction_1) This query is an example that shows how an internal transaction on Base is tracked. Details: * In: This array contains a series of transactions occurring within the bigger transaction. * where: This is used to filter the data based on certain conditions * Call: {Depth: {gt: 0}}: This was used to filter calls having Depth greater than 0. * From: This is the address that initiated the call. * Success: Shows if the call was successful (true) or not (false). * Value: This is the amount of tokens transferred during the call. * Hash: This is the unique identifier of the transaction. * Transaction:{Hash: {is: "0x85dc2c0eac54d090ac7e1b50bd47ec686ba764870b61714937b32524a96ed2b6"}}:'This filters for transactions with the specific hash mentioned. This means the query will only return data related to this transaction. Tracing Internal Transactions on Bitquery Explorer[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#tracing-internal-transactions-on-bitquery-explorer "Direct link to Tracing Internal Transactions on Bitquery Explorer") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The [Bitquery Explorer](https://explorer.bitquery.io/) allows users to visually explore and analyze blockchain data. We can use this to track internal transactions. To track internal transactions using the Bitquery Explorer, follow these steps: * Visit the [Bitquery Explorer](https://explorer.bitquery.io/) website. * Select the blockchain network. * Enter the transaction hash you want to trace in the search bar. * Click the "Tracing" tab. Details: The internal transactions section provides details such as the sender and receiver addresses, the amount transferred, and the specific contract method called and gas used. ![Internal transactions example](https://lh7-rt.googleusercontent.com/docsz/AD_4nXd2u4PdpEvwZpwemeJ221AT2xGPrvHxjzzCuWdqbTQd64Mz_HJuX-O9ybhLjJmczfvuLkb9JwjBAVLB2lz7BO0b_VAPoeeXfOvIpSeA_uRQJg6Ya5W5oALK0hDPgLPq0uzxd4N_K4vcDUjLLR8rzF03t68g?key=5ttYeo2nskIw9kc9CkTdTA) There is also a graphical view that shows how funds flow between different addresses ![Internal transactions trace example](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfpIcX5dHn8aERff9UJKN5qOzM7mFsuFmlP3b_zvMf2O4z27YRSnjDBUh4g0rXXha3xEaX_2U_cVHE2F6UQO_Da7VjyY5HPu6awAQ2TcofiixcuzMHuzDMs5KBJQ32TSwQU9a09RcOCNsZGOAS8ceMGZI5u?key=5ttYeo2nskIw9kc9CkTdTA) ### Tracing an Internal Transaction Example[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#tracing-an-internal-transaction-example "Direct link to Tracing an Internal Transaction Example") Now let's explore specific examples to gain a better understanding. We'll examine transactions on the following blockchains: * Ethereum * BNB * ARBITRUM #### Ethereum[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#ethereum-1 "Direct link to Ethereum") This is an example of an ETH transaction on the Bitquery Explorer using the tracing feature. [https://explorer.bitquery.io/ethereum/tx/0x26960e8c31dde5d76b69ba68201bfea5186555a7b44383f515d109ded74f3ac8/tracing](https://explorer.bitquery.io/ethereum/tx/0x26960e8c31dde5d76b69ba68201bfea5186555a7b44383f515d109ded74f3ac8/tracing) ![Ethereum internal transaction call tree](https://docs.bitquery.io/assets/images/eth_tree-477299f38ccfff81cb4153e56fe5e0af.png) Below is a graphical view that shows how funds flow between different addresses ![Ethereum transaction trace](https://docs.bitquery.io/assets/images/eth_trace-96a86292c332ac5475522426ad18cf03.png) #### Binance (BNB) Smart Chain[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#binance-bnb-smart-chain "Direct link to Binance (BNB) Smart Chain") This is an example of a BSC transaction on the Bitquery Explorer using the tracing feature. [https://explorer.bitquery.io/bsc/tx/0x9c78b80a02c882db9d3d9add2d98243e4aeadb035fe9aacf82d04d51092db7fc/tracing](https://explorer.bitquery.io/bsc/tx/0x9c78b80a02c882db9d3d9add2d98243e4aeadb035fe9aacf82d04d51092db7fc/tracing) ![BNB Chain internal transaction call tree](https://docs.bitquery.io/assets/images/bnb_tree-71da0a684a97fb26c7ccf1e5f66d0ec7.png) Below is a graphical view that shows how funds flow between different addresses ![BNB Chain transaction trace](https://docs.bitquery.io/assets/images/bnb_trace-24b554845d31834ba31ffdbcb94f4854.png) #### ARBITRUM[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#arbitrum "Direct link to ARBITRUM") This is an example of an Arbitrum transaction on the Bitquery Explorer using the tracing feature. [https://explorer.bitquery.io/arbitrum/tx/0x9346cd8afb33598d6ab57c3c83f5267ea96765e63e16b04e8dee7e599151c938/tracing](https://explorer.bitquery.io/arbitrum/tx/0x9346cd8afb33598d6ab57c3c83f5267ea96765e63e16b04e8dee7e599151c938/tracing) ![Arbitrum internal transaction call tree](https://docs.bitquery.io/assets/images/arb_tree-018591c05cb6cc00b6d085c928967cda.png) Below is a graphical view that shows how funds flow between different addresses ![Arbitrum transaction trace](https://docs.bitquery.io/assets/images/arb_trace-77c3c71648fd1ae1018295eea2532e99.png) Here’s a practical example to help people understand the importance of tracing internal transactions: Tracking internal transactions can help people understand the movement of their funds. An example is a situation where a user moved some ETH from Coinbase to a hardware wallet, only to find out that the wallet did not display the second and third transactions, making them doubt if they had the coins in their wallet as expected. In the situation above, the user can use [Bitquery](https://bitquery.io/) APIs to trace these internal transactions to confirm the status of their ETH. They can query the internal transactions associated with the wallet address to ensure that all movements of their funds are accounted for. Conclusion[​](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#conclusion "Direct link to Conclusion") --------------------------------------------------------------------------------------------------------------------------------------------- Tracking internal transactions is important to ensure the transparency and integrity of blockchain activities. By using tools such as Bitquery to monitor these transactions, users can verify the movement of their funds and also understand the flow of assets within smart contracts, thus ensuring the wallet balances are accurate. This is important for developers and users who need to maintain trust and security in decentralized applications. For more information and related content, visit the [Bitquery blog](https://bitquery.io/blog) or explore the [documentation](https://docs.bitquery.io/) . Frequently Asked Questions -------------------------- What is an internal transaction? An internal transaction is a value transfer or contract call triggered inside an outer transaction — for example a DEX swap routed through a router contract. How do I fetch internal transactions with Bitquery? Use EVM.Calls or trace-style APIs filtered by transaction hash, contract address, or method signature. Are internal transactions the same as token transfers? No. Transfers move tokens between addresses. Internal calls show contract execution paths — both are useful for wallet and DeFi forensics. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [What are Internal Transactions?](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#what-are-internal-transactions) * [What are Internal Transfers?](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#what-are-internal-transfers) * [Tracing Internal Transfer with APIs](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#tracing-internal-transfer-with-apis) * [Tracing Internal Transactions with APIs](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#tracing-internal-transactions-with-apis) * [Ethereum](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#ethereum) * [BNB](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#bnb) * [BASE](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#base) * [Tracing Internal Transactions on Bitquery Explorer](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#tracing-internal-transactions-on-bitquery-explorer) * [Tracing an Internal Transaction Example](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#tracing-an-internal-transaction-example) * [Conclusion](https://docs.bitquery.io/docs/API-Blog/what-are-internal-transactions-how-to-get-them/#conclusion) --- # Robinhood Transactions & Receipts API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Query **transactions and their receipts on Robinhood** with Bitquery GraphQL. The `EVM.Transactions` cube returns one row per transaction with its **receipt** (status, gas used, cumulative gas, contract address, logs bloom), **fee breakdown** (effective gas price, burnt, miner reward), and header fields — a no-node replacement for the JSON-RPC receipt methods that also streams live over WebSocket. This page is organized around the **RPC methods people migrate from** — `eth_getBlockReceipts`, `eth_getTransactionReceipt`, `eth_getTransactionByHash` — with the Bitquery equivalent for each. Every query was executed against the production endpoint before publishing, and the stream was verified live over WebSocket. API Key Required To query or stream data outside the Bitquery IDE, you need an API access token. Follow the steps here: [How to generate Bitquery API token ➤](https://docs.bitquery.io/docs/authorization/how-to-generate/) Related docs * [Robinhood Chain API overview](https://docs.bitquery.io/docs/blockchain/robinhood/) — every Robinhood Chain API, launchpad guide and stream in one place * [Robinhood Events API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) (logs — receipts don't nest them here) * [Robinhood Calls & Traces API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/) * [Robinhood Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) * [WebSocket authentication](https://docs.bitquery.io/docs/authorization/websocket/) **On this page:** [RPC mapping](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#rpc-method-mapping) · [Dataset caveat](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#dataset-realtime-only) · [Block receipts](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_getblockreceipts-equivalent) · [Single receipt](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionreceipt-equivalent) · [Transaction by hash](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionbyhash-equivalent) · [Getting logs](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#getting-the-logs-for-a-receipt) · [Latest & stream](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#latest-transactions-and-live-stream) · [Failed txs](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#failed-transactions) · [Account history](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#transactions-for-an-account) · [Receipt fields](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#receipt-field-reference) · [FAQ](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#faq) * * * RPC method mapping[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#rpc-method-mapping "Direct link to RPC method mapping") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | JSON-RPC method | Bitquery equivalent | | --- | --- | | `eth_getBlockReceipts` | `Transactions` filtered by `Block.Number` (or `Block.Hash`) — [below](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_getblockreceipts-equivalent) | | `eth_getTransactionReceipt` | `Transactions` filtered by `Transaction.Hash` — [below](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionreceipt-equivalent) | | `eth_getTransactionByHash` | Same filter, selecting header fields incl. `Transaction.Data` — [below](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionbyhash-equivalent) | | `eth_getTransactionReceipt().logs` | `Events` cube, same block or tx filter — [below](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#getting-the-logs-for-a-receipt) | | `eth_getBlockTransactionCountByNumber` | `Transactions` + `count` on a block — [below](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#block-transaction-stats) | | `eth_subscribe("newHeads"/txs)` | `subscription { Transactions }` — [below](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#latest-transactions-and-live-stream) | * * * Dataset: realtime only[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#dataset-realtime-only "Direct link to Dataset: realtime only") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Use `dataset: realtime` for transactions and receipts Unlike the [Events](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) and [Calls](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/) cubes, the **`Transactions` cube has no archive table on Robinhood**. `dataset: archive` errors (_"no table can query Transaction"_), and `combined` only serves blocks still inside the realtime window. So receipt queries work for **recent blocks** — the realtime window is a rolling span of recent days; measure it with the [window probe](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#window-probe) . Blocks older than the window need a [data export](https://bitquery.io/forms/api) . The block and transaction identifiers in the examples are **illustrative recent values** — they roll out of the realtime window over time. Get a current block number from the [latest-transactions query](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#latest-transactions-and-live-stream) and substitute it. ### Window probe[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#window-probe "Direct link to Window probe") { EVM(network: robinhood, dataset: realtime) { Transactions { count earliest: Block { Time(minimum: Block_Time) } latest: Block { Time(maximum: Block_Time) } } }} * * * `eth_getBlockReceipts` equivalent[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_getblockreceipts-equivalent "Direct link to eth_getblockreceipts-equivalent") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Every transaction receipt in one block: filter `Block.Number` and order by `Transaction.Index` — each row is one receipt. Substitute a recent block number. { EVM(network: robinhood, dataset: realtime) { Transactions( where: { Block: { Number: { eq: "18038003" } } } orderBy: { ascending: Transaction_Index } limit: { count: 1000 } ) { Block { Number Hash Time } Transaction { Hash Index From To Type Nonce Value } Receipt { Status Type CumulativeGasUsed GasUsed ContractAddress Bloom PostState } Fee { EffectiveGasPrice } TransactionStatus { Success } } }} To target the block **by hash** (the other form `eth_getBlockReceipts` accepts), swap the filter: where: { Block: { Hash: { is: "0x69ab18694427b809459cad7a44b1ae369095897b2d86571410a1430902a9fb1d" } } } Robinhood is an Arbitrum-Orbit chain Blocks include system/sequencer transactions (e.g. `Receipt.Type: 106` from the sequencer address `0x…000a4b05`) alongside user transactions — exactly what a node returns for the block. Filter them out by `Transaction.Type` or sender if you only want user activity. * * * `eth_getTransactionReceipt` equivalent[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionreceipt-equivalent "Direct link to eth_gettransactionreceipt-equivalent") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ One transaction's receipt — filter `Transaction.Hash`. { EVM(network: robinhood, dataset: realtime) { Transactions( where: { Transaction: { Hash: { is: "0x01f956f16e7200e1a2054e3a701bf6b2496972a23544b4d2f122f0894a0f0835" } } } ) { Block { Number Hash Time } Transaction { Hash Index From To Type Nonce Value Gas GasPrice } Receipt { Status Type CumulativeGasUsed GasUsed ContractAddress Bloom } Fee { EffectiveGasPrice Burnt MinerReward } TransactionStatus { Success EndError } } }} `Receipt.Status` is the RPC-style `"1"`/`"0"`; `TransactionStatus.Success` is the same as a boolean, with `EndError` / `FaultError` carrying the revert reason when it failed. * * * `eth_getTransactionByHash` equivalent[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionbyhash-equivalent "Direct link to eth_gettransactionbyhash-equivalent") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The same filter, selecting the transaction header — including `Transaction.Data` (the input calldata) and the fee-cap fields. { EVM(network: robinhood, dataset: realtime) { Transactions( where: { Transaction: { Hash: { is: "0x01f956f16e7200e1a2054e3a701bf6b2496972a23544b4d2f122f0894a0f0835" } } } ) { Block { Number Time } Transaction { Hash Index From To Nonce Value Gas GasPrice GasFeeCap GasTipCap Type Data } } }} For the decoded function call and internal calls of a transaction, use the [Calls & Traces API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#full-call-tree-of-a-transaction) instead of raw `Data`. * * * Getting the logs for a receipt[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#getting-the-logs-for-a-receipt "Direct link to Getting the logs for a receipt") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `eth_getTransactionReceipt` embeds a `logs` array; here logs live in the **[Events cube](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) **, decoded. Query them for the same transaction (or the whole block) and order by `Log.Index`: { EVM(network: robinhood, dataset: realtime) { Events( where: { Transaction: { Hash: { is: "0x01f956f16e7200e1a2054e3a701bf6b2496972a23544b4d2f122f0894a0f0835" } } } orderBy: { ascending: Log_Index } ) { Log { Index SmartContract Signature { Name SignatureHash } } Arguments { Name Type Value { ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} Swap the filter to `Block: { Number: { eq: "…" } }` for every log in a block (the `eth_getBlockReceipts` logs, flattened). * * * Latest transactions and live stream[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#latest-transactions-and-live-stream "Direct link to Latest transactions and live stream") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ▶️ Runnable IDE examples: [daily transaction count](https://ide.bitquery.io/robinhood-chain-daily-transactions) , [daily active wallets](https://ide.bitquery.io/robinhood-chain-active-wallets) , [gas usage and price](https://ide.bitquery.io/robinhood-chain-gas-fees) , [blocks per day](https://ide.bitquery.io/robinhood-chain-block-time) The newest transactions with their receipts — and the block numbers to plug into the examples above. { EVM(network: robinhood, dataset: realtime) { Transactions(limit: { count: 10 }, orderBy: { descending: Block_Time }) { Block { Number Time } Transaction { Hash From To Value Type } Receipt { Status GasUsed } TransactionStatus { Success } } }} Stream every transaction as it is mined — the push-based counterpart, verified live over WebSocket: subscription { EVM(network: robinhood) { Transactions { Block { Number Time } Transaction { Hash From To Value } Receipt { Status GasUsed } TransactionStatus { Success } } }} WebSocket connection Connect to `wss://streaming.bitquery.io/graphql?token=YOUR_TOKEN` with the `graphql-transport-ws` subprotocol (`connection_init` → `connection_ack` → `subscribe`). See [WebSocket authentication](https://docs.bitquery.io/docs/authorization/websocket/) . Prefer Kafka for the firehose Consuming every transaction continuously? Bitquery also delivers Robinhood data as **Kafka streams** (protobuf topic `robinhood.transactions.proto`) with consumer-group scaling and replay. See [Kafka Streaming Concepts](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/) . * * * Failed transactions[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#failed-transactions "Direct link to Failed transactions") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Filter `TransactionStatus.Success: false` for reverted transactions with their error text — an error monitor across the chain. { EVM(network: robinhood, dataset: realtime) { Transactions( limit: { count: 10 } orderBy: { descending: Block_Time } where: { TransactionStatus: { Success: false } } ) { Block { Time } Transaction { Hash From To } TransactionStatus { Success EndError FaultError } Receipt { Status GasUsed } } }} * * * Transactions for an account[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#transactions-for-an-account "Direct link to Transactions for an account") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Every top-level transaction sent by an address (`Transaction.From`), with receipts — an account history / nonce tracker. Swap in an active sender. { EVM(network: robinhood, dataset: realtime) { Transactions( limit: { count: 10 } orderBy: { descending: Block_Time } where: { Transaction: { From: { is: "0xcc1120e4af58abbecae0c0e3c4b2d343c1283695" } } } ) { Block { Time } Transaction { Hash To Value Nonce } Receipt { Status GasUsed } } }} `Transaction.From` is the top-level sender (EOA). For a contract's inbound calls including internal ones, use the [Calls API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-calls-to-one-contract) . * * * Block transaction stats[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#block-transaction-stats "Direct link to Block transaction stats") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The count and gas of one block in a single aggregate — the `eth_getBlockTransactionCountByNumber` answer, plus success rate and total gas. { EVM(network: robinhood, dataset: realtime) { Transactions(where: { Block: { Number: { eq: "18038003" } } }) { txns: count success: count(if: { TransactionStatus: { Success: true } }) gas: sum(of: Receipt_GasUsed) } }} * * * Receipt field reference[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#receipt-field-reference "Direct link to Receipt field reference") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | JSON-RPC receipt field | Bitquery field | | --- | --- | | `blockNumber` / `blockHash` | `Block.Number` / `Block.Hash` | | `transactionHash` / `transactionIndex` | `Transaction.Hash` / `Transaction.Index` | | `from` / `to` | `Transaction.From` / `Transaction.To` | | `status` | `Receipt.Status` (`"1"`/`"0"`) or `TransactionStatus.Success` (bool) | | `cumulativeGasUsed` | `Receipt.CumulativeGasUsed` | | `gasUsed` | `Receipt.GasUsed` | | `contractAddress` | `Receipt.ContractAddress` | | `logsBloom` | `Receipt.Bloom` | | `effectiveGasPrice` | `Fee.EffectiveGasPrice` | | `type` | `Receipt.Type` (or `Transaction.Type`) | | `root` (pre-Byzantium) | `Receipt.PostState` | | `logs` | [`Events` cube](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#getting-the-logs-for-a-receipt)
(separate, decoded) | Also on `Fee`: `Burnt`, `MinerReward`, `PriorityFeePerGas`, `GasRefund`, `Savings` (plus `*InUSD` variants). On `Transaction`: `GasFeeCap`, `GasTipCap`, `Data`, `Nonce`, `CallCount`, `Protected`. * * * Tips[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#tips "Direct link to Tips") ---------------------------------------------------------------------------------------------------------------------------- 1. Use **`dataset: realtime`** — the `Transactions` cube has no archive on Robinhood; older blocks need a [data export](https://bitquery.io/forms/api) . 2. `Receipt.Status` is RPC-style `"1"`/`"0"`; `TransactionStatus.Success` is the boolean form and carries `EndError` / `FaultError` on failure. 3. Receipts don't nest logs here — pull them from the [Events cube](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#getting-the-logs-for-a-receipt) by block or tx hash. 4. Block/tx identifiers in queries roll out of the realtime window over time; fetch current ones from the [latest-transactions query](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#latest-transactions-and-live-stream) . 5. Sequencer/system transactions (`Type: 106`) appear in blocks — filter by `Transaction.Type` or sender for user-only views. 6. For decoded function inputs and internal calls, use the [Calls API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/) ; for token movement, use [Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) . * * * FAQ[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#faq "Direct link to FAQ") ------------------------------------------------------------------------------------------------------------------------- ### What is the eth\_getBlockReceipts equivalent on Robinhood?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#what-is-the-eth_getblockreceipts-equivalent-on-robinhood "Direct link to What is the eth_getBlockReceipts equivalent on Robinhood?") Query the `EVM.Transactions` cube filtered by `Block.Number` (or `Block.Hash`), ordered by `Transaction.Index`, selecting `Receipt`, `Fee`, and `TransactionStatus` — one row per receipt. See [the query](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_getblockreceipts-equivalent) . Use `dataset: realtime`. ### How do I get a single transaction's receipt?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#how-do-i-get-a-single-transactions-receipt "Direct link to How do I get a single transaction's receipt?") Filter `Transaction.Hash` on the same cube — the [`eth_getTransactionReceipt` equivalent](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionreceipt-equivalent) . Add `Transaction.Data` and fee-cap fields for the [`eth_getTransactionByHash`](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionbyhash-equivalent) view. ### Where are the receipt logs?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#where-are-the-receipt-logs "Direct link to Where are the receipt logs?") Logs are a separate, decoded cube — [Events](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) . Filter it by the same `Transaction.Hash` or `Block.Number` and order by `Log.Index`. See [Getting the logs](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#getting-the-logs-for-a-receipt) . ### Why does dataset archive fail for transactions?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#why-does-dataset-archive-fail-for-transactions "Direct link to Why does dataset archive fail for transactions?") The `Transactions` cube is realtime-only on Robinhood — there is no archive table, so `archive` errors and `combined` only covers the realtime window. Recent blocks work; for older history request a [data export](https://bitquery.io/forms/api) . ### How do I check whether a transaction succeeded or reverted?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#how-do-i-check-whether-a-transaction-succeeded-or-reverted "Direct link to How do I check whether a transaction succeeded or reverted?") Read `TransactionStatus.Success` (boolean) with `EndError` / `FaultError` for the reason, or `Receipt.Status` for the `"1"`/`"0"` form. Filter `Success: false` to list [failed transactions](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#failed-transactions) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [RPC method mapping](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#rpc-method-mapping) * [Dataset: realtime only](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#dataset-realtime-only) * [Window probe](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#window-probe) * [`eth_getBlockReceipts` equivalent](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_getblockreceipts-equivalent) * [`eth_getTransactionReceipt` equivalent](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionreceipt-equivalent) * [`eth_getTransactionByHash` equivalent](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#eth_gettransactionbyhash-equivalent) * [Getting the logs for a receipt](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#getting-the-logs-for-a-receipt) * [Latest transactions and live stream](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#latest-transactions-and-live-stream) * [Failed transactions](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#failed-transactions) * [Transactions for an account](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#transactions-for-an-account) * [Block transaction stats](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#block-transaction-stats) * [Receipt field reference](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#receipt-field-reference) * [Tips](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#tips) * [FAQ](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#faq) * [What is the eth\_getBlockReceipts equivalent on Robinhood?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#what-is-the-eth_getblockreceipts-equivalent-on-robinhood) * [How do I get a single transaction's receipt?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#how-do-i-get-a-single-transactions-receipt) * [Where are the receipt logs?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#where-are-the-receipt-logs) * [Why does dataset archive fail for transactions?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#why-does-dataset-archive-fail-for-transactions) * [How do I check whether a transaction succeeded or reverted?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transactions-receipts-api/#how-do-i-check-whether-a-transaction-succeeded-or-reverted) --- # Arbitrum Token Market Cap API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Use Bitquery’s **Trading** API **`Tokens`** cube to stream or query **market cap**, **fully diluted valuation (USD)**, **total supply**, **price** (OHLC and averages), and **volume** for tokens traded on **Arbitrum One**. Filter with token/currency **`Id`** values such as **`arbitrum:`** plus a **lowercase** contract address. For schema details and field meanings, see the **[Tokens cube](https://docs.bitquery.io/docs/trading/crypto-price-api/tokens/) ** and **[Supply fields](https://docs.bitquery.io/docs/trading/crypto-price-api/supply-fields/) **. Trading API and EVM addresses On **Arbitrum** (EVM), the **Trading** API expects **lowercase** hex in **`Id`** values (e.g. `arbitrum:0x97e6…`, not mixed-case checksum addresses). Related APIs[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#related-apis "Direct link to Related APIs") -------------------------------------------------------------------------------------------------------------------------------------------- * **[Ethereum Token Market Cap API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/ethereum-token-marketcap-api/) ** — same patterns with **`eth:`** ids * **[BSC Token Market Cap API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/) ** — same patterns with **`bsc:`** ids * **[Polygon (Matic) Token Market Cap API](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/) ** — same patterns with **`matic:`** ids * **[Base Token Market Cap API](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/) ** — same patterns with **`base:`** ids * **[Solana Token Market Cap API](https://docs.bitquery.io/docs/blockchain/Solana/solana-token-marketcap-api/) ** — same patterns with **`solana:`** ids * **[Crypto Price API — Tokens](https://docs.bitquery.io/docs/trading/crypto-price-api/tokens/) ** — full `Tokens` cube reference * * * How do I stream live Arbitrum token market cap, price, and volume?[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-stream-live-arbitrum-token-market-cap-price-and-volume "Direct link to How do I stream live Arbitrum token market cap, price, and volume?") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Subscribe to **`Tokens`** where **currency id** includes **`arbitrum`**, with **interval duration** greater than **1** (second). You get **token fields**, **block time**, **supply** (**MarketCap**, **FullyDilutedValuationUsd**), **price** (OHLC and mean), and **volume**. You can run this subscription [in the Bitquery IDE](https://ide.bitquery.io/arbitrum-token-marketcap-stream) . subscription MyQuery { Trading { Tokens( where: {Currency: {Id: {includes: "arbitrum"}}, Interval: {Time: {Duration: {gt: 1}}}} ) { Token { Name Id Address Symbol } Block { Time } Supply { TotalSupply FullyDilutedValuationUsd MarketCap } Price { Average { Mean } Ohlc { Open Low High Close } } Volume { Base BaseAttributedToUsd Quote Usd } } }} * * * How do I get the latest market cap for a specific token on Arbitrum?[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-get-the-latest-market-cap-for-a-specific-token-on-arbitrum "Direct link to How do I get the latest market cap for a specific token on Arbitrum?") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Use **`limit: { count: 1 }`**, **`orderBy: { descending: Block_Time }`**, and filter **`Token.Id`** with **`includesCaseInsensitive`** (e.g. **`arbitrum:`** + lowercase contract). You can run this query [in the Bitquery IDE](https://ide.bitquery.io/specific-arbitrum-token-latest-marketcap) . query { Trading { Tokens( limit: { count: 1 } orderBy: { descending: Block_Time } where: {Token: {Id: {includesCaseInsensitive: "arbitrum:0x97e66d3c4d5bcd7c64e3e55af28544c9addf9281"}}, Interval: {Time: {Duration: {gt: 1}}}} ) { Token { Name Id Address Symbol } Block { Time } Supply { TotalSupply FullyDilutedValuationUsd MarketCap } Price { Average { Mean } Ohlc { Open Low High Close } } Volume { Base BaseAttributedToUsd Quote Usd } } }} Replace the `includesCaseInsensitive` value with your token’s **`arbitrum:`** id (lowercase hex). * * * How do I stream Arbitrum tokens with market cap above $1 million?[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-stream-arbitrum-tokens-with-market-cap-above-1-million "Direct link to How do I stream Arbitrum tokens with market cap above $1 million?") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Subscribe when **`Token.Id`** matches **Arbitrum** (**`arbitrum`**) and **`Supply.MarketCap`** **\>** **1,000,000** (USD). You can run this subscription [in the Bitquery IDE](https://ide.bitquery.io/realtime-stream-arbitrum-tokens-with-marketcap-above-1-million) . subscription { Trading { Tokens( where: {Token: {Id: {includesCaseInsensitive: "arbitrum"}}, Interval: {Time: {Duration: {gt: 1}}}, Supply: {MarketCap: {gt: 1000000}}} ) { Currency { Name Id Symbol } Supply { TotalSupply FullyDilutedValuationUsd MarketCap } } }} Threshold and interval Tune **`Supply.MarketCap`** and **`Interval.Time.Duration`** for your alerts or dashboards. See **[Tokens cube](https://docs.bitquery.io/docs/trading/crypto-price-api/tokens/) ** for more filters. * * * How do I get top Arbitrum tokens by market cap?[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-get-top-arbitrum-tokens-by-market-cap "Direct link to How do I get top Arbitrum tokens by market cap?") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query ranks **Arbitrum** tokens by **`Supply.MarketCap`**. It uses roughly the **last 24 hours** (`since_relative: { hours_ago: 24 }`), **1-second** intervals, at least **$1,000** **USD volume**, **`limitBy`** one row per **`Token_Id`**, and up to **50** tokens. You can run this query [in the Bitquery IDE](https://ide.bitquery.io/Top-Tokens-by-Market-Cap-on-Arbitrum) . { Trading { Tokens( limit: { count: 50 } limitBy: { count: 1, by: Token_Id } orderBy: { descending: Supply_MarketCap } where: { Block: { Time: { since_relative: { hours_ago: 24 } } } Interval: { Time: { Duration: { eq: 1 } } } Volume: { Usd: { gt: 1000 } } Token: { Network: { is: "Arbitrum" } } } ) { Currency { Id Name Symbol } Price { Average { Mean(maximum: Block_Time) } } Volume { Base(maximum: Block_Time) Quote(maximum: Block_Time) Usd(maximum: Block_Time) } Token { Network Symbol Address } Supply { MarketCap(maximum: Block_Time) FullyDilutedValuationUsd(maximum: Block_Time) TotalSupply(maximum: Block_Time) } } }} * * * How do I get top Arbitrum tokens by market cap change in 1 hour?[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-get-top-arbitrum-tokens-by-market-cap-change-in-1-hour "Direct link to How do I get top Arbitrum tokens by market cap change in 1 hour?") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Uses a **1-hour** OHLC interval (`Duration: { eq: 3600 }`) and orders by **`change_mcap`**: **(close − open) × total supply**. **`Token.Network`** is **Arbitrum**. You can run this query [in the Bitquery IDE](https://ide.bitquery.io/top-arb-tokens-by-Market-Cap-Change-1h) . { Trading { Tokens( limit: { count: 50 } orderBy: { descendingByField: "change_mcap" } where: { Interval: { Time: { Duration: { eq: 3600 } } } Token: { Network: { is: "Arbitrum" } } } ) { Currency { Id Name Symbol } Token { Network Symbol Address } Supply { MarketCap FullyDilutedValuationUsd CirculatingSupply TotalSupply MaxSupply } change_mcap: calculate( expression: "($Price_Ohlc_Close-$Price_Ohlc_Open) * Supply_TotalSupply" ) Price { Ohlc { Open Close } } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Related APIs](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#related-apis) * [How do I stream live Arbitrum token market cap, price, and volume?](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-stream-live-arbitrum-token-market-cap-price-and-volume) * [How do I get the latest market cap for a specific token on Arbitrum?](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-get-the-latest-market-cap-for-a-specific-token-on-arbitrum) * [How do I stream Arbitrum tokens with market cap above $1 million?](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-stream-arbitrum-tokens-with-market-cap-above-1-million) * [How do I get top Arbitrum tokens by market cap?](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-get-top-arbitrum-tokens-by-market-cap) * [How do I get top Arbitrum tokens by market cap change in 1 hour?](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/#how-do-i-get-top-arbitrum-tokens-by-market-cap-change-in-1-hour) --- # Base Chain Token Transfers API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we'll have a look at some examples using the Base Transfers API. Subscribe to Recent Whale Transactions of a particular currency[​](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#subscribe-to-recent-whale-transactions-of-a-particular-currency "Direct link to Subscribe to Recent Whale Transactions of a particular currency") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The subscription query below fetches the whale transactions on the Base network. We have used USDC address `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`. You can find the query [here](https://ide.bitquery.io/Whale-transfers-of-USDC-on-base#) subscription { EVM(network: base) { Transfers( where: {Transfer: {Currency: {SmartContract: {is: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}, Amount: {ge: "10000"}}} ) { Transaction { From Hash } Transfer { Amount Sender Receiver Currency { SmartContract Symbol Name Fungible Native } Id } } }} Sender is a particular address[​](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#sender-is-a-particular-address "Direct link to Sender is a particular address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This websocket retrieves transfers where the sender is a particular address `0x3304E22DDaa22bCdC5fCa2269b418046aE7b566A`. For this subscription query we use `where` keyword and in that we specify `{Transfer: {Sender: {is: "0x3304E22DDaa22bCdC5fCa2269b418046aE7b566A"}}}` to get the desired data. You can find the query [here](https://ide.bitquery.io/Sender-is-a-particular-address_3#) subscription { EVM(network: base) { Transfers( where: {Transfer: {Sender: {is: "0x3304E22DDaa22bCdC5fCa2269b418046aE7b566A"}}} ) { Transfer { Amount AmountInUSD Currency { Name SmartContract Native Symbol Fungible } Receiver Sender } Transaction { Hash } } }} Subscribe to the latest NFT token transfers on Base Chain[​](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#subscribe-to-the-latest-nft-token-transfers-on-base-chain "Direct link to Subscribe to the latest NFT token transfers on Base Chain") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Let's see an example of NFT token transfers using GraphQL Subscription (Webhook). In the following NFT Token Transfers API, we will be subscribing to all NFT token transfers on Base network. You can run the query [here](https://ide.bitquery.io/NFT-Token-Transfers-API_4#) subscription { EVM(network: base) { Transfers(where: {Transfer: {Currency: {Fungible: false}}}) { Transfer { Amount AmountInUSD Currency { Name SmartContract Symbol Fungible HasURI Decimals } URI Sender Receiver } Transaction { Hash } } }} Get all transfers of a particular NFT[​](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#get-all-transfers-of-a-particular-nft "Direct link to Get all transfers of a particular NFT") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This below query will give you all the transfers of a particular NFT `0xb68CA010776B4584cf49893E75b66583eb884948`. You can test out the query [here](https://ide.bitquery.io/get-all-transfers-of-a-specific-nft) . query MyQuery { EVM(network: base, dataset: realtime) { Transfers( where: {Transfer: {Currency: {Fungible: false, SmartContract: {is: "0xb68CA010776B4584cf49893E75b66583eb884948"}}}} ) { Transfer { Amount AmountInUSD Currency { Name Native SmartContract Symbol } Id Sender Receiver } Transaction { From Hash } } }} Transactions From or To an address[​](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#transactions-from-or-to-an-address "Direct link to Transactions From or To an address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- We use the `any` filter \[ OR condition\] to get transactions from or to a wallet. [Run Query](https://ide.bitquery.io/tx-from-to-base-address) query MyQuery { EVM(dataset: archive, network: base) { Transfers( limit: {count: 100, offset: 0} where: { any: [ {Transaction: {From: {is: "0x0b2a7f1c6b7fae642a20434be47359e19bfadf4d"}, To: {is: "0x0b2a7f1c6b7fae642a20434be47359e19bfadf4d"}}} {Block: {Date: {after: "2025-08-01"}}} ] } ) { Block { Time Number Date } Transfer { Receiver Sender Currency { Decimals Name SmartContract Symbol ProtocolName } Amount AmountInUSD } Transaction { Hash From To } } }} Video Tutorial | How to get Token Transfers data on Base in Realtime[​](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#video-tutorial--how-to-get-token-transfers-data-on-base-in-realtime "Direct link to Video Tutorial | How to get Token Transfers data on Base in Realtime") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Deterministic Pagination for Backfilling Transfers[​](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#deterministic-pagination-for-backfilling-transfers "Direct link to Deterministic Pagination for Backfilling Transfers") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- When backfilling Base transfer data or building a historical index, use deterministic pagination to guarantee no records are missed or duplicated. **Try it live:** [Deterministic Transfer API](https://ide.bitquery.io/Reliable-transfer-api) { EVM(dataset: combined, network: base) { 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 } } }} The composite `orderBy` across `Block_Number`, `Transaction_Index`, `Call_Index`, `Log_Index`, `Transfer_Index`, and `Transfer_Type` uniquely positions every transfer, making offset-based pagination safe for backfilling. Increment `offset` by the `count` value on each request. You can pull up to **25,000 records in a single request** by setting `count: 25000`. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Subscribe to Recent Whale Transactions of a particular currency](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#subscribe-to-recent-whale-transactions-of-a-particular-currency) * [Sender is a particular address](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#sender-is-a-particular-address) * [Subscribe to the latest NFT token transfers on Base Chain](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#subscribe-to-the-latest-nft-token-transfers-on-base-chain) * [Get all transfers of a particular NFT](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#get-all-transfers-of-a-particular-nft) * [Transactions From or To an address](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#transactions-from-or-to-an-address) * [Video Tutorial | How to get Token Transfers data on Base in Realtime](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#video-tutorial--how-to-get-token-transfers-data-on-base-in-realtime) * [Deterministic Pagination for Backfilling Transfers](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/#deterministic-pagination-for-backfilling-transfers) --- # Ethereum NFT API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD `BalanceUpdates` sunsets 10 August 2026 Queries on this page that use **`BalanceUpdates`** will stop working on **10 August 2026**. Migrate to the **`Balances`** and **`Holders`** cubes, which return the current balance directly instead of summing deltas. See the [migration mapping](https://docs.bitquery.io/docs/cubes/balances-cube/#migrating-from-balanceupdates) for the query-by-query translation. Non-Fungible Tokens (NFTs) are digital assets with unique identification codes that cannot be exchanged for other tokens on a one-to-one basis. NFTs have gained significant popularity in recent years, with the growth of digital art, collectables, and gaming. Bitquery's APIs help you extract and analyze NFT data from various blockchain networks. Below are some examples of NFT queries that can be performed using Bitquery's platform: NFT Holders for a project[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#nft-holders-for-a-project "Direct link to NFT Holders for a project") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ This query retrieves the Ethereum addresses that hold Axie Infinity NFT tokens associated with that smart contract, ordered by the sum of the token balances in descending order. **Migrated query** — use this. `BalanceUpdates` sunsets 10 August 2026. { EVM(network: eth, dataset: combined) { Balances( limit: { count: 100 } orderBy: { descending: Balance_Amount } where: { Currency: { SmartContract: { is: "0xf5b0a3efb8e8e4c201e2a935f110eaaf3ffecb8d" } } } ) { Balance { Address } Balance { Amount } } }} Old `BalanceUpdates` version (stops working 10 August 2026) { EVM(network: eth, dataset: combined) { BalanceUpdates( limit: { count: 100 } orderBy: { descendingByField: "balance" } where: { Currency: { SmartContract: { is: "0xf5b0a3efb8e8e4c201e2a935f110eaaf3ffecb8d" } } } ) { BalanceUpdate { Address } balance: sum(of: BalanceUpdate_Amount) } }} **Parameters** * `network`: This specifies the Ethereum network to use. In this case, the network is "eth". * `dataset`: This specifies the dataset to use. In this case, the dataset is [combined](https://docs.bitquery.io/docs/graphql/dataset/combined/) . * `limit`: This parameter specifies the maximum number of results to return. In this query, the limit is set to 100. * `orderBy`: This parameter specifies the field to order the results by. In this query, the results are ordered in descending order of balance. * `where`: This parameter specifies the conditions to filter the results by. In this query, the filter condition is that the Currency is a Smart Contract with the address "0xf5b0a3efb8e8e4c201e2a935f110eaaf3ffecb8d". \*\* Returned Data\*\* * `Address`: This field returns the Ethereum wallet address holding the NFT * `balance`: This field returns the sum of the token balances associated with the Ethereum address. All NFTs owned by an address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#all-nfts-owned-by-an-address "Direct link to All NFTs owned by an address") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { EVM(network: eth, dataset: combined) { BalanceUpdates( limit: { count: 100 } orderBy: { descending: BalanceUpdate_Amount } where: { BalanceUpdate: { Address: { is: "0xaba7161a7fb69c88e16ed9f455ce62b791ee4d03" } } Currency: { Fungible: false } } ) { Currency { Fungible Symbol SmartContract Name HasURI Delegated Decimals } BalanceUpdate { Id Amount Address URI } } }} **Parameters** * `EVM(network: eth, dataset: combined)`: specifies that we want to query the [combined](https://docs.bitquery.io/docs/graphql/dataset/combined/) dataset of the Ethereum blockchain. * `BalanceUpdates`: specifies that we want to retrieve balance updates for a specific smart contract. * `where: { Currency: { SmartContract: { is: "0xBE223020724CC3e2999f5dCeDA3120484FdBfef7" } }, BalanceUpdate: { Address: { is: "0xb92505a3364B7C7E333c05B44cE1E55377fC43cA" }, Amount: { gt: "0" } } }`: specifies the filter condition to retrieve balance updates for a specific smart contract with address "0xBE223020724CC3e2999f5dCeDA3120484FdBfef7" and a specific address "0xb92505a3364B7C7E333c05B44cE1E55377fC43cA" which has a balance greater than 0. **Returned Data** * `Currency`: returns the currency information for the specified smart contract. * `Fungible`: specifies if the currency is fungible or non-fungible. * `Symbol`: returns the symbol for the currency. * `SmartContract`: returns the address of the smart contract for the currency. * `Name`: returns the name of the currency. * `HasURI`: specifies if the currency has a URI. * `Delegated`: specifies if the currency is delegated. * `BalanceUpdate`: returns the balance update information for the specified address. * `Id`: returns the ID of the balance update. * `Amount`: returns the amount of the balance update. * `Address`: returns the address of the balance update. Latest NFT trades for given project[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#latest-nft-trades-for-given-project "Direct link to Latest NFT trades for given project") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { EVM(network: eth) { DEXTrades( orderBy: {descending: Block_Number} where: {Trade: {Buy: {Currency: {SmartContract: {is: "0x0fcbd68251819928c8f6d182fc04be733fa94170"}}}}} limit: {count: 10} ) { Block { Time } Transaction { Hash } Trade { Dex { ProtocolFamily ProtocolName ProtocolVersion SmartContract } Buy { Price Buyer Ids URIs } Sell { Seller Amount Currency { Symbol SmartContract } } } } }} **Parameters** * `network: eth` specifies that the Ethereum network is being queried. * `dexTrade` retrieves information about trades on DEXs and NFT marketplace for all type of tokens (Fungible or Non-fungible). * `limit: {count: 100}` specifies that up to 100 results will be returned. * `orderBy: {descending: Block_Number}` sorts the results in descending order by the block number (height). * `where` filters the results based on certain criteria. In this case, the results are filtered based on buyCurrency token address "0x0fcbd68251819928c8f6d182fc04be733fa94170" . All NFT transfers in a block[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#all-nft-transfers-in-a-block "Direct link to All NFT transfers in a block") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query retrieves all NFT token transfers on the Ethereum network within a specific block, and returns information about the block, transfer amount, token currency, sender, and receiver. { EVM(dataset: combined, network: eth) { Transfers( orderBy: { descending: Block_Time } where: { Block: { Number: { eq: "16747554" } } Transfer: { Currency: { Fungible: false } } } ) { Block { Hash Number } Transfer { Amount Currency { Name Symbol Native } Sender Receiver } } }} **Parameters**: The EVM Transfers query takes in the following parameters: * `dataset`: This specifies the dataset to use. In this case, the dataset is [combined](https://docs.bitquery.io/docs/graphql/dataset/combined/) * `network`: This specifies the Ethereum network to use. In this case, the network is "eth". * `orderBy`: This parameter specifies the field to order the results by. In this query, the results are ordered in descending order of block time. * `where`: This parameter specifies the conditions to filter the results by. In this query, the filter condition is that the transfer is non-fungible and occurred within a specific block identified by the block number. **Returned Data** The EVM Transfers query returns the following fields: * `Hash`: This field returns the hash of the block in which the transfer occurred. * `Number`: This field returns the number of the block in which the transfer occurred. * `Amount`: This field returns the amount transferred. * `Currency.Name`: This field returns the name of the token currency. * `Currency.Symbol`: This field returns the symbol of the token currency. * `Currency.Native`: This field returns a boolean indicating whether the token currency is a native currency of the blockchain. * `Sender`: This field returns the Ethereum address of the sender. * `Receiver`: This field returns the Ethereum address of the receiver. All transfers of an NFT[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#all-transfers-of-an-nft "Direct link to All transfers of an NFT") ------------------------------------------------------------------------------------------------------------------------------------------------------------ This query retrieves the most recent transfers of a specific non-fungible token (NFT) on the Ethereum network. You can find the GraphQL query [here](https://ide.bitquery.io/All-transfers-of-an-NFT) query MyQuery { EVM(dataset: combined, network: eth) { Transfers( orderBy: { descending: Block_Time } where: { Transfer: { Currency: { Fungible: false SmartContract: { is: "0x005e6b6776108f4c9e9c5c1259b9554036f8d55e" } } } } limit: { count: 20 } ) { Block { Hash Number } Transfer { Amount Currency { Name Symbol Native } Sender Receiver } } }} **Parameters** * `EVM(dataset: combined, network: eth)` specifies that the query will be executed on the Ethereum blockchain network. * `Transfers` specifies that the query will retrieve transfer transactions on the Ethereum network. * `orderBy: {descending: Block_Time}` specifies that the transfers should be ordered by the time of the block in which they occurred, in descending order (i.e., most recent first). * `where: {Transfer: {Currency: {Fungible: false, SmartContract: {is: "0x005e6b6776108f4c9e9c5c1259b9554036f8d55e"}}}}` specifies the conditions for the transfers to be retrieved. In this case, it specifies that the transfers must involve a non-fungible token (Fungible: false) whose smart contract address is `0x005e6b6776108f4c9e9c5c1259b9554036f8d55e`. * `limit: {count: 20}` specifies that the query should only return the 20 most recent transfers that meet the specified conditions. **Returned Data** * `Block.Hash`: The hash of the block in which the transfer occurred. * `Block.Number`: The number of the block in which the transfer occurred. * `Amount`: The amount of the NFT that was transferred. * `Currency.Name`: The name of the NFT's currency. * `Currency.Symbol`: The symbol of the NFT's currency. * `Currency.Native`: The native type of the NFT's currency. * `Sender`: The address of the sender of the transfer. * `Receiver`: The address of the receiver of the transfer. Frequently Asked Questions -------------------------- How do I get NFT transfer history on Ethereum? Query NFT transfer APIs filtered by contract address, token ID, or wallet. Can I see OpenSea or Blur marketplace trades? Yes. Marketplace trades are indexed — filter by marketplace protocol in your query. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [NFT Holders for a project](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#nft-holders-for-a-project) * [All NFTs owned by an address](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#all-nfts-owned-by-an-address) * [Latest NFT trades for given project](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#latest-nft-trades-for-given-project) * [All NFT transfers in a block](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#all-nft-transfers-in-a-block) * [All transfers of an NFT](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/#all-transfers-of-an-nft) --- # Ethereum NFT Transfer API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The NFT Transfer API provides access to diverse NFT transfer data on supported blockchains and have various use cases. For instance we can retrieve daily transfers, monitor top NFT transfers, track the latest transfers of specific NFTs, and subscribe to real-time transfers for instant updates etc. Daily NFT Transfers[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#daily-nft-transfers "Direct link to Daily NFT Transfers") --------------------------------------------------------------------------------------------------------------------------------------------------------- Here's an example query that retrieves the daily NFT transfers, providing the quantity of transfers occurring on a day-to-day basis within a specified date range. { EVM(dataset: combined, network: eth) { Transfers( orderBy: {ascending: Block_Date} where: {Block: {Date: {since: "2023-05-02", till: "2023-05-09"}}, Transfer: {Currency: {Fungible: false}}} ) { Block { Date } count } }} **Parameters** * `network` : Specifies the Ethereum network. * `dataset` : Indicates the [combined](https://docs.bitquery.io/docs/graphql/dataset/combined/) dataset to be used. * `orderBy` : Orders the results in ascending order based on the Block\_Date. * `where` : It filters the results based on the specified conditions. In this case, it selects transfers where currency is non-fungible and block date is between "2023-05-02" and "2023-05-09". **Returned Data** * `count` : The count of NFT transfers that occurred within the specified date range. * `Block` : The `date` specifies the date of the block associated with each transfer. You can find the graphql query [here](https://ide.bitquery.io/NFT-Token-Transfers-By-Date) . Top Transferred NFT on Ethereum[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#top-transferred-nft-on-ethereum "Direct link to Top Transferred NFT on Ethereum") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query fetches the most frequently transferred NFTs on the Ethereum Blockchain within the specified date range. { EVM(dataset: combined network: eth){ Transfers( orderBy: {descendingByField: "count"} limit: {offset: 10 count: 100} where: { Block: {Date: {since: "2023-05-02" till: "2023-05-09" }} Transfer: {Currency: {Fungible: false}}} ){ Transfer { Currency { Symbol SmartContract } } count senders: uniq(of: Transfer_Sender method: approximate) receivers: uniq(of: Transfer_Receiver method: approximate) ids: uniq(of: Transfer_Id method: approximate) } }} You can find the graphql query [here](https://ide.bitquery.io/Top-transfered-NFT-tokens-in-network) . Recent Transfers of an NFT[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#recent-transfers-of-an-nft "Direct link to Recent Transfers of an NFT") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Using this query, we can retrieve the most recent transfers of an NFT, ordered by block time. Includes details such as transfer amount, currency information, sender, receiver, transfer type, NFT ID, and more. { EVM(dataset: archive, network: eth) { Transfers( where: {Transfer: {Currency: {SmartContract: {is: "0xdba45c28b32f2750bdc3c25d6a0118d8e1c8ca80"}}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Transfer { Amount Currency { Name Symbol } Receiver Sender Type Id URI Data } } }} You can find the graphql query [here](https://ide.bitquery.io/latest-nft-transfers) . Latest NFT transfers Involving Specific User[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#latest-nft-transfers-involving-specific-user "Direct link to Latest NFT transfers Involving Specific User") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This query retrieves the latest transfers of an NFT involving a specific user. The `sent` field retrieves transfers where the user is the sender, while the `recieved` field retrieves transfers where the user is the receiver. { EVM(dataset: archive, network: eth) { sent: Transfers( where: {Transfer: {Sender: {is: "0x415bdfed5a7c490e1a89332648d8eb339d4eea69"}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Transfer { Amount Currency { Name Symbol } Receiver Sender Type Id URI } } recieved: Transfers( where: {Transfer: {Receiver: {is: "0x415bdfed5a7c490e1a89332648d8eb339d4eea69"}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Transfer { Amount Currency { Name Symbol } Receiver Sender Type Id URI } } }} You can find the graphql query [here](https://ide.bitquery.io/latest-nft-transfers-by-a-user) . Realtime NFT Transfer Subscriptions[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#realtime-nft-transfer-subscriptions "Direct link to Realtime NFT Transfer Subscriptions") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Using Streaming APIs, you can subscribe to real-time changes on blockchains. We use a GraphQL subscription,which function similarly to WebSockets. Below example, shows how to subscribe to the latest transfers of the NFT token with the smart contract address `0xdba45c28b32f2750bdc3c25d6a0118d8e1c8ca80`. subscription { EVM(network: eth, trigger_on: head) { Transfers( where: {Transfer: {Currency: {SmartContract: {is: "0xdba45c28b32f2750bdc3c25d6a0118d8e1c8ca80"}}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Transfer { Amount Currency { Name Symbol } Receiver Sender Type Id URI Data } } }} You can find the graphql query [here](https://ide.bitquery.io/Subscription-WebSocket---Latest-NFT-Transfers) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Daily NFT Transfers](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#daily-nft-transfers) * [Top Transferred NFT on Ethereum](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#top-transferred-nft-on-ethereum) * [Recent Transfers of an NFT](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#recent-transfers-of-an-nft) * [Latest NFT transfers Involving Specific User](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#latest-nft-transfers-involving-specific-user) * [Realtime NFT Transfer Subscriptions](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-transfer-api/#realtime-nft-transfer-subscriptions) --- # Ethereum Pancakeswap API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pancakeswap-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Bitquery provides PancakeSwap data through APIs, Streams and Data Dumps. The below graphQL APIs and Streams are examples of data points you can get with Bitquery. If you have any question on other data points reach out to [support](https://t.me/Bloxy_info) Need zero-latency Pumpfun data? [Read about our Kafka Streams and Contact us for a Trial](https://docs.bitquery.io/docs/streams/protobuf/chains/EVM-protobuf/) . The PancakSwap DEX Data is also available for view as a dashboard [at DEXRABBIT](https://dexrabbit.bitquery.io/eth/dex_market/pancake_swap_v3) Latest Trades on PancakeSwap V3 on Ethereum[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pancakeswap-api/#latest-trades-on-pancakeswap-v3-on-ethereum "Direct link to Latest Trades on PancakeSwap V3 on Ethereum") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > Note : You can change the network from "eth" to "bsc" to PancakeSwap data on BNB [Run Query ➤](https://ide.bitquery.io/Latest-Trades-on-PancakeSwap-V3-ETH) Click to expand GraphQL query query LatestTrades { EVM(network: eth) { DEXTradeByTokens( orderBy: {descending: Block_Time} limit: {count: 50} where: {TransactionStatus: {Success: true}, Trade: {Dex: {ProtocolName: {is: "pancake_swap_v3"}}}, Block: {Time: {since: "2025-06-17T09:50:13Z"}}} ) { Block { Time } Transaction { Hash } Trade { Dex { OwnerAddress ProtocolFamily ProtocolName } AmountInUSD Price Amount Side { Type Currency { Symbol SmartContract Name } AmountInUSD Amount } Currency { Symbol SmartContract Name } } } }} Top Traded Pairs on PancakeSwap V3 on ETH[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pancakeswap-api/#top-traded-pairs-on-pancakeswap-v3-on-eth "Direct link to Top Traded Pairs on PancakeSwap V3 on ETH") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [Run Query ➤](https://ide.bitquery.io/Top-token-pairs-on-PancakeSwap-v3) Click to expand GraphQL query query pairs($min_count: String, $market: String, $network: evm_network, $time_10min_ago: DateTime, $time_1h_ago: DateTime, $time_3h_ago: DateTime, $time_ago: DateTime, $eth: String!, $weth: String!, $usdc: String!, $usdt: String!) { EVM(network: $network) { DEXTradeByTokens( where: {TransactionStatus: {Success: true}, Block: {Time: {since: $time_ago}}, any: [{Trade: {Side: {Currency: {SmartContract: {is: $eth}}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $usdt}}}, Currency: {SmartContract: {notIn: [$eth]}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $usdc}}}, Currency: {SmartContract: {notIn: [$eth, $usdt]}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $weth}}}, Currency: {SmartContract: {notIn: [$eth, $usdc, $usdt]}}}}, {Trade: {Side: {Currency: {SmartContract: {notIn: [$usdc, $usdt, $weth, $eth]}}}, Currency: {SmartContract: {notIn: [$usdc, $usdt, $weth, $eth]}}}}], Trade: {Success: true, Dex: {ProtocolName: {is: $market}}}} orderBy: {descendingByField: "usd"} limit: {count: 70} ) { Block { Time(maximum: Block_Time, selectWhere: {after: $time_1h_ago}) } Trade { Currency { Symbol Name SmartContract ProtocolName } Side { Currency { Symbol Name SmartContract ProtocolName } } price_last: PriceInUSD(maximum: Block_Number) price_10min_ago: PriceInUSD( maximum: Block_Number if: {Block: {Time: {before: $time_10min_ago}}} ) price_1h_ago: PriceInUSD( maximum: Block_Number if: {Block: {Time: {before: $time_1h_ago}}} ) price_3h_ago: PriceInUSD( maximum: Block_Number if: {Block: {Time: {before: $time_3h_ago}}} ) } dexes: uniq(of: Trade_Dex_OwnerAddress) amount: sum(of: Trade_Side_Amount) usd: sum(of: Trade_Side_AmountInUSD) sellers: uniq(of: Trade_Seller) buyers: uniq(of: Trade_Buyer) count(selectWhere: {ge: $min_count}) } }}{ "network": "eth", "market": "pancake_swap_v3", "eth": "0x", "usdc": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "usdt": "0xdac17f958d2ee523a2206206994597c13d831ec7", "weth": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "min_count": "100", "time_10min_ago": "2025-06-18T09:43:37Z", "time_1h_ago": "2025-06-18T08:53:37Z", "time_3h_ago": "2025-06-18T06:53:37Z", "time_ago": "2025-06-17T09:53:37Z"} Top Traders on PancakeSwap V3 on ETH[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pancakeswap-api/#top-traders-on-pancakeswap-v3-on-eth "Direct link to Top Traders on PancakeSwap V3 on ETH") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [Run Query ➤](https://ide.bitquery.io/Top-Traders-of-a-token-on-PancakeSwap-on-ETH) Click to expand GraphQL query query topTraders { EVM(network: eth) { DEXTradeByTokens( orderBy: {descendingByField: "volumeUsd"} limit: {count: 100} where: {Trade: {Currency: {SmartContract: {is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}}, Dex: {ProtocolName: {is:"pancake_swap_v3"}}}} ) { Trade { Buyer } bought: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: buy}}}}) sold: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}}) volume: sum(of: Trade_Amount) volumeUsd: sum(of: Trade_Side_AmountInUSD) } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest Trades on PancakeSwap V3 on Ethereum](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pancakeswap-api/#latest-trades-on-pancakeswap-v3-on-ethereum) * [Top Traded Pairs on PancakeSwap V3 on ETH](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pancakeswap-api/#top-traded-pairs-on-pancakeswap-v3-on-eth) * [Top Traders on PancakeSwap V3 on ETH](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pancakeswap-api/#top-traders-on-pancakeswap-v3-on-eth) --- # Base Slippage API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will see how to get Base DEX pool slippage information using our API. The slippage API helps you understand price impact and liquidity depth for token swaps on Base DEX pools. Understanding Slippage and Price Impact[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#understanding-slippage-and-price-impact "Direct link to Understanding Slippage and Price Impact") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Slippage refers to the difference between the expected price of a trade and the actual execution price. When swapping tokens in a DEX pool, larger trades can move the price due to limited liquidity, resulting in slippage. The DEXPoolSlippages API provides detailed information about: * Maximum input amounts that can be swapped at different slippage tolerances * Minimum output amounts guaranteed at each slippage level * Average execution prices for different trade sizes * Price impact calculations for both swap directions (A to B and B to A) For a comprehensive explanation of how DEX pools work, liquidity calculations, and price tables, refer to the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/) . Realtime Slippage Monitoring[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#realtime-slippage-monitoring "Direct link to Realtime Slippage Monitoring") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription query returns real-time slippage data for all DEX pools on Base. You can monitor price impact and liquidity depth as trades occur. You can find the query [here](https://ide.bitquery.io/realtime-slippage-on-base) subscription { EVM(network: base) { DEXPoolSlippages { Price { BtoA { Price MinAmountOut MaxAmountIn } AtoB { Price MinAmountOut MaxAmountIn } Pool { PoolId SmartContract Pair { Decimals SmartContract Name } CurrencyB { Symbol SmartContract Name Decimals } CurrencyA { Symbol SmartContract Name Decimals } } Dex { SmartContract ProtocolVersion ProtocolName ProtocolFamily } SlippageBasisPoints } Block { Time Number } } }} Latest Slippage for a Specific Pool[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#latest-slippage-for-a-specific-pool "Direct link to Latest Slippage for a Specific Pool") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query retrieves the latest slippage data for a specific DEX pool on Base. Use this to check current liquidity depth and price impact for a particular token pair. You can find the query [here](https://ide.bitquery.io/Latest-slippage-of-a-pool-on-Uniswap-v3) query { EVM(network: base) { DEXPoolSlippages( where: {Price: {Pool: {SmartContract: {is: "0x42161084d0672e1d3f26a9b53e653be2084ff19c"}}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Price { BtoA { Price MinAmountOut MaxAmountIn } AtoB { Price MinAmountOut MaxAmountIn } Pool { PoolId SmartContract Pair { Decimals SmartContract Name } CurrencyB { Symbol SmartContract Name Decimals } CurrencyA { Symbol SmartContract Name Decimals } } Dex { SmartContract ProtocolVersion ProtocolName ProtocolFamily } SlippageBasisPoints } Block { Time Number } } }} > **Note:** This query can be converted to a subscription to monitor in real-time. Simply replace `query` with `subscription` to receive live updates whenever the pool's liquidity changes. Realtime Slippage Data via Kafka Streams[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#realtime-slippage-data-via-kafka-streams "Direct link to Realtime Slippage Data via Kafka Streams") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Slippage data can also be obtained via Kafka streams for lower latency and better reliability. The Kafka topic for Base DEX pools is: **`base.dexpools.proto`** Kafka streams provide the same slippage data as GraphQL subscriptions but with several advantages: * Lower latency due to shorter data pipeline * Better reliability with persistent connections * Ability to read from latest offset without gaps * Better scalability with multiple consumers For detailed information on how to connect to Kafka streams, subscribe to topics, and parse messages, refer to the [Kafka Streaming Concepts documentation](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/) . > **Note:** IDE credentials will not work with Kafka Streams. You need separate Kafka credentials. Please contact sales on our official telegram channel or fill out the [form on our website](https://bitquery.io/forms/api) > . Understanding the Response[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#understanding-the-response "Direct link to Understanding the Response") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `DEXPoolSlippages` API response contains the following information: * **`Price`**: Price information for swaps at a specific slippage tolerance * **`AtoB`**: Price data for swapping CurrencyA to CurrencyB * `Price`: Average execution price for swaps at this slippage level * `MinAmountOut`: Minimum output amount guaranteed at this slippage level * `MaxAmountIn`: Maximum input amount that can be swapped at this slippage level * **`BtoA`**: Price data for swapping CurrencyB to CurrencyA (same structure as AtoB) * **`SlippageBasisPoints`**: Slippage tolerance in basis points (100 = 1%) * **`Pool`**: Pool information including token pair details * **`Dex`**: DEX protocol information (Uniswap V2, V3, V4, etc.) * **`Block`**: Block information when the slippage data was recorded * `Time`: Timestamp of the block * `Number`: Block number For more details on how slippage is calculated and when new pool records are emitted, see the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/#when-is-a-new-dexpool-record-emitted-in-the-apis--streams) . Use Cases[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#use-cases "Direct link to Use Cases") -------------------------------------------------------------------------------------------------------------------- ### Liquidity Depth Analysis[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#liquidity-depth-analysis "Direct link to Liquidity Depth Analysis") Use the slippage API to analyze which pools can handle large trades without significant price impact. By examining `MaxAmountIn` values at different slippage levels, you can: * Identify pools with sufficient liquidity for your trade size * Determine optimal slippage tolerance settings * Estimate price impact before executing trades ### Multi-Pool Price Comparison[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#multi-pool-price-comparison "Direct link to Multi-Pool Price Comparison") Compare execution prices across different pools and slippage scenarios to: * Find the best pool for your specific trade size * Understand price differences between DEX protocols * Optimize trade execution strategies ### Trading Applications[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#trading-applications "Direct link to Trading Applications") #### Live Execution Testing[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#live-execution-testing "Direct link to Live Execution Testing") Use the slippage API to test and validate trade execution strategies in real-time: * **Pre-trade validation**: Check if your intended trade size can be executed within acceptable slippage bounds before submitting * **Execution simulation**: Calculate expected price impact and minimum output amounts for different trade sizes * **Strategy backtesting**: Monitor historical slippage data to validate trading algorithms and optimize entry/exit points * **Risk assessment**: Evaluate maximum position sizes that can be entered without exceeding your slippage tolerance #### Detecting Liquidity Shocks and Toxic Order Flow[​](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#detecting-liquidity-shocks-and-toxic-order-flow "Direct link to Detecting Liquidity Shocks and Toxic Order Flow") The slippage API helps identify temporary price dislocations and liquidity shocks that can be exploited or avoided: * **Flow toxicity detection**: Monitor sudden changes in `MaxAmountIn` values to detect when pools experience large outflows or inflows * **Price impact analysis**: Track how `MinAmountOut` changes relative to `MaxAmountIn` to identify when pools become less liquid * **Mean reversion opportunities**: Identify pools where large swaps have created temporary price dislocations that may revert * **Toxic order flow avoidance**: Use slippage data to avoid entering positions when liquidity is thin or when large trades are likely to move price against you For a practical implementation example of using slippage data for automated trading strategies, including flow toxicity detection and mean-reversion trading, see the [AMM Flow Toxicity Alpha Engine](https://github.com/Divyn/amm-flow-toxicity-alpha-engine) repository. This system demonstrates how to: * Detect large swaps that move price significantly (50-500 basis points) * Verify isolation from trending markets * Execute fade trades against temporary price impacts * Manage positions with dynamic stop losses and take profits based on slippage data For more advanced use cases, refer to the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/#advanced-use-cases-and-processing-patterns) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Understanding Slippage and Price Impact](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#understanding-slippage-and-price-impact) * [Realtime Slippage Monitoring](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#realtime-slippage-monitoring) * [Latest Slippage for a Specific Pool](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#latest-slippage-for-a-specific-pool) * [Realtime Slippage Data via Kafka Streams](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#realtime-slippage-data-via-kafka-streams) * [Understanding the Response](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#understanding-the-response) * [Use Cases](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#use-cases) * [Liquidity Depth Analysis](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#liquidity-depth-analysis) * [Multi-Pool Price Comparison](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#multi-pool-price-comparison) * [Trading Applications](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/#trading-applications) --- # BSC Token Market Cap API: Market Cap, FDV and Supply of BNB Chain Tokens [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The `Tokens` cube of the Trading API keeps, for every token that trades on BNB Chain, a rolling set of candles with price, USD volume, circulating and total supply, market cap and fully diluted valuation. Market cap is circulating supply times the trade-weighted price, computed from on-chain trades, so it follows the market with a delay of a block rather than an hour. Tokens are addressed by id, `bid:bsc:` followed by the lowercase contract, and the chain is `Token.Network: "Binance Smart Chain"`. The cube keeps about a month; the [BSC transaction balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/) gives on-chain total supply at any recent transaction if you only need supply. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account; the worked token is CAKE, `0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82`. Market cap of one token now[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#market-cap-of-one-token-now "Direct link to Market cap of one token now") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Match the id exactly, keep one candle size and a short window, and take the newest row. Without the window the query scans the whole cube and times out; without the duration it returns one row per candle size. Saved query [here](https://ide.bitquery.io/specific-bsc-token-latest-marketcap_1) . { Trading { Tokens( limit: { count: 1 } orderBy: { descending: Block_Time } where: { Token: { Id: { is: "bid:bsc:0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82" } } Interval: { Time: { Duration: { eq: 60 } } } Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Block { Time } Token { Name Symbol Address Network } Price { Ohlc { Close } Average { Mean } } Supply { CirculatingSupply TotalSupply MarketCap FullyDilutedValuationUsd } Volume { Usd } } }} A watchlist in one query[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#a-watchlist-in-one-query "Direct link to A watchlist in one query") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- `in` takes a list of ids and `limitBy` on the token id keeps the newest row per token. The example is CAKE, WBNB and USDT. { Trading { Tokens( limitBy: { by: Token_Id, count: 1 } orderBy: { descending: Block_Time } where: { Token: { Id: { in: [ "bid:bsc:0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82" "bid:bsc:0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c" "bid:bsc:0x55d398326f99059ff775485246999027b3197955" ] } } Interval: { Time: { Duration: { eq: 60 } } } Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Block { Time } Token { Symbol Id } Price { Ohlc { Close } } Supply { MarketCap FullyDilutedValuationUsd CirculatingSupply TotalSupply } Volume { Usd } } }} Hourly market cap over the last day[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#hourly-market-cap-over-the-last-day "Direct link to Hourly market cap over the last day") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- One-hour candles carry the market cap at the close of each hour, with open and close price and the hour's USD volume, which is enough for a chart or a change-over-24-hours figure. Saved query [here](https://ide.bitquery.io/top-bsc-tokens-by-Market-Cap-Change-1h) . { Trading { Tokens( limit: { count: 24 } orderBy: { descending: Block_Time } where: { Token: { Id: { is: "bid:bsc:0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82" } } Interval: { Time: { Duration: { eq: 3600 } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Interval { Time { Start } } Price { Ohlc { Open Close } } Supply { MarketCap } Volume { Usd } } }} Stream market cap updates for every BNB Chain token[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#stream-market-cap-updates-for-every-bnb-chain-token "Direct link to Stream market cap updates for every BNB Chain token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Filter `Currency.Id` on the chain prefix and subscribe. Each message is a candle closing for some token; `Duration` above one second skips the tick-level candles. Saved stream [here](https://ide.bitquery.io/bsc-token-marketcap-stream) . subscription { Trading { Tokens( where: { Currency: { Id: { includes: "bsc" } } Interval: { Time: { Duration: { gt: 1 } } } } ) { Block { Time } Token { Symbol Id } Interval { Time { Duration } } Price { Ohlc { Close } } Supply { MarketCap FullyDilutedValuationUsd TotalSupply } Volume { Usd } } }} Alert when a token crosses a market cap[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#alert-when-a-token-crosses-a-market-cap "Direct link to Alert when a token crosses a market cap") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add a `Supply.MarketCap` bound to the stream and only tokens above it arrive, which is a launch screener in one filter. Saved stream [here](https://ide.bitquery.io/realtime-stream-bsc-tokens-with-marketcap-above-1-million_1) . subscription { Trading { Tokens( where: { Token: { Network: { is: "Binance Smart Chain" } } Interval: { Time: { Duration: { gt: 1 } } } Supply: { MarketCap: { gt: 1000000 } } } ) { Block { Time } Token { Symbol Id } Supply { MarketCap TotalSupply } Price { Ohlc { Close } } } }} Why some market caps look absurd[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#why-some-market-caps-look-absurd "Direct link to Why some market caps look absurd") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Market cap here is on-chain supply times an on-chain price. A token with a huge minted supply and a few dollars of trades in a thin pool can show a market cap in the billions, and a plain "top tokens by market cap" ranking of the cube is led by those. Rank inside a list you trust, as in the watchlist query, or bound the ranking with `Volume: { Usd: { gt: ... } }` and `Supply: { MarketCap: { lt: ... } }` and treat the result as a screen rather than a league table. The saved [top tokens by market cap](https://ide.bitquery.io/Top-Tokens-by-Market-Cap-on-bsc) query shows the bounded form. Frequently Asked Questions -------------------------- How do I get the market cap of a BNB Chain token? Query Trading.Tokens with Token.Id set to bid:bsc: plus the lowercase contract, one candle duration, a short time window and limit 1 ordered by Block\_Time descending. Supply.MarketCap and FullyDilutedValuationUsd are on the row. How is market cap computed? Circulating supply times the trade-weighted price of the candle, both from on-chain data. FDV uses total supply instead. How far back does the Tokens cube go? About a month of candles. For older supply figures use the transaction balance tracker, which records total supply on token rows. Why does a query with includesCaseInsensitive on the id time out? It has to scan every token. Use the exact bid:bsc: id with is, add a candle duration and a time window, and the query returns in well under a second. Can I stream market caps for one token only? Yes. Put the exact Token.Id in the stream filter instead of the chain prefix; a message arrives whenever one of its candles closes. Related pages[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------- * [Base token market cap API](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/) * [Ethereum token market cap API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/ethereum-token-marketcap-api/) * [Tokens cube](https://docs.bitquery.io/docs/trading/crypto-price-api/tokens/) * [Supply fields](https://docs.bitquery.io/docs/trading/crypto-price-api/supply-fields/) * [BSC transaction balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Market cap of one token now](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#market-cap-of-one-token-now) * [A watchlist in one query](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#a-watchlist-in-one-query) * [Hourly market cap over the last day](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#hourly-market-cap-over-the-last-day) * [Stream market cap updates for every BNB Chain token](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#stream-market-cap-updates-for-every-bnb-chain-token) * [Alert when a token crosses a market cap](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#alert-when-a-token-crosses-a-market-cap) * [Why some market caps look absurd](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#why-some-market-caps-look-absurd) * [Related pages](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/#related-pages) --- # Ethereum Pepe API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Query real-time and historical on-chain data for [PEPE](https://explorer.bitquery.io/ethereum/token/0x6982508145454ce325ddbe47a25d4ec3d2311933) , a popular ERC-20 memecoin on Ethereum. All examples below target PEPE's contract address: `0x6982508145454ce325ddbe47a25d4ec3d2311933`. * * * Real Time PEPE Trades Stream[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#real-time-pepe-trades-stream "Direct link to Real Time PEPE Trades Stream") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Every PEPE DEX trade as it is confirmed on-chain in real time using Bitquery subscription. [Run In IDE ➤](https://ide.bitquery.io/pepe-live-trades-stream) subscription { EVM(network: eth) { DEXTradeByTokens( where: { Trade: { Currency: { SmartContract: { is: "0x6982508145454ce325ddbe47a25d4ec3d2311933" } } } } ) { Block { Time Number } Transaction { Hash } Trade { AmountInUSD Price Side { Type AmountInUSD Currency { Symbol } } Buyer Seller Dex { ProtocolName SmartContract } Currency { Symbol } } } }} * * * Real Time PEPE OHLCV Stream[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#real-time-pepe-ohlcv-stream "Direct link to Real Time PEPE OHLCV Stream") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- Stream live PEPE price data with 1-minute candles, moving averages, and USD volume. > Note: `Volume: { Usd: { gt: 5 } }` is included to filter outlier ticks; the stream already pre-filters outliers—this is an additional check. [Run In IDE ➤](https://ide.bitquery.io/pepe-ohlcv-stream) subscription { Trading { Tokens( where: { Token: { Address: { is: "0x6982508145454ce325ddbe47a25d4ec3d2311933" } } Interval: { Time: { Duration: { eq: 60 } } } Volume: { Usd: { gt: 5 } } } ) { Token { Symbol Name Network Address } Block { Time Timestamp } Interval { Time { Start Duration End } } Price { IsQuotedInUsd Ohlc { Open High Low Close } Average { Mean SimpleMoving WeightedSimpleMoving ExponentialMoving } } } }} * * * Historical PEPE OHLCV (Last 30 Days)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#historical-pepe-ohlcv-last-30-days "Direct link to Historical PEPE OHLCV (Last 30 Days)") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Fetch hourly OHLCV candles for the past 30 days. Change `Duration` for different intervals, such as 60 (1 minute) or 300 (5 minutes). [Run In IDE ➤](https://ide.bitquery.io/pepe-historical-ohlcv-30days) { Trading { Tokens( where: { Token: { Address: { is: "0x6982508145454ce325ddbe47a25d4ec3d2311933" } } Interval: { Time: { Duration: { eq: 3600 } } } Volume: { Usd: { gt: 5 } } Block: { Time: { since_relative: { days_ago: 30 } } } } limit: { count: 1000 } orderBy: { descending: Interval_Time_Start } ) { Interval { Time { Start End Duration } } Price { IsQuotedInUsd Ohlc { Open High Low Close } Average { Mean ExponentialMoving SimpleMoving } } Volume { Usd } } }} * * * Monitor Whale Activities for PEPE in Real Time[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#monitor-whale-activities-for-pepe-in-real-time "Direct link to Monitor Whale Activities for PEPE in Real Time") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Subscribe to PEPE transfers above 1 billion tokens the moment they hit the chain. [Run In IDE ➤](https://ide.bitquery.io/pepe-whale-transfer-stream) subscription { EVM(network: eth) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x6982508145454ce325ddbe47a25d4ec3d2311933" } } Amount: { ge: "1000000000000" } } } ) { Block { Time Number } Transaction { Hash } Transfer { Amount AmountInUSD Sender Receiver Currency { Symbol } } } }} * * * Latest Trading Volume and Market Cap for PEPE[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#latest-trading-volume-and-market-cap-for-pepe "Direct link to Latest Trading Volume and Market Cap for PEPE") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query provides the latest trade volume for the past one hour along with the latest market cap. [Run In IDE ➤](https://ide.bitquery.io/pepe-volume-marketcap) { Trading { Tokens( where: { Token: { Address: { is: "0x6982508145454ce325ddbe47a25d4ec3d2311933" } } Interval: { Time: { Duration: { eq: 3600 } } } } orderBy: {descending: Interval_Time_End} limit: {count: 1} ) { Interval{ Time{ Start End } } Price { Ohlc { Close } } Volume { Usd Base Quote } Supply { TotalSupply MarketCap FullyDilutedValuationUsd } } }} * * * PEPE Volume by DEX (Last 24 Hours)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#pepe-volume-by-dex-last-24-hours "Direct link to PEPE Volume by DEX (Last 24 Hours)") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Break down PEPE trading volume across all DEXs. [Run In IDE ➤](https://ide.bitquery.io/pepe-volume-by-dex) { EVM(network: eth) { DEXTradeByTokens( where: { Trade: { Currency: { SmartContract: { is: "0x6982508145454ce325ddbe47a25d4ec3d2311933" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "volumeUsd" } ) { Trade { Dex { ProtocolName ProtocolFamily SmartContract } } volumeUsd: sum(of: Trade_AmountInUSD) tradeCount: count(of: Transaction_Hash) } }} * * * Historical Daily Volume for 30 Days[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#historical-daily-volume-for-30-days "Direct link to Historical Daily Volume for 30 Days") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The below query returns the daily trading volume for the past 30 days. [Run In IDE ➤](https://ide.bitquery.io/pepe-daily-volume-30days) query MyQuery { Trading { Trades( where: { Block: {Time: {since_relative: {days_ago: 30}}}, Pair: {Token: {Address: {is: "0x6982508145454ce325ddbe47a25d4ec3d2311933"}}} } orderBy: {ascending: Block_Date} ) { Block{ Date } volume: sum(of: AmountsInUsd_Base) trades: count traders: uniq(of: Trader_Address) } }} * * * Top PEPE Buyers for Last 24 Hours[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#top-pepe-buyers-for-last-24-hours "Direct link to Top PEPE Buyers for Last 24 Hours") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Rank wallets by total USD spent buying PEPE. [Run In IDE ➤](https://ide.bitquery.io/pepe-top-buyers-24h) query MyQuery { Trading { Trades( where: { Block: {Time: {since_relative: {hours_ago: 24}}}, Pair: {Token: {Address: {is: "0x6982508145454ce325ddbe47a25d4ec3d2311933"}}}, Side: {is: "Buy"} } limit: {count: 20} orderBy: {descendingByField: "volume"} ) { Trader { Address } volume: sum(of: AmountsInUsd_Base) trades: count } }} * * * Top PEPE Sellers for Last 24 Hours[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#top-pepe-sellers-for-last-24-hours "Direct link to Top PEPE Sellers for Last 24 Hours") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Rank wallets by total USD value of PEPE sold. [Run In IDE ➤](https://ide.bitquery.io/pepe-top-sellers-24h) query MyQuery { Trading { Trades( where: { Block: {Time: {since_relative: {hours_ago: 24}}}, Pair: {Token: {Address: {is: "0x6982508145454ce325ddbe47a25d4ec3d2311933"}}}, Side: {is: "Sell"} } limit: {count: 20} orderBy: {descendingByField: "volume"} ) { Trader { Address } volume: sum(of: AmountsInUsd_Base) trades: count } }} * * * PEPE Top Holders by Balance[​](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#pepe-top-holders-by-balance "Direct link to PEPE Top Holders by Balance") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- [Run In IDE ➤](https://ide.bitquery.io/pepe-top-holders_3) query MyQuery { Trading { Trades( where: { Pair: {Token: {Address: {is: "0x6982508145454ce325ddbe47a25d4ec3d2311933"}}}, } limit: {count: 20} orderBy: {descendingByField: "holdings"} ) { Trader { Address } buy_volume: sum(of: AmountsInUsd_Base if: {Side: {is: "Buy"}}) sell_volume: sum(of: AmountsInUsd_Base if: {Side: {is: "Sell"}}) holdings: calculate(expression: "$buy_volume - $sell_volume") trades: count } }} * * * Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Real Time PEPE Trades Stream](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#real-time-pepe-trades-stream) * [Real Time PEPE OHLCV Stream](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#real-time-pepe-ohlcv-stream) * [Historical PEPE OHLCV (Last 30 Days)](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#historical-pepe-ohlcv-last-30-days) * [Monitor Whale Activities for PEPE in Real Time](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#monitor-whale-activities-for-pepe-in-real-time) * [Latest Trading Volume and Market Cap for PEPE](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#latest-trading-volume-and-market-cap-for-pepe) * [PEPE Volume by DEX (Last 24 Hours)](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#pepe-volume-by-dex-last-24-hours) * [Historical Daily Volume for 30 Days](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#historical-daily-volume-for-30-days) * [Top PEPE Buyers for Last 24 Hours](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#top-pepe-buyers-for-last-24-hours) * [Top PEPE Sellers for Last 24 Hours](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#top-pepe-sellers-for-last-24-hours) * [PEPE Top Holders by Balance](https://docs.bitquery.io/docs/blockchain/Ethereum/pepe-api/#pepe-top-holders-by-balance) --- # eth_getTransactionByHash | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionByHash/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will discuss how we can build eth\_getTransactionByHash alternatives using Bitquery APIs. Get Transaction Hash[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionByHash/#get-transaction-hash "Direct link to Get Transaction Hash") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- We will use [this](https://ide.bitquery.io/Get-Transaction-Hash) stream to get the latest transactions hash. We will use this transaction hash as an input for the eth\_getTransactionByHash alternative API. subscription { EVM { Transactions { Transaction { Hash } } }} Get Transaction Details by Hash[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionByHash/#get-transaction-details-by-hash "Direct link to Get Transaction Details by Hash") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/eth_getTransactionByHash_1) API serves as an alternative to the eth\_getTransactionByHash JSON RPC method with `Hash` as `0xcc9ce436a02e8a4b44546affebe036fdd54b70c27ea3c2df18c0a1ed78ec9fbe`. query getTransactionByHash { EVM { Transactions( where: {Transaction: {Hash: {is: "0xcc9ce436a02e8a4b44546affebe036fdd54b70c27ea3c2df18c0a1ed78ec9fbe"}}} ) { Block { Time Number } ChainId Signature { R S V } Transaction { From Gas GasPrice Hash Index Nonce Cost Data To Value AccessList { Address StorageKeys } GasFeeCap Type } TransactionStatus { Success } } }} After running the above query this is the expected result. { "EVM": { "Transactions": [ { "Block": { "Number": "20525804", "Time": "2024-08-14T08:54:11Z" }, "ChainId": "1", "Signature": { "R": "15733655909487727252053616094955044058698623526211212024614602844347766842611", "S": "31797148001645269693712272496207792779118835901043019296634774876795585651855", "V": "0" }, "Transaction": { "AccessList": [], "Cost": "0.000603129239285980", "Data": "0x", "From": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5", "Gas": "27329", "GasFeeCap": "3474089451", "GasPrice": "0.000000003474089451", "Hash": "0xcc9ce436a02e8a4b44546affebe036fdd54b70c27ea3c2df18c0a1ed78ec9fbe", "Index": "23", "Nonce": "1278621", "To": "0x1876207dbfd106372d289d06e89cb75a4ff40231", "Type": 2, "Value": "0.000508185848679601" }, "TransactionStatus": { "Success": true } } ] }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Transaction Hash](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionByHash/#get-transaction-hash) * [Get Transaction Details by Hash](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionByHash/#get-transaction-details-by-hash) --- # Base Gas Balance Tracker: Fees Paid by Senders and Collected by Vaults [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Base reports gas differently from Ethereum in the `TransactionBalances` cube. Ethereum splits a fee into a gas purchase, a refund and a tip, with reason codes 6, 7 and 5. Base emits two codes only: * **Code 0** for every ordinary balance change: the sender's ETH goes down by the value sent plus the gas paid, and the receiver's goes up by the value. * **Code 5** for the fee credited to the three OP Stack fee vaults: `0x4200000000000000000000000000000000000011` (SequencerFeeVault), `0x4200000000000000000000000000000000000019` (BaseFeeVault) and `0x420000000000000000000000000000000000001a` (L1FeeVault). So the gas a sender paid is read from its own code 0 row, and the fees the network collected are read from the vaults' code 5 rows. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account; the cube covers the recent realtime window only, so queries carry a time filter. Fee vault balances now[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#fee-vault-balances-now "Direct link to Fee vault balances now") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `limitBy` on the address keeps the newest row per vault; `PostBalance` is the balance after the latest credit. Saved query [here](https://ide.bitquery.io/top-gas-fee-collectors-base) . { EVM(network: base) { TransactionBalances( limitBy: { by: TokenBalance_Address, count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Time: { since_relative: { minutes_ago: 5 } } } } ) { Block { Time } TokenBalance { Address PostBalance PostBalanceInUSD } } }} Largest fee credits in the last ten minutes[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#largest-fee-credits-in-the-last-ten-minutes "Direct link to Largest fee credits in the last ten minutes") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Each code 5 row is one transaction's contribution to one vault; `fee` is the balance after minus the balance before. Sort on it to find the transactions that paid most. { EVM(network: base) { TransactionBalances( limit: { count: 20 } orderBy: { descendingByField: "fee" } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Time: { since_relative: { minutes_ago: 10 } } } } ) { Block { Number Time } TokenBalance { Address PreBalance PostBalance } Transaction { Hash From To } fee: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) } }} What one address paid in gas[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#what-one-address-paid-in-gas "Direct link to What one address paid in gas") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The sender's own code 0 row holds the balance before and after; subtracting the value sent leaves the gas. Filter on the address as both the balance owner and the transaction sender. If the address also received ETH inside the same transaction, for example from a swap, the result goes negative, so read it alongside `Transaction.Value`. Saved query [here](https://ide.bitquery.io/Latest-balance-and-gas-fee-paid-for-an-address-base_1) . { EVM(network: base) { TransactionBalances( limit: { count: 10 } orderBy: { descending: Block_Time } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 0 } Currency: { Native: true } Address: { is: "0x6c8ab6bd67d4df8d131e952edcb00b7e77183b60" } } Transaction: { From: { is: "0x6c8ab6bd67d4df8d131e952edcb00b7e77183b60" } } } ) { Block { Time } TokenBalance { PreBalance PostBalance PostBalanceInUSD } Transaction { Hash Value } gas: calculate( expression: "$TokenBalance_PreBalance - $TokenBalance_PostBalance - $Transaction_Value" ) } }} Stream fee income live[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#stream-fee-income-live "Direct link to Stream fee income live") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Every fee credit as it lands, with the sender that paid it. subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Number Time } TokenBalance { Address PreBalance PostBalance } Transaction { Hash From To } fee: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) } }} To watch one wallet's spending instead, stream code 0 rows with `Currency: { Native: true }` and the wallet in both `TokenBalance.Address` and `Transaction.From`, the same filter as the query above. Frequently Asked Questions -------------------------- Why are there no gas codes 6 and 7 on Base? Base emits reason codes 0 and 5 only. The sender's gas payment is folded into its code 0 balance change, and the collected fee appears as a code 5 credit to the OP Stack fee vaults. What are the three fee vault addresses on Base? 0x4200...0011 is the SequencerFeeVault, 0x4200...0019 the BaseFeeVault and 0x4200...001a the L1FeeVault. Every transaction credits one or more of them with reason code 5. How do I get the gas one address paid? Take the address's code 0 row for the transaction, subtract PostBalance from PreBalance and then subtract Transaction.Value. Filter on the address as both the balance owner and the transaction sender. Can I get historical gas data on Base this way? TransactionBalances holds the recent realtime window only. For history, query the Transactions cube, which carries gas and cost per transaction, or stream and store these rows. Related pages[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- * [Base transaction balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/) * [Base MEV balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/) * [Ethereum gas balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/) * [Balance change reason codes](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/#balance-change-reason-codes) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Fee vault balances now](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#fee-vault-balances-now) * [Largest fee credits in the last ten minutes](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#largest-fee-credits-in-the-last-ten-minutes) * [What one address paid in gas](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#what-one-address-paid-in-gas) * [Stream fee income live](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#stream-fee-income-live) * [Related pages](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/#related-pages) --- # Robinhood Token Supply API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Get **token total supply** on the **Robinhood** network with Bitquery's `EVM.TransactionBalances` API. This guide covers the **latest supply of a token**, a **real-time supply stream**, and the **supply of all active tokens**. API Key Required To query or stream data outside the Bitquery IDE, you need an API access token. Follow the steps here: [How to generate Bitquery API token ➤](https://docs.bitquery.io/docs/authorization/how-to-generate/) Related docs * [Robinhood Chain API overview](https://docs.bitquery.io/docs/blockchain/robinhood/) — every Robinhood Chain API, launchpad guide and stream in one place * [Robinhood Trades API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-trades/) * [Robinhood Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) * [Robinhood Liquidity & Slippage API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-liquidity/) * [Flap.sh API on Robinhood](https://docs.bitquery.io/docs/blockchain/robinhood/flap-sh-api/) * [WebSocket subscriptions](https://docs.bitquery.io/docs/subscriptions/websockets/) `TransactionBalances` is realtime-only on Robinhood This cube has no archive table on Robinhood: it holds only the most recent days, so a token with no transaction in that window returns no row, and `dataset: archive` errors. Keep queries bounded with a `Block.Time` filter and a `limit`. Supply is decimal-normalized `TokenBalance.TotalSupply` is already adjusted for the token's decimals, so it returns whole-token values (e.g. `100000000.000000000000000000`) — not the raw on-chain integer. * * * ▶️ [Token lookup by contract address - Run in IDE](https://ide.bitquery.io/token-lookup-by-address-robinhood-chain) Latest Supply of a Token[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#latest-supply-of-a-token "Direct link to Latest Supply of a Token") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get the most recent total supply for a single token by filtering on its contract address and taking the newest balance record. { EVM(network: robinhood) { TransactionBalances( limit: {count: 1} orderBy: {descending: Block_Time} where: {TokenBalance: {Currency: {SmartContract: {is: "0x0bd7d308f8e1639fab988df18a8011f41eacad73"}}}} ) { TokenBalance { Currency { Symbol HasURI SmartContract } TotalSupply } } }} Sample response { "EVM": { "TransactionBalances": [ { "TokenBalance": { "Currency": { "Symbol": "WETH", "HasURI": false, "SmartContract": "0x0bd7d308f8e1639fab988df18a8011f41eacad73" }, "TotalSupply": "18584.722713864831985195" } } ] }} * * * Real-Time Supply Stream for Tokens on Robinhood[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#real-time-supply-stream-for-tokens-on-robinhood "Direct link to Real-Time Supply Stream for Tokens on Robinhood") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Subscribe to live total-supply updates across Robinhood tokens. The `SmartContract: {not: "0x"}` filter excludes the native coin so only token supply changes stream through. subscription { EVM(network: robinhood) { TransactionBalances( where: { TokenBalance: { Currency: { SmartContract: {not: "0x"} } } } ) { TokenBalance { Currency { Symbol HasURI SmartContract } TotalSupply } } }} * * * Supply of All Active Tokens[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#supply-of-all-active-tokens "Direct link to Supply of All Active Tokens") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Fetch the latest total supply for every recently active token in a single query. `limitBy` collapses results to the newest record per token contract, so each token appears once with its current supply. Keep a `limit` — unbounded, this returns one row per active token, which can be very large. { EVM(network: robinhood) { TransactionBalances( limitBy: {by: TokenBalance_Currency_SmartContract, count: 1} limit: {count: 100} orderBy: {descending: Block_Time} where: {TokenBalance: {Currency: {SmartContract: {not: "0x"}}}} ) { TokenBalance { Currency { Symbol HasURI SmartContract } TotalSupply } } }} Sample response { "EVM": { "TransactionBalances": [ { "TokenBalance": { "Currency": { "Symbol": "HEIST", "HasURI": false, "SmartContract": "0xfbb3171fc52fca9f8ff10b2494a6055a51f68717" }, "TotalSupply": "100000000.000000000000000000" } }, { "TokenBalance": { "Currency": { "Symbol": "ROBINHOOD", "HasURI": false, "SmartContract": "0x217b7013e00c13ce4f3bc968238e0b13ce297382" }, "TotalSupply": "100000000000.000000000000000000" } }, { "TokenBalance": { "Currency": { "Symbol": "BabyJugger", "HasURI": false, "SmartContract": "0xd8e25ced04f51efa18fa94b460f6e924c3aa23ae" }, "TotalSupply": "1000000000.000000000000000000" } } ] }} * * * Tokenized Stock Supply (NVDA)[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#tokenized-stock-supply-nvda "Direct link to Tokenized Stock Supply (NVDA)") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Robinhood's tokenized equities are ordinary ERC-20s, so the same query returns the on-chain supply of a stock token — `TotalSupply` reads as the tokenized share count. Example: NVIDIA (`NVDA`); swap in AAPL (`0xaf3d76f1834a1d425780943c99ea8a608f8a93f9`) or any other stock token. { EVM(network: robinhood) { TransactionBalances( limit: {count: 1} orderBy: {descending: Block_Time} where: {TokenBalance: {Currency: {SmartContract: {is: "0xd0601ce157db5bdc3162bbac2a2c8af5320d9eec"}}}} ) { TokenBalance { Currency { Symbol Name SmartContract } TotalSupply } } }} * * * Supply Watchlist: Multiple Tokens at Once[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#supply-watchlist-multiple-tokens-at-once "Direct link to Supply Watchlist: Multiple Tokens at Once") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- One latest supply row per token for a fixed list — `SmartContract.in` plus `limitBy` per contract, bounded to the last six hours so the `limitBy` scan stays fast (widen the bound for tokens that transact rarely). Example list: WETH, USDG, AAPL, NVDA. { EVM(network: robinhood) { TransactionBalances( limitBy: {by: TokenBalance_Currency_SmartContract, count: 1} limit: {count: 10} orderBy: {descending: Block_Time} where: {Block: {Time: {since_relative: {hours_ago: 6}}}, TokenBalance: {Currency: {SmartContract: {in: [ "0x0bd7d308f8e1639fab988df18a8011f41eacad73", "0x5fc5360d0400a0fd4f2af552add042d716f1d168", "0xaf3d76f1834a1d425780943c99ea8a608f8a93f9", "0xd0601ce157db5bdc3162bbac2a2c8af5320d9eec" ]}}}} ) { TokenBalance { Currency { Symbol SmartContract } TotalSupply } } }} * * * FAQ[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#faq "Direct link to FAQ") ------------------------------------------------------------------------------------------------------------ ### How do I get the current total supply of a Robinhood token?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#how-do-i-get-the-current-total-supply-of-a-robinhood-token "Direct link to How do I get the current total supply of a Robinhood token?") Query `EVM.TransactionBalances` filtered by the token's `Currency.SmartContract`, ordered by `descending: Block_Time` with `limit: 1`. The newest record holds the latest `TotalSupply`. ### How do I stream supply changes in real time?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#how-do-i-stream-supply-changes-in-real-time "Direct link to How do I stream supply changes in real time?") Run the `subscription` on `TransactionBalances` with `Currency.SmartContract: {not: "0x"}`. Each supply change on a token is pushed to your client as it is indexed. ### How do I list supply for all active tokens at once?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#how-do-i-list-supply-for-all-active-tokens-at-once "Direct link to How do I list supply for all active tokens at once?") Use `limitBy: {by: TokenBalance_Currency_SmartContract, count: 1}` with `orderBy: {descending: Block_Time}`. This returns one row — the latest supply — per token contract. ### Can I get supply for several tokens in one query?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#can-i-get-supply-for-several-tokens-in-one-query "Direct link to Can I get supply for several tokens in one query?") Yes — filter `Currency.SmartContract` with `in: [...]` and add `limitBy: {by: TokenBalance_Currency_SmartContract, count: 1}` so each token returns its newest supply once. See [the watchlist example](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#supply-watchlist-multiple-tokens-at-once) . ### Is `TotalSupply` raw or decimal-adjusted?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#is-totalsupply-raw-or-decimal-adjusted "Direct link to is-totalsupply-raw-or-decimal-adjusted") It is decimal-normalized (whole tokens), already divided by the token's decimals. Use it directly for market-cap math without further scaling. * * * Next steps[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#next-steps "Direct link to Next steps") --------------------------------------------------------------------------------------------------------------------------------- * Combine supply with price from the [Robinhood Trades API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-trades/) for market-cap and FDV calculations. * Track newly launched tokens with the [Robinhood Meme Coin Launches API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/) and [Flap.sh API](https://docs.bitquery.io/docs/blockchain/robinhood/flap-sh-api/) . * Inspect holder and wallet flows with [Robinhood Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest Supply of a Token](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#latest-supply-of-a-token) * [Real-Time Supply Stream for Tokens on Robinhood](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#real-time-supply-stream-for-tokens-on-robinhood) * [Supply of All Active Tokens](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#supply-of-all-active-tokens) * [Tokenized Stock Supply (NVDA)](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#tokenized-stock-supply-nvda) * [Supply Watchlist: Multiple Tokens at Once](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#supply-watchlist-multiple-tokens-at-once) * [FAQ](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#faq) * [How do I get the current total supply of a Robinhood token?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#how-do-i-get-the-current-total-supply-of-a-robinhood-token) * [How do I stream supply changes in real time?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#how-do-i-stream-supply-changes-in-real-time) * [How do I list supply for all active tokens at once?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#how-do-i-list-supply-for-all-active-tokens-at-once) * [Can I get supply for several tokens in one query?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#can-i-get-supply-for-several-tokens-in-one-query) * [Is `TotalSupply` raw or decimal-adjusted?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#is-totalsupply-raw-or-decimal-adjusted) * [Next steps](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-token-supply/#next-steps) --- # Robinhood Calls & Traces API — WebSocket Streams [Skip to main content](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Stream **every contract call and internal trace on Robinhood** with Bitquery GraphQL — top-level calls and nested internal calls, with **decoded input arguments**, gas accounting, revert errors, and the surrounding transaction and receipt joined into one record. The `EVM.Calls` cube on `network: robinhood` replaces a tracing node: no `debug_traceTransaction` loops, no 4-byte databases, no trace decoding pipeline. Open **one WebSocket that carries every call on the chain**, or narrowly filtered sockets — per contract, per function, per selector, deployments-only, reverts-only. Every subscription on this page was verified live over WebSocket, and every query was executed against the production endpoint before publishing. API Key Required To query or stream data outside the Bitquery IDE, you need an API access token. Follow the steps here: [How to generate Bitquery API token ➤](https://docs.bitquery.io/docs/authorization/how-to-generate/) Related docs * [Robinhood Chain API overview](https://docs.bitquery.io/docs/blockchain/robinhood/) — every Robinhood Chain API, launchpad guide and stream in one place * [Robinhood Events API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) * [Transfers vs Events vs Calls](https://docs.bitquery.io/docs/start/mental-model-transfers-events-calls/) * [Robinhood Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) * [Robinhood Trades](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-trades/) * [WebSocket authentication](https://docs.bitquery.io/docs/authorization/websocket/) **On this page:** [Why not a tracing node](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#why-stream-calls-instead-of-tracing-a-node) · [Datasets & history](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#datasets-and-history) · [Call anatomy](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#what-one-call-row-contains) · [Firehose](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-all-calls-firehose) · [By contract](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-calls-to-one-contract) · [By function](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-by-function-name-or-selector) · [Deployments](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-contract-deployments) · [Reverts](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-reverted-calls) · [Value traces](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#internal-eth-value-transfers) · [By wallet](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#calls-from-a-wallet) · [Call tree](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#full-call-tree-of-a-transaction) · [Analytics](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-called-contracts) · [FAQ](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#faq) * * * Why stream calls instead of tracing a node[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#why-stream-calls-instead-of-tracing-a-node "Direct link to Why stream calls instead of tracing a node") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Tracing node (`debug_traceTransaction` / `trace_filter`) | Bitquery Calls stream | | --- | --- | --- | | Infrastructure | Archive node with tracing enabled — heavy to run and sync | One WebSocket to `streaming.bitquery.io` | | Decoding | Raw calldata; you maintain ABIs and 4-byte lookups | `Arguments` arrive **decoded and typed** for known signatures | | Scope | Per-transaction or per-block tracing loops | Server-side filters: contract, function name, selector, caller, `Create`, `Reverted`, value, time | | Context | Trace only — separate calls for tx and receipt | Transaction and `Receipt` joined onto every call | | Deployments | Diff traces for `CREATE` frames yourself | `Call: { Create: true }` is a filter | | Backfill | Re-trace history block by block | Same query with `dataset: archive` / `combined` | * * * Datasets and history[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#datasets-and-history "Direct link to Datasets and history") ------------------------------------------------------------------------------------------------------------------------------------------------------------ * **`realtime`** (the default) — a rolling window of recent blocks whose depth varies; measure it with the probe below rather than assuming it. * **`archive`** — deep call history, retained up to roughly the **last 3 months** (Robinhood is a newer chain, so today the archive holds its complete history; older data ages out as the cap applies); its head lags the chain by minutes. * **`combined`** — archive + realtime union; the safe choice for fixed windows (24h, 7d). For older or bulk history, Bitquery can provide **data exports** — [contact support](https://bitquery.io/forms/api) . ### Check the calls window[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#check-the-calls-window "Direct link to Check the calls window") { EVM(network: robinhood) { Calls { count earliest: Block { Time(minimum: Block_Time) } latest: Block { Time(maximum: Block_Time) } } }} * * * What one call row contains[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#what-one-call-row-contains "Direct link to What one call row contains") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Group | What it gives you | | --- | --- | | **`Call`** | `From`/`To`, `Value` (+USD), gas fields, `Signature` (function `Name`, full `Signature`, 4-byte `SignatureHash`), flags: `Create`, `Delegated`, `Reverted`, `Success`, `SelfDestruct`, `Error`, plus tree position (`Index`, `CallerIndex`, `CallPath`, `InternalCalls`) | | **`Arguments`** | Decoded, typed **function input values** (`address`, `bigInteger`, `string`, `hex`, `bool`, `integer`) with parameter names | | **`Transaction`** | Hash, `From`/`To`, value, full gas and fee fields (incl. USD) | | **`Receipt`** | `GasUsed`, `CumulativeGasUsed`, `ContractAddress`, receipt `Type` | | **`Block`** | `Number`, `Time`, `Nonce` | Tree semantics: `Index` numbers each call within the transaction, `CallerIndex` points to the parent call's index, and `CallPath` is the position path from the top-level call (e.g. `[2, 0]` = first sub-call of call 2) — enough to rebuild the entire trace tree client-side. For calls, `Signature.SignatureHash` is the **4-byte selector** as uppercase hex **without** a `0x` prefix (e.g. `A9059CBB` for `transfer(address,uint256)`). Calls with an empty `Name` are undecoded selectors — still streamed and filterable by hash. Note that on-chain `balanceOf`\-style reads made by contracts also appear: this cube sees every call executed, not just state-changing ones. * * * Stream all calls (firehose)[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-all-calls-firehose "Direct link to Stream all calls (firehose)") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- One socket, every call on the chain — top-level and internal — with decoded inputs and full context. Events arrive in per-block batches. Very high volume Calls are the highest-volume cube on a busy chain (every transaction fans out into many internal calls). Use the firehose for exploration and full indexers; filter in production. subscription { EVM(network: robinhood) { Calls { Block { Number Time Nonce } Call { CallPath InternalCalls From To Signature { Name Parsed Signature SignatureHash SignatureType } CallerIndex Create Delegated Error Gas GasUsed Index Reverted SelfDestruct Success Value ValueInUSD } Receipt { CumulativeGasUsed ContractAddress Type GasUsed } Transaction { From To Type Cost CostInUSD Gas GasFeeCap GasFeeCapInUSD GasPriceInUSD GasPrice GasTipCapInUSD GasTipCap Hash Value ValueInUSD } Arguments { Name Type Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} WebSocket connection Connect to `wss://streaming.bitquery.io/graphql?token=YOUR_TOKEN` with the `graphql-transport-ws` subprotocol (`connection_init` → `connection_ack` → `subscribe`). See [WebSocket authentication](https://docs.bitquery.io/docs/authorization/websocket/) . Any subscription on this page also runs as a query — add `limit` and `orderBy` and drop the `subscription` keyword. Prefer Kafka for the firehose Consuming the full call feed continuously? Bitquery also delivers Robinhood data as **Kafka streams** — decoded transactions, calls, and events on the protobuf topic `robinhood.transactions.proto` — with consumer-group scaling and replay. See [Kafka Streaming Concepts](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/) . * * * Stream calls to one contract[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-calls-to-one-contract "Direct link to Stream calls to one contract") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **Protocol ops:** every function invocation of one contract — including internal calls from other contracts, which a mempool or tx-level watcher misses. Example: the Uniswap V4 pool manager. subscription { EVM(network: robinhood) { Calls( where: { Call: { To: { is: "0x8366a39cc670b4001a1121b8f6a443a643e40951" } } } ) { Block { Time } Call { From To Signature { Name SignatureHash } GasUsed Success } Transaction { Hash } } }} * * * Stream by function name or selector[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-by-function-name-or-selector "Direct link to Stream by function name or selector") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **Method-level feeds:** filter by decoded function name to receive one method across **every** contract — for example, every ERC-20 `transfer` call on the chain. subscription { EVM(network: robinhood) { Calls( where: { Call: { Signature: { Name: { is: "transfer" } } } } ) { Block { Time } Call { From To Signature { Name SignatureHash } } Arguments { Name Type Value { ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} To pin one exact ABI variant — or to match an **undecoded** method — filter the 4-byte selector instead (uppercase hex, no `0x`): subscription { EVM(network: robinhood) { Calls( where: { Call: { Signature: { SignatureHash: { is: "70A08231" } } } } ) { Block { Time } Call { To Signature { Name SignatureHash } } } }} * * * Stream contract deployments[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-contract-deployments "Direct link to Stream contract deployments") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ▶️ [Run in IDE](https://ide.bitquery.io/new-contracts-deployed-robinhood-chain) **New-contract radar:** `Call: { Create: true }` matches every `CREATE`/`CREATE2` frame — top-level and factory-internal. On these rows **`Call.To` is the newly deployed contract address** and `Call.From` is the deployer (`Receipt.ContractAddress` is populated only for top-level deployment transactions). subscription { EVM(network: robinhood) { Calls( where: { Call: { Create: true } } ) { Block { Time } Call { From To Create Success } Transaction { Hash From } } }} * * * Stream reverted calls[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-reverted-calls "Direct link to Stream reverted calls") --------------------------------------------------------------------------------------------------------------------------------------------------------------- **Error monitoring:** every failed call with its revert reason — watch your own contracts for breakage, or the whole chain for failing bots and exploits in progress. `Call.Error` carries the message (commonly `execution reverted`). subscription { EVM(network: robinhood) { Calls( where: { Call: { Reverted: true } } ) { Block { Time } Call { From To Error Reverted Success Signature { Name } } Transaction { Hash } } }} Scope it with a `Call.To` filter to alert only on your own deployments. * * * Internal ETH value transfers[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#internal-eth-value-transfers "Direct link to Internal ETH value transfers") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **Value tracing:** calls that move native ETH (`Call.Value > 0`) — including internal transfers that never appear as top-level transaction values. The [Transfers cube](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) models the same movements with USD enrichment; use Calls when you want them inside their execution context. subscription { EVM(network: robinhood) { Calls( where: { Call: { Value: { gt: "0" } } } ) { Block { Time } Call { From To Value ValueInUSD Signature { Name } } Transaction { Hash } } }} * * * Calls from a wallet[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#calls-from-a-wallet "Direct link to Calls from a wallet") --------------------------------------------------------------------------------------------------------------------------------------------------------- Everything one address executes — as transaction sender or as an internal caller (routers and bots show up here with their full fan-out). Swap in any address; rows appear only while it is active. subscription { EVM(network: robinhood) { Calls( where: { Call: { From: { is: "0xcaf681a66d020601342297493863e78c959e5cb2" } } } ) { Block { Time } Call { To Value Signature { Name } } Transaction { Hash } } }} * * * Full call tree of a transaction[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#full-call-tree-of-a-transaction "Direct link to Full call tree of a transaction") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **The `debug_traceTransaction` replacement:** every call frame of one transaction, ordered by `Call_Index`, with `CallerIndex`/`CallPath` to rebuild the tree and decoded arguments per frame. { EVM(network: robinhood, dataset: archive) { Calls( orderBy: { ascending: Call_Index } where: { Transaction: { Hash: { is: "0x816be7f8f359f85066599fcd2585cbf7c3b544590315afc5298dc7e538b3678b" } } } ) { Call { Index CallerIndex CallPath From To Delegated Create Success GasUsed Value Signature { Name } } } }} * * * Top called contracts[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-called-contracts "Direct link to Top called contracts") ------------------------------------------------------------------------------------------------------------------------------------------------------------ **Discovery:** the most-invoked contracts over a window, with how many distinct methods each serves. { EVM(network: robinhood) { Calls( limit: { count: 10 } orderBy: { descendingByField: "calls" } where: { Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Call { To } calls: count signatures: count(distinct: Call_Signature_SignatureHash) } }} * * * Top function signatures[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-function-signatures "Direct link to Top function signatures") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- Which methods dominate the chain — grouped by signature with counts. Rows with an empty `Name` are undecoded selectors. { EVM(network: robinhood) { Calls(limit: { count: 15 }, orderBy: { descendingByField: "count" }) { Call { Signature { Name SignatureHash } } count } }} * * * Top gas-burning contracts[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-gas-burning-contracts "Direct link to Top gas-burning contracts") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **Gas analytics:** rank contracts by total gas consumed over a window — where the chain's compute actually goes. { EVM(network: robinhood) { Calls( limit: { count: 10 } orderBy: { descendingByField: "gas" } where: { Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Call { To } gas: sum(of: Call_GasUsed) calls: count } }} * * * Call volume in a time window[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#call-volume-in-a-time-window "Direct link to Call volume in a time window") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ One-row stats for dashboards: total calls, distinct callers, distinct called contracts. Use `dataset: combined` when the window must be complete regardless of realtime depth. { EVM(network: robinhood, dataset: combined) { Calls(where: { Block: { Time: { since_relative: { hours_ago: 1 } } } }) { count callers: count(distinct: Call_From) contracts: count(distinct: Call_To) } }} * * * Use-case patterns[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#use-case-patterns "Direct link to Use-case patterns") --------------------------------------------------------------------------------------------------------------------------------------------------- | Goal | Approach | | --- | --- | | Trace explorer / tx debugger | [Per-transaction call tree](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#full-call-tree-of-a-transaction)
with `Index`/`CallerIndex`/`CallPath` | | New-contract & token-factory radar | [`Create: true` stream](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-contract-deployments)
— `Call.To` is the deployed address | | Contract error alerting | [`Reverted: true`](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-reverted-calls)
scoped to your `Call.To` | | Method-level analytics | [Name / selector streams](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-by-function-name-or-selector)
; counts via [top signatures](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-function-signatures) | | Internal ETH flow tracing | [`Value > 0` calls](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#internal-eth-value-transfers)
, or [Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/)
for USD-priced movements | | Bot / router monitoring | [`Call.From` stream](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#calls-from-a-wallet)
for the full execution fan-out | | Chain ops dashboards | [Top called contracts](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-called-contracts)
, [gas burners](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-gas-burning-contracts)
, [window stats](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#call-volume-in-a-time-window) | | Event-side view of the same activity | [Robinhood Events API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) | * * * Tips[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#tips "Direct link to Tips") ------------------------------------------------------------------------------------------------------------ 1. **Filter production streams.** The calls firehose outweighs every other cube — per-contract, per-selector, deployments-only, and reverts-only sockets are cheap. 2. For calls, `SignatureHash` is the **4-byte selector, uppercase hex, no `0x`** (events use the full 32-byte topic hash instead). 3. `Create: true` rows put the **deployed contract in `Call.To`**; `Receipt.ContractAddress` fills only for top-level deployment transactions. 4. Function names collide across ABIs and undecoded methods have empty names — pin exact behavior with the selector filter. 5. Every executed call appears, including contract-to-contract `balanceOf`\-style reads — filter by name/selector to cut that noise from analytics. 6. Rebuild trace trees client-side from `Index`, `CallerIndex`, and `CallPath`; `InternalCalls` tells you how many children a frame has. 7. Realtime depth varies — measure with the [window probe](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#check-the-calls-window) ; use `combined` for fixed windows. Archive retains up to roughly the last 3 months of calls; for older or bulk data, ask about [exports](https://bitquery.io/forms/api) . 8. Decoded `Arguments` are the function **inputs**; for emitted results, join the same transaction on the [Events API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) . * * * FAQ[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#faq "Direct link to FAQ") --------------------------------------------------------------------------------------------------------- ### Can I trace Robinhood transactions without a tracing node?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#can-i-trace-robinhood-transactions-without-a-tracing-node "Direct link to Can I trace Robinhood transactions without a tracing node?") Yes — filter `EVM.Calls` by `Transaction.Hash` and order by `Call_Index` to get every internal call frame with decoded inputs, gas, and revert state: a `debug_traceTransaction` replacement served over GraphQL. Stream the same cube for live traces. ### How do I detect new contract deployments in real time?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#how-do-i-detect-new-contract-deployments-in-real-time "Direct link to How do I detect new contract deployments in real time?") Subscribe with `Call: { Create: true }`. Each row's `Call.To` is the freshly deployed contract address and `Call.From` its deployer — factory-internal deployments included. See [Stream contract deployments](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-contract-deployments) . ### How do I monitor failed or reverted calls?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#how-do-i-monitor-failed-or-reverted-calls "Direct link to How do I monitor failed or reverted calls?") Subscribe with `Call: { Reverted: true }` (optionally scoped by `Call.To` to your contracts) and read `Call.Error` for the revert reason. See [Stream reverted calls](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-reverted-calls) . ### How do I filter by a 4-byte function selector?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#how-do-i-filter-by-a-4-byte-function-selector "Direct link to How do I filter by a 4-byte function selector?") Use `Call.Signature.SignatureHash` with the selector as uppercase hex without `0x` — e.g. `A9059CBB` for `transfer(address,uint256)`. This also matches methods whose ABI is unknown (empty `Name`). ### How far back does Robinhood calls data go?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#how-far-back-does-robinhood-calls-data-go "Direct link to How far back does Robinhood calls data go?") `archive` retains up to roughly the last 3 months of calls (on a newer chain like Robinhood that is currently its complete history), and `realtime` holds a rolling recent window — measure either with the [window probe](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#check-the-calls-window) . For older or bulk history, Bitquery can provide data exports on request. ### Which cube should I use — Calls, Events, or Transfers?[​](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#which-cube-should-i-use--calls-events-or-transfers "Direct link to Which cube should I use — Calls, Events, or Transfers?") `Calls` is execution: who invoked what, with inputs, gas, and reverts. [`Events`](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) is what contracts emitted. [`Transfers`](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) is pre-modeled asset movement with USD enrichment. See [Transfers vs Events vs Calls](https://docs.bitquery.io/docs/start/mental-model-transfers-events-calls/) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Why stream calls instead of tracing a node](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#why-stream-calls-instead-of-tracing-a-node) * [Datasets and history](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#datasets-and-history) * [Check the calls window](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#check-the-calls-window) * [What one call row contains](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#what-one-call-row-contains) * [Stream all calls (firehose)](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-all-calls-firehose) * [Stream calls to one contract](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-calls-to-one-contract) * [Stream by function name or selector](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-by-function-name-or-selector) * [Stream contract deployments](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-contract-deployments) * [Stream reverted calls](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#stream-reverted-calls) * [Internal ETH value transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#internal-eth-value-transfers) * [Calls from a wallet](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#calls-from-a-wallet) * [Full call tree of a transaction](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#full-call-tree-of-a-transaction) * [Top called contracts](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-called-contracts) * [Top function signatures](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-function-signatures) * [Top gas-burning contracts](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#top-gas-burning-contracts) * [Call volume in a time window](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#call-volume-in-a-time-window) * [Use-case patterns](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#use-case-patterns) * [Tips](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#tips) * [FAQ](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#faq) * [Can I trace Robinhood transactions without a tracing node?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#can-i-trace-robinhood-transactions-without-a-tracing-node) * [How do I detect new contract deployments in real time?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#how-do-i-detect-new-contract-deployments-in-real-time) * [How do I monitor failed or reverted calls?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#how-do-i-monitor-failed-or-reverted-calls) * [How do I filter by a 4-byte function selector?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#how-do-i-filter-by-a-4-byte-function-selector) * [How far back does Robinhood calls data go?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#how-far-back-does-robinhood-calls-data-go) * [Which cube should I use — Calls, Events, or Transfers?](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/#which-cube-should-i-use--calls-events-or-transfers) --- # trench.today API on Robinhood | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD **trench.today** is a meme-coin launchpad on the **Robinhood** network, one of the most active token factories on the chain. This guide shows how to track **newly launched trench.today tokens**, **bonding-curve buys and sells**, and **live curve reserves** with Bitquery GraphQL APIs, using the `EVM(network: robinhood)` Events cube. API Key Required To query or stream data outside the Bitquery IDE, you need an API access token. Follow the steps here: [How to generate Bitquery API token ➤](https://docs.bitquery.io/docs/authorization/how-to-generate/) Related docs * [Robinhood Chain API overview](https://docs.bitquery.io/docs/blockchain/robinhood/) — every Robinhood Chain API, launchpad guide and stream in one place * [Robinhood Trades API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-trades/) * [Robinhood Meme Coin Launches API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/) * [Flap.sh API on Robinhood](https://docs.bitquery.io/docs/blockchain/robinhood/flap-sh-api/) — another Robinhood launchpad * [Pons Launchpad API on Robinhood Chain](https://docs.bitquery.io/docs/blockchain/robinhood/pons-api/) * [Robinhood Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) * [WebSocket subscriptions](https://docs.bitquery.io/docs/subscriptions/websockets/) * * * trench.today contracts[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#trenchtoday-contracts "Direct link to trench.today contracts") -------------------------------------------------------------------------------------------------------------------------------------------------------------- All trench.today protocol events are emitted through a single factory proxy, which makes filtering simple: pin every query to one `LogHeader.Address`. | Role | Address | Emits | | --- | --- | --- | | **Factory / curve engine** (EIP-1967 proxy) | `0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d` | `TokenCreate`, `TokenPurchase`, `TokenSale`, `Sync` | | **Implementation** (behind the proxy) | `0x5d15bdd2a834c66149c38c5ae19c5f4b60cbc397` | Shown as `Log.SmartContract` in decoded events | Decoded event names exist on the realtime dataset only On `dataset: realtime` (the default) the four events carry decoded names and `Arguments`, and every query on this page works as written. On `dataset: archive` and `dataset: combined` the same rows are stored **undecoded**, so a `Log.Signature.Name` filter returns **zero rows** there, silently. For history, filter by topic0 instead and decode the payload client-side: | Event | topic0 (`Log.Signature.SignatureHash`) | | --- | --- | | `TokenCreate` | `e2eb7016a2fc7f0aec441cc8bc9a7ecd75d29d94478782bab1cfa9c5b0dbdf1b` | | `TokenPurchase` | `b284604a447841f5b5ee1495033bc7db1ab2f84c2624a7b7a3e9f014f32e8e7b` | | `TokenSale` | `fe41490121bfbd4555a4f9aabe1e789de1641611b7edd2a0dc1c594f684ba193` | | `Sync` | `27efe2fec96cb0ff68b9206e3dca402a919bb7172e2f2d12d49b633df3eabc4f` | { EVM(network: robinhood, dataset: archive) { Events( limit: {count: 10} orderBy: {descending: Block_Time} where: { LogHeader: {Address: {is: "0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d"}} Log: {Signature: {SignatureHash: {is: "e2eb7016a2fc7f0aec441cc8bc9a7ecd75d29d94478782bab1cfa9c5b0dbdf1b"}}} } ) { Block { Time } Transaction { Hash } LogHeader { Address Data } Log { Signature { SignatureHash } } } }} The four events cover the full bonding-curve lifecycle: | Event | Meaning | Key arguments | | --- | --- | --- | | `TokenCreate` | New token launched | `creator`, `curve`, `token`, `quote`, `name`, `symbol`, `timestamp`, `tokenURI` | | `TokenPurchase` | Buy on the curve | `token`, `buyer`, `amountOut`, `quoteAmountUsed`, `protocolFee`, `extraFee`, `extraFeeReceiver`, `extraFeeRate` | | `TokenSale` | Sell on the curve | `token`, `seller`, `amountIn`, `netQuoteOut`, `protocolFee`, `extraFee`, `extraFeeReceiver` | | `Sync` | Post-trade curve reserves | `token`, `realQuoteReserves`, `realTokenReserves`, `virtualQuote`, `virtualToken` | Amounts are raw on-chain integers Event argument values (`amountOut`, `quoteAmountUsed`, reserves, fees) are the raw on-chain integers — divide by `1e18` for whole-token / native amounts. The `quote` argument of `TokenCreate` is the zero address, meaning the curve quotes in the chain's native token. * * * Newly launched tokens[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#newly-launched-tokens "Direct link to Newly launched tokens") ------------------------------------------------------------------------------------------------------------------------------------------------------------ Every launch emits a decoded **`TokenCreate`** event with the creator, the new token address, its bonding `curve` contract, and full metadata (`name`, `symbol`, `tokenURI`). ▶️ [Run in IDE](https://ide.bitquery.io/trench-today-newly-created-tokens) · [WebSocket stream](https://ide.bitquery.io/trench-today-newly-created-tokens-stream) { EVM(network: robinhood) { Events( limit: {count: 20} orderBy: {descending: Block_Time} where: { LogHeader: {Address: {is: "0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d"}} Log: {Signature: {Name: {is: "TokenCreate"}}} } ) { Block { Time Number } Transaction { Hash From } Log { Signature { Name } SmartContract } Arguments { Name Value { ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} Stream the same query Change the operation type from a query to a `subscription` in the Bitquery IDE (and drop `limit`/`orderBy`) to receive every new trench.today launch in real time over WebSocket. * * * Token buys (`TokenPurchase`)[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#token-buys-tokenpurchase "Direct link to token-buys-tokenpurchase") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Each buy on the bonding curve emits `TokenPurchase` with the `buyer`, tokens received (`amountOut`), native spent (`quoteAmountUsed`), and the protocol fee. ▶️ [Run in IDE](https://ide.bitquery.io/trench-today-token-purchases) { EVM(network: robinhood) { Events( limit: {count: 20} orderBy: {descending: Block_Time} where: { LogHeader: {Address: {is: "0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d"}} Log: {Signature: {Name: {is: "TokenPurchase"}}} } ) { Block { Time } Transaction { Hash From } Arguments { Name Value { ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} Token sells (`TokenSale`)[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#token-sells-tokensale "Direct link to token-sells-tokensale") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Sells mirror buys: `amountIn` is the tokens sold, `netQuoteOut` the native returned to the `seller` after fees. ▶️ [Run in IDE](https://ide.bitquery.io/trench-today-token-sales) { EVM(network: robinhood) { Events( limit: {count: 20} orderBy: {descending: Block_Time} where: { LogHeader: {Address: {is: "0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d"}} Log: {Signature: {Name: {is: "TokenSale"}}} } ) { Block { Time } Transaction { Hash From } Arguments { Name Value { ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} Live trades stream (buys + sells)[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#live-trades-stream-buys--sells "Direct link to Live trades stream (buys + sells)") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Subscribe to both trade events in one WebSocket stream — the backbone of a trench.today trading bot or live feed. ▶️ [Run in IDE](https://ide.bitquery.io/trench-today-live-trades-stream) subscription { EVM(network: robinhood) { Events( where: { LogHeader: {Address: {is: "0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d"}} Log: {Signature: {Name: {in: ["TokenPurchase", "TokenSale"]}}} } ) { Block { Time } Transaction { Hash From } Log { Signature { Name } } Arguments { Name Value { ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} `Log.Signature.Name` tells you whether each message is a buy (`TokenPurchase`) or a sell (`TokenSale`). * * * Bonding-curve reserves (`Sync`)[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#bonding-curve-reserves-sync "Direct link to bonding-curve-reserves-sync") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- After every trade the curve emits `Sync` with its current state: `realQuoteReserves` / `realTokenReserves` (actual balances) and `virtualQuote` / `virtualToken` (the constant-product virtual reserves). The instantaneous curve price is `virtualQuote / virtualToken`, and real reserves show how far a token has progressed along its curve. ▶️ [Run in IDE](https://ide.bitquery.io/trench-today-bonding-curve-sync) { EVM(network: robinhood) { Events( limit: {count: 20} orderBy: {descending: Block_Time} where: { LogHeader: {Address: {is: "0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d"}} Log: {Signature: {Name: {is: "Sync"}}} } ) { Block { Time } Arguments { Name Value { ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} * * * All events for a single token[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#all-events-for-a-single-token "Direct link to All events for a single token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Every trench.today event carries a `token` argument, so one `Arguments.includes` filter follows a token through its whole lifecycle — creation, every buy and sell, and each reserve update. Replace the address with the token you're tracking. ▶️ [Run in IDE](https://ide.bitquery.io/trench-today-all-events-for-a-token) { EVM(network: robinhood) { Events( limit: {count: 50} orderBy: {descending: Block_Time} where: { LogHeader: {Address: {is: "0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d"}} Arguments: { includes: { Name: {is: "token"} Value: {Address: {is: "0xe6052a3eb17590ceac6652bc751065224749cccc"}} } } } ) { Block { Time } Transaction { Hash From } Log { Signature { Name } } Arguments { Name Value { ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} * * * FAQ[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#faq "Direct link to FAQ") ------------------------------------------------------------------------------------------------------ ### How do I detect a newly launched trench.today token?[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#how-do-i-detect-a-newly-launched-trenchtoday-token "Direct link to How do I detect a newly launched trench.today token?") Filter events by `Log.Signature.Name: "TokenCreate"` on the factory address `0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d`. The decoded arguments include the `token` address, its `creator`, the bonding `curve` contract, and metadata (`name`, `symbol`, `tokenURI`). Run it as a `subscription` for real-time launch alerts. ### How do I get trench.today trades?[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#how-do-i-get-trenchtoday-trades "Direct link to How do I get trench.today trades?") Query the same factory address for `TokenPurchase` (buys) and `TokenSale` (sells), or subscribe to both at once with `Name: {in: ["TokenPurchase", "TokenSale"]}`. Amounts are raw integers — divide by `1e18`. ### How do I compute a token's bonding-curve price?[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#how-do-i-compute-a-tokens-bonding-curve-price "Direct link to How do I compute a token's bonding-curve price?") Use the `Sync` event: the curve price in native terms is `virtualQuote / virtualToken`. `Sync` fires after every trade, so streaming it gives you a live price and reserve feed per token. ### Why is there one contract address instead of separate factory and curve contracts?[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#why-is-there-one-contract-address-instead-of-separate-factory-and-curve-contracts "Direct link to Why is there one contract address instead of separate factory and curve contracts?") trench.today runs everything through a single EIP-1967 proxy (`0x77dc…f9d`). Each token still gets its own `curve` contract (reported in `TokenCreate`), but events are emitted by the proxy, so a single `LogHeader.Address` filter captures the entire protocol. Decoded events report the implementation `0x5d15…397` as `Log.SmartContract`. ### Can I use the Trading cube for trench.today trades?[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#can-i-use-the-trading-cube-for-trenchtoday-trades "Direct link to Can I use the Trading cube for trench.today trades?") Bonding-curve trades live in the `EVM` Events cube queries shown on this page. Once a token migrates to a DEX pool, its trading appears under Uniswap markets on Robinhood — follow it with the [Robinhood Trades API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-trades/) . * * * Next steps[​](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#next-steps "Direct link to Next steps") --------------------------------------------------------------------------------------------------------------------------- * Stream **`TokenCreate`** for real-time launch alerts, then follow each token with the [all-events-for-a-token query](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#all-events-for-a-single-token) . * Track other Robinhood launchpads with the [Robinhood Meme Coin Launches API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-meme-coin-launches/) . * Explore prices, OHLCV, whale trades, and top traders in the [Robinhood Trades API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-trades/) . * Inspect holder and wallet flows with [Robinhood Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [trench.today contracts](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#trenchtoday-contracts) * [Newly launched tokens](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#newly-launched-tokens) * [Token buys (`TokenPurchase`)](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#token-buys-tokenpurchase) * [Token sells (`TokenSale`)](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#token-sells-tokensale) * [Live trades stream (buys + sells)](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#live-trades-stream-buys--sells) * [Bonding-curve reserves (`Sync`)](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#bonding-curve-reserves-sync) * [All events for a single token](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#all-events-for-a-single-token) * [FAQ](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#faq) * [How do I detect a newly launched trench.today token?](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#how-do-i-detect-a-newly-launched-trenchtoday-token) * [How do I get trench.today trades?](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#how-do-i-get-trenchtoday-trades) * [How do I compute a token's bonding-curve price?](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#how-do-i-compute-a-tokens-bonding-curve-price) * [Why is there one contract address instead of separate factory and curve contracts?](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#why-is-there-one-contract-address-instead-of-separate-factory-and-curve-contracts) * [Can I use the Trading cube for trench.today trades?](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#can-i-use-the-trading-cube-for-trenchtoday-trades) * [Next steps](https://docs.bitquery.io/docs/blockchain/robinhood/trench-today-api/#next-steps) --- # BSC Miner Balance Tracker: Block Producer Rewards on BNB Chain [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD BNB Chain has never had miners. Blocks are produced by a fixed set of validators under the Parlia consensus, so the two mining codes in the balance schema, 1 for an uncle reward and 2 for a block reward, never appear in BNB Chain data. A filter on them returns nothing, and the last query on this page shows that. What a block producer earns instead is the gas paid by the transactions in its block, and the `TransactionBalances` cube shows that income in two places: as a code 5 credit for each transaction, and as one deposit per block into the ValidatorSet contract. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account; the cube covers the recent realtime window only. How block producer income shows up[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#how-block-producer-income-shows-up "Direct link to How block producer income shows up") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. While a block executes, each transaction's fee is credited to the fee holder `0xfffffffffffffffffffffffffffffffffffffffe` with reason code 5. 2. At the end of the block, the validator sends the collected total to the ValidatorSet system contract `0x0000000000000000000000000000000000001000`. `Transaction.From` on that deposit is the validator and `Transaction.Value` is the block's income. 3. Validators withdraw their share from the contract later; those withdrawals are ordinary transfers. Fee income per block[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#fee-income-per-block "Direct link to Fee income per block") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- One row per block, newest first. Saved query [here](https://ide.bitquery.io/Track-Block-Mining-Rewards-bsc) . { EVM(network: bsc) { TransactionBalances( limit: { count: 20 } limitBy: { by: Transaction_Hash, count: 1 } orderBy: { descending: Block_Number } where: { TokenBalance: { Address: { is: "0x0000000000000000000000000000000000001000" } Currency: { Native: true } } Transaction: { Value: { gt: "0" } } Block: { Time: { since_relative: { minutes_ago: 10 } } } } ) { Block { Number Time } Transaction { Hash From Value } } }} The deposit rows do not stream well as a subscription on BNB Chain because the filter has to scan every balance row on the network; poll this query, or stream the code 5 credits below, which are keyed by the fee holder and arrive at once. Blocks produced per validator[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#blocks-produced-per-validator "Direct link to Blocks produced per validator") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Group the deposits by the validator address; `uniq` on the transaction hash counts blocks. Saved query [here](https://ide.bitquery.io/Historical-Miner-Balance-Data-bsc) . { EVM(network: bsc) { TransactionBalances( limit: { count: 50 } orderBy: { descendingByField: "blocks" } where: { TokenBalance: { Address: { is: "0x0000000000000000000000000000000000001000" } Currency: { Native: true } } Transaction: { Value: { gt: "0" } } Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Transaction { From } blocks: uniq(of: Transaction_Hash) } }} Income of one validator[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#income-of-one-validator "Direct link to Income of one validator") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add the validator to `Transaction.From`. The example is one of the validators with the most blocks; take any address from the query above. Validators rotate, so a quiet hour is normal for a single address and the window here is a day. Saved query [here](https://ide.bitquery.io/Filter-by-Miner-Address-bsc) . { EVM(network: bsc) { TransactionBalances( limit: { count: 20 } limitBy: { by: Transaction_Hash, count: 1 } orderBy: { descending: Block_Number } where: { TokenBalance: { Address: { is: "0x0000000000000000000000000000000000001000" } Currency: { Native: true } } Transaction: { Value: { gt: "0" } From: { is: "0x9bb56c2b4dbe5a06d79911c9899b6f817696acfc" } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Block { Number Time } Transaction { Hash Value } } }} Fee credits per transaction[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#fee-credits-per-transaction "Direct link to Fee credits per transaction") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The per-transaction view is reason code 5 on the fee holder. The [BSC MEV balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/) streams these with the tip computed per row and ranks the largest. Saved stream [here](https://ide.bitquery.io/Track-Transaction-Fee-Rewards-bsc) . subscription { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Number Time } TokenBalance { Address PreBalance PostBalance } Transaction { Hash From } } }} Why the mining codes return nothing[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#why-the-mining-codes-return-nothing "Direct link to Why the mining codes return nothing") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Codes 1 and 2 exist in the schema because the same cube serves chains with a proof-of-work past. On BNB Chain the count is zero in any window. Saved query [here](https://ide.bitquery.io/Track-Uncle-Block-Rewards-bsc) . { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [1, 2] } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { count } }} Frequently Asked Questions -------------------------- Does BNB Chain have mining rewards? No. BNB Chain has used validators under the Parlia consensus since launch. Reason codes 1 and 2 never appear in its balance data; block producers earn transaction fees, visible as code 5 credits and as per-block deposits into the ValidatorSet contract. How do I get a validator's earnings per block? Query TransactionBalances rows on 0x0000000000000000000000000000000000001000 with Transaction.Value above zero and limitBy on the transaction hash. Transaction.From is the validator and Value is the block's fee income. How far back does this data go? The cube holds the recent realtime window and has no archive dataset. Stream the deposits and store them to keep a longer record. Where do I see validator withdrawals and staking? The BSC validator balance tracker covers the staking side. This page is about the fee income that a block producer collects. Related pages[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- * [BSC MEV balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/) * [BSC validator balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/) * [BSC transaction balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/) * [Balance change reason codes](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/#balance-change-reason-codes) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [How block producer income shows up](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#how-block-producer-income-shows-up) * [Fee income per block](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#fee-income-per-block) * [Blocks produced per validator](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#blocks-produced-per-validator) * [Income of one validator](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#income-of-one-validator) * [Fee credits per transaction](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#fee-credits-per-transaction) * [Why the mining codes return nothing](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#why-the-mining-codes-return-nothing) * [Related pages](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/#related-pages) --- # Base Network Coins API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD `BalanceUpdates` sunsets 10 August 2026 Queries on this page that use **`BalanceUpdates`** will stop working on **10 August 2026**. Migrate to the **`Balances`** and **`Holders`** cubes, which return the current balance directly instead of summing deltas. See the [migration mapping](https://docs.bitquery.io/docs/cubes/balances-cube/#migrating-from-balanceupdates) for the query-by-query translation. In the recent times, base network has seen rise of many Memecoins and token based ecosystems. In this guide, we will see some queries that could provide beneficial information about these coins, for people to take informed investment decisions. Latest Coins Created on Base[​](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#latest-coins-created-on-base "Direct link to Latest Coins Created on Base") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Latest-Coin-on-Base-Coin_3) query returns the details of all the tokens and Memecoins created on the Base Network for a particular day. query LatestCoins { EVM(network: base) { Calls( where: { Call: { Create: true } Arguments: { length: { ne: 0 } } Receipt: { ContractAddress: { not: "0x0000000000000000000000000000000000000000" } } } orderBy: { descending: Block_Time } ) { Arguments { Name Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } } } Transaction { Hash } Receipt { ContractAddress } Block { Time } } }} The `Receipt{ ContractAddress }` field returns the contract address of the newly created token or Memecoin. Analysis of AERO Coin[​](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#analysis-of-aero-coin "Direct link to Analysis of AERO Coin") ----------------------------------------------------------------------------------------------------------------------------------------------------- In this section, we have a list of queries that returns data that affects investment decisions. For this part, we have chosen AERO token as the token is currently trending and have high trade volume. ### Latest DEX Trades with AERO coin[​](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#latest-dex-trades-with-aero-coin "Direct link to Latest DEX Trades with AERO coin") [This](https://ide.bitquery.io/Subscription-for-Latest-Trades-for-AERO_1) subscription returns the information on latest trades involving AERO coins like `timestamp`, `PriceInUSD`, `buyer`, `seller` and details about `side currency`, where `0x940181a94A35A4569E4529A3CDfB74e38FD98631` is the smart contract address of AERO Coin. subscription { EVM(network: base) { DEXTradeByTokens( where: { Trade: { Currency: { SmartContract: { is: "0x940181a94A35A4569E4529A3CDfB74e38FD98631" } } AmountInUSD: { gt: "0" } Success: true } } ) { Block { Time } Trade { AmountInUSD Buyer Currency { Name Symbol SmartContract } PriceInUSD Seller Side { Currency { Name Symbol SmartContract } } Dex { ProtocolFamily ProtocolName } } Transaction { Hash } } }} ### Top Ten Holders of AERO Coin[​](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#top-ten-holders-of-aero-coin "Direct link to Top Ten Holders of AERO Coin") Using the following [query](https://ide.bitquery.io/Top-Holders-for-Aero-Token) we can get the list of Top 10 token holders for AERO Coins, where `0x940181a94A35A4569E4529A3CDfB74e38FD98631` is the contract address of the AERO coin. query MyQuery { EVM(network: base) { BalanceUpdates( where: { Currency: { SmartContract: { is: "0x940181a94A35A4569E4529A3CDfB74e38FD98631" } } } orderBy: { descendingByField: "balance" } limit: { count: 10 } ) { BalanceUpdate { Address } balance: sum(of: BalanceUpdate_AmountInUSD, selectWhere: { ne: "0" }) Currency { Name Symbol SmartContract } } }} ### OHLC Data for AERO/USDC Pair[​](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#ohlc-data-for-aerousdc-pair "Direct link to OHLC Data for AERO/USDC Pair") [This](https://ide.bitquery.io/OHLC-of-AERO-Coin_1) query returns the OHLC parameters and `volume` for the AERO/USDC trade pair for a one hour window. { EVM(network: base, dataset: combined) { DEXTradeByTokens( orderBy: { descendingByField: "Block_testfield" } where: { Trade: { Currency: { SmartContract: { is: "0x940181a94A35A4569E4529A3CDfB74e38FD98631" } } Side: { Currency: { SmartContract: { is: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" } } Type: { is: buy } } PriceAsymmetry: { lt: 0.1 } } } limit: { count: 10 } ) { Block { testfield: Time(interval: { in: hours, count: 1 }) } volume: sum(of: Trade_Amount) Trade { high: Price(maximum: Trade_Price) low: Price(minimum: Trade_Price) open: Price(minimum: Block_Number) close: Price(maximum: Block_Number) } count } }} ### Total Supply of AERO Coin[​](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#total-supply-of-aero-coin "Direct link to Total Supply of AERO Coin") [This](https://ide.bitquery.io/Total-supply-of-a-AERO-on-Base) query returns the total supply of a token, which is an important parameter to consider from the investment perspective. Also, it is an important parameter for Market Cap calculation. query MyQuery { EVM(network: base, dataset: combined) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x940181a94A35A4569E4529A3CDfB74e38FD98631" } } Success: true } } ) { minted: sum( of: Transfer_Amount if: { Transfer: { Sender: { is: "0x0000000000000000000000000000000000000000" } } } ) burned: sum( of: Transfer_Amount if: { Transfer: { Receiver: { is: "0x0000000000000000000000000000000000000000" } } } ) } }} You can checkout more queries related to tokens and token trades [here](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/token-trades-apis/#ohlc-in-usd-of-a-token) . Video Tutorial to Get Latest Memecoins on Base[​](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#video-tutorial-to-get-latest-memecoins-on-base "Direct link to Video Tutorial to Get Latest Memecoins on Base") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest Coins Created on Base](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#latest-coins-created-on-base) * [Analysis of AERO Coin](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#analysis-of-aero-coin) * [Latest DEX Trades with AERO coin](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#latest-dex-trades-with-aero-coin) * [Top Ten Holders of AERO Coin](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#top-ten-holders-of-aero-coin) * [OHLC Data for AERO/USDC Pair](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#ohlc-data-for-aerousdc-pair) * [Total Supply of AERO Coin](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#total-supply-of-aero-coin) * [Video Tutorial to Get Latest Memecoins on Base](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/#video-tutorial-to-get-latest-memecoins-on-base) --- # debug_traceCall with Bitquery: Trace Internal Calls Without a Node [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD `debug_traceCall` is the JSON-RPC method that executes a call against a block's state and returns the trace: every internal call with its sender, target, input, output, gas and value. It needs an archive node with the debug API enabled, and it traces one call you construct. The Bitquery `Calls` cube holds the same trace fields for every call that ran on chain, top-level and internal, already decoded, so you filter instead of simulating: all calls into a contract, calls from one sender, calls that carried ETH, one method by name. It does not simulate a hypothetical call; it returns what executed. Every query runs in the [IDE](https://ide.bitquery.io/) on a free account, on Ethereum and, by changing `network`, on the other EVM chains. Calls into a contract[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#calls-into-a-contract "Direct link to Calls into a contract") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Every call whose target is the USDC contract in the last ten minutes, with the fields a trace returns. `Depth` separates top-level calls (0) from internal ones, `Success` flags reverts, and `Signature.Name` is the decoded method. The time bound keeps the scan small; widen it, or add `dataset: archive` for history. { EVM(network: eth) { Calls( where: { Call: { To: { is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } } Block: { Time: { since_relative: { minutes_ago: 10 } } } } limit: { count: 10 } orderBy: { descending: Block_Time } ) { ChainId Block { Time } Call { From To Input Output Gas GasUsed Value Create Success Depth Signature { Name } } Transaction { Hash } } }} `Gas` is the gas available to the call and `GasUsed` what it consumed, both in gas units; `Value` is in wei. The saved IDE version of this query is [here](https://ide.bitquery.io/debug_traceCall) . Calls from a known sender[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#calls-from-a-known-sender "Direct link to Calls from a known sender") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add `From` to the filter. This ranks the addresses that called USDC most in the last hour, which is the quickest way to find an active sender to trace; then put that address in `From: { is: "..." }` with the selection above. Saved variant [here](https://ide.bitquery.io/debug_traceCall_1) . { EVM(network: eth) { Calls( where: { Call: { To: { is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } } Block: { Time: { since_relative: { hours_ago: 1 } } } } limit: { count: 3 } orderBy: { descendingByField: "n" } ) { Call { From } n: count } }} Calls that carried value[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#calls-that-carried-value "Direct link to Calls that carried value") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `Value` takes `eq`, `ne`, `gt`, `ge`, `lt` and `le`, where the RPC method only matches a fixed value. Calls into WETH with value above zero are deposits, most of them internal calls made by routers on a user's behalf. Saved variant [here](https://ide.bitquery.io/debug_traceCall_2) . { EVM(network: eth) { Calls( where: { Call: { To: { is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" }, Value: { gt: "0" } } Block: { Time: { since_relative: { hours_ago: 1 } } } } limit: { count: 5 } orderBy: { descending: Block_Time } ) { Block { Time } Call { From To Value Depth Signature { Name } } Transaction { Hash } } }} What the RPC method has that this does not, and the reverse[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#what-the-rpc-method-has-that-this-does-not-and-the-reverse "Direct link to What the RPC method has that this does not, and the reverse") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `debug_traceCall` simulates a call you have not sent, against any block state. Bitquery only returns calls that executed. In return you get filters across every transaction at once, decoded method names and arguments, `dataset: archive` for history, and a subscription form that streams new calls into a contract as they happen. For a full transaction's trace, filter `Transaction: { Hash: { is: "..." } }` and read the calls in `Call.Index` order. Frequently Asked Questions -------------------------- Can Bitquery replace debug\_traceCall? For tracing what executed on chain, yes: the Calls cube has from, to, input, output, gas, gas used, value, create and success for every top-level and internal call, plus decoded method names. It does not simulate a call that was never sent. How do I get all internal calls of one transaction? Filter the Calls cube on Transaction.Hash and sort by Call.Index; Depth tells you the nesting level and Success whether a call reverted. How do I get internal calls on BSC, Base or Polygon? Change the network name in EVM(network: ...). The Calls cube has the same fields on every EVM chain Bitquery indexes. Can I stream calls into a contract in real time? Yes. Change query to subscription, keep the Call.To filter and drop limit and orderBy; each new call into the contract arrives as it is indexed. Why does my Calls query time out? An unbounded scan over a busy contract is large. Add a time window with since\_relative, keep a limit, and add dataset: archive only when you need history. Related pages[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------------------- * [EVM calls schema](https://docs.bitquery.io/docs/schema/evm/calls/) * [Robinhood Calls and traces API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/) * [eth\_blockNumber with Bitquery](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/) * [Ethereum API hub](https://docs.bitquery.io/docs/blockchain/Ethereum/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Calls into a contract](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#calls-into-a-contract) * [Calls from a known sender](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#calls-from-a-known-sender) * [Calls that carried value](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#calls-that-carried-value) * [What the RPC method has that this does not, and the reverse](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#what-the-rpc-method-has-that-this-does-not-and-the-reverse) * [Related pages](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/#related-pages) --- # Ethereum Self-Destruct Balance Tracker | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Ethereum Self-Destruct Balance Tracker API provides real-time balance updates for contracts that self-destruct and addresses that receive funds from self-destructed contracts. This API helps you monitor contract destruction events, track ephemeral contracts (like MEV bots), and analyze security incidents. What is Self-Destruct?[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#what-is-self-destruct "Direct link to What is Self-Destruct?") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `selfdestruct` opcode allows a smart contract to permanently remove its bytecode from the blockchain and send its remaining ETH balance to a specified recipient address. Once a contract self-destructs, it can no longer execute code or receive transactions. ### Common Use Cases[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#common-use-cases "Direct link to Common Use Cases") * **MEV Builder Payments**: Ephemeral contracts created to pay MEV builders/block builders (e.g., `quasarbuilder.eth`) as part of the Proposer-Builder Separation (PBS) infrastructure, then immediately self-destructed * **Ephemeral MEV/Arbitrage Executors**: Contracts created and destroyed within the same transaction to execute atomic profit extraction * **Security Incidents**: Malicious actors destroying contracts * **Emergency Shutdowns**: Contract owners destroying contracts to reclaim funds or retire functionality * **Upgrade Patterns**: Destroying old contract versions during upgrades * **Paymasters/Relayers**: Short-lived helper contracts that clean up after sponsoring gas Balance Change Reason Codes[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#balance-change-reason-codes "Direct link to Balance Change Reason Codes") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The API tracks self-destruct events using specific balance change reason codes: * **Code 12**: `BalanceIncreaseSelfdestruct` - Balance added to the recipient as indicated by a self-destructing account * **Code 13**: `BalanceDecreaseSelfdestruct` - Balance deducted from a contract due to self-destruct * **Code 14**: `BalanceDecreaseSelfdestructBurn` - ETH sent to an already self-destructed account within the same transaction Track All Self-Destruct Event Balances[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-all-self-destruct-event-balances "Direct link to Track All Self-Destruct Event Balances") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor all contract self-destruct event balances in real-time using this GraphQL subscription. [Run Stream](https://ide.bitquery.io/All-Self-Destruct-Event-Balances-Stream) You can also run this as a query by replacing the word `subscription` with `query` subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [12, 13, 14] } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Track Contract Self-Destruct Balance Decrease[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-contract-self-destruct-balance-decrease "Direct link to Track Contract Self-Destruct Balance Decrease") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor contract balance decrease when contracts are self-destructing. [Run Query](https://ide.bitquery.io/Self-Destruct-Balance-Decrease-API) { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 13 } } } limit: { count: 10 } orderBy: { descending: Block_Time } ) { Block { Time Number } TokenBalance { Currency { Symbol SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Track Recipients of Self-Destructed Fund Balances[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-recipients-of-self-destructed-fund-balances "Direct link to Track Recipients of Self-Destructed Fund Balances") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor contract balance increase when contracts are self-destructing. [Run query](https://ide.bitquery.io/Self-Destruct-Balance-Increase-API) { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 12 } } } limit: { count: 10 } orderBy: { descending: Block_Time } ) { Block { Time Number } TokenBalance { Currency { Symbol SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Track Self-Destruct Balance Changes for Specific Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-self-destruct-balance-changes-for-specific-address "Direct link to Track Self-Destruct Balance Changes for Specific Address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor self-destruct balance changes for a specific contract address using this GraphQL query: Try the API [here](https://ide.bitquery.io/Track-Self-Destruct-Balance-Changes-for-Specific-Address) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { Address: { is: "0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4" } BalanceChangeReasonCode: { in: [12, 13, 14] } } } ) { Block { Time Number } TokenBalance { Currency { Symbol SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Track Large Self-Destruct Transaction Balances[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-large-self-destruct-transaction-balances "Direct link to Track Large Self-Destruct Transaction Balances") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor significant self-destruct balance changes (e.g., > $1000 USD) using this subscription: Try the API [here](https://ide.bitquery.io/Track-Large-Self-Destruct-Transaction-Balances) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [12, 13] } PostBalanceInUSD: { gt: "1000" } } } ) { Block { Time Number } TokenBalance { Currency { Symbol SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Track Ephemeral MEV Contract Balance Changes[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-ephemeral-mev-contract-balance-changes "Direct link to Track Ephemeral MEV Contract Balance Changes") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor balance changes for short-lived contracts that are created and destroyed in the same transaction (typical pattern for MEV bots) using this subscription: Try the API [here](https://ide.bitquery.io/Track-Ephemeral-MEV-Contract-Balance-Changes) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 13 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash From To } } }} Aggregate Self-Destruct Statistics[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#aggregate-self-destruct-statistics "Direct link to Aggregate Self-Destruct Statistics") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Calculate total ETH destroyed or received from self-destructs using aggregation functions: Try the API [here](https://ide.bitquery.io/Aggregate-Self-Destruct-Statistics) . { EVM(dataset: realtime, network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [12, 13] } } } ) { TokenBalance { Currency { Symbol SmartContract } } totalDestroyed: sum(of: TokenBalance_PostBalance) destructCount: count } }} Self-Destruct Usecase Examples[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#self-destruct-usecase-examples "Direct link to Self-Destruct Usecase Examples") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 1\. MEV Builder Payment (Ephemeral Executor)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#1-mev-builder-payment-ephemeral-executor "Direct link to 1. MEV Builder Payment (Ephemeral Executor)") A common pattern in the MEV ecosystem involves **ephemeral contracts** that are created to pay MEV builders/block builders, then immediately self-destruct. This pattern is part of the **Proposer-Builder Separation (PBS)** infrastructure. Contrack Flow: Deploy → Transfer to MEV builder → Self-destruct **What's happening:** 1. A searcher/bundler deploys a temporary helper contract 2. The contract holds the exact ETH amount owed as a fee/bribe to the MEV builder 3. The contract transfers ETH to the builder 4. The contract immediately self-destructs, cleaning up and leaving minimal trace **Why this pattern:** * **Ephemeral by design** - avoids leaving identifiable payment trails per bundle * **Safety** - one-use contract prevents reuse or exploitation * **Gas efficiency** - minimal runtime deployment is cheaper than maintaining reusable state * **Privacy** - prevents tracking of bundle logic across blocks **API Subscription: Track payments to known MEV builders:** Try the API [here](https://ide.bitquery.io/Track-payments-to-known-MEV-builders) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 12 } Address: { in: [ "0x396343362be2A4dA1cE0C1C210945346fb82Aa49" # Add other known MEV builder addresses ] } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash From To } } }} ### 3\. Ephemeral MEV/Arbitrage Contracts[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#3-ephemeral-mevarbitrage-contracts "Direct link to 3. Ephemeral MEV/Arbitrage Contracts") Many MEV bots and arbitrage executors create contracts that are destroyed within the same transaction. These short-lived contracts are used for: * Atomic multi-swap execution * Flash loan arbitrage * Obfuscation of execution patterns * Cleanup of bytecode footprint **API Query: Track recent ephemeral contract patterns:** Try the API [here](https://ide.bitquery.io/Track-recent-ephemeral-contract-patterns_1) . { EVM(dataset: realtime, network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 13 } } } limit: { count: 100 } orderBy: { descendingByField: "Block_Time" } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash From To } } }} API Use Cases[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#api-use-cases "Direct link to API Use Cases") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Security Monitoring - Track Malicious Self-Destructs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#security-monitoring---track-malicious-self-destructs "Direct link to Security Monitoring - Track Malicious Self-Destructs") Track self-destruct events to identify potential security incidents or malicious contract destruction: Try the API [here](https://ide.bitquery.io/Track-Malicious-Self-Destructs) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 13 } PostBalanceInUSD: { gt: "10000" } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash From } } }} Notes[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#notes "Direct link to Notes") ------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Balance Change Reason Codes 12, 13, and 14** are only available for native currency (ETH) transactions, not for fungible tokens or NFTs * Code 12 indicates funds **received** from a self-destructed contract * Code 13 indicates funds **destroyed** from a self-destructing contract * Code 14 indicates ETH sent to an already self-destructed account within the same transaction * Self-destructed contracts cannot be recovered or interacted with after destruction * The `PreBalance` field shows the balance before the self-destruct, and `PostBalance` shows the balance after (typically 0 for the destroyed contract) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [What is Self-Destruct?](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#what-is-self-destruct) * [Common Use Cases](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#common-use-cases) * [Balance Change Reason Codes](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#balance-change-reason-codes) * [Track All Self-Destruct Event Balances](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-all-self-destruct-event-balances) * [Track Contract Self-Destruct Balance Decrease](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-contract-self-destruct-balance-decrease) * [Track Recipients of Self-Destructed Fund Balances](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-recipients-of-self-destructed-fund-balances) * [Track Self-Destruct Balance Changes for Specific Address](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-self-destruct-balance-changes-for-specific-address) * [Track Large Self-Destruct Transaction Balances](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-large-self-destruct-transaction-balances) * [Track Ephemeral MEV Contract Balance Changes](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#track-ephemeral-mev-contract-balance-changes) * [Aggregate Self-Destruct Statistics](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#aggregate-self-destruct-statistics) * [Self-Destruct Usecase Examples](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#self-destruct-usecase-examples) * [1\. MEV Builder Payment (Ephemeral Executor)](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#1-mev-builder-payment-ephemeral-executor) * [3\. Ephemeral MEV/Arbitrage Contracts](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#3-ephemeral-mevarbitrage-contracts) * [API Use Cases](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#api-use-cases) * [Security Monitoring - Track Malicious Self-Destructs](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#security-monitoring---track-malicious-self-destructs) * [Notes](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/#notes) --- # Base Token Market Cap API: Market Cap, FDV and Supply for Tokens on Base [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Base tokens trade against ETH and USDC on Aerodrome, Uniswap and the launchpads, and the `Tokens` cube of the Trading API turns those trades into candles that carry price, USD volume, circulating and total supply, market cap and fully diluted valuation, refreshed every block. Address a token by id, `bid:base:` plus its lowercase contract, and the chain by `Token.Network: "Base"`. The cube keeps about a month of candles; the [Base transaction balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/) gives total supply at any recent transaction if supply alone is enough. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account; the worked tokens are AERO, `0x940181a94a35a4569e4529a3cdfb74e38fd98631`, and cbBTC, `0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf`. Market cap of one token now[​](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#market-cap-of-one-token-now "Direct link to Market cap of one token now") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Exact id, one candle size, a short window, newest row first. The window matters: without it the query scans the whole cube and times out. Saved query [here](https://ide.bitquery.io/specific-base-token-latest-marketcap) . { Trading { Tokens( limit: { count: 1 } orderBy: { descending: Block_Time } where: { Token: { Id: { is: "bid:base:0x940181a94a35a4569e4529a3cdfb74e38fd98631" } } Interval: { Time: { Duration: { eq: 60 } } } Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Block { Time } Token { Name Symbol Address Network } Price { Ohlc { Close } Average { Mean } } Supply { CirculatingSupply TotalSupply MarketCap FullyDilutedValuationUsd } Volume { Usd } } }} For AERO the market cap and the FDV differ by about half, because only part of the supply is in circulation; for cbBTC they are equal, since every minted coin circulates. A watchlist in one query[​](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#a-watchlist-in-one-query "Direct link to A watchlist in one query") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ List the ids and keep the newest row per token with `limitBy`. The example is AERO, cbBTC and WETH on Base. { Trading { Tokens( limitBy: { by: Token_Id, count: 1 } orderBy: { descending: Block_Time } where: { Token: { Id: { in: [ "bid:base:0x940181a94a35a4569e4529a3cdfb74e38fd98631" "bid:base:0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf" "bid:base:0x4200000000000000000000000000000000000006" ] } } Interval: { Time: { Duration: { eq: 60 } } } Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Block { Time } Token { Symbol Id } Price { Ohlc { Close } } Supply { MarketCap FullyDilutedValuationUsd CirculatingSupply TotalSupply } Volume { Usd } } }} A day of hourly market cap[​](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#a-day-of-hourly-market-cap "Direct link to A day of hourly market cap") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ One-hour candles hold the market cap at each close with the hour's open, close and USD volume; the difference between the first and last row is the 24-hour change. Saved query [here](https://ide.bitquery.io/top-base-tokens-by-Market-Cap-Change-1h) . { Trading { Tokens( limit: { count: 24 } orderBy: { descending: Block_Time } where: { Token: { Id: { is: "bid:base:0x940181a94a35a4569e4529a3cdfb74e38fd98631" } } Interval: { Time: { Duration: { eq: 3600 } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Interval { Time { Start } } Price { Ohlc { Open Close } } Supply { MarketCap } Volume { Usd } } }} Stream every Base token's market cap[​](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#stream-every-base-tokens-market-cap "Direct link to Stream every Base token's market cap") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Filter on the chain prefix in `Currency.Id` and subscribe; each message is a candle closing for some Base token. `Duration` above one second leaves out the tick-level candles. Saved stream [here](https://ide.bitquery.io/base-token-marketcap-stream) . subscription { Trading { Tokens( where: { Currency: { Id: { includes: "base" } } Interval: { Time: { Duration: { gt: 1 } } } } ) { Block { Time } Token { Symbol Id } Interval { Time { Duration } } Price { Ohlc { Close } } Supply { MarketCap FullyDilutedValuationUsd TotalSupply } Volume { Usd } } }} Alert on tokens above a market cap[​](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#alert-on-tokens-above-a-market-cap "Direct link to Alert on tokens above a market cap") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ A `Supply.MarketCap` bound on the stream turns it into a screener for launches that crossed a size. Saved stream [here](https://ide.bitquery.io/realtime-stream-base-tokens-with-marketcap-above-1-million) . subscription { Trading { Tokens( where: { Token: { Network: { is: "Base" } } Interval: { Time: { Duration: { gt: 1 } } } Supply: { MarketCap: { gt: 1000000 } } } ) { Block { Time } Token { Symbol Id } Supply { MarketCap TotalSupply } Price { Ohlc { Close } } } }} Why rankings need bounds[​](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#why-rankings-need-bounds "Direct link to Why rankings need bounds") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Market cap here is on-chain supply times an on-chain price, and Base has thousands of launchpad tokens with enormous supplies and a few dollars of trades in one thin pool. A raw "top tokens by market cap" over the cube is led by them. Rank inside a list you trust, as the watchlist query does, or bound the ranking with `Volume: { Usd: { gt: ... } }` and `Supply: { MarketCap: { lt: ... } }`; the saved [top tokens by market cap](https://ide.bitquery.io/Top-Tokens-by-Market-Cap-on-Base) query shows the bounded form. Frequently Asked Questions -------------------------- How do I get the market cap of a token on Base? Query Trading.Tokens with Token.Id set to bid:base: plus the lowercase contract, a candle duration, a short time window and limit 1 ordered by Block\_Time descending. Supply.MarketCap and FullyDilutedValuationUsd are on the row. Why do market cap and FDV differ? Market cap uses circulating supply and FDV uses total supply, both times the same trade-weighted price. For tokens with locked or unvested supply, such as AERO, FDV is much larger. Why does a query on the token id time out? A partial or case-insensitive match has to scan every token. Use the exact bid:base: id with is, one candle duration and a time window. How far back does the Tokens cube go on Base? About a month of candles. For older supply values use the transaction balance tracker, which records total supply on every token row. Can I get the same data for other chains? Yes. The id prefix changes: bid:eth:, bid:bsc:, bid:arbitrum:, bid:matic:, bid:solana:. Each chain has its own market cap page with that chain's examples. Related pages[​](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#related-pages "Direct link to Related pages") --------------------------------------------------------------------------------------------------------------------------------------- * [BSC token market cap API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/) * [Ethereum token market cap API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/ethereum-token-marketcap-api/) * [Tokens cube](https://docs.bitquery.io/docs/trading/crypto-price-api/tokens/) * [Supply fields](https://docs.bitquery.io/docs/trading/crypto-price-api/supply-fields/) * [Base transaction balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Market cap of one token now](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#market-cap-of-one-token-now) * [A watchlist in one query](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#a-watchlist-in-one-query) * [A day of hourly market cap](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#a-day-of-hourly-market-cap) * [Stream every Base token's market cap](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#stream-every-base-tokens-market-cap) * [Alert on tokens above a market cap](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#alert-on-tokens-above-a-market-cap) * [Why rankings need bounds](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#why-rankings-need-bounds) * [Related pages](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/#related-pages) --- # BNB Chain Gra Fun API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Need real-time GRA.fun data or anything from the last ~30 days? For **real-time + last ~30 days**, use the [**Trading cube**](https://docs.bitquery.io/docs/trading/trading-data-overview/) — [`Trading.Trades`](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) gives you clean, MEV-filtered GRA.fun swaps with **USD price, market cap, and supply on every row** across **9 chains in one API**. Use this page when you need **historical GRA.fun data older than ~30 days**, raw per-swap detail, or call / event context. In this section we'll have a look at some examples using the BSC Transfers API. New Token Created[​](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#new-token-created "Direct link to New Token Created") ------------------------------------------------------------------------------------------------------------------------------------- Retrieve newly created tokens on the gra.fun platform using [query below](https://ide.bitquery.io/grafun-new-token-created-api) . { EVM(network: bsc) { Events( where: {Transaction: {To: {is: "0x8341b19a2a602eae0f22633b6da12e1b016e6451"}}, Call: {Signature: {Name: {is: "createPool"}}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Block { Number Time } Transaction { Hash To From } Log { Index Signature { Name } } Log { Signature { Name } } Arguments { Name Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Integer_Value_Arg { integer } } } Call { Signature { Name } From To } } }} GRA fun All Transfers/Trades[​](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-all-transferstrades "Direct link to GRA fun All Transfers/Trades") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- Retrieve all transfer and trade events related to the GRA fun using [this query](https://ide.bitquery.io/gra-fun-all-transfers) . { EVM(network: bsc) { Transfers( orderBy: {descending: Block_Time} limit: {count: 10} where: {Transaction: {To: {is: "0x8341b19a2a602eae0f22633b6da12e1b016e6451"}}} ) { Transaction { Hash From To } Call { Signature { Signature Name SignatureHash } } Transfer { Amount AmountInUSD Currency { Name Symbol SmartContract } Receiver Sender } } }} GRA fun Redeem Transactions[​](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-redeem-transactions "Direct link to GRA fun Redeem Transactions") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Retrieve all redeemed transactions using [this query](https://ide.bitquery.io/Gra-fun-redeem-transactions) . { EVM(network: bsc) { Events( orderBy: {descending: Block_Time} limit: {count: 100} where: {Transaction: {To: {is: "0x8341b19a2a602eae0f22633b6da12e1b016e6451"}}, Call: {Signature: {SignatureHash: {is: "1e9a6950"}}}} ) { Transaction { Hash From To } Call { CallPath CallerIndex Create Delegated Error From Gas GasUsed Index InternalCalls Reverted SelfDestruct Signature { Name SignatureHash } Success To Value } Log { Signature { Name Signature SignatureHash } } Arguments { Name Index Value { __typename ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} GRA fun Buy Transactions[​](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-buy-transactions "Direct link to GRA fun Buy Transactions") ---------------------------------------------------------------------------------------------------------------------------------------------------------- Retrieve all buy transactions from GRA.fun using [this query](https://ide.bitquery.io/Gra-fun-buy-transactions) . { EVM(network: bsc) { Events( orderBy: {descending: Block_Time} limit: {count: 100} where: {Transaction: {To: {is: "0x8341b19a2a602eae0f22633b6da12e1b016e6451"}}, Call: {Signature: {SignatureHash: {is: "db61c76e"}}}} ) { Transaction { Hash From To } Call { CallPath CallerIndex Create Delegated Error From Gas GasUsed Index InternalCalls Reverted SelfDestruct Signature { Name SignatureHash } Success To Value } Log { Signature { Name Signature SignatureHash } } Arguments { Name Index Value { __typename ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} GRA fun Sell Transactions[​](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-sell-transactions "Direct link to GRA fun Sell Transactions") ------------------------------------------------------------------------------------------------------------------------------------------------------------- Retrieve all sell transactions on GRA fun using [this query](https://ide.bitquery.io/Gra-fun-sell-transactions) . { EVM(network: bsc) { Events( orderBy: {descending: Block_Time} limit: {count: 100} where: {Transaction: {To: {is: "0x8341b19a2a602eae0f22633b6da12e1b016e6451"}}, Call: {Signature: {SignatureHash: {is: "2dc8f867"}}}} ) { Transaction { Hash From To } Call { CallPath CallerIndex Create Delegated Error From Gas GasUsed Index InternalCalls Reverted SelfDestruct Signature { Name SignatureHash } Success To Value } Log { Signature { Name Signature SignatureHash } } Arguments { Name Index Value { __typename ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} GRA fun Transaction Details[​](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-transaction-details "Direct link to GRA fun Transaction Details") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Retrieve detailed information about a specific transaction using [this query](https://ide.bitquery.io/gra-fun-detailed-transfer-of-a-transaction) . You can check Sender and Receiver of Transfers to understand what bought and sold. { EVM(network: bsc, dataset: combined) { Transfers( orderBy: {descending: Block_Time} limit: {count: 10} where: {Transaction: {Hash: {is: "0xcf6b5a0789dacbf9fadffe0c00d208b5df39fadfef21302fe382cf6f6b433d3c"}}} ) { Transaction { Hash From To } Call { Signature { Signature Name SignatureHash } } Transfer { Amount AmountInUSD Currency { Name Symbol SmartContract } Receiver Sender } } }} To get all transfers of on GRA.fun, please check [this query](https://ide.bitquery.io/gra-fun-all-transfers) . Trades of a token on pancake v3[​](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#trades-of-a-token-on-pancake-v3 "Direct link to Trades of a token on pancake v3") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Use this API to get Pancake V3 APIs using [this api](https://ide.bitquery.io/Trades-of-token-on-pancake-v3) { EVM(dataset: archive, network: bsc) { DEXTrades( orderBy: {descending: Block_Time} limit: {count: 100} where: {Block: {Date: {since: "2024-08-01"}}, any: [{Trade: {Buy: {Currency: {SmartContract: {is: "0xcac007926755e2675e201223f7d4d68c74fd3439"}}}}}, {Trade: {Sell: {Currency: {SmartContract: {is: "0xcac007926755e2675e201223f7d4d68c74fd3439"}}}}}]} ) { Trade { Dex { SmartContract ProtocolName ProtocolVersion } Buy { Amount AmountInUSD Buyer Currency { Name Symbol SmartContract } Seller Price PriceInUSD } Sell { Amount AmountInUSD Buyer Currency { Name Symbol SmartContract } Seller Price PriceInUSD } } } }} First trade of a token on pancake v3[​](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#first-trade-of-a-token-on-pancake-v3 "Direct link to First trade of a token on pancake v3") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get 1st trade of token on Pancake v3 using [this api](https://ide.bitquery.io/Trades-of-token-on-pancake-v3_5) . { EVM(dataset: combined, network: bsc) { DEXTrades( orderBy: [{ascending: Block_Time}{ascending:Transaction_Index}] limit: {count: 1} where: {Block: {Date: {since: "2024-07-01"}}, any: [{Trade: {Buy: {Currency: {SmartContract: {is: "0xcac007926755e2675e201223f7d4d68c74fd3439"}}}}}, {Trade: {Sell: {Currency: {SmartContract: {is: "0xcac007926755e2675e201223f7d4d68c74fd3439"}}}}}]} ) { Trade { Dex { SmartContract ProtocolName ProtocolVersion } Buy { Amount AmountInUSD Buyer Currency { Name Symbol SmartContract } Seller Price PriceInUSD } Sell { Amount AmountInUSD Buyer Currency { Name Symbol SmartContract } Seller Price PriceInUSD } } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [New Token Created](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#new-token-created) * [GRA fun All Transfers/Trades](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-all-transferstrades) * [GRA fun Redeem Transactions](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-redeem-transactions) * [GRA fun Buy Transactions](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-buy-transactions) * [GRA fun Sell Transactions](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-sell-transactions) * [GRA fun Transaction Details](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#gra-fun-transaction-details) * [Trades of a token on pancake v3](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#trades-of-a-token-on-pancake-v3) * [First trade of a token on pancake v3](https://docs.bitquery.io/docs/blockchain/BSC/gra-fun-api/#first-trade-of-a-token-on-pancake-v3) --- # Base API Documentation | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Building a trading app or DEX UI on Base? For **real-time trades and prices on Base** (and the last ~30 days), use the curated [**Trading cube**](https://docs.bitquery.io/docs/trading/trading-data-overview/) — [`Trading.Trades`](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) gives you clean, MEV-filtered swaps with **USD price, market cap, and supply on every row** across **9 chains in one API**. For **historical Base data older than ~30 days**, use the chain-level `DEXTrades` / `DEXTradeByTokens` APIs documented below. Overview[​](https://docs.bitquery.io/docs/blockchain/Base/#overview "Direct link to Overview") ----------------------------------------------------------------------------------------------- In this section we will see how to fetch data on tokens, transactions, DEXs like Aerodrome and Uniswap, liquidity pools, and slippage data on Base via APIs and Streams. If you need help getting data on Base, reach out to [support](https://t.me/Bloxy_info) . ### What is Base API?[​](https://docs.bitquery.io/docs/blockchain/Base/#what-is-base-api "Direct link to What is Base API?") Bitquery Base APIs help you fetch onchain data like trades, transactions, balances, token holders, liquidity pools, and slippage data etc using graphQL query. ### What are capabilities of Bitquery Base API?[​](https://docs.bitquery.io/docs/blockchain/Base/#what-are-capabilities-of-bitquery-base-api "Direct link to What are capabilities of Bitquery Base API?") Bitquery Base APIs are very flexible; you can fetch trade, transaction, balance, liquidity, and slippage information for a period, for a specific wallet, and join with other information. ### Difference between Base RPC and Bitquery Base API?[​](https://docs.bitquery.io/docs/blockchain/Base/#difference-between-base-rpc-and-bitquery-base-api "Direct link to Difference between Base RPC and Bitquery Base API?") | Base RPC | Bitquery Base API | | --- | --- | | JSON-RPC endpoint exposing raw EVM on-chain state and transactions | GraphQL endpoint over pre-indexed, parsed Base chain data (token transfers, DEX trades, logs, calls, etc.) | | No built-in history or analytics—any indexing/aggregation you build or outsource | Historical data, joins, aggregations & real-time subscriptions | | Ideal for submitting transactions | Great for real-time data and historical backtesting without running your own indexer | ### Does Bitquery support Base Websocket and Webhooks?[​](https://docs.bitquery.io/docs/blockchain/Base/#does-bitquery-support-base-websocket-and-webhooks "Direct link to Does Bitquery support Base Websocket and Webhooks?") Bitquery supports websocket and webhooks; you can convert most GraphQL APIs into GraphQL streams by changing the word `query` to `subscription`. You can monitor this data via a websocket. More docs and code samples are available [here](https://docs.bitquery.io/docs/subscriptions/websockets/) . Quick start[​](https://docs.bitquery.io/docs/blockchain/Base/#quick-start "Direct link to Quick start") -------------------------------------------------------------------------------------------------------- Run this minimal GraphQL query to fetch the latest 5 DEX trades on Base: query LatestBaseTrades { EVM(network: base) { DEXTrades(limit: { count: 5 }, orderBy: { descending: Block_Time }) { Block { Time } Trade { Dex { ProtocolName } Buy { AmountInUSD Currency { Symbol } } Sell { AmountInUSD Currency { Symbol } } } Transaction { Hash } } }} DEX and Protocol APIs[​](https://docs.bitquery.io/docs/blockchain/Base/#dex-and-protocol-apis "Direct link to DEX and Protocol APIs") -------------------------------------------------------------------------------------------------------------------------------------- * [Aerodrome API](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/) * [Uniswap v3 on Base API](https://docs.bitquery.io/docs/blockchain/Base/base-uniswap-api/) * [Base Dex Trades](https://docs.bitquery.io/docs/blockchain/Base/base-dextrades/) * [ApeStore API](https://docs.bitquery.io/docs/blockchain/Base/apestore-base-api/) * [Clanker API](https://docs.bitquery.io/docs/blockchain/Base/base-clanker-api/) · [DEXrabbit Clanker tokens](https://dexrabbit.bitquery.io/categories/clanker-ecosystem) * [Jump (Base) API](https://docs.bitquery.io/docs/blockchain/Base/base-jump-base-api/) Base Slippage API[​](https://docs.bitquery.io/docs/blockchain/Base/#base-slippage-api "Direct link to Base Slippage API") -------------------------------------------------------------------------------------------------------------------------- * [Base Slippage API](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/) Get slippage and price impact data for Base DEX pools. Understand price impact and liquidity depth for token swaps, calculate maximum input amounts at different slippage tolerances, and monitor real-time slippage data across all DEX pools on Base. Base Liquidity API[​](https://docs.bitquery.io/docs/blockchain/Base/#base-liquidity-api "Direct link to Base Liquidity API") ----------------------------------------------------------------------------------------------------------------------------- * [Base Liquidity API](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/) Monitor real-time liquidity changes, track pool reserves, and analyze liquidity depth for token pairs on Base DEX pools. Track when liquidity is added or removed, monitor pool health and depth, and analyze liquidity patterns across different pools. Tokens, Transfers, Balances[​](https://docs.bitquery.io/docs/blockchain/Base/#tokens-transfers-balances "Direct link to Tokens, Transfers, Balances") ------------------------------------------------------------------------------------------------------------------------------------------------------ * [Base Coins API](https://docs.bitquery.io/docs/blockchain/Base/base-coins-api/) * [Base Transfers](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/) * [Base Address Balance API](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/) NFTs[​](https://docs.bitquery.io/docs/blockchain/Base/#nfts "Direct link to NFTs") ----------------------------------------------------------------------------------- * [Base NFT](https://docs.bitquery.io/docs/blockchain/Base/base-nft/) * [Zora on Base API](https://docs.bitquery.io/docs/blockchain/Base/base-zora-api/) AI Agent[​](https://docs.bitquery.io/docs/blockchain/Base/#ai-agent "Direct link to AI Agent") ----------------------------------------------------------------------------------------------- * [Building an AI Trading Agent on Base](https://docs.bitquery.io/docs/blockchain/Base/ai-agent-base-data/) Videos[​](https://docs.bitquery.io/docs/blockchain/Base/#videos "Direct link to Videos") ----------------------------------------------------------------------------------------- ### Video Tutorial | Aerodrome: Latest Trades & Most Purchased Tokens[​](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--aerodrome-latest-trades--most-purchased-tokens "Direct link to Video Tutorial | Aerodrome: Latest Trades & Most Purchased Tokens") ### Video Tutorial | Aerodrome: Latest Liquidity Pools & Pool Liquidity[​](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--aerodrome-latest-liquidity-pools--pool-liquidity "Direct link to Video Tutorial | Aerodrome: Latest Liquidity Pools & Pool Liquidity") ### Video Tutorial | Base DEX Trades API[​](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--base-dex-trades-api "Direct link to Video Tutorial | Base DEX Trades API") ### Video Tutorial | Base Transfers in Realtime[​](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--base-transfers-in-realtime "Direct link to Video Tutorial | Base Transfers in Realtime") ### Video Tutorial | Latest Memecoins on Base[​](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--latest-memecoins-on-base "Direct link to Video Tutorial | Latest Memecoins on Base") Browse live Base memecoin DEX prices on [DEXrabbit's Base Meme Coins category](https://dexrabbit.bitquery.io/categories/base-meme-coins) . ### Video Tutorial | Base Balance Updates[​](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--base-balance-updates "Direct link to Video Tutorial | Base Balance Updates") ### Video Tutorial | Build AI Trading Agent on Base[​](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--build-ai-trading-agent-on-base "Direct link to Video Tutorial | Build AI Trading Agent on Base") Frequently Asked Questions -------------------------- What Base chain APIs are available? DEX trades, transfers, NFTs, Aerodrome, Uniswap, Zora, Clanker, and other Base-native protocols. How do I get Aerodrome or Base DEX trades? Query EVM.DEXTrades with network base and filter by protocol name — see the Aerodrome and base-dextrades docs. Is Base data near real-time? Yes. Trades and blocks are indexed as Base produces them. Use subscriptions for live apps. More guides[​](https://docs.bitquery.io/docs/blockchain/Base/#more-guides "Direct link to More guides") -------------------------------------------------------------------------------------------------------- * [Data Coverage & Retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) — how far back this chain's data goes * [Common errors and what to do](https://docs.bitquery.io/docs/start/errors/) * [Plans, Points & Limits](https://docs.bitquery.io/docs/plans/how-billing-works/) * [First query in 5 minutes](https://docs.bitquery.io/docs/start/first-query/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Overview](https://docs.bitquery.io/docs/blockchain/Base/#overview) * [What is Base API?](https://docs.bitquery.io/docs/blockchain/Base/#what-is-base-api) * [What are capabilities of Bitquery Base API?](https://docs.bitquery.io/docs/blockchain/Base/#what-are-capabilities-of-bitquery-base-api) * [Difference between Base RPC and Bitquery Base API?](https://docs.bitquery.io/docs/blockchain/Base/#difference-between-base-rpc-and-bitquery-base-api) * [Does Bitquery support Base Websocket and Webhooks?](https://docs.bitquery.io/docs/blockchain/Base/#does-bitquery-support-base-websocket-and-webhooks) * [Quick start](https://docs.bitquery.io/docs/blockchain/Base/#quick-start) * [DEX and Protocol APIs](https://docs.bitquery.io/docs/blockchain/Base/#dex-and-protocol-apis) * [Base Slippage API](https://docs.bitquery.io/docs/blockchain/Base/#base-slippage-api) * [Base Liquidity API](https://docs.bitquery.io/docs/blockchain/Base/#base-liquidity-api) * [Tokens, Transfers, Balances](https://docs.bitquery.io/docs/blockchain/Base/#tokens-transfers-balances) * [NFTs](https://docs.bitquery.io/docs/blockchain/Base/#nfts) * [AI Agent](https://docs.bitquery.io/docs/blockchain/Base/#ai-agent) * [Videos](https://docs.bitquery.io/docs/blockchain/Base/#videos) * [Video Tutorial | Aerodrome: Latest Trades & Most Purchased Tokens](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--aerodrome-latest-trades--most-purchased-tokens) * [Video Tutorial | Aerodrome: Latest Liquidity Pools & Pool Liquidity](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--aerodrome-latest-liquidity-pools--pool-liquidity) * [Video Tutorial | Base DEX Trades API](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--base-dex-trades-api) * [Video Tutorial | Base Transfers in Realtime](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--base-transfers-in-realtime) * [Video Tutorial | Latest Memecoins on Base](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--latest-memecoins-on-base) * [Video Tutorial | Base Balance Updates](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--base-balance-updates) * [Video Tutorial | Build AI Trading Agent on Base](https://docs.bitquery.io/docs/blockchain/Base/#video-tutorial--build-ai-trading-agent-on-base) * [More guides](https://docs.bitquery.io/docs/blockchain/Base/#more-guides) --- # BSC Transaction Balance Tracker: Balances Before and After a Transaction [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The `TransactionBalances` cube records, for each transaction on BNB Chain, every address whose balance changed and the balance before and after, in BNB, BEP-20 tokens and NFTs. A wallet tracker, a fee monitor and a pool reserve feed all come from the same rows. Native rows carry a reason code that says why the balance moved: 10 for a transfer, 6 and 7 for gas bought and returned, 5 for the fee credited to the block producer, 12 and 13 for self-destructs, 0 when no specific reason applies. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The cube covers the recent realtime window only, so queries carry a `limit` and, for wide filters, a time window. Stream one address[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#stream-one-address "Direct link to Stream one address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- BNB Chain produces so many balance rows that a stream over the whole network, one token or a broad reason code does not deliver in practice; filter on an address, or use the reason code 5 stream on the [MEV balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/) , which is keyed to one address. The example is a busy exchange wallet, so rows arrive within seconds; a quiet wallet streams only when it transacts. Saved stream [here](https://ide.bitquery.io/Subscribe-to-Transaction-Balances-for-a-Specific-Address-bsc) . subscription { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { Address: { is: "0x238a358808379702088667322f80ac48bad5e6c4" } } } ) { Block { Number Time } TokenBalance { BalanceChangeReasonCode PreBalance PostBalance PostBalanceInUSD Currency { Symbol SmartContract Native } } Transaction { Hash From To } } }} Latest BNB balance of an address[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#latest-bnb-balance-of-an-address "Direct link to Latest BNB balance of an address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The newest native row for the address; `PostBalance` is the balance after that transaction. Saved query [here](https://ide.bitquery.io/latest-native-balance-of-an-address-bsc) . { EVM(network: bsc) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0x238a358808379702088667322f80ac48bad5e6c4" } Currency: { Native: true } } } ) { Block { Time } TokenBalance { PostBalance PostBalanceInUSD BalanceChangeReasonCode } Transaction { Hash } } }} Latest balance of an address in one token[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#latest-balance-of-an-address-in-one-token "Direct link to Latest balance of an address in one token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The same query with the token contract in place of the native flag. The example is USDT on BNB Chain, `0x55d398326f99059fF775485246999027B3197955`. Saved query [here](https://ide.bitquery.io/latest-balance-of-an-address-for-a-specific-token-bsc) . { EVM(network: bsc) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0x238a358808379702088667322f80ac48bad5e6c4" } Currency: { SmartContract: { is: "0x55d398326f99059fF775485246999027B3197955" } } } } ) { Block { Time } TokenBalance { PostBalance PostBalanceInUSD Currency { Symbol Name } } Transaction { Hash } } }} An address that has not moved the token inside the realtime window has no row here; use the [Balances cube](https://docs.bitquery.io/docs/cubes/balances-cube/) for a balance that does not depend on recent activity. Latest reserves of a pool[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#latest-reserves-of-a-pool "Direct link to Latest reserves of a pool") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- A pool is an address like any other, so its token balances are its reserves. `limitBy` on the token contract keeps the newest row per token, and the time window keeps the query fast on a busy pool. The example is the PancakeSwap v3 WBNB/USDT pool. Saved query [here](https://ide.bitquery.io/latest-liquidity-of-a-bsc-pool) . { EVM(network: bsc) { TransactionBalances( limit: { count: 2 } limitBy: { by: TokenBalance_Currency_SmartContract, count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0x36696169C63e42cd08ce11f5deeBbCeBae652050" } } Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Block { Time } TokenBalance { Currency { Symbol SmartContract } PostBalance PostBalanceInUSD } } }} Latest supply and market cap of a token[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#latest-supply-and-market-cap-of-a-token "Direct link to Latest supply and market cap of a token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Token rows carry `TotalSupply` and `TotalSupplyInUSD` as of that transaction, so the newest row for a token gives its supply and on-chain market cap. The example is CAKE. Saved query [here](https://ide.bitquery.io/Total-Supply-and-onchain-Marketcap-of-a-specific-token-bsc) . { EVM(network: bsc) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Currency: { SmartContract: { is: "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82" } } } } ) { Block { Time } TokenBalance { Currency { Symbol Name } TotalSupply TotalSupplyInUSD } } }} Which fields each currency type carries[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#which-fields-each-currency-type-carries "Direct link to Which fields each currency type carries") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **BNB:** `BalanceChangeReasonCode`, `PreBalance`, `PostBalance`, `PostBalanceInUSD`. * **BEP-20:** `PostBalance`, `PostBalanceInUSD`, `TotalSupply`, `TotalSupplyInUSD`; no pre-balance or reason code. * **NFTs:** `PostBalance` and `TokenOwnership`; no USD values. Frequently Asked Questions -------------------------- What is the BSC transaction balance tracker? A cube that records, per transaction, every address whose balance changed with the balance before and after. It covers BNB, BEP-20 tokens and NFTs and can be queried or streamed with the same filters. Which reason codes appear on BNB Chain? In live data: 0, 5, 6, 7, 10, 12 and 13. The mining codes 1 and 2 never appear because BNB Chain has validators, not miners; see the miner and MEV balance tracker pages for what block producers earn. How do I get a wallet's current balance if it has been idle? TransactionBalances only has rows for addresses that transacted inside the realtime window. Use the Balances cube for a balance that does not depend on recent activity. Can I read pool reserves from this cube? Yes. Filter on the pool address with a short time window and use limitBy on the token contract to get the newest balance per token; those are the reserves after the pool's latest transaction. Related pages[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * [BSC transaction balance tracker overview](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/) * [BSC gas balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/) * [BSC MEV balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/) * [Balances and Holders cubes](https://docs.bitquery.io/docs/cubes/balances-cube/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Stream one address](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#stream-one-address) * [Latest BNB balance of an address](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#latest-bnb-balance-of-an-address) * [Latest balance of an address in one token](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#latest-balance-of-an-address-in-one-token) * [Latest reserves of a pool](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#latest-reserves-of-a-pool) * [Latest supply and market cap of a token](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#latest-supply-and-market-cap-of-a-token) * [Which fields each currency type carries](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#which-fields-each-currency-type-carries) * [Related pages](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/#related-pages) --- # Ethereum Token Holder API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Deprecated API `EVM.TokenHolders` was deprecated as of **20 May 2026** and removed on **15 June 2026**. Use **`EVM.Holders`** (this page) instead. Holder rankings, snapshots and distribution stats are productized in the [Token Holder API](https://bitquery.io/products/token-holder-api) — see the page for chains, plans and trial access. The **Holders** API returns token holder data for ERC-20 tokens on Ethereum: top holders, holder counts, and balance thresholds. Non-zero balances use `Amount(selectWhere: { gt: "0" })` on the `Balance` field (not in `where`). Use `dataset: combined` or `dataset: archive` as follows: | Dataset | When to use | | --- | --- | | **`combined`** | Latest holder count, top holders, and balances. Queries **realtime and archive** databases and merges results. | | **`archive`** | Addresses not recently active (not in the realtime window). | Examples: [Top Holders](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#top-holders-of-a-currency-current) · [Holder Count](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-count-for-an-erc-20-token) · [Whales](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#holder-count-with-balance-above-a-threshold) · [Historical Top Holders](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#historical-top-holders-by-date) · [Holder Activity](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-activity) · [Statistics](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-statistics) ProductUsing this in production? See the [Token Holder API](https://bitquery.io/products/token-holder-api) page for plans, free trial and enterprise delivery options. Top Holders of a Currency (Current)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#top-holders-of-a-currency-current "Direct link to Top Holders of a Currency (Current)") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The most common starting point for traders and analysts: who holds the most of a token right now. Use `dataset: combined` for the latest top holders (realtime + archive). [Run in IDE](https://ide.bitquery.io/ethereum-holders-top) Click to expand GraphQL query { EVM(network: eth, dataset: combined) { Holders( date: "2026-06-30" where: {Currency: {SmartContract: {is: "0x54D2252757e1672EEaD234D27B1270728fF90581"}}} orderBy: {descending: Balance_Amount} limit: {count: 10} ) { Holder { Address } Balance { Amount(selectWhere: {gt: "0"}) FirstChangeTime LastChangeTime } } }} Token Holder Count for an ERC-20 Token[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-count-for-an-erc-20-token "Direct link to Token Holder Count for an ERC-20 Token") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- How many wallets hold a token. Count distinct addresses with `uniq(of: Holder_Address)` and `dataset: combined`. [Run in IDE](https://ide.bitquery.io/ethereum-holders-count-combined) Click to expand GraphQL query query { EVM(network: eth, dataset: combined) { Holders( where: { Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } } ) { uniq(of: Holder_Address) } }} Token Holder Snapshot[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-snapshot "Direct link to Token Holder Snapshot") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The number of unique holders, token supply, and Gini coefficient for the balance amount before a specific timestamp can be derived using the query below. These stats provide a useful holder snapshot for any given time. [Run in IDE](https://ide.bitquery.io/token-holder-snapshot_1) Click to expand GraphQL query query MyQuery($network: evm_network!, $address: String!) { EVM(network: $network, dataset: archive) { Holders( where: { Currency: {SmartContract: {is: $address}}, Balance: { Amount: {gt: "0"}, LastChangeTime: {till: "2026-05-20T00:00:00Z"} }, Holder: {Address: {not: "0x"}}} ) { Balance { LastChangeTime(maximum: Balance_LastChangeTime) } holders: uniq(of: Holder_Address) supply: sum(of: Balance_Amount) gini(of: Balance_Amount) } }} { "network": "eth", "address": "0x00000000001594c61dd8a6804da9ab58ed2483ce"} Holder Count with Balance Above a Threshold[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#holder-count-with-balance-above-a-threshold "Direct link to Holder Count with Balance Above a Threshold") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Count holders above a minimum balance (whale / large-holder filters). Use `uniq(of: Holder_Address, if: { Balance: { Amount: { gt: "..." } } })` with your threshold. [Run in IDE](https://ide.bitquery.io/count-ethereum-holders-count-above-threshold) Click to expand GraphQL query query { EVM(network: eth, dataset: combined) { Holders( where: { Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } } ) { uniq( of: Holder_Address if: { Balance: { Amount: { gt: "10000000" } } } ) } }} Track Whale Wallets and Token Holdings[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#track-whale-wallets-and-token-holdings "Direct link to Track Whale Wallets and Token Holdings") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- For whale monitoring, combine **[Top Holders](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#top-holders-of-a-currency-current) ** (`orderBy: { descending: Balance_Amount }`, `limit`) with **[Holder Count Above a Threshold](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#holder-count-with-balance-above-a-threshold) **. Pair with [ERC-20 transfers](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/erc20-token-transfer-api/) to see recent inflows and outflows from large wallets. Historical Top Holders by Date[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#historical-top-holders-by-date "Direct link to Historical Top Holders by Date") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The **Holders** cube does not support `Block.Date`. Filter by `Balance.LastChangeTime` using datetime format (for example `"2026-05-01T00:00:00Z"`). For address balances on a calendar date, use the [Balances API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-on-a-specific-date) with `Block.Date`. [Run in IDE](https://ide.bitquery.io/ethereum-holders-top-by-date) Click to expand GraphQL query query { EVM(network: eth, dataset: combined) { Holders( where: { Balance: { LastChangeTime: { till: "2026-05-01T00:00:00Z" } } Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } } orderBy: { descending: Balance_Amount } limit: { count: 100 } ) { Holder { Address } Balance { Amount(selectWhere: { gt: "0" }) LastChangeTime } } }} Token Holder Count History Over Time[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-count-history-over-time "Direct link to Token Holder Count History Over Time") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Build holder-count time series by running the count query with `Balance.LastChangeTime.till` at different timestamps, then aggregating in your app or scheduler. [Run in IDE](https://ide.bitquery.io/ethereum-holders-count-by-date) Click to expand GraphQL query query { EVM(network: eth, dataset: combined) { Holders( where: { Balance: { LastChangeTime: { till: "2026-05-01T00:00:00Z" } } Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } } ) { uniq(of: Holder_Address) } }} Wallet Balance at a Point in Time[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#wallet-balance-at-a-point-in-time "Direct link to Wallet Balance at a Point in Time") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- One wallet’s balance for a token on a given date uses the **[Balances API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/) **, not Holders: set `Balance.Address`, `Currency.SmartContract`, and `Block.Date.till`. Use `dataset: archive`, `orderBy: { descending: Block_Date }`, and `limit: { count: 1 }`. [Run in IDE](https://ide.bitquery.io/ethereum-wallet-balance-token-at-date) · [Balances API docs](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#wallet-balance-for-a-specific-token-on-a-date) Click to expand GraphQL query query { EVM(network: eth, dataset: archive) { Balances( where: { Block: { Date: { till: "2026-05-05" } } Balance: { Address: { is: "0xA46320Aa0b4877b9a46a07B4F3DB93719bd422dE" } } Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } } limit: { count: 1 } orderBy: { descending: Block_Date } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Token Holder Activity[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-activity "Direct link to Token Holder Activity") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Drill into a **specific wallet** for a token: transfer count and first/last activity times. Uses the **Holders** API (`UpdateCount`, `FirstChangeTime`, `LastChangeTime`). ### Count of Transactions for a Token from a Token Holder[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#count-of-transactions-for-a-token-from-a-token-holder "Direct link to Count of Transactions for a Token from a Token Holder") [Run in IDE](https://ide.bitquery.io/Number-of-token-transactions-for-a-wallet) Click to expand GraphQL query query { EVM(network: eth, dataset: combined) { Holders( where: { Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } Holder: { Address: { is: "0xB953E202C5E51C7C010E80402a63C02f37F14059" } } } ) { Balance { UpdateCount } } }} ### First and Last Transfer Dates for a Token Holder[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#first-and-last-transfer-dates-for-a-token-holder "Direct link to First and Last Transfer Dates for a Token Holder") [Run in IDE](https://ide.bitquery.io/Frst-and-last-date-time-for-token-holder) Click to expand GraphQL query query { EVM(network: eth, dataset: combined) { Holders( where: { Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } Holder: { Address: { is: "0xB953E202C5E51C7C010E80402a63C02f37F14059" } } } ) { Balance { UpdateCount LastChangeTime FirstChangeTime } } }} Token Holder Statistics[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-statistics "Direct link to Token Holder Statistics") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Distribution metrics (average, median, Gini, Nakamoto index, and more) come from aggregate functions on the **`Holders`** cube. See [statistics docs](https://docs.bitquery.io/docs/graphql/metrics/statistics/) for the full metric list, and the [Balances & Holders cubes](https://docs.bitquery.io/docs/cubes/balances-cube/) reference for how `Holders` differs from `Balances`. ### Average Balance of a Token Holder[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#average-balance-of-a-token-holder "Direct link to Average Balance of a Token Holder") [Run in IDE](https://ide.bitquery.io/avg-usdt-balance-on-ethereum-using-token-holders-api) Click to expand GraphQL query { EVM(dataset: archive, network: eth) { Holders( date: "2026-05-01" where: { Currency: { SmartContract: { is: "0xdAC17F958D2ee523a2206206994597C13D831ec7" } }, Balance: { Amount: { ge: "0" } } } ) { average(of: Balance_Amount) } }} ### Median Balance of a Token Holder[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#median-balance-of-a-token-holder "Direct link to Median Balance of a Token Holder") [Run in IDE](https://ide.bitquery.io/median-balance-of-usdt-holders-on-ethereum-with-token-holders-api) Click to expand GraphQL query { EVM(dataset: archive, network: eth) { Holders( date: "2026-05-01" where: { Currency: { SmartContract: { is: "0xdAC17F958D2ee523a2206206994597C13D831ec7" } }, Balance: { Amount: { ge: "0" } } } ) { median(of: Balance_Amount) } }} Find Token Holders Outside a Certain Range[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#find-token-holders-outside-a-certain-range "Direct link to Find Token Holders Outside a Certain Range") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Advanced filter: holders with balance above an upper bound or below a lower bound (e.g. excluding mid-tier wallets). [Run in IDE](https://ide.bitquery.io/Find-holders-outside-a-range) Click to expand GraphQL query { EVM(dataset: archive) { Holders( date: "2026-05-01" where: { Currency: { SmartContract: { is: "0x0fcbd68251819928c8f6d182fc04be733fa94170" } }, any: [ { Balance: { Amount: { gt: "100" } } } { Balance: { Amount: { lt: "20" } } } ] Balance: { Amount: { gt: "0" } } } orderBy: { descending: Balance_Amount } limit: { count: 10 } ) { Balance { Amount } Holder { Address } Currency { Name Symbol } } }} Video Tutorial on How to Identify Top Token Holders for Any Cryptocurrency[​](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#video-tutorial-on-how-to-identify-top-token-holders-for-any-cryptocurrency "Direct link to Video Tutorial on How to Identify Top Token Holders for Any Cryptocurrency") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Frequently Asked Questions -------------------------- Which endpoint should I use for ERC-20 holders? Use EVM.Holders. The older EVM.TokenHolders field has been removed — migrate to Holders with Amount(selectWhere: { gt: "0" }). How do I get the top holders of a token? Query EVM.Holders with dataset: combined, filter by Currency SmartContract address, order by Balance descending, and limit results. How do I count total holders? Use a Holders query with count aggregation and Amount(selectWhere: { gt: "0" }) so zero-balance addresses are excluded. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Top Holders of a Currency (Current)](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#top-holders-of-a-currency-current) * [Token Holder Count for an ERC-20 Token](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-count-for-an-erc-20-token) * [Token Holder Snapshot](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-snapshot) * [Holder Count with Balance Above a Threshold](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#holder-count-with-balance-above-a-threshold) * [Track Whale Wallets and Token Holdings](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#track-whale-wallets-and-token-holdings) * [Historical Top Holders by Date](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#historical-top-holders-by-date) * [Token Holder Count History Over Time](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-count-history-over-time) * [Wallet Balance at a Point in Time](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#wallet-balance-at-a-point-in-time) * [Token Holder Activity](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-activity) * [Count of Transactions for a Token from a Token Holder](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#count-of-transactions-for-a-token-from-a-token-holder) * [First and Last Transfer Dates for a Token Holder](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#first-and-last-transfer-dates-for-a-token-holder) * [Token Holder Statistics](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-statistics) * [Average Balance of a Token Holder](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#average-balance-of-a-token-holder) * [Median Balance of a Token Holder](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#median-balance-of-a-token-holder) * [Find Token Holders Outside a Certain Range](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#find-token-holders-outside-a-certain-range) * [Video Tutorial on How to Identify Top Token Holders for Any Cryptocurrency](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#video-tutorial-on-how-to-identify-top-token-holders-for-any-cryptocurrency) --- # Base Transaction Balance Tracker: Balances Before and After a Transaction [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The `TransactionBalances` cube records, for each transaction on Base, every address whose balance changed and the balance before and after, in ETH, ERC-20 tokens and NFTs. A wallet tracker, a fee monitor and a pool reserve feed all come from the same rows. Native rows carry a reason code; on Base that is 0 for ordinary changes and 5 for fee credits to the fee vaults, and no other code appears. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The cube covers the recent realtime window only, so queries carry a `limit` and, for wide filters, a time window. Stream one address[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#stream-one-address "Direct link to Stream one address") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Base produces too many balance rows for an unfiltered stream to be practical, so subscribe with a filter: an address, as here, or a reason code, as on the [gas balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/) . The example is the Uniswap v4 PoolManager, whose token balances change on every swap, so rows arrive within seconds; a wallet streams only when it transacts. Saved stream [here](https://ide.bitquery.io/Subscribe-to-Transaction-Balances-for-a-Specific-Address-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { Address: { is: "0x498581ff718922c3f8e6a244956af099b2652b2b" } } } ) { Block { Number Time } TokenBalance { BalanceChangeReasonCode PreBalance PostBalance PostBalanceInUSD Currency { Symbol SmartContract Native } } Transaction { Hash From To } } }} Latest ETH balance of an address[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#latest-eth-balance-of-an-address "Direct link to Latest ETH balance of an address") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The newest native row for the address; `PostBalance` is the balance after that transaction. Saved query [here](https://ide.bitquery.io/latest-native-balance-of-an-address-base) . { EVM(network: base) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0x238a358808379702088667322f80ac48bad5e6c4" } Currency: { Native: true } } } ) { Block { Time } TokenBalance { PostBalance PostBalanceInUSD BalanceChangeReasonCode } Transaction { Hash } } }} Latest balance of an address in one token[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#latest-balance-of-an-address-in-one-token "Direct link to Latest balance of an address in one token") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The same query with the token contract in place of the native flag. The example is USDC on Base, `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`. Saved query [here](https://ide.bitquery.io/latest-balance-of-an-address-for-a-specific-token-base) . { EVM(network: base) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0x238a358808379702088667322f80ac48bad5e6c4" } Currency: { SmartContract: { is: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" } } } } ) { Block { Time } TokenBalance { PostBalance PostBalanceInUSD Currency { Symbol Name } } Transaction { Hash } } }} An address that has not moved the token inside the realtime window has no row here; use the [Balances cube](https://docs.bitquery.io/docs/cubes/balances-cube/) for a balance that does not depend on recent activity. Latest reserves of a pool[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#latest-reserves-of-a-pool "Direct link to Latest reserves of a pool") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- A pool is an address like any other, so its token balances are its reserves. `limitBy` on the token contract keeps the newest row per token. The example is the Uniswap v3 WETH/USDC 0.05% pool. Saved query [here](https://ide.bitquery.io/latest-liquidity-of-a-base-pool) . { EVM(network: base) { TransactionBalances( limit: { count: 2 } limitBy: { by: TokenBalance_Currency_SmartContract, count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0xd0b53D9277642d899DF5C87A3966A349A798F224" } } Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Block { Time } TokenBalance { Currency { Symbol SmartContract } PostBalance PostBalanceInUSD } } }} Latest supply and market cap of a token[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#latest-supply-and-market-cap-of-a-token "Direct link to Latest supply and market cap of a token") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Token rows carry `TotalSupply` and `TotalSupplyInUSD` as of that transaction, so the newest row for a token gives its supply and on-chain market cap. The example is AERO. Saved query [here](https://ide.bitquery.io/Total-Supply-and-onchain-Marketcap-of-a-specific-token-base) . { EVM(network: base) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Currency: { SmartContract: { is: "0x940181a94A35A4569E4529A3CDfB74e38FD98631" } } } } ) { Block { Time } TokenBalance { Currency { Symbol Name } TotalSupply TotalSupplyInUSD } } }} Which fields each currency type carries[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#which-fields-each-currency-type-carries "Direct link to Which fields each currency type carries") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **ETH:** `BalanceChangeReasonCode`, `PreBalance`, `PostBalance`, `PostBalanceInUSD`. * **ERC-20:** `PostBalance`, `PostBalanceInUSD`, `TotalSupply`, `TotalSupplyInUSD`; no pre-balance or reason code. * **NFTs:** `PostBalance` and `TokenOwnership`; no USD values. Frequently Asked Questions -------------------------- What is the Base transaction balance tracker? A cube that records, per transaction, every address whose balance changed with the balance before and after. It covers ETH, ERC-20 tokens and NFTs and can be queried or streamed with the same filters. Which reason codes appear on Base? Only 0 and 5. Code 0 marks ordinary changes, including the sender's gas, and code 5 marks fee credits to the sequencer, base fee and L1 fee vaults. The gas codes used on Ethereum do not appear. How do I get a wallet's current balance if it has been idle? TransactionBalances only has rows for addresses that transacted inside the realtime window. Use the Balances cube for a balance that does not depend on recent activity. Can I read pool reserves from this cube? Yes. Filter on the pool address and use limitBy on the token contract to get the newest balance per token; those are the pool's reserves after its latest transaction. Related pages[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#related-pages "Direct link to Related pages") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * [Base transaction balance tracker overview](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/) * [Base gas balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/) * [Base transfers API](https://docs.bitquery.io/docs/blockchain/Base/base-transfers/) * [Balances and Holders cubes](https://docs.bitquery.io/docs/cubes/balances-cube/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Stream one address](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#stream-one-address) * [Latest ETH balance of an address](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#latest-eth-balance-of-an-address) * [Latest balance of an address in one token](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#latest-balance-of-an-address-in-one-token) * [Latest reserves of a pool](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#latest-reserves-of-a-pool) * [Latest supply and market cap of a token](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#latest-supply-and-market-cap-of-a-token) * [Which fields each currency type carries](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#which-fields-each-currency-type-carries) * [Related pages](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/#related-pages) --- # Base Liquidity API: Uniswap and PancakeSwap Pool Reserves in Real Time [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The `DEXPoolEvents` cube under `EVM(network: base)` emits one row every time a pool's reserves change, whether by a swap, a deposit or a withdrawal. Each row carries the reserves of both tokens after the change, in token units and in USD, the spot price in both directions, the pool and its protocol, and the transaction that moved it. On Base the rows come from Uniswap v2, v3 and v4 pools and from PancakeSwap v3 and Infinity pools. Aerodrome, the largest DEX on Base by volume, is not in this cube: its swaps are in the [Base DEX trades API](https://docs.bitquery.io/docs/blockchain/Base/base-dextrades/) and its pool balances in the [balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/) . The cube holds the recent realtime window only and has no archive dataset: to keep a history, record the stream. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The worked pool is the Uniswap v3 WETH/USDC pool, `0xb4cb800910b228ed3d0834cf79d697127bbb00e5`. Current reserves of a pool[​](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#current-reserves-of-a-pool "Direct link to Current reserves of a pool") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The last ten changes to the pool, newest first. Each row is the state after that change: `AmountCurrencyA` and `AmountCurrencyB` are the reserves, `AmountCurrencyAInUSD` and `AmountCurrencyBInUSD` their dollar value, and `AtoBPrice` the spot rate of A in B. Saved query [here](https://ide.bitquery.io/Latest-Liquidity-Changes-of-a-Specific-Pool_4) . { EVM(network: base) { DEXPoolEvents( limit: { count: 10 } orderBy: { descending: Block_Time } where: { PoolEvent: { Pool: { SmartContract: { is: "0xb4cb800910b228ed3d0834cf79d697127bbb00e5" } } } } ) { Block { Time Number } PoolEvent { AtoBPrice BtoAPrice Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } Pool { SmartContract CurrencyA { Symbol SmartContract } CurrencyB { Symbol SmartContract } } Dex { ProtocolName } } Transaction { Hash } } }} The same pool, live[​](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#the-same-pool-live "Direct link to The same pool, live") -------------------------------------------------------------------------------------------------------------------------------------------------- As a subscription the filter yields a row per reserve change, a few per minute on this pool. Saved stream [here](https://ide.bitquery.io/Realtime-Liquidity-Stream-of-a-Specific-Pool_3) . subscription { EVM(network: base) { DEXPoolEvents( where: { PoolEvent: { Pool: { SmartContract: { is: "0xb4cb800910b228ed3d0834cf79d697127bbb00e5" } } } } ) { Block { Time Number } PoolEvent { AtoBPrice BtoAPrice Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } Pool { SmartContract CurrencyA { Symbol } CurrencyB { Symbol } } } Transaction { Hash } } }} Every Uniswap v4 pool on Base[​](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#every-uniswap-v4-pool-on-base "Direct link to Every Uniswap v4 pool on Base") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Uniswap v4 is the busiest source of pool events on Base. All v4 pools live in the PoolManager, `0x498581ff718922c3f8e6a244956af099b2652b2b`, so `Pool.SmartContract` repeats on every row and `Pool.PoolId` is the field that tells pools apart; for v2 and v3 pools `PoolId` is empty. Saved stream [here](https://ide.bitquery.io/Latest-Liquidity-Changes-of-Pools-in-a-Specific-DEX-Protocol---Uniswap-V4_5) . subscription { EVM(network: base) { DEXPoolEvents( where: { PoolEvent: { Dex: { ProtocolName: { is: "uniswap_v4" } } } } ) { Block { Time } PoolEvent { Pool { PoolId SmartContract CurrencyA { Symbol SmartContract } CurrencyB { Symbol SmartContract } } Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } AtoBPrice } Transaction { Hash } } }} Other protocol names that report on Base: `uniswap_v3`, `uniswap_v2`, `pancake_swap_v3` and `pancakeswap_infinity`. Every pool of a token[​](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#every-pool-of-a-token "Direct link to Every pool of a token") --------------------------------------------------------------------------------------------------------------------------------------------------------- Which pools hold cbBTC, `0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf`, and how much? Ask for pools with cbBTC as `CurrencyA` in the window and keep only the newest row of each with `limitBy` on the pool address; a second run with cbBTC as `CurrencyB` covers the pools that list it second. Because Aerodrome is outside this cube, the answer covers Uniswap and PancakeSwap pools only. Rank by the USD reserve in your code. Saved query [here](https://ide.bitquery.io/top-liquidity-pools-of-cbBTC) . { EVM(network: base) { DEXPoolEvents( limit: { count: 20 } limitBy: { by: PoolEvent_Pool_SmartContract, count: 1 } orderBy: { descending: Block_Time } where: { PoolEvent: { Pool: { CurrencyA: { SmartContract: { is: "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf" } } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Block { Time } PoolEvent { Dex { ProtocolName } Pool { SmartContract PoolId CurrencyB { Symbol SmartContract } } Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } } } }} Row anatomy[​](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#row-anatomy "Direct link to Row anatomy") --------------------------------------------------------------------------------------------------------------------------- A row is one reserve change. `Liquidity` holds the two reserves after it, in token units and in USD; `AtoBPrice` and `BtoAPrice` hold the spot rate both ways; `Pool` names the contract, or for Uniswap v4 and PancakeSwap Infinity the manager plus a `PoolId`; `Dex.ProtocolName` is one of `uniswap_v4`, `uniswap_v3`, `uniswap_v2`, `pancake_swap_v3` and `pancakeswap_infinity`; and `Transaction.Hash` points at the swap, deposit or withdrawal behind it. Kafka and slippage[​](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#kafka-and-slippage "Direct link to Kafka and slippage") ------------------------------------------------------------------------------------------------------------------------------------------------ The `base.dexpools.proto` topic streams these rows as protobuf with lower latency than WebSocket and needs its own credentials; start at the [Kafka streams hub](https://docs.bitquery.io/docs/category/kafka-streams/) . The [Base slippage API](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/) turns the same pool states into how much each pool can absorb at a given tolerance. Frequently Asked Questions -------------------------- How do I get the reserves of a pool on Base? Filter DEXPoolEvents on network base by the pool contract in PoolEvent.Pool.SmartContract and take the newest row. Its Liquidity fields are the reserves in token units and USD, and AtoBPrice is the spot rate. Does the Base liquidity API cover Aerodrome? No. Aerodrome pools are not in DEXPoolEvents. Aerodrome swaps are in the DEX trades cube, and a pool's token balances can be read from the transaction balance tracker. How do I tell Uniswap v4 pools apart on Base? All v4 pools share the PoolManager address 0x498581ff718922c3f8e6a244956af099b2652b2b, so filter and group on PoolEvent.Pool.PoolId instead of SmartContract. Can I get past reserves of a Base pool? Only what is inside the realtime window; DEXPoolEvents has no archive dataset. Keep the stream or the Kafka topic if you need a history. How do I rank the pools of a token by liquidity? Take the newest row per pool with limitBy on the pool address, once with the token as CurrencyA and once as CurrencyB, and sort by the USD reserve fields in your code. Related pages[​](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#related-pages "Direct link to Related pages") --------------------------------------------------------------------------------------------------------------------------------- * [Base slippage API](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/) * [Base DEX trades API](https://docs.bitquery.io/docs/blockchain/Base/base-dextrades/) * [Uniswap v4 on Base](https://docs.bitquery.io/docs/blockchain/Base/uniswap-v4-api/) * [DEXPools cube](https://docs.bitquery.io/docs/cubes/evm-dexpool/) * [Arbitrum liquidity API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Current reserves of a pool](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#current-reserves-of-a-pool) * [The same pool, live](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#the-same-pool-live) * [Every Uniswap v4 pool on Base](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#every-uniswap-v4-pool-on-base) * [Every pool of a token](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#every-pool-of-a-token) * [Row anatomy](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#row-anatomy) * [Kafka and slippage](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#kafka-and-slippage) * [Related pages](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/#related-pages) --- # Aerodrome Finance API — Base DEX Trades & Liquidity [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD `BalanceUpdates` sunsets 10 August 2026 Queries on this page that use **`BalanceUpdates`** will stop working on **10 August 2026**. Migrate to the **`Balances`** and **`Holders`** cubes, which return the current balance directly instead of summing deltas. See the [migration mapping](https://docs.bitquery.io/docs/cubes/balances-cube/#migrating-from-balanceupdates) for the query-by-query translation. Get real-time Aerodrome Finance DEX trades, liquidity pools, token prices, trading volume and comprehensive analytics on Base network. Access live trading data, pool creation events, liquidity metrics and token statistics through our Aerodrome Finance API, Streams and Data services. The GraphQL APIs and Streams below provide extensive data points for the Aerodrome Finance ecosystem. If you have any questions on other data points, reach out to [support](https://t.me/Bloxy_info) . You may also be interested in: * [Base Network DEX APIs ➤](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/dex-api/) * [Token Trades APIs ➤](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/token-trades-apis/) * [Liquidity Pool APIs ➤](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/ethereum-liquidity-api/) note To query or stream data via graphQL **outside the Bitquery IDE**, you need to generate an API access token. Follow the steps here to create one: [How to generate Bitquery API token ➤](https://docs.bitquery.io/docs/authorization/how-to-generate/) * * * ### Table of Contents[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#table-of-contents "Direct link to Table of Contents") ### 1\. DEX Trades & Trading Activity[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#1-dex-trades--trading-activity "Direct link to 1. DEX Trades & Trading Activity") * [Subscribe to Latest Trades on Aerodrome Finance ➤](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#subscribe-to-latest-trades-on-aerodrome-finance) * [Most Traded Tokens on Aerodrome Finance ➤](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#most-traded-tokens-on-aerodrome-finance) * [Realtime Prices, OHLC, Trading Volume of all pairs ➤](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#realtime-prices-ohlc-trading-volume-of-all-pairs) ### 2\. Liquidity Pools & Analytics[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#2-liquidity-pools--analytics "Direct link to 2. Liquidity Pools & Analytics") * [Latest Liquidity Pools on Aerodrome Finance ➤](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#latest-liquidity-pools-on-aerodrome-finance) * [Get Liquidity of a Pool ➤](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#get-liquidity-of-a-pool) ### 3\. [Video Tutorials](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#video-tutorials) [​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#3-video-tutorials "Direct link to 3-video-tutorials") DEX Trades & Trading Activity[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#dex-trades--trading-activity "Direct link to DEX Trades & Trading Activity") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Subscribe to Latest Trades on Aerodrome Finance[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#subscribe-to-latest-trades-on-aerodrome-finance "Direct link to Subscribe to Latest Trades on Aerodrome Finance") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Stream real-time DEX trades on Aerodrome Finance with this subscription query. Monitor live buy/sell activity, token pairs, prices, and trading volumes as they happen on the Base network. This query filters Aerodrome DEX trades by the protocol's `OwnerAddress` (`0x420dd381b31aef6683db6b902084cb0ffece40da`). [Subscribe to Aerodrome Finance trades in real-time — Stream ➤](https://ide.bitquery.io/Latest-Trades-on-Aerodrome) Click to expand GraphQL query subscription { EVM(network: base) { DEXTrades( where: { Trade: { Dex: { OwnerAddress: { is: "0x420dd381b31aef6683db6b902084cb0ffece40da" } } } } ) { Block { Time } Trade { Buy { AmountInUSD(selectWhere: { gt: "0" }) Buyer Currency { Name Symbol SmartContract } PriceInUSD Seller } Dex { ProtocolFamily ProtocolName } Sell { Currency { SmartContract Symbol Name } Seller Buyer AmountInUSD } } } }} Most Traded Tokens on Aerodrome Finance[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#most-traded-tokens-on-aerodrome-finance "Direct link to Most Traded Tokens on Aerodrome Finance") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Discover the most actively traded tokens on Aerodrome Finance over any time period. This query analyzes all DEX trades within a specified timeframe and ranks tokens by trade count, helping you identify trending tokens and market activity patterns. [Get most traded tokens on Aerodrome Finance — Query ➤](https://ide.bitquery.io/Most-Traded-Tokens-on-Aerodome-Last-Month) Click to expand GraphQL query query MyQuery { EVM(dataset: archive, network: base) { DEXTradeByTokens( limit: { count: 10 } where: { Block: { Time: { after: "2024-06-10T00:00:00Z" before: "2024-07-10T00:00:00Z" } } Trade: { Dex: { OwnerAddress: { is: "0x420dd381b31aef6683db6b902084cb0ffece40da" } } } } orderBy: { descendingByField: "count" } ) { Trade { Currency { Name SmartContract } } count } }} Realtime Prices, OHLC, Trading Volume of all pairs[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#realtime-prices-ohlc-trading-volume-of-all-pairs "Direct link to Realtime Prices, OHLC, Trading Volume of all pairs") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Below API gives you instant access to live Aerodrome market data with pre-calculated OHLC, moving averages, and trading volumes updating every second—no complex calculations needed, just plug and play for your trading bots or analytics platform. [Realtime Prices, OHLC, Trading Volume of all pairs — Query ➤](https://ide.bitquery.io/aerodrome-dex---realtime-prices-1-sec-ohlc-trading-volumes) Click to expand GraphQL query subscription { Trading { Pairs( where: { Interval: { Time: { Duration: { eq: 1 } } } Price: { IsQuotedInUsd: true } Market: { ProtocolFamily: { is: "Aerodrome" } } } ) { Token { Name Symbol Address } Price { Average { Estimate Mean ExponentialMoving SimpleMoving WeightedSimpleMoving } Ohlc { Open High Low Close } } QuoteToken { Name Symbol Address } Market { ProtocolFamily } Volume { Base Quote } Interval { Time { Duration Start End } } } }} Liquidity Pools & Analytics[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#liquidity-pools--analytics "Direct link to Liquidity Pools & Analytics") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Latest Liquidity Pools on Aerodrome Finance[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#latest-liquidity-pools-on-aerodrome-finance "Direct link to Latest Liquidity Pools on Aerodrome Finance") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track newly created liquidity pools on Aerodrome Finance in real-time. Discover fresh trading pairs and potential liquidity provision opportunities as pools are created. This query monitors `PoolCreated` events from the Aerodrome Finance smart contract, returning pool addresses, token pairs, and creation timestamps. [Get latest liquidity pools on Aerodrome Finance — Query ➤](https://ide.bitquery.io/Latest-Liquidity-Pools-on-Aerodome) Click to expand GraphQL query { EVM(dataset: combined, network: base) { Events( orderBy: { descending: Block_Number } limit: { count: 10 } where: { Log: { SmartContract: { is: "0x420dd381b31aef6683db6b902084cb0ffece40da" } Signature: { Name: { is: "PoolCreated" } } } } ) { Log { Signature { Name Parsed Signature } SmartContract } Transaction { Hash } Block { Date Number } Arguments { Value { ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} **Response Structure:** The query returns pool creation events with the following information: { "Arguments": [ { "Value": { "address": "0x02f92800f57bcd74066f5709f1daa1a4302df875" } }, { "Value": { "address": "0xf564f589f58ced0127e48e1a02093ba53c2856ed" } }, { "Value": { "bool": false } }, { "Value": { "address": "0xa187378f0f3613e42b6ad5cc063a01060f82763f" } }, { "Value": { "bigInteger": "1539" } } ], "Block": { "Date": "2024-07-10", "Number": "16894743" }, "Log": { "Signature": { "Name": "PoolCreated", "Parsed": true, "Signature": "PoolCreated(address,address,bool,address,uint256)" }, "SmartContract": "0x420dd381b31aef6683db6b902084cb0ffece40da" }, "Transaction": { "Hash": "0xc5049804074b77ccb975b9617974ee40533634b8d6d8cabf2865cebb94c462a4" }} **Understanding the Response:** * **Token Addresses**: The first two address arguments (`0x02f92800f57bcd74066f5709f1daa1a4302df875` and `0xf564f589f58ced0127e48e1a02093ba53c2856ed`) represent the two tokens in the trading pair. * **Pool Address**: The fourth argument (`0xa187378f0f3613e42b6ad5cc063a01060f82763f`) is the newly created liquidity pool address. * **Pool Type**: The boolean value indicates whether the pool is stable or volatile. * **Pool ID**: The bigInteger value is the unique pool identifier. Get Liquidity of a Pool[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#get-liquidity-of-a-pool "Direct link to Get Liquidity of a Pool") --------------------------------------------------------------------------------------------------------------------------------------------------------------- Query the current liquidity levels for any Aerodrome Finance pool by pool address. This query retrieves the token balances for both assets in a liquidity pool, allowing you to calculate total value locked (TVL), assess pool depth, and analyze liquidity distribution. [Get pool liquidity on Aerodrome Finance — Query ➤](https://ide.bitquery.io/Liquidity-of-a-Pool_2) Click to expand GraphQL query **Migrated query** — use this. `BalanceUpdates` sunsets 10 August 2026. query MyQuery { EVM(dataset: combined, network: base) { Balances( where: { Balance: { Address: { is: "0x1e039aade407a94df380649b33b52cb8ad41c755" } } Currency: { SmartContract: { in: [ "0x4200000000000000000000000000000000000006" "0xa999542c71febba77602fbc2f784ba9ba0c850f6" ] } } } orderBy: { descending: Balance_Amount } ) { Currency { Name } Balance { Amount(selectWhere: { gt: "0" }) } } }} Old `BalanceUpdates` version (stops working 10 August 2026) query MyQuery { EVM(dataset: combined, network: base) { BalanceUpdates( where: { BalanceUpdate: { Address: { is: "0x1e039aade407a94df380649b33b52cb8ad41c755" } } Currency: { SmartContract: { in: [ "0x4200000000000000000000000000000000000006" "0xa999542c71febba77602fbc2f784ba9ba0c850f6" ] } } } orderBy: { descendingByField: "balance" } ) { Currency { Name } balance: sum(of: BalanceUpdate_Amount, selectWhere: { gt: "0" }) } }} Video Tutorials[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#video-tutorials "Direct link to Video Tutorials") --------------------------------------------------------------------------------------------------------------------------------------- ### Video Tutorial | How to stream Realtime Prices, OHLCV, and Moving Averages for trading pairs on Aerodrome DEX[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#video-tutorial--how-to-stream-realtime-prices-ohlcv-and-moving-averages-for-trading-pairs-on-aerodrome-dex "Direct link to Video Tutorial | How to stream Realtime Prices, OHLCV, and Moving Averages for trading pairs on Aerodrome DEX") ### Video Tutorial | How to Get Latest Trades and Most Traded Tokens on Aerodrome Finance[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#video-tutorial--how-to-get-latest-trades-and-most-traded-tokens-on-aerodrome-finance "Direct link to Video Tutorial | How to Get Latest Trades and Most Traded Tokens on Aerodrome Finance") ### Video Tutorial | How to Get Latest Liquidity Pools and Pool Liquidity on Aerodrome Finance[​](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#video-tutorial--how-to-get-latest-liquidity-pools-and-pool-liquidity-on-aerodrome-finance "Direct link to Video Tutorial | How to Get Latest Liquidity Pools and Pool Liquidity on Aerodrome Finance") Frequently Asked Questions -------------------------- How do I get Aerodrome trades on Base? Query EVM.DEXTrades on network base with Aerodrome protocol filters from the examples on this page. Can I track new Aerodrome pools? Yes. Query DEXPools filtered to Aerodrome and sort by creation time or subscribe to new pool events. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Table of Contents](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#table-of-contents) * [1\. DEX Trades & Trading Activity](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#1-dex-trades--trading-activity) * [2\. Liquidity Pools & Analytics](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#2-liquidity-pools--analytics) * [3\. Video Tutorials](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#3-video-tutorials) * [DEX Trades & Trading Activity](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#dex-trades--trading-activity) * [Subscribe to Latest Trades on Aerodrome Finance](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#subscribe-to-latest-trades-on-aerodrome-finance) * [Most Traded Tokens on Aerodrome Finance](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#most-traded-tokens-on-aerodrome-finance) * [Realtime Prices, OHLC, Trading Volume of all pairs](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#realtime-prices-ohlc-trading-volume-of-all-pairs) * [Liquidity Pools & Analytics](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#liquidity-pools--analytics) * [Latest Liquidity Pools on Aerodrome Finance](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#latest-liquidity-pools-on-aerodrome-finance) * [Get Liquidity of a Pool](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#get-liquidity-of-a-pool) * [Video Tutorials](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#video-tutorials) * [Video Tutorial | How to stream Realtime Prices, OHLCV, and Moving Averages for trading pairs on Aerodrome DEX](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#video-tutorial--how-to-stream-realtime-prices-ohlcv-and-moving-averages-for-trading-pairs-on-aerodrome-dex) * [Video Tutorial | How to Get Latest Trades and Most Traded Tokens on Aerodrome Finance](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#video-tutorial--how-to-get-latest-trades-and-most-traded-tokens-on-aerodrome-finance) * [Video Tutorial | How to Get Latest Liquidity Pools and Pool Liquidity on Aerodrome Finance](https://docs.bitquery.io/docs/blockchain/Base/aerodrome-base-api/#video-tutorial--how-to-get-latest-liquidity-pools-and-pool-liquidity-on-aerodrome-finance) --- # Ethereum Uniswap v4 API: Swaps, PoolIds, Pool Stats, Traders and Reserves [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Uniswap v4 replaced one contract per pool with one contract for all pools. On Ethereum that contract is the PoolManager at `0x000000000004444c5dc75cB358380D2e3dE08A90`; a pool is a `PoolId`, the hash of its two tokens, fee, tick spacing and hook, and swaps, deposits and withdrawals all surface as events of the PoolManager. Bitquery decodes those into the same cubes as every other DEX, with two things to know. `Trade.PoolId` is how you pick a pool, since `Dex.SmartContract` is always the PoolManager. And on raw `DEXTrades` rows the buyer and seller are both the PoolManager, because it settles both sides; the trader is `Transaction.From`, or the `Trader` field of the Trading cube. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The worked pool is ETH/USDC, `PoolId 0x00b9edc1583bf6ef09ff3a09f6c23ecb57fd7d0bb75625717ec81eed181e22d7`, and the worked token is USDC, `0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48`. Live swaps with trader, USD and market cap[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#live-swaps-with-trader-usd-and-market-cap "Direct link to Live swaps with trader, USD and market cap") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- For a live feed with the trader, USD amounts and the token's supply and market cap on every row, use the [Crypto Trades API](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) of the Trading cube and filter the market to Ethereum and `uniswap_v4`. `Pair.Pool.Id` is the PoolId and `Pair.Pool.Address` the PoolManager. The Trading cube keeps about 30 days; the chain cubes below reach further back. Saved stream [here](https://ide.bitquery.io/Uniswap-v4-trades-with-pool-id-and-mcap) . subscription { Trading { Trades( where: { Pair: { Market: { Network: { is: "Ethereum" }, Protocol: { is: "uniswap_v4" } } } } ) { Block { Time } Side Trader { Address } Amounts { Base Quote } AmountsInUsd { Base Quote } Supply { CirculatingSupply MarketCap } Pair { Currency { Symbol Id } QuoteCurrency { Symbol } Pool { Id Address } } TransactionHeader { Sender } } }} Raw swaps from the PoolManager[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#raw-swaps-from-the-poolmanager "Direct link to Raw swaps from the PoolManager") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The chain-specific `DEXTrades` cube gives the pool-side view of each swap: what the pool received and what it paid out, with USD on both sides. Filter on the protocol name and subscribe, or add a `PoolId`. Saved stream [here](https://ide.bitquery.io/Real-time-trades-on-uniswap-v4----subscription) . subscription { EVM(network: eth) { DEXTrades(where: { Trade: { Dex: { ProtocolName: { is: "uniswap_v4" } } } }) { Block { Time } Trade { PoolId Buy { Currency { Symbol SmartContract } Amount AmountInUSD PriceInUSD } Sell { Currency { Symbol SmartContract } Amount AmountInUSD } } Transaction { From Hash } } }} Every v4 pool of a token[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#every-v4-pool-of-a-token "Direct link to Every v4 pool of a token") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Group `DEXTradeByTokens` by `PoolId` with the token in `Currency`. Each row is one pool with its counter token, trade count and USD volume in the window; this is the lookup that gives you a `PoolId`. Saved query [here](https://ide.bitquery.io/All-Pool_Ids-for-currency) . { EVM(network: eth) { DEXTradeByTokens( where: { Trade: { Dex: { ProtocolName: { is: "uniswap_v4" } } Currency: { SmartContract: { is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "count" } limit: { count: 20 } ) { Trade { PoolId Side { Currency { Symbol SmartContract } } } count volumeUsd: sum(of: Trade_Side_AmountInUSD) } }} Latest swaps in one pool[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#latest-swaps-in-one-pool "Direct link to Latest swaps in one pool") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Saved query [here](https://ide.bitquery.io/Latest-trades-for-a-Pool-Id-on-uniswap-v4) . { EVM(network: eth) { DEXTrades( where: { Trade: { PoolId: { is: "0x00b9edc1583bf6ef09ff3a09f6c23ecb57fd7d0bb75625717ec81eed181e22d7" } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Trade { Buy { Currency { Symbol } Amount AmountInUSD PriceInUSD } Sell { Currency { Symbol } Amount AmountInUSD } } Transaction { From Hash } } }} Pool stats for the last 24 hours[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#pool-stats-for-the-last-24-hours "Direct link to Pool stats for the last 24 hours") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Trades, distinct buyers and sellers, and USD volume split by direction for the token you name. Saved query [here](https://ide.bitquery.io/uniswap-v4-stats---Volume-bought-and-sold) . { EVM(network: eth) { DEXTradeByTokens( where: { Trade: { PoolId: { is: "0x00b9edc1583bf6ef09ff3a09f6c23ecb57fd7d0bb75625717ec81eed181e22d7" } Currency: { SmartContract: { is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Trade { Currency { Symbol } Side { Currency { Symbol } } } trades: count buyers: uniq(of: Trade_Buyer) sellers: uniq(of: Trade_Seller) volumeUsd: sum(of: Trade_Side_AmountInUSD) buyVolumeUsd: sum(of: Trade_Side_AmountInUSD, if: { Trade: { Side: { Type: { is: buy } } } }) sellVolumeUsd: sum(of: Trade_Side_AmountInUSD, if: { Trade: { Side: { Type: { is: sell } } } }) } }} Top traders of the pool[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#top-traders-of-the-pool "Direct link to Top traders of the pool") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Rank by `Transaction.From`, the account that sent the swap. `bought` sums the token the trader received and `sold` the token it paid; `Side.Type` describes the counter-side of each trade, which is why the two conditions are the other way round. Saved queries: [top buyers](https://ide.bitquery.io/Top-Buyers-of-a-currency-on-uniswap-v4) , [top sellers](https://ide.bitquery.io/Top-Sellers-of-a-currency-on-uniswap-v4) . { EVM(network: eth) { DEXTradeByTokens( where: { Trade: { PoolId: { is: "0x00b9edc1583bf6ef09ff3a09f6c23ecb57fd7d0bb75625717ec81eed181e22d7" } Currency: { SmartContract: { is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "volumeUsd" } limit: { count: 20 } ) { Transaction { From } trades: count volumeUsd: sum(of: Trade_Side_AmountInUSD) bought: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: sell } } } }) sold: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: buy } } } }) } }} Reserves of a v4 pool[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#reserves-of-a-v4-pool "Direct link to Reserves of a v4 pool") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- `DEXPoolEvents` rows carry the reserves the PoolManager holds for the pool after each change, rebuilt from the concentrated positions around the current price and priced in USD. Filter by `PoolId` for one pool, or keep only the protocol name to stream them all. Saved streams: [all v4 pools](https://ide.bitquery.io/Latest-Liquidity-Changes-of-Pools-in-a-Specific-DEX-Protocol---Uniswap-V4_6) , [by PoolId](https://ide.bitquery.io/uniswap-v4-pool-liquidity-by-poolid-ethereum) . { EVM(network: eth) { DEXPoolEvents( where: { PoolEvent: { Pool: { PoolId: { is: "0x00b9edc1583bf6ef09ff3a09f6c23ecb57fd7d0bb75625717ec81eed181e22d7" } } } } limit: { count: 5 } orderBy: { descending: Block_Time } ) { Block { Time } PoolEvent { Pool { PoolId CurrencyA { Symbol } CurrencyB { Symbol } } Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } AtoBPrice } } }} Frequently Asked Questions -------------------------- How do I query Uniswap v4 trades on Ethereum? Two ways. Trading.Trades with the market filtered to Ethereum and uniswap\_v4 gives swaps with trader, USD and market cap for the last month or so. EVM.DEXTrades with ProtocolName uniswap\_v4 gives the raw pool-side rows with history on the archive dataset. What is the Uniswap v4 PoolManager address on Ethereum? 0x000000000004444c5dc75cB358380D2e3dE08A90. Every v4 pool on Ethereum lives inside it, so Dex.SmartContract repeats and Trade.PoolId identifies the pool. How do I find a pool's PoolId? Group DEXTradeByTokens by Trade.PoolId with one token in Currency and the protocol name uniswap\_v4; the rows are the pools of that token with counter token and volume. The Trading cube shows the same id as Pair.Pool.Id. Why are buyer and seller the same address on v4 swap rows? The PoolManager settles both sides, so DEXTrades shows it twice. Use Transaction.From, the Trader field of the Trading cube, or DEXTradeByTokens for trader-level data. Which chains have Uniswap v4 pages? Ethereum, Base, BNB Chain, Arbitrum, Optimism and Polygon each have a page with that chain's PoolManager address and live pools. Related pages[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------------- * [Ethereum DEX trades API](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/dex-api/) * [Crypto Trades API](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) * [Uniswap v4 on Base](https://docs.bitquery.io/docs/blockchain/Base/uniswap-v4-api/) * [Uniswap v4 on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/uniswap-v4-api/) * [Uniswap v4 on Optimism](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Live swaps with trader, USD and market cap](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#live-swaps-with-trader-usd-and-market-cap) * [Raw swaps from the PoolManager](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#raw-swaps-from-the-poolmanager) * [Every v4 pool of a token](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#every-v4-pool-of-a-token) * [Latest swaps in one pool](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#latest-swaps-in-one-pool) * [Pool stats for the last 24 hours](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#pool-stats-for-the-last-24-hours) * [Top traders of the pool](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#top-traders-of-the-pool) * [Reserves of a v4 pool](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#reserves-of-a-v4-pool) * [Related pages](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/#related-pages) --- # Uniswap V3 Position API: Mints, Burns, Liquidity Changes and Fee Collections [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Every Uniswap V3 liquidity position on Ethereum is an NFT issued by the NonfungiblePositionManager, `0xc36442b4a4522e871399cd717abdd847ab11fe88`. The contract's calls and events are the whole lifecycle: `mint` creates a position and returns its token ID, `increaseLiquidity` and `decreaseLiquidity` resize it, `Collect` pays out fees, `burn` destroys it. Bitquery decodes all of them in the `Calls` and `Events` cubes, arguments and return values included, and the contract sees a steady flow of position changes and fee collections every hour. Every example below runs in the [IDE](https://ide.bitquery.io/) on a free account against the realtime dataset, which is where decoded call arguments and returns live; the archive dataset does not serve the `Calls` cube. Uniswap V4 keeps positions inside its PoolManager instead, and the last section covers it. New positions with their token IDs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#new-positions-with-their-token-ids "Direct link to New positions with their token IDs") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `mint` calls from the last day, newest first. The `params` struct arrives as one argument per member in contract order: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline. `Returns` carries the new `tokenId`, the `liquidity` minted and the two amounts pulled in. Saved query [here](https://ide.bitquery.io/recent-uniswap-position-NFTs-mint_1) . { EVM(network: eth) { Calls( where: { Call: { Signature: { Name: { is: "mint" } } To: { is: "0xc36442b4a4522e871399cd717abdd847ab11fe88" } } Block: { Time: { since_relative: { hours_ago: 24 } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Transaction { From Hash } Arguments { Name Path { Name } Value { ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Integer_Value_Arg { integer } } } Returns { Name Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} The same filter as a subscription delivers each new position as it is minted; expect one every few minutes rather than a firehose. subscription { EVM(network: eth) { Calls( where: { Call: { Signature: { Name: { is: "mint" } } To: { is: "0xc36442b4a4522e871399cd717abdd847ab11fe88" } } } ) { Block { Time } Transaction { From Hash } Returns { Name Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} Closed positions[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#closed-positions "Direct link to Closed positions") ---------------------------------------------------------------------------------------------------------------------------------------------------------- `burn` destroys the NFT once its liquidity is zero and fees are collected. The only argument is the token ID. Saved query [here](https://ide.bitquery.io/Uniswap-v3-weth-usdt-burn-calls-only) . { EVM(network: eth) { Calls( where: { Call: { Signature: { Name: { is: "burn" } } To: { is: "0xc36442b4a4522e871399cd717abdd847ab11fe88" } } Block: { Time: { since_relative: { hours_ago: 24 } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Transaction { From Hash } Arguments { Name Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} Liquidity added to or removed from a position[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#liquidity-added-to-or-removed-from-a-position "Direct link to Liquidity added to or removed from a position") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `increaseLiquidity` and `decreaseLiquidity` keep the token ID and change the size. The `params` members arrive in order: tokenId, then the desired and minimum amounts for `increaseLiquidity` or the liquidity to remove and the minimum amounts for `decreaseLiquidity`, then the deadline. `Returns` gives the liquidity delta and the token amounts moved. Saved query [here](https://ide.bitquery.io/uniswap-v3-liquidity-increase-decrease) . { EVM(network: eth) { Calls( where: { Call: { Signature: { Name: { in: ["increaseLiquidity", "decreaseLiquidity"] } } To: { is: "0xc36442b4a4522e871399cd717abdd847ab11fe88" } } Block: { Time: { since_relative: { hours_ago: 24 } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Call { Signature { Name } } Transaction { From Hash } Arguments { Name Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Integer_Value_Arg { integer } } } Returns { Name Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} Position details by token ID[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#position-details-by-token-id "Direct link to Position details by token ID") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `positions(tokenId)` is a view function, but contracts call it on-chain all day, and each recorded call returns the full position: `token0`, `token1`, `fee`, `tickLower`, `tickUpper`, `liquidity`, the fee growth counters and the tokens owed. Add the commented `Arguments` filter to pin one token ID. Saved query [here](https://ide.bitquery.io/uniswap-v3-weth-usdt-positions-of-tokenid-with-returns) . { EVM(network: eth) { Calls( where: { Call: { Signature: { Name: { is: "positions" } } To: { is: "0xc36442b4a4522e871399cd717abdd847ab11fe88" } } # Arguments: { includes: { Value: { BigInteger: { eq: "1360638" } } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } limit: { count: 10 } orderBy: { descending: Block_Time } ) { Block { Time } Call { From } Arguments { Name Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } Returns { Name Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_Address_Value_Arg { address } } } } }} Fee collections[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#fee-collections "Direct link to Fee collections") ------------------------------------------------------------------------------------------------------------------------------------------------------- The `Collect` event on the position manager names the `tokenId`, the `recipient` and the raw `amount0` and `amount1` paid out. Filtering on the log's contract catches collections routed through other contracts as well as direct calls. Saved query [here](https://ide.bitquery.io/Fee-collection-on-Uniswap-v3-Positions) . { EVM(network: eth) { Events( where: { Log: { SmartContract: { is: "0xc36442b4a4522e871399cd717abdd847ab11fe88" } Signature: { Name: { is: "Collect" } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Transaction { Hash From } Arguments { Name Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } } } } }} Uniswap V4 positions[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#uniswap-v4-positions "Direct link to Uniswap V4 positions") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- V4 has no position NFT contract of its own: the PoolManager, `0x000000000004444c5dc75cb358380d2e3de08a90`, emits `ModifyLiquidity` with the pool `id`, the `sender`, `tickLower`, `tickUpper`, the signed `liquidityDelta` and the position `salt`. A positive delta adds liquidity and a negative one removes it. Saved query [here](https://ide.bitquery.io/Latest-ModifyLiquidity-Events-on-Uniswap-v4) . { EVM(network: eth) { Events( where: { Log: { SmartContract: { is: "0x000000000004444c5dc75cb358380d2e3de08a90" } Signature: { Name: { is: "ModifyLiquidity" } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Transaction { From Hash } Arguments { Name Value { ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_Bytes_Value_Arg { hex } } } } }} Turning ticks into a price band[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#turning-ticks-into-a-price-band "Direct link to Turning ticks into a price band") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- A position earns fees only while the pool price sits between its ticks. The price at a tick is `1.0001 ^ tick` in token1 per token0 raw units, so a position with `tickLower` of -100 and `tickUpper` of 100 covers roughly 0.990 to 1.010. Multiply by `10 ^ (decimals0 - decimals1)` to get a human price, and invert it if you want token0 per token1. The tick values come from the `mint` arguments, the `positions` returns or the V4 `ModifyLiquidity` event above. Frequently Asked Questions -------------------------- How do I get the token ID of a new Uniswap V3 position? Query mint calls to the NonfungiblePositionManager and read Returns: tokenId is the first return value, followed by liquidity, amount0 and amount1. The subscription form delivers each new position as it is minted. Why does the archive dataset fail for these queries? Decoded call arguments and returns are served from the realtime dataset only; the archive dataset does not serve the Calls cube. Use relative time windows on the default dataset as the examples do. How do I track fees collected by one position? Filter the Collect events on the position manager and add Arguments includes Value BigInteger eq with the token ID, the same filter shape shown for positions calls. Which contract holds Uniswap V4 positions? The PoolManager, 0x000000000004444c5dc75cb358380d2e3de08a90. Its ModifyLiquidity event carries the pool id, sender, tick range, liquidityDelta and salt; there is no separate position NFT contract in V4. Can I see the liquidity of a whole pool rather than one position? Yes. The Ethereum liquidity API page covers pool reserves and changes through DEXPoolEvents, with USD values on every row. Related pages[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------------------- * [Uniswap API on Ethereum](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-api/) * [Uniswap v4 API on Ethereum](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/) * [Ethereum liquidity API](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/ethereum-liquidity-api/) * [Ethereum slippage API](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/ethereum-slippage-api/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [New positions with their token IDs](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#new-positions-with-their-token-ids) * [Closed positions](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#closed-positions) * [Liquidity added to or removed from a position](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#liquidity-added-to-or-removed-from-a-position) * [Position details by token ID](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#position-details-by-token-id) * [Fee collections](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#fee-collections) * [Uniswap V4 positions](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#uniswap-v4-positions) * [Turning ticks into a price band](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#turning-ticks-into-a-price-band) * [Related pages](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-position-api/#related-pages) --- # BSC Mempool Stream - Real-Time Transaction Monitoring [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Monitor BSC (BNB Smart Chain) mempool transactions in real-time before they are confirmed on-chain. Track pending DEX trades, token creations, transfers, and detect opportunities early with Bitquery's Mempool APIs and Streams. Any Bitquery GraphQL stream can be converted to a mempool monitoring stream by setting `mempool: true`. We also provide low-latency Kafka streams to monitor broadcasted data, which are much faster than GraphQL mempool streams. Read more about Kafka streams [here](https://docs.bitquery.io/docs/streams/protobuf/chains/EVM-protobuf/) . note To query or stream data via GraphQL **outside the Bitquery IDE**, you need to generate an API access token. Follow the steps here to create one: [How to generate Bitquery API token ➤](https://docs.bitquery.io/docs/authorization/how-to-generate/) * * * How do I stream BSC pending transactions (mempool) using Bitquery?[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#how-do-i-stream-bsc-pending-transactions-mempool-using-bitquery "Direct link to How do I stream BSC pending transactions (mempool) using Bitquery?") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Use a **GraphQL `subscription`** on the Bitquery streaming **WebSocket** [`wss://streaming.bitquery.io/graphql`](https://docs.bitquery.io/docs/subscriptions/websockets/) with root **`EVM(network: bsc, mempool: true)`**. The **`mempool: true`** flag switches the stream to **broadcast / simulated pending** traffic instead of only confirmed blocks. Under that root, subscribe to the same APIs you use on-chain—**`Transactions`**, **`Transfers`**, **`DEXTrades`**, **`Events`**, and others—with `where` filters as needed. Authenticate the socket per [WebSocket authorization](https://docs.bitquery.io/docs/authorization/websocket/) . For mempool semantics (ordering, time window, vs confirmed subscriptions), read [Subscribing to mempool updates](https://docs.bitquery.io/docs/subscriptions/mempool-subscriptions/) . For lower latency at scale, consider **Kafka** [EVM protobuf streams](https://docs.bitquery.io/docs/streams/protobuf/chains/EVM-protobuf/) . Minimal example—pending transaction headers on BSC: subscription BscMempoolTransactions { EVM(network: bsc, mempool: true) { Transactions { Block { Time } Transaction { Hash Cost To From } } }} Try it in the IDE: [BSC mempool transactions](https://ide.bitquery.io/bsc-mempool-txs) . Richer **`Transfers`** and **DEX** mempool patterns are in [Mempool Streaming Examples](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#mempool-streaming-examples) below. * * * Table of Contents[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#table-of-contents "Direct link to Table of Contents") -------------------------------------------------------------------------------------------------------------------------------------------- ### 1\. [How do I stream BSC pending transactions (mempool) using Bitquery?](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#how-do-i-stream-bsc-pending-transactions-mempool-using-bitquery) [​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#1-how-do-i-stream-bsc-pending-transactions-mempool-using-bitquery "Direct link to 1-how-do-i-stream-bsc-pending-transactions-mempool-using-bitquery") ### 2\. [How Mempool Simulation Works](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#how-do-we-simulate-txs-for-bitquery-mempool-apis--streams) [​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#2-how-mempool-simulation-works "Direct link to 2-how-mempool-simulation-works") ### 3\. Mempool Streaming Examples[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#3-mempool-streaming-examples "Direct link to 3. Mempool Streaming Examples") * [Stream Four Meme Trades in Mempool ➤](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#stream-four-meme-trades-in-mempool---detect-them-early) * [Stream Four Meme Token Creation in Mempool ➤](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#stream-four-meme-token-creation-in-mempool---detect-them-first) * [Stream All Transactions in Mempool ➤](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#streaming-transactions-in-mempool-on-bsc) * [Stream DEX Trades in Mempool ➤](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#streaming-trades-in-mempool-on-bsc) * * * How do we simulate txs for Bitquery Mempool APIs & Streams?[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#how-do-we-simulate-txs-for-bitquery-mempool-apis--streams "Direct link to How do we simulate txs for Bitquery Mempool APIs & Streams?") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ When a transaction is received by the node but not yet included in a block, Bitquery uses the following context to send mempool data: * The transaction is executed in the EVM (using the current pending block context). * The system captures the simulated receipt and trace. For each batch of simulated transactions, Bitquery records the block header used as the execution context. message BroadcastedTransactionsMessage { Chain Chain = 1; BlockHeader Header = 2; repeated Transaction Transactions = 3;} Mempool Streaming Examples[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#mempool-streaming-examples "Direct link to Mempool Streaming Examples") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Stream Four Meme Trades in Mempool - Detect Them Early[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#stream-four-meme-trades-in-mempool---detect-them-early "Direct link to Stream Four Meme Trades in Mempool - Detect Them Early") Monitor Four Meme DEX trades in real-time as they appear in the mempool, before they are confirmed on-chain. This allows you to detect trading opportunities early and front-run or back-run trades. [Run Stream ➤](https://ide.bitquery.io/Four-Meme-mempool-trades) Click to expand GraphQL query subscription { EVM(network: bsc, mempool: true) { DEXTrades(where: {Trade: {Dex: {ProtocolName: {is: "fourmeme_v1"}}}}) { Trade { Buy { Buyer Currency { Name Symbol SmartContract } Amount } Sell { Seller Currency { Name Symbol SmartContract } Amount } } Transaction { Hash } } }} ### Stream Four Meme Token Creation in Mempool - Detect Them First[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#stream-four-meme-token-creation-in-mempool---detect-them-first "Direct link to Stream Four Meme Token Creation in Mempool - Detect Them First") Track new Four Meme token creations in the mempool instantly. Be the first to know when a new token is being created, before it's confirmed on-chain. [Run Stream ➤](https://ide.bitquery.io/track-Four-meme-token-creation-in-mempool) Click to expand GraphQL query subscription { EVM(network: bsc, mempool: true) { Events( where: {Transaction: {To: {is: "0x5c952063c7fc8610ffdb798152d69f0b9550762b"}}, Log: {Signature: {Name: {is: "TokenCreate"}}}} ) { Log { Signature { Name Signature } } Arguments { Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } } Name Type } Transaction { Hash To From } } }} ### Streaming Transactions in Mempool on BSC[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#streaming-transactions-in-mempool-on-bsc "Direct link to Streaming Transactions in Mempool on BSC") Monitor all pending transactions and transfers on BSC in real-time. Track transaction details including sender, receiver, gas, amounts, and token information before blocks are mined. [Run Stream ➤](https://ide.bitquery.io/bsc-mempool-txs) Click to expand GraphQL query subscription { EVM(mempool: true, network: bsc) { Transfers { Log { Index } Transaction { Time Type To Gas From Cost Hash } Transfer { Amount Currency { Name } Type } TransactionStatus { Success FaultError EndError } Block { Time } Call { Signature { Name } } } }} ### Streaming Trades in Mempool on BSC[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#streaming-trades-in-mempool-on-bsc "Direct link to Streaming Trades in Mempool on BSC") Stream all DEX trades happening in the BSC mempool in real-time. Monitor buy/sell activity, prices, volumes, and trading pairs across all DEXs before transactions are confirmed. [Run Stream ➤](https://ide.bitquery.io/monitor-mempool-trades-bsc) Click to expand GraphQL query subscription { EVM(mempool: true, network: bsc) { DEXTradeByTokens { Block { Number } Transaction { Hash } Trade { Price PriceInUSD Currency { Name } Amount Buyer Dex { ProtocolName } Side { Seller Buyer AmountInUSD Amount Currency { Name Symbol } } } } }} * * * Related Resources[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#related-resources "Direct link to Related Resources") -------------------------------------------------------------------------------------------------------------------------------------------- You may also be interested in: * [Four Meme API Documentation ➤](https://docs.bitquery.io/docs/blockchain/BSC/four-meme-api/) * [BSC DEX Trades API ➤](https://docs.bitquery.io/docs/schema/evm/dextrades/) * [Kafka Protobuf Streams for EVM ➤](https://docs.bitquery.io/docs/streams/protobuf/chains/EVM-protobuf/) * [WebSocket Subscriptions ➤](https://docs.bitquery.io/docs/authorization/websocket/) Need Help?[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#need-help "Direct link to Need Help?") ---------------------------------------------------------------------------------------------------------------------- If you have any questions or need assistance with BSC mempool streams, reach out to our [Telegram support](https://t.me/Bloxy_info) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [How do I stream BSC pending transactions (mempool) using Bitquery?](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#how-do-i-stream-bsc-pending-transactions-mempool-using-bitquery) * [Table of Contents](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#table-of-contents) * [1\. How do I stream BSC pending transactions (mempool) using Bitquery?](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#1-how-do-i-stream-bsc-pending-transactions-mempool-using-bitquery) * [2\. How Mempool Simulation Works](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#2-how-mempool-simulation-works) * [3\. Mempool Streaming Examples](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#3-mempool-streaming-examples) * [How do we simulate txs for Bitquery Mempool APIs & Streams?](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#how-do-we-simulate-txs-for-bitquery-mempool-apis--streams) * [Mempool Streaming Examples](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#mempool-streaming-examples) * [Stream Four Meme Trades in Mempool - Detect Them Early](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#stream-four-meme-trades-in-mempool---detect-them-early) * [Stream Four Meme Token Creation in Mempool - Detect Them First](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#stream-four-meme-token-creation-in-mempool---detect-them-first) * [Streaming Transactions in Mempool on BSC](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#streaming-transactions-in-mempool-on-bsc) * [Streaming Trades in Mempool on BSC](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#streaming-trades-in-mempool-on-bsc) * [Related Resources](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#related-resources) * [Need Help?](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/#need-help) --- # Cardano Coinpath API - Trace ADA Flows Across Multiple Hops [Skip to main content](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Coinpath walks ADA flows between Cardano addresses across multiple hops — forward to see where funds went, backward to see where they came from. Because Cardano uses an eUTXO model, the API stitches chains of UTXOs together and returns senders, receivers, hop depth, amounts, and transaction counts at each level. Common use cases: AML / compliance screening, DAO treasury audits, exchange deposit tracing, and source-of-funds verification. Endpoint Cardano GraphQL queries are served at `https://graphql.bitquery.io`. Trace inbound and outbound ADA flows for an address[​](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/#trace-inbound-and-outbound-ada-flows-for-an-address "Direct link to Trace inbound and outbound ADA flows for an address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query runs both directions in one request. The `inbound` block walks backward from the initial address to find fund sources; the `outbound` block walks forward to find destinations. Each side is capped at 2 hops with up to 2 paths per hop — a good starting point before widening for deeper investigations. { cardano(network: cardano) { inbound: coinpath( currency: {is: "ADA"} initialAddress: {is: "addr1q8hq60cyqg68aqfzs9geq084yj0tvvpm7rnckn6gsf3ahyrwak0antyvs6lyd7ymqg2zp6q8999vsdadmpm70x93f8msd7uwux"} depth: {lteq: 2} options: {direction: inbound, asc: "depth", desc: "amount", limitBy: {each: "depth", limit: 2}} date: {since: "2023-11-30", till: "2023-12-18"} ) { sender { address annotation } receiver { address annotation } amount depth count } outbound: coinpath( currency: {is: "ADA"} initialAddress: {is: "addr1q8hq60cyqg68aqfzs9geq084yj0tvvpm7rnckn6gsf3ahyrwak0antyvs6lyd7ymqg2zp6q8999vsdadmpm70x93f8msd7uwux"} depth: {lteq: 2} options: {asc: "depth", desc: "amount", limitBy: {each: "depth", limit: 2}} date: {since: "2023-11-30", till: "2023-12-18"} ) { sender { address annotation } receiver { address annotation } amount depth count } }} Raise `depth: {lteq: N}` (typically 3–5) for broader tracing, increase `limitBy.limit` for more paths per hop, and widen the `date` window. Keep only the block you need if a single direction is enough. Deeper outbound ADA trace[​](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/#deeper-outbound-ada-trace "Direct link to Deeper outbound ADA trace") -------------------------------------------------------------------------------------------------------------------------------------------------------------- Walk forward from an address up to 3 hops deep with 5 paths per hop — a compact view that covers more ground than the 2-hop example above. Returns `amount`, `depth`, and `count` per hop, which is enough for most DAO treasury audits and fraud investigations. { cardano(network: cardano) { coinpath( currency: {is: "ADA"} initialAddress: {is: "addr1q8hq60cyqg68aqfzs9geq084yj0tvvpm7rnckn6gsf3ahyrwak0antyvs6lyd7ymqg2zp6q8999vsdadmpm70x93f8msd7uwux"} depth: {lteq: 3} options: {asc: "depth", desc: "amount", limitBy: {each: "depth", limit: 5}} date: {since: "2023-01-01", till: "2023-12-31"} ) { sender { address annotation } receiver { address annotation } amount depth count } }} For forensic work, depths of 5–7 are common. Add `direction: inbound` to `options` to flip the trace. If you're running the same query repeatedly in parallel and want to bypass intermediate-stage caching, set `options: {seed: 110, ...}` with any random integer. Related resources[​](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/#related-resources "Direct link to Related resources") -------------------------------------------------------------------------------------------------------------------------------------- * [Cardano Address API](https://docs.bitquery.io/docs/blockchain/Cardano/address/) — wallet balances, staking, and `addressStats` * [Cardano Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/) — UTXO-level inflows and outflows Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Trace inbound and outbound ADA flows for an address](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/#trace-inbound-and-outbound-ada-flows-for-an-address) * [Deeper outbound ADA trace](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/#deeper-outbound-ada-trace) * [Related resources](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/#related-resources) --- # Polygon (MATIC) NFT API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Matic/matic-nft/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we'll have a look at some examples using the Matic NFT API. Track transfers of an NFT in Realtime[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-nft/#track-transfers-of-an-nft-in-realtime "Direct link to Track transfers of an NFT in Realtime") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query subscribes you to the real time transfers of a specific non-fungible token (NFT) on the Matic network. You can find the query [here](https://ide.bitquery.io/Real-time-transfer-websocket-for-NFT-token-on-matic) subscription { EVM(network: matic) { Transfers( where: { Transfer: { Currency: { Fungible: false SmartContract: { is: "0x4d544035500D7aC1B42329c70eb58E77f8249f0F" } } } } ) { Block { Hash Number } Transfer { Amount Currency { Name Symbol Native } Sender Receiver } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track transfers of an NFT in Realtime](https://docs.bitquery.io/docs/blockchain/Matic/matic-nft/#track-transfers-of-an-nft-in-realtime) --- # Cardano Blocks API - Query Blocks by Height, Slot & Epoch [Skip to main content](https://docs.bitquery.io/docs/blockchain/Cardano/blocks/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Blocks API exposes everything you'd expect from a Cardano block: height, hash, size, protocol version, epoch and slot context, slot-leader metadata, VRF key, transaction count, and timestamp. Use it to power explorer front-ends, monitor chain progression, or pull historical block context for downstream analytics. Endpoint Cardano GraphQL queries are served at `https://graphql.bitquery.io`. Look up a Cardano block by height[​](https://docs.bitquery.io/docs/blockchain/Cardano/blocks/#look-up-a-cardano-block-by-height "Direct link to Look up a Cardano block by height") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Fetch a single block by its height. The response carries the block hash, size and protocol version, epoch and slot context, operational certificate, slot-leader description and hash, VRF key, transaction count, and the production timestamp. query { cardano(network: cardano) { blocks(height: {is: 9612373}) { timestamp { time(format: "%Y-%m-%d %H:%M:%S") } blockHash blockSize blockVersion transactionCount epoch opCert slot slotInEpoch slotLeaderDescription slotLeaderHash vrfKey height } }} To look up by hash instead, swap `height` for `blockHash: {is: "..."}`. To pull several blocks in one request, pass an array with `height: {in: [...]}`. List recent Cardano blocks in a time window[​](https://docs.bitquery.io/docs/blockchain/Cardano/blocks/#list-recent-cardano-blocks-in-a-time-window "Direct link to List recent Cardano blocks in a time window") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Get the 10 most recent blocks produced between two timestamps. Handy for explorer recent-block widgets, throughput dashboards, and watching slot leaders across an epoch. { cardano(network: cardano) { blocks( options: {desc: "height", limit: 10, offset: 0} time: {since: "2023-11-30T06:10:00Z", till: "2023-11-30T06:17:00Z"} ) { height blockHash blockSize transactionCount epoch slot slotInEpoch timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } }} Sort ascending with `asc: "height"` to walk the chain forward, and widen the `time` window for longer scans. Related resources[​](https://docs.bitquery.io/docs/blockchain/Cardano/blocks/#related-resources "Direct link to Related resources") ------------------------------------------------------------------------------------------------------------------------------------ * [Cardano Transactions API](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/) — per-block transaction details and fees * [Cardano Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/) — UTXO data tied to each transaction Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Look up a Cardano block by height](https://docs.bitquery.io/docs/blockchain/Cardano/blocks/#look-up-a-cardano-block-by-height) * [List recent Cardano blocks in a time window](https://docs.bitquery.io/docs/blockchain/Cardano/blocks/#list-recent-cardano-blocks-in-a-time-window) * [Related resources](https://docs.bitquery.io/docs/blockchain/Cardano/blocks/#related-resources) --- # Cardano Transactions API - Fees, Inputs, Outputs & Mints [Skip to main content](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Transactions API returns transaction-level data on Cardano: input and output totals, fees in ADA and USD, mint counts, withdrawals, and block context. Use it for daily reporting, fee analysis, spotting outlier transactions, and building activity dashboards. Endpoint Cardano GraphQL queries are served at `https://graphql.bitquery.io`. Get Cardano transactions for a specific date[​](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/#get-cardano-transactions-for-a-specific-date "Direct link to Get Cardano transactions for a specific date") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Pull 10 transactions from a single day with full economic context — input value in ADA and USD, fee value in ADA and USD, mint count, withdrawal totals, output value, and input/output counts. { cardano(network: cardano) { transactions(options: {limit: 10}, date: {is: "2023-11-29"}) { block { timestamp { time(format: "%Y-%m-%d %H:%M:%S") } height } hash index inputValue input_value_usd: inputValue(in: USD) outputValue inputCount outputCount feeValue fee_value_usd: feeValue(in: USD) mintCount withdrawalValue withdrawalCount } }} Switch `date: {is: ...}` to `date: {since: ..., till: ...}` for a range, sort with `options: {desc: ["block.height", "index"], limit: 10}` to pull the latest, or add `feeValue: {gt: ...}` to surface high-fee transactions only. Count daily Cardano transactions[​](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/#count-daily-cardano-transactions "Direct link to Count daily Cardano transactions") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate the total transaction count per day for the last 10 days. Useful for activity dashboards, throughput monitoring, and spotting unusual spikes. { cardano(network: cardano) { transactions(options: {desc: "date.date", limit: 10}) { date { date } count } }} Use `startOfInterval(unit: day, interval: 10)` for coarser buckets, raise `limit` for more days, or add a `date: {since: ..., till: ...}` window. Related resources[​](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/#related-resources "Direct link to Related resources") ------------------------------------------------------------------------------------------------------------------------------------------ * [Cardano Blocks API](https://docs.bitquery.io/docs/blockchain/Cardano/blocks/) — block-level lookups and time-window queries * [Cardano Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/) — UTXO-level transaction data * [Cardano Mints API](https://docs.bitquery.io/docs/blockchain/Cardano/mints/) — drill into the mint events behind `mintCount` Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Cardano transactions for a specific date](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/#get-cardano-transactions-for-a-specific-date) * [Count daily Cardano transactions](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/#count-daily-cardano-transactions) * [Related resources](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/#related-resources) --- # Cardano Inputs and Outputs API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Cardano runs on an **eUTXO** model — there are no account balances stored on-chain. To get an address's balance or activity you walk its inputs (UTXOs being spent) and outputs (UTXOs being received). These APIs return that UTXO-level data with transaction hash, output index, ADA and USD values, and block timestamps. Endpoint Cardano GraphQL queries are served at `https://graphql.bitquery.io`. Compute a Cardano address balance from UTXOs[​](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/#compute-a-cardano-address-balance-from-utxos "Direct link to Compute a Cardano address balance from UTXOs") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In the eUTXO model, an address balance is simply `sum(outputs received) - sum(inputs spent)`. This query pulls both sides in one request, with total counts, ADA values, USD values, and the first / last active dates. { cardano(network: cardano) { inputs( currency: {is: "ADA"} inputAddress: {is: "addr1v9m34968vfwya2dydafkaq48ag9pzerznwjf0ewu4jj5vfsvgmyhk"} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) } outputs( currency: {is: "ADA"} outputAddress: {is: "addr1v9m34968vfwya2dydafkaq48ag9pzerznwjf0ewu4jj5vfsvgmyhk"} ) { count value value_usd: value(in: USD) min_date: minimum(of: date) max_date: maximum(of: date) } }} Add `date: {since: ..., till: ...}` to scope a window, pass `inputAddress: {in: [...]}` / `outputAddress: {in: [...]}` to aggregate across multiple wallets in one call, or drop the `currency: {is: "ADA"}` filter to include native tokens alongside ADA. For the aggregate shortcut (with pre-computed inflows, outflows, counterparty counts, etc.) see the [`addressStats` query](https://docs.bitquery.io/docs/blockchain/Cardano/address/#get-cardano-address-activity-stats-addressstats) . List UTXO outputs received by a Cardano address[​](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/#list-utxo-outputs-received-by-a-cardano-address "Direct link to List UTXO outputs received by a Cardano address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Return individual UTXOs received by an address inside a date window. Each row carries block height and timestamp, transaction hash, output index, output direction, and ADA / USD value. Use it for transaction reports, wallet activity feeds, or merchant payment ingestion. { cardano(network: cardano) { outputs( currency: {is: "ADA"} date: {since: "2022-10-19", till: "2022-10-26T23:59:59"} outputAddress: {is: "addr1qxz3ve4caaywwg6q82ax9l5xknyc7juvwwsw20cpugyz5gv9zent3m6guu35qw46vtlgddxf3a9ccuaqu5lsrcsg9gss69fhxw"} options: {desc: ["block.height", "outputIndex"], limit: 10, offset: 0} ) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } transaction { hash } outputIndex outputDirection value value_usd: value(in: USD) currency { symbol } } }} Swap `outputs` for `inputs` (and `outputAddress` for `inputAddress`) to see UTXOs the wallet has spent. Remove the `currency` filter entirely to include every asset type — native tokens included. Get the parsed datum of a Cardano transaction UTXO[​](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/#get-the-parsed-datum-of-a-cardano-transaction-utxo "Direct link to Get the parsed datum of a Cardano transaction UTXO") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Cardano UTXOs can carry inline `datum` — script-readable data attached to an output, used by Plutus smart contracts. This query returns all outputs for a given transaction hash and exposes the parsed datum inside `currency.properties` (in YAML-like format), so you don't have to decode CBOR yourself. query ($network: CardanoNetwork!, $hash: String!, $limit: Int!, $offset: Int!) { cardano(network: $network) { outputs( txHash: {is: $hash} options: {asc: "outputIndex", limit: $limit, offset: $offset} ) { outputIndex address: outputAddress { address annotation } value value_usd: value(in: USD) currency { symbol tokenType tokenId properties name decimals address } outputDirection date { date } transaction { hash } valueDecimal } }} Variables: { "limit": 10, "offset": 0, "network": "cardano", "hash": "6c83cf62225ecdf0cbb57e11718a8ec079f490b7f05d97f5a6d2214fb00be182"} The `properties` field on the currency object contains the parsed datum: "properties": "---\nassetName: 494e4459\nfingerprint: asset1u8caujpkc0km4vlwxnd8f954lxphrc8l55ef3j\npolicyId: 533bb94a8850ee3ccbe483106489399112b74c905342cb1792a797a0\n", Related resources[​](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/#related-resources "Direct link to Related resources") -------------------------------------------------------------------------------------------------------------------------------------------- * [Cardano Address API](https://docs.bitquery.io/docs/blockchain/Cardano/address/) — balances, staking, and the `addressStats` aggregate cube * [Cardano Coinpath API](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/) — multi-hop ADA flow tracing across addresses * [Cardano Transactions API](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/) — transaction-level totals and fees Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Compute a Cardano address balance from UTXOs](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/#compute-a-cardano-address-balance-from-utxos) * [List UTXO outputs received by a Cardano address](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/#list-utxo-outputs-received-by-a-cardano-address) * [Get the parsed datum of a Cardano transaction UTXO](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/#get-the-parsed-datum-of-a-cardano-transaction-utxo) * [Related resources](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/#related-resources) --- # Cardano Mints API - Track Native Token Mints | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Cardano/mints/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Cardano doesn't mint tokens through smart contracts the way EVM chains do. Every native token — fungible or NFT — is issued under a **minting policy**, and every mint or burn shows up on-chain as a single event tied to that policy. The Mints API exposes those events with amounts, transaction hash, block context, and the full asset metadata. Use it to track NFT collection drops, fungible-token issuance, stablecoin supply changes, or any kind of on-chain supply movement. Endpoint Cardano GraphQL queries are served at `https://graphql.bitquery.io`. Get recent Cardano mint and burn events[​](https://docs.bitquery.io/docs/blockchain/Cardano/mints/#get-recent-cardano-mint-and-burn-events "Direct link to Get recent Cardano mint and burn events") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Pull the 10 most recent mint events across every minting policy on a given date. The `value` field is signed: positive numbers are mints, negative numbers are burns. Each result includes block height and timestamp, transaction hash and index, and full currency metadata — including the policy-based `address`, asset name, symbol, `tokenId` (CIP-14 fingerprint), `tokenType`, and decimals. { cardano(network: cardano) { mints(options: {limit: 10, desc: "block.height"}, date: {is: "2026-05-01"}) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } value transaction { hash index } currency { address name symbol tokenId tokenType decimals } } }} To find the largest single mints, sort by `desc: "value"`. To filter by a specific policy or asset, add `currency: {is: ""}` — see the [DJED examples](https://docs.bitquery.io/docs/blockchain/Cardano/djed/) for the pattern. On Cardano, the policy ID is the first 56 hex characters of `currency.address`; the remainder is the hex-encoded asset name. Aggregate Cardano mints by month[​](https://docs.bitquery.io/docs/blockchain/Cardano/mints/#aggregate-cardano-mints-by-month "Direct link to Aggregate Cardano mints by month") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get monthly mint counts by pulling `mintCount` from the `transactions` cube. Returns one row per month with the total mint count, input and output values, and fees — a compact view for tracking issuance trends across quarters or years. { cardano(network: cardano) { transactions( options: {desc: "date.month", limit: 12} date: {since: "2023-01-01", till: "2023-12-31"} ) { date { month startOfInterval(unit: month) } mintCount(calculate: sum) inputValue input_value_usd: inputValue(in: USD) outputCount inputCount feeValue fee_value_usd: feeValue(in: USD) } }} Change `startOfInterval(unit: month)` to `week` or `day` for finer buckets. To drill from a monthly total down to the individual mint events, combine this query with the one above. Related resources[​](https://docs.bitquery.io/docs/blockchain/Cardano/mints/#related-resources "Direct link to Related resources") ----------------------------------------------------------------------------------------------------------------------------------- * [Djed Stablecoin API](https://docs.bitquery.io/docs/blockchain/Cardano/djed/) — currency-filtered mint and burn examples on a real asset * [Cardano Transactions API](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/) — full transaction context for mint events Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get recent Cardano mint and burn events](https://docs.bitquery.io/docs/blockchain/Cardano/mints/#get-recent-cardano-mint-and-burn-events) * [Aggregate Cardano mints by month](https://docs.bitquery.io/docs/blockchain/Cardano/mints/#aggregate-cardano-mints-by-month) * [Related resources](https://docs.bitquery.io/docs/blockchain/Cardano/mints/#related-resources) --- # Cardano Address API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Cardano/address/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Address API gives you everything tied to a Cardano wallet: ADA balance, balances for every native token the wallet holds, and the staking snapshot (controlled stake, rewards available, rewards withdrawn). For quick activity profiling you can also use the `addressStats` cube, which returns pre-aggregated inflow, outflow, counterparty, and first/last-active metrics. Endpoint Cardano GraphQL queries are served at `https://graphql.bitquery.io`. Get Cardano wallet balances and staking info[​](https://docs.bitquery.io/docs/blockchain/Cardano/address/#get-cardano-wallet-balances-and-staking-info "Direct link to Get Cardano wallet balances and staking info") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query returns ADA plus every native token a Cardano address holds, with the wallet's full staking context — total controlled stake, the staked amount with and without rewards, rewards currently available, and how much has already been withdrawn. Useful for portfolio dashboards, wallet UIs, and staking analytics. Swap the example address with the wallet you want to inspect. Stake addresses (`stake1...`) work in the same filter. { cardano(network: cardano) { address( address: {is: "addr1v9m34968vfwya2dydafkaq48ag9pzerznwjf0ewu4jj5vfsvgmyhk"} ) { address { address annotation } balance { value currency { name symbol decimals address tokenId tokenType } } staking { controlledTotalStake stakedAmount stakedAmountWithRewards rewardsAmount rewardsAvailable withdrawnAmount address { address annotation } } } }} If you only want the ADA balance, filter the response client-side where `currency.symbol == "ADA"`. Drop the `staking` block when stake context isn't needed. Get Cardano address activity stats (addressStats)[​](https://docs.bitquery.io/docs/blockchain/Cardano/address/#get-cardano-address-activity-stats-addressstats "Direct link to Get Cardano address activity stats (addressStats)") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `addressStats` is a pre-aggregated view of a wallet's lifetime activity — total inflows and outflows, inbound and outbound transaction counts, unique senders and receivers, unique active days, current balance, and the first / last active timestamps. It's the fastest way to profile an address for compliance checks, exchange screening, or analytics dashboards. caution `addressStats` is pre-aggregated and can lag the chain slightly. For exact, up-to-the-block balance math, sum `outputs` and subtract `inputs` from the [Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/) . { cardano(network: cardano) { addressStats( address: {is: "addr1v9m34968vfwya2dydafkaq48ag9pzerznwjf0ewu4jj5vfsvgmyhk"} ) { address { address annotation balance inflows outflows inboundTransactions outboundTransactions uniqueSenders uniqueReceivers uniqueDaysWithTransfers firstActive { time } lastActive { time } } } }} Pair this with the `address(...)` query above when you want fast aggregate metrics and per-asset balances in one round trip, or run it against a list of exchange / DAO / protocol addresses to compare them side-by-side. Related resources[​](https://docs.bitquery.io/docs/blockchain/Cardano/address/#related-resources "Direct link to Related resources") ------------------------------------------------------------------------------------------------------------------------------------- * [Cardano Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/) — UTXO-level balance reconstruction * [Cardano Transactions API](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/) — transaction-level data with fees * [Cardano Coinpath API](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/) — multi-hop ADA flow tracing Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Cardano wallet balances and staking info](https://docs.bitquery.io/docs/blockchain/Cardano/address/#get-cardano-wallet-balances-and-staking-info) * [Get Cardano address activity stats (addressStats)](https://docs.bitquery.io/docs/blockchain/Cardano/address/#get-cardano-address-activity-stats-addressstats) * [Related resources](https://docs.bitquery.io/docs/blockchain/Cardano/address/#related-resources) --- # Bitcoin Fee API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Query Bitcoin transaction fees at the per-transaction level or aggregated across an address or time window — in BTC and USD. Use it for fee estimation, wallet expense tracking, and historical fee trend analysis. Endpoint Bitcoin GraphQL queries are served at `https://graphql.bitquery.io`. List Bitcoin transactions with per-tx fees in BTC and USD[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/#list-bitcoin-transactions-with-per-tx-fees-in-btc-and-usd "Direct link to List Bitcoin transactions with per-tx fees in BTC and USD") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Pulls transactions for a specific address on a given day with per-transaction fee amounts (BTC and USD), input/output values, and counts. [Run query](https://ide.bitquery.io/bitcoin-trxn-fees-for-a-account_2) . query MyQuery { bitcoin(network: bitcoin) { transactions( options: {limit: 10, desc: ["block.height"]} date: {is: "2025-05-08"} inputAddress: {is: "bc1qrtjvr4d8qtstw5334mspp7rmrzl55uj3dcwj09"} ) { block { timestamp { iso8601 } height } feeValue feeInUSD: feeValue(in: USD) feeValueDecimal hash index inputValue inputCountBigInt inputCount outputValueDecimal outputValue outputCountBigInt outputCount inputValueDecimal } }} Drop the `inputAddress` filter to see fees across all transactions, add `date: {since: ..., till: ...}` for a window, or sort by `feeValue` to surface the highest-fee transactions first. Sum total Bitcoin fees paid by an address on a single day[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/#sum-total-bitcoin-fees-paid-by-an-address-on-a-single-day "Direct link to Sum total Bitcoin fees paid by an address on a single day") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate total fees paid by an address with `feeValue(calculate: sum)` in both BTC and USD. [Run query](https://ide.bitquery.io/Get-Total-fees-paid-by-an-account-on-Bitcoin-network) . query MyQuery { bitcoin(network: bitcoin) { transactions( date: {is: "2025-05-08"} inputAddress: {is: "bc1qrtjvr4d8qtstw5334mspp7rmrzl55uj3dcwj09"} ) { total_fees_in_usd: feeValue(calculate: sum, in: USD) total_fees: feeValue(calculate: sum) } }} Change `date` to a range for multi-day totals, drop `inputAddress` for a network-wide aggregate, or add `feeValue(calculate: average)` for average fee per transaction. Video tutorial: getting Bitcoin transaction fee data[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/#video-tutorial-getting-bitcoin-transaction-fee-data "Direct link to Video tutorial: getting Bitcoin transaction fee data") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Related resources[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/#related-resources "Direct link to Related resources") --------------------------------------------------------------------------------------------------------------------------------------------- * [Bitcoin Transactions API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/) — full transaction query patterns * [Bitcoin Address API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/) — address balances and activity * [Bitcoin Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/) — UTXO-level detail Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [List Bitcoin transactions with per-tx fees in BTC and USD](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/#list-bitcoin-transactions-with-per-tx-fees-in-btc-and-usd) * [Sum total Bitcoin fees paid by an address on a single day](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/#sum-total-bitcoin-fees-paid-by-an-address-on-a-single-day) * [Video tutorial: getting Bitcoin transaction fee data](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/#video-tutorial-getting-bitcoin-transaction-fee-data) * [Related resources](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/#related-resources) --- # Bitcoin Omni Transactions | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-omni-transactions/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Omni Layer is a protocol built on top of Bitcoin for issuing and trading custom tokens — most famously the original Bitcoin-issued USDT. These APIs return Omni-specific transaction and transfer data so you can track issuance, redemptions, and per-address Omni token activity directly on the Bitcoin chain. Endpoint Bitcoin GraphQL queries are served at `https://graphql.bitquery.io`. Get the latest Omni transactions on Bitcoin[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-omni-transactions/#get-the-latest-omni-transactions-on-bitcoin "Direct link to Get the latest Omni transactions on Bitcoin") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the 10 most recent Omni Layer transactions with block height, timestamp, fee in USD, transaction hash, and sender address — ordered by block height descending. query ($network: BitcoinNetwork!) { bitcoin(network: $network) { omniTransactions( options: {desc: "block.height", limit: 10} date: {after: "2023-11-20"} ) { block { height } blockHash date { date } feeValue(in: USD) hash index txSender } }} Filter by sender with `txSender: {is: "..."}`, narrow with a different `date` window, or add `limit` / `offset` for pagination. List Omni transfers for a specific address[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-omni-transactions/#list-omni-transfers-for-a-specific-address "Direct link to List Omni transfers for a specific address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns every Omni token transfer originating from a given Bitcoin address — block hash, sender (`transferFrom`), and receiver (`transferTo`). Replace `ADDRESS_HERE` with the wallet you want to inspect. query ($network: BitcoinNetwork!) { bitcoin(network: $network) { omniTransfers(options: {desc: "block.height"}, txSender: {is: "ADDRESS_HERE"}) { block { height } blockHash transferFrom transferTo } }} Filter incoming transfers with `transferTo: {is: "..."}` instead, add a `date` window to scope a period, or extend the query with currency / amount fields to identify which Omni token moved. Related resources[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-omni-transactions/#related-resources "Direct link to Related resources") ------------------------------------------------------------------------------------------------------------------------------------------------------- * [Bitcoin Transactions API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/) — base-layer Bitcoin transactions * [Bitcoin Address API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/) — address balances and activity * [Bitcoin Coinpath API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/) — multi-hop BTC fund tracing Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get the latest Omni transactions on Bitcoin](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-omni-transactions/#get-the-latest-omni-transactions-on-bitcoin) * [List Omni transfers for a specific address](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-omni-transactions/#list-omni-transfers-for-a-specific-address) * [Related resources](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-omni-transactions/#related-resources) --- # Algorand Smart Contract Calls API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Smart Contract Calls API returns parsed application call data on Algorand: transaction type, sender, smart contract address, block context, and call counts. Filter by `txType` to isolate payments (`pay`), asset configuration (`acfg`), or any other Algorand transaction type. Endpoint Algorand GraphQL queries are served at `https://graphql.bitquery.io`. Count unique smart contract calls in the latest block[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#count-unique-smart-contract-calls-in-the-latest-block "Direct link to Count unique smart contract calls in the latest block") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the count of unique smart contract calls in the most recent block after a given date. [Run query](https://ide.bitquery.io/Get-Count-of-Smart-Contract-Calls-in-Latest-Block_1) { algorand(network: algorand) { smartContractCalls( date: {after: "2023-08-05"} options: {desc: "block.timestamp.iso8601", limit: 1} ) { block { timestamp { iso8601 } } count(uniq: calls) } }} Track newly created assets (acfg transactions)[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#track-newly-created-assets-acfg-transactions "Direct link to Track newly created assets (acfg transactions)") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the 10 most recent asset configuration transactions — `acfg` stands for asset config. Each result includes the smart contract address, transaction hash, sender, and block timestamp. [Run query](https://ide.bitquery.io/Track-latest-assets-created-on-Algorand-network_1#) { algorand(network: algorand) { smartContractCalls( options: {desc: "block.timestamp.iso8601", limit: 10} txType: {is: acfg} ) { block { timestamp { iso8601 } } smartContract { address { address } } transaction { hash } txSender { address } txType } }} Count smart contract calls by transaction type since genesis[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#count-smart-contract-calls-by-transaction-type-since-genesis "Direct link to Count smart contract calls by transaction type since genesis") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the total number of calls grouped by transaction type across Algorand mainnet history. [Run query](https://ide.bitquery.io/Count-of-each-trxn-type-called-till-now-on-Algorand-network#) query MyQuery { algorand(network: algorand) { smartContractCalls(options: {desc: "count"}) { txType count } }} Get latest smart contract calls filtered by type[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#get-latest-smart-contract-calls-filtered-by-type "Direct link to Get latest smart contract calls filtered by type") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the 10 most recent `pay` (payment) transactions with smart contract address, hash, sender, and block timestamp. Swap `pay` for any other `txType` value. { algorand(network: algorand) { smartContractCalls( date: {after: "2023-08-05"} options: {desc: "block.timestamp.iso8601", limit: 10} txType: {is: pay} ) { block { timestamp { iso8601 } } smartContract { address { address } } transaction { hash } txSender { address } txType } }} Video: tracking newly created tokens on Algorand[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#video-tracking-newly-created-tokens-on-algorand "Direct link to Video: tracking newly created tokens on Algorand") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Related resources[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#related-resources "Direct link to Related resources") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- * [Algorand Arguments API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-arguments-api/) — parsed argument names, types, and values * [Algorand Transactions API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transactions-api/) — full transaction details and daily counts Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Count unique smart contract calls in the latest block](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#count-unique-smart-contract-calls-in-the-latest-block) * [Track newly created assets (acfg transactions)](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#track-newly-created-assets-acfg-transactions) * [Count smart contract calls by transaction type since genesis](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#count-smart-contract-calls-by-transaction-type-since-genesis) * [Get latest smart contract calls filtered by type](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#get-latest-smart-contract-calls-filtered-by-type) * [Video: tracking newly created tokens on Algorand](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#video-tracking-newly-created-tokens-on-algorand) * [Related resources](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-smart-contract-calls-api/#related-resources) --- # Algorand Address API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Address API gives you native ALGO balances for one or many accounts, plus smart contract details — bytecode and source — for application addresses. Use it for wallet dashboards, treasury monitoring, and inspecting on-chain program code without running your own indexer. Endpoint Algorand GraphQL queries are served at `https://graphql.bitquery.io`. Get ALGO balance for a single address[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/#get-algo-balance-for-a-single-address "Direct link to Get ALGO balance for a single address") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the native ALGO balance for one account. Replace the address with your target wallet or contract. { algorand(network: algorand) { address( address: {is: "ADDRESS_HERE"} ) { address { address } balance } }} Add a `date` filter to reconstruct balance context at a point in time, or use the `in` operator shown below for batch lookups. Get ALGO balances for multiple addresses[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/#get-algo-balances-for-multiple-addresses "Direct link to Get ALGO balances for multiple addresses") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Pull balances for several addresses in a single request. Handy for portfolio views and treasury snapshots. { algorand(network: algorand) { address(address: {in: ["ADDRESS_ONE", "ADDRESS_TWO", "ADDRESS_THREE"]}) { address { address } balance } }} Get smart contract bytecode and source[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/#get-smart-contract-bytecode-and-source "Direct link to Get smart contract bytecode and source") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Returns the bytecode and source of an Algorand application address. Add the `balance` field to the `smartContract` block if you also need the contract's ALGO holdings. { algorand(network: algorand) { address(address: {is: "SMART_CONTRACT_ADDRESS"}) { smartContract { address { address } bytecode source } } }} Related resources[​](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/#related-resources "Direct link to Related resources") --------------------------------------------------------------------------------------------------------------------------------------------------- * [Algorand Transfers API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-transfers-api/) — ALGO and ASA transfer history per address * [Algorand Coinpath API](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-coinpath-api/) — multi-hop fund flow tracing Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get ALGO balance for a single address](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/#get-algo-balance-for-a-single-address) * [Get ALGO balances for multiple addresses](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/#get-algo-balances-for-multiple-addresses) * [Get smart contract bytecode and source](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/#get-smart-contract-bytecode-and-source) * [Related resources](https://docs.bitquery.io/docs/blockchain/Algorand/algorand-address-api/#related-resources) --- # Bitcoin Blocks API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-blocks-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Blocks API returns block-level data on Bitcoin: height, difficulty, size, transaction count, and timestamp. Use it to drive explorer front-ends, monitor chain progression, or pull historical block context for mining and network analytics. Endpoint Bitcoin GraphQL queries are served at `https://graphql.bitquery.io`. Get the 10 most recent Bitcoin blocks[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-blocks-api/#get-the-10-most-recent-bitcoin-blocks "Direct link to Get the 10 most recent Bitcoin blocks") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Returns blocks ordered by height descending, with the timestamp formatted for display. Add a `date` filter to constrain the window. query { bitcoin(network: bitcoin) { blocks(options: {desc: "height", limit: 10}, date: {after: "2023-10-10"}) { timestamp { time(format: "%Y-%m-%d %H:%M:%S") } height difficulty transactionCount blockSizeBigInt } }} Use `height: {is: N}` to look up a single block, or `height: {in: [N1, N2, ...]}` for several at once. The same query shape works on other UTXO networks supported here by swapping `network: bitcoin` for `litecoin`, `dogecoin`, and others. Find the busiest Bitcoin blocks by transaction count[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-blocks-api/#find-the-busiest-bitcoin-blocks-by-transaction-count "Direct link to Find the busiest Bitcoin blocks by transaction count") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sort blocks by `transactionCount` descending to surface the busiest blocks on-chain — useful for network congestion studies and block utilization analysis. query { bitcoin(network: bitcoin) { blocks(options: {limit: 10, desc: "transactionCount"}) { timestamp { time(format: "%Y-%m-%d %H:%M:%S") } difficulty maximum(of: transaction_count, get: transaction_count) transactionCount } }} Swap the sort to `desc: "difficulty"` or `desc: "blockSizeBigInt"` for different angles. Add `date: {since: ..., till: ...}` to search inside a specific window, or use `average(of: transaction_count)` for average transactions per block. Related resources[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-blocks-api/#related-resources "Direct link to Related resources") ------------------------------------------------------------------------------------------------------------------------------------------------ * [Bitcoin Transactions API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/) — per-block transaction details and fees * [Bitcoin Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/) — UTXO data and miner rewards * [Bitcoin Kafka stream](https://docs.bitquery.io/docs/streams/protobuf/chains/Bitcoin-protobuf/) — real-time block and transaction delivery Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get the 10 most recent Bitcoin blocks](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-blocks-api/#get-the-10-most-recent-bitcoin-blocks) * [Find the busiest Bitcoin blocks by transaction count](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-blocks-api/#find-the-busiest-bitcoin-blocks-by-transaction-count) * [Related resources](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-blocks-api/#related-resources) --- # Optimism Transfers API: Token and ETH Transfers, Whale Alerts, Backfills [Skip to main content](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD 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](https://ide.bitquery.io/) on a free account. Large transfers of one token[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#large-transfers-of-one-token "Direct link to Large transfers of one token") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- USDT on Optimism, transfers of 10,000 or more in the last day. Saved as a live stream [here](https://ide.bitquery.io/Whale-transfers-of-USDT-on-optimism) ; 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[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#transfers-of-one-wallet "Direct link to Transfers of one wallet") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Filter `Sender` or `Receiver`, or both with an `any` block, on the address. Saved stream [here](https://ide.bitquery.io/Sender-is-a-particular-address) ; 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[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#nft-transfers "Direct link to 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](https://ide.bitquery.io/NFT-Token-Transfers-API_1) ; the [Optimism NFT API](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/) 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[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#deterministic-pagination-for-backfilling "Direct link to 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](https://ide.bitquery.io/Reliable-transfer-api) . { 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[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------- * [Optimism API hub](https://docs.bitquery.io/docs/blockchain/Optimism/) * [Optimism NFT API](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/) * [Transfers cube](https://docs.bitquery.io/docs/cubes/transfers-cube/) * [Data coverage and retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Large transfers of one token](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#large-transfers-of-one-token) * [Transfers of one wallet](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#transfers-of-one-wallet) * [NFT transfers](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#nft-transfers) * [Deterministic pagination for backfilling](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#deterministic-pagination-for-backfilling) * [Related pages](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/#related-pages) --- # Bitcoin Transactions API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Transactions API returns transaction-level data on Bitcoin: input and output totals in BTC and USD, fees, input/output counts, block context, and per-address transaction history. Use it for paginated transaction feeds, daily activity dashboards, fee trend analysis, and wallet history widgets. Endpoint Bitcoin GraphQL queries are served at `https://graphql.bitquery.io`. Get the latest Bitcoin transactions with fees and transfer values[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/#get-the-latest-bitcoin-transactions-with-fees-and-transfer-values "Direct link to Get the latest Bitcoin transactions with fees and transfer values") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ A reusable query that takes `limit`, `offset`, and a date range as variables. Returns input value (BTC and USD), output count, input count, fees (BTC and USD), and block context — the standard shape for paginated transaction feeds. query ($network: BitcoinNetwork!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime) { bitcoin(network: $network) { transactions( options: {desc: ["block.height", "index"], limit: $limit, offset: $offset} time: {since: $from, till: $till} ) { block { timestamp { time(format: "%Y-%m-%d %H:%M:%S") } height } inputValue input_value_usd: inputValue(in: USD) outputCount inputCount index hash feeValue fee_value_usd: feeValue(in: USD) } }} Adjust `limit` and `offset` for pagination, narrow with `inputAddress` or `outputAddress` for a single wallet, or add `hash: {is: "..."}` for a single-transaction lookup. Daily Bitcoin transaction count and average fee[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/#daily-bitcoin-transaction-count-and-average-fee "Direct link to Daily Bitcoin transaction count and average fee") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Aggregate transactions by day to track network throughput and fee trends over time. Returns one row per day with the total transaction count, total fees, and average fee per transaction. query ($network: BitcoinNetwork!, $dateFormat: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) { bitcoin(network: $network) { transactions(options: {asc: "date.date"}, date: {since: $from, till: $till}) { date: date { date(format: $dateFormat) } count: countBigInt feeValue avgFee: feeValue(calculate: average) } }} Use `feeValue(calculate: median)` for median fees, or add `count(uniq: addresses)` to get daily active address counts alongside the fee stats. List Bitcoin transactions sent from a specific address[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/#list-bitcoin-transactions-sent-from-a-specific-address "Direct link to List Bitcoin transactions sent from a specific address") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns every transaction where a given address appears on the input side — the standard query for an outbound wallet history. query ($network: BitcoinNetwork!) { bitcoin(network: $network) { transactions( options: {desc: ["block.height"]} inputAddress: {is: "bc1p4kufll9uhnpkgzuc65slcxd2qaw2hl9xecket3h8yyu4awglcsqslqaztd"} ) { block { timestamp { time(format: "%Y-%m-%d %H:%M:%S") } height } inputValue hash feeValue outputValue } }} Swap `inputAddress` for `outputAddress` to see received transactions instead. Add `date` for a window, `limit` / `offset` for pagination, and `inputValue(in: USD)` / `outputValue(in: USD)` for USD-equivalent amounts. Related resources[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/#related-resources "Direct link to Related resources") ------------------------------------------------------------------------------------------------------------------------------------------------------ * [Bitcoin Blocks API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-blocks-api/) — block-level lookups and stats * [Bitcoin Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/) — UTXO-level transaction detail * [Bitcoin Fee API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/) — focused fee queries and aggregates * [Bitcoin Address API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/) — wallet balances and activity stats Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get the latest Bitcoin transactions with fees and transfer values](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/#get-the-latest-bitcoin-transactions-with-fees-and-transfer-values) * [Daily Bitcoin transaction count and average fee](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/#daily-bitcoin-transaction-count-and-average-fee) * [List Bitcoin transactions sent from a specific address](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/#list-bitcoin-transactions-sent-from-a-specific-address) * [Related resources](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/#related-resources) --- # Arbitrum Cross Chain API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Overview[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#overview "Direct link to Overview") ------------------------------------------------------------------------------------------------------------------------ Explore the integration of the **Arbitrum Cross Chain API** to track bridge transfers, interact with smart contracts, and fetch detailed transaction data. For detailed reference, visit the [official Arbitrum documentation](https://docs.arbitrum.io/build-decentralized-apps/token-bridging/token-bridge-erc20) . Additional information about migrating to the latest version of Across Protocol is available [here](https://docs.across.to/introduction/migration-guides/migration-from-v2-to-v3#event-changes) . Tracking Across Bridge Transfers Using SpokePool Events[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#tracking-across-bridge-transfers-using-spokepool-events "Direct link to Tracking Across Bridge Transfers Using SpokePool Events") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SpokePool events in Across Protocol can be used to monitor the status of bridge transfers effectively. Below are queries that retrieve the latest deposits and transfers related to the Arbitrum SpokePool. ### Latest Deposits on Across Protocol Bridge SpokePool[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#latest-deposits-on-across-protocol-bridge-spokepool "Direct link to Latest Deposits on Across Protocol Bridge SpokePool") Query the latest deposits made on the Across Protocol Bridge SpokePool. Fetch the most recent deposits and associated details using `V3FundsDeposited` events. * **Query link**: [Run this query](https://ide.bitquery.io/Latest-deposits-on-Across-Bridge) { EVM(network: arbitrum) { Events( where: { Log: { SmartContract: { is: "0xe35e9842fceaca96570b734083f4a58e8f7c5f2a" } Signature: { Name: { is: "V3FundsDeposited" } } } } orderBy: { descending: Block_Time } ) { Log { SmartContract Signature { Name } } Transaction { From To } Block { Time ParentHash } Arguments { Name Value { __typename ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} * * * ### Latest Transfers to Arbitrum SpokePool[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#latest-transfers-to-arbitrum-spokepool "Direct link to Latest Transfers to Arbitrum SpokePool") Retrieve the latest transfers directed to the Arbitrum SpokePool.Get information on transfers to the SpokePool, such as sender, receiver, currency, and block details. * **Query link**: [Run this query](https://ide.bitquery.io/Across-Protocol-Arbitrum-Transfers) { EVM(dataset: combined, network: arbitrum) { Transfers( where: { Transaction: { To: { is: "0xe35e9842fceaca96570b734083f4a58e8f7c5f2a" } } Block: { Date: { is: "2024-12-12" } } } limit: { count: 10 } orderBy: { descending: Block_Number } ) { Transfer { Amount Currency { Name Symbol SmartContract } Sender Receiver } Call { Signature { Name } From To Value CallPath } Block { Number Time } } }} Video Tutorial | How to track Across Bridge Deposits on Arbitrum[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#video-tutorial--how-to-track-across-bridge-deposits-on-arbitrum "Direct link to Video Tutorial | How to track Across Bridge Deposits on Arbitrum") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Overview](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#overview) * [Tracking Across Bridge Transfers Using SpokePool Events](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#tracking-across-bridge-transfers-using-spokepool-events) * [Latest Deposits on Across Protocol Bridge SpokePool](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#latest-deposits-on-across-protocol-bridge-spokepool) * [Latest Transfers to Arbitrum SpokePool](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#latest-transfers-to-arbitrum-spokepool) * [Video Tutorial | How to track Across Bridge Deposits on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/#video-tutorial--how-to-track-across-bridge-deposits-on-arbitrum) --- # Arbitrum Smart Contract Calls API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/Smart_Contract_Calls/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will see how to get Arbitrum Smart contract calls information using our API. Transaction Call Trace for a Arbitrum Transaction[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/Smart_Contract_Calls/#transaction-call-trace-for-a-arbitrum-transaction "Direct link to Transaction Call Trace for a Arbitrum Transaction") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query gets the transaction call trace for an Arbitrum transaction. The `Calls` API in the query returns a list of all calls made by the transaction. You can find the query [here](https://ide.bitquery.io/Transaction-Call-Trace-Arbitrum) query myquery($network: evm_network!, $hash: String!) { EVM(dataset: combined, network: $network) { Calls( limit: {count: 10} orderBy: {descending: Block_Time} where: {Transaction: {Hash: {is: $hash}}} ) { Call { From Gas GasUsed To Value CallPath Opcode { Code Name } SelfDestruct Create Delegated Depth InternalCalls Success Reverted Output LogCount Input } Transaction { Hash } Arguments { Index Path { Name } Type Name Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }}{ "hash": "0x0ca5e462cace62c893cefb57c4491eabf9aebe873a86f9cb16377a127b17589b", "network": "arbitrum"} Each call contains the following information: * `CallPath`: The call path, which is a list of the contract addresses that were called. * `Create`: Whether the call created a new contract. * `Delegated`: Whether the call was a delegated call. * `Depth`: The depth of the call, which is the number of nested calls. * `From`: The address that made the call. * `Gas`: The gas limit for the call. * `GasUsed`: The gas used by the call. * `Input`: The input data for the call. * `InternalCalls`: The number of internal calls made by the call. * `LogCount`: The number of logs generated by the call. * `Opcode`: The opcode of the call. * `Output`: The output data for the call. * `Reverted`: Whether the call reverted. * `SelfDestruct`: Whether the call self-destructed the contract. * `Success`: Whether the call was successful. * `To`: The address that was called. * `Value`: The value transferred to the called contract. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Transaction Call Trace for a Arbitrum Transaction](https://docs.bitquery.io/docs/blockchain/Arbitrum/Smart_Contract_Calls/#transaction-call-trace-for-a-arbitrum-transaction) --- # Arbitrum Smart Contract Events API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/Smart_Contract_Events/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will see how to get Arbitrum Smart Contract Events information using our API. Tracking Swap Events on Arbitrum[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/Smart_Contract_Events/#tracking-swap-events-on-arbitrum "Direct link to Tracking Swap Events on Arbitrum") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The query returns the 10 most recent `swap` events on the Arbitrum network. We get this by using the signature hash `c42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67` for the swap event. You can find the query [here](https://ide.bitquery.io/Swap-Events-Arbitrum) query ($network: evm_network, $limit: Int, $method: String) { EVM(dataset: archive, network: $network) { Events( where: {Log: {Signature: {SignatureHash: {is: $method}}}} limit: {count: $limit} orderBy: {descending: Block_Time} ) { ChainId Transaction { Hash } Log { Signature { Name } } Fee { SenderFee } Block { Time Number } } }}{ "limit": 10, "network": "arbitrum", "method": "c42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67"} The `Log` field in each event contains the following information: * `Signature`: The signature of the event. * `Name`: The name of the event. The `Transaction` field in each event contains the following information: * `Hash`: The hash of the transaction that emitted the event. The `Fee` field in each event contains the following information: * `SenderFee`: The fee paid by the sender of the transaction. The `Block` field in each event contains the following information: * `Time`: The time at which the block was mined. * `Number`: The block number. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Tracking Swap Events on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/Smart_Contract_Events/#tracking-swap-events-on-arbitrum) --- # Optimism API Documentation | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Optimism/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Building a trading app or DEX UI on Optimism? For **real-time trades and prices on Optimism** (and the last ~30 days), use the curated [**Trading cube**](https://docs.bitquery.io/docs/trading/trading-data-overview/) — [`Trading.Trades`](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) gives you clean, MEV-filtered swaps with **USD price, market cap, and supply on every row** across **9 chains in one API**. For **historical Optimism data older than ~30 days**, use the chain-level `DEXTrades` / `DEXTradeByTokens` APIs documented below. Overview[​](https://docs.bitquery.io/docs/blockchain/Optimism/#overview "Direct link to Overview") --------------------------------------------------------------------------------------------------- In this section we will see how to fetch data on different tokens, transactions, and DEXs on Optimism via APIs and Streams. **[Create your account](https://account.bitquery.io/auth/signup) ** to get started. If you need help getting data on Optimism, reach out to [support](https://t.me/Bloxy_info) . ### What is Optimism API?[​](https://docs.bitquery.io/docs/blockchain/Optimism/#what-is-optimism-api "Direct link to What is Optimism API?") Bitquery Optimism APIs help you fetch onchain data like trades, transactions, balances, etc using graphQL query. ### What are capabilities of Bitquery Optimism API?[​](https://docs.bitquery.io/docs/blockchain/Optimism/#what-are-capabilities-of-bitquery-optimism-api "Direct link to What are capabilities of Bitquery Optimism API?") Bitquery Optimism APIs are very flexible, you can fetch trade, transaction, and balance information for a period, for a specific wallet, and join with other information. ### Difference between Optimism RPC and Bitquery Optimism API?[​](https://docs.bitquery.io/docs/blockchain/Optimism/#difference-between-optimism-rpc-and-bitquery-optimism-api "Direct link to Difference between Optimism RPC and Bitquery Optimism API?") | Optimism RPC | Bitquery Optimism API | | --- | --- | | JSON-RPC endpoint exposing raw Optimism on-chain state and transactions | GraphQL endpoint over pre-indexed, parsed Optimism data (token transfers, DEX trades, logs, calls, etc.) | | No built-in history or analytics—any indexing/aggregation you build or outsource | Historical data, joins, aggregations & real-time subscriptions | | Ideal for submitting transactions | Great for real-time data and historical backtesting without running your own indexer | To access Bitquery Tron API you would require your own **[Access Token](https://account.bitquery.io/user/api_v2/access_tokens) ** after signup. ### Does Bitquery support Optimism Websocket and Webhooks?[​](https://docs.bitquery.io/docs/blockchain/Optimism/#does-bitquery-support-optimism-websocket-and-webhooks "Direct link to Does Bitquery support Optimism Websocket and Webhooks?") Bitquery supports websocket and webhooks; you can convert most GraphQL APIs into GraphQL streams by changing the word `query` to `subscription`. You can monitor this data via a websocket. More docs and code samples are available [here](https://docs.bitquery.io/docs/subscriptions/websockets/) . Quick start[​](https://docs.bitquery.io/docs/blockchain/Optimism/#quick-start "Direct link to Quick start") ------------------------------------------------------------------------------------------------------------ Run this minimal GraphQL query on **[GraphQL IDE](https://ide.bitquery.io/) ** after signing up, to fetch the latest 5 DEX trades on Optimism: query LatestOptimismTrades { EVM(network: optimism) { DEXTrades(limit: { count: 5 }, orderBy: { descending: Block_Time }) { Block { Time } Trade { Dex { ProtocolName } Buy { AmountInUSD Currency { Symbol } } Sell { AmountInUSD Currency { Symbol } } } Transaction { Hash } } }} DEX APIs[​](https://docs.bitquery.io/docs/blockchain/Optimism/#dex-apis "Direct link to DEX APIs") --------------------------------------------------------------------------------------------------- * [Optimism Dex Trades](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/) Core Optimism APIs[​](https://docs.bitquery.io/docs/blockchain/Optimism/#core-optimism-apis "Direct link to Core Optimism APIs") --------------------------------------------------------------------------------------------------------------------------------- * [Balance API](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-balance-api/) * [NFT](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/) * [Transfers](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/) Videos[​](https://docs.bitquery.io/docs/blockchain/Optimism/#videos "Direct link to Videos") --------------------------------------------------------------------------------------------- ### Video Tutorial | Get Trending Optimism Tokens Using Bitquery API[​](https://docs.bitquery.io/docs/blockchain/Optimism/#video-tutorial--get-trending-optimism-tokens-using-bitquery-api "Direct link to Video Tutorial | Get Trending Optimism Tokens Using Bitquery API") ### Video Tutorial | Get Optimism DEX Trades Data Using Bitquery API[​](https://docs.bitquery.io/docs/blockchain/Optimism/#video-tutorial--get-optimism-dex-trades-data-using-bitquery-api "Direct link to Video Tutorial | Get Optimism DEX Trades Data Using Bitquery API") ### Video Tutorial | Get Top Traders on Optimism Using Bitquery API[​](https://docs.bitquery.io/docs/blockchain/Optimism/#video-tutorial--get-top-traders-on-optimism-using-bitquery-api "Direct link to Video Tutorial | Get Top Traders on Optimism Using Bitquery API") ### Video Tutorial | Get Latest Trades on Optimism Using Bitquery Subscriptions[​](https://docs.bitquery.io/docs/blockchain/Optimism/#video-tutorial--get-latest-trades-on-optimism-using-bitquery-subscriptions "Direct link to Video Tutorial | Get Latest Trades on Optimism Using Bitquery Subscriptions") More guides[​](https://docs.bitquery.io/docs/blockchain/Optimism/#more-guides "Direct link to More guides") ------------------------------------------------------------------------------------------------------------ * [Data Coverage & Retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) — how far back this chain's data goes * [Common errors and what to do](https://docs.bitquery.io/docs/start/errors/) * [Plans, Points & Limits](https://docs.bitquery.io/docs/plans/how-billing-works/) * [First query in 5 minutes](https://docs.bitquery.io/docs/start/first-query/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Overview](https://docs.bitquery.io/docs/blockchain/Optimism/#overview) * [What is Optimism API?](https://docs.bitquery.io/docs/blockchain/Optimism/#what-is-optimism-api) * [What are capabilities of Bitquery Optimism API?](https://docs.bitquery.io/docs/blockchain/Optimism/#what-are-capabilities-of-bitquery-optimism-api) * [Difference between Optimism RPC and Bitquery Optimism API?](https://docs.bitquery.io/docs/blockchain/Optimism/#difference-between-optimism-rpc-and-bitquery-optimism-api) * [Does Bitquery support Optimism Websocket and Webhooks?](https://docs.bitquery.io/docs/blockchain/Optimism/#does-bitquery-support-optimism-websocket-and-webhooks) * [Quick start](https://docs.bitquery.io/docs/blockchain/Optimism/#quick-start) * [DEX APIs](https://docs.bitquery.io/docs/blockchain/Optimism/#dex-apis) * [Core Optimism APIs](https://docs.bitquery.io/docs/blockchain/Optimism/#core-optimism-apis) * [Videos](https://docs.bitquery.io/docs/blockchain/Optimism/#videos) * [Video Tutorial | Get Trending Optimism Tokens Using Bitquery API](https://docs.bitquery.io/docs/blockchain/Optimism/#video-tutorial--get-trending-optimism-tokens-using-bitquery-api) * [Video Tutorial | Get Optimism DEX Trades Data Using Bitquery API](https://docs.bitquery.io/docs/blockchain/Optimism/#video-tutorial--get-optimism-dex-trades-data-using-bitquery-api) * [Video Tutorial | Get Top Traders on Optimism Using Bitquery API](https://docs.bitquery.io/docs/blockchain/Optimism/#video-tutorial--get-top-traders-on-optimism-using-bitquery-api) * [Video Tutorial | Get Latest Trades on Optimism Using Bitquery Subscriptions](https://docs.bitquery.io/docs/blockchain/Optimism/#video-tutorial--get-latest-trades-on-optimism-using-bitquery-subscriptions) * [More guides](https://docs.bitquery.io/docs/blockchain/Optimism/#more-guides) --- # Arbitrum TimeBoost API & Streams | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-timeboost-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Arbitrum sequencers traditionally ordered transactions on a first-come-first-serve (FCFS) basis. **TimeBoost** introduced an auction-driven priority lane that lets searchers bid for earlier inclusion. With Bitquery’s Stream you can subscribe to every call that interacts with the TimeBoost auction contract and correlate it with other Arbitrum insights described in our [Arbitrum Overview](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-timeboost-api/) . Real-time subscription[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-timeboost-api/#real-time-subscription "Direct link to Real-time subscription") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- Use the following subscription in the Bitquery IDE to watch every TimeBoost auction interaction. The query filters on the auction contract address and surfaces both transaction context and decoded ABI arguments. [Run this stream](https://ide.bitquery.io/Arbitrum-Timeboost-Auction-Transactions-in-Realtime) subscription { EVM(network: arbitrum) { Events( where: { Transaction: { To: { is: "0x5fcb496a31b7AE91e7c9078Ec662bd7A55cd3079" } } } ) { Block { Number } Call { CallPath InternalCalls Signature { Name } } Topics { Hash } Receipt { CumulativeGasUsed } Transaction { From To Type } Arguments { Name Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } } } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Real-time subscription](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-timeboost-api/#real-time-subscription) --- # Cardano API Documentation | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Cardano/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Overview[​](https://docs.bitquery.io/docs/blockchain/Cardano/#overview "Direct link to Overview") -------------------------------------------------------------------------------------------------- Bitquery's Cardano APIs let you query the chain through GraphQL — blocks, transactions, addresses, native tokens, UTXO-level inputs and outputs, staking, and multi-hop fund flow. Replace the example addresses and token IDs in any query with your own values to point them at real wallets and assets. If you get stuck or need a data point that isn't covered here, reach out on [Telegram](https://t.me/Bloxy_info) . Endpoint Cardano GraphQL queries are served at `https://graphql.bitquery.io`. ### What you can do with the Cardano API[​](https://docs.bitquery.io/docs/blockchain/Cardano/#what-you-can-do-with-the-cardano-api "Direct link to What you can do with the Cardano API") * Look up blocks by height, hash, or time window — including epoch, slot, slot leader, and VRF key. * Pull transactions with input/output totals, fees in ADA and USD, mint count, and withdrawals. * Get address balances across ADA and every native token a wallet holds, plus staking and rewards. * Walk UTXO-level inputs and outputs to reconstruct exact balances or build transaction feeds. * Track mints and burns of any native token (NFTs, fungibles, stablecoins like DJED). * Trace ADA flows inbound and outbound across multiple hops with Coinpath. ### How the Cardano API differs from running your own node[​](https://docs.bitquery.io/docs/blockchain/Cardano/#how-the-cardano-api-differs-from-running-your-own-node "Direct link to How the Cardano API differs from running your own node") | `cardano-node` / RPC | Bitquery Cardano API | | --- | --- | | Raw chain state — you build the indexer | Pre-indexed and parsed: blocks, txs, UTXOs, native tokens, staking | | No historical analytics out of the box | History, joins, aggregations, USD conversion | | You stream and decode CBOR yourself | GraphQL response — pick the fields you need | | Best for submitting transactions and full validation | Best for analytics, dashboards, wallet UIs, and compliance work | Quick start[​](https://docs.bitquery.io/docs/blockchain/Cardano/#quick-start "Direct link to Quick start") ----------------------------------------------------------------------------------------------------------- This query returns the 5 most recent Cardano blocks with hash, height, transaction count, and timestamp. { cardano(network: cardano) { blocks(options: {desc: "height", limit: 5}) { height blockHash transactionCount timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } }} API reference[​](https://docs.bitquery.io/docs/blockchain/Cardano/#api-reference "Direct link to API reference") ----------------------------------------------------------------------------------------------------------------- ### Core data[​](https://docs.bitquery.io/docs/blockchain/Cardano/#core-data "Direct link to Core data") * [Cardano Blocks API](https://docs.bitquery.io/docs/blockchain/Cardano/blocks/) — block lookups by height or time, epoch/slot context, slot-leader metadata. * [Cardano Transactions API](https://docs.bitquery.io/docs/blockchain/Cardano/transactions/) — transaction details, fees in ADA and USD, mint counts, daily counts. * [Cardano Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/) — UTXO-level data for balance reconstruction and transfer feeds. ### Addresses and staking[​](https://docs.bitquery.io/docs/blockchain/Cardano/#addresses-and-staking "Direct link to Addresses and staking") * [Cardano Address API](https://docs.bitquery.io/docs/blockchain/Cardano/address/) — per-asset balances, staking snapshot, and the `addressStats` aggregate cube. ### Native tokens[​](https://docs.bitquery.io/docs/blockchain/Cardano/#native-tokens "Direct link to Native tokens") * [Cardano Mints API](https://docs.bitquery.io/docs/blockchain/Cardano/mints/) — native-token mint and burn events, including NFT drops and fungible issuance. ### Stablecoins[​](https://docs.bitquery.io/docs/blockchain/Cardano/#stablecoins "Direct link to Stablecoins") * [Djed Stablecoin API](https://docs.bitquery.io/docs/blockchain/Cardano/djed/) — DJED mints, burns, transfers, and wallet-level balance examples. ### Fund tracing[​](https://docs.bitquery.io/docs/blockchain/Cardano/#fund-tracing "Direct link to Fund tracing") * [Cardano Coinpath API](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/) — multi-hop inbound and outbound ADA flow tracing for compliance and treasury work. More guides[​](https://docs.bitquery.io/docs/blockchain/Cardano/#more-guides "Direct link to More guides") ----------------------------------------------------------------------------------------------------------- * [Data Coverage & Retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) — how far back this chain's data goes * [Common errors and what to do](https://docs.bitquery.io/docs/start/errors/) * [Plans, Points & Limits](https://docs.bitquery.io/docs/plans/how-billing-works/) * [First query in 5 minutes](https://docs.bitquery.io/docs/start/first-query/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Overview](https://docs.bitquery.io/docs/blockchain/Cardano/#overview) * [What you can do with the Cardano API](https://docs.bitquery.io/docs/blockchain/Cardano/#what-you-can-do-with-the-cardano-api) * [How the Cardano API differs from running your own node](https://docs.bitquery.io/docs/blockchain/Cardano/#how-the-cardano-api-differs-from-running-your-own-node) * [Quick start](https://docs.bitquery.io/docs/blockchain/Cardano/#quick-start) * [API reference](https://docs.bitquery.io/docs/blockchain/Cardano/#api-reference) * [Core data](https://docs.bitquery.io/docs/blockchain/Cardano/#core-data) * [Addresses and staking](https://docs.bitquery.io/docs/blockchain/Cardano/#addresses-and-staking) * [Native tokens](https://docs.bitquery.io/docs/blockchain/Cardano/#native-tokens) * [Stablecoins](https://docs.bitquery.io/docs/blockchain/Cardano/#stablecoins) * [Fund tracing](https://docs.bitquery.io/docs/blockchain/Cardano/#fund-tracing) * [More guides](https://docs.bitquery.io/docs/blockchain/Cardano/#more-guides) --- # GMX Staking API on Arbitrum | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD This section covers how to retrieve staking information on GMX. GMX is one venue within our [Arbitrum API](https://bitquery.io/blockchains/arbitrum-blockchain-api) coverage — the page lists DEX trades, transfers, NFTs and balances on Arbitrum One. You can read more about the [GMX ecosystem in this blog](https://bitquery.io/blog/gmx) . ProductUsing this in production? See the [Arbitrum API](https://bitquery.io/blockchains/arbitrum-blockchain-api) page for plans, free trial and enterprise delivery options. Video Tutorial on GMX and esGMX[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/#video-tutorial-on-gmx-and-esgmx "Direct link to Video Tutorial on GMX and esGMX") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- New Positions by Trader[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/#new-positions-by-trader "Direct link to New Positions by Trader") -------------------------------------------------------------------------------------------------------------------------------------------------------- The following query retrieves new positions created by a specific trader on the GMX DEX { EVM(dataset: archive, network: arbitrum) { Events( where: { Log: { SmartContract: { is: "0x489ee077994B6658eAfA855C308275EAd8097C4A" }, Signature: { Name: { is: "IncreasePosition" } } }, Arguments: { includes: { Name: { is: "account" }, Value: { Address: { is: "0x92812499fF2c040f93121Aab684680a6e603C4A7" } } } } } orderBy: { descending: Block_Time } ) { Log { Signature { Name Parsed Signature } } Arguments { Name Type Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Integer_Value_Arg { integer } } } Block { Time } } }} Latest Liquidated Positions[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/#latest-liquidated-positions "Direct link to Latest Liquidated Positions") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- The following query retrieves the latest liquidated positions on the GMX DEX, providing information on the account, collateral token, index token, position, reserve amount, realised PnL, and mark price. { EVM(dataset: archive, network: arbitrum) { Events( where: { Log: { SmartContract: { is: "0x489ee077994B6658eAfA855C308275EAd8097C4A" }, Signature: { Name: { is: "LiquidatePosition" } } } } limit: { count: 100 } orderBy: { descending: Block_Time } ) { Log { Signature { Name Parsed Signature } } Block { Time } Call { Signature { Name } } Transaction { Hash } Arguments { Name Type Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Integer_Value_Arg { integer } } } } }} Latest GMX Events[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/#latest-gmx-events "Direct link to Latest GMX Events") -------------------------------------------------------------------------------------------------------------------------------------- You can run the query [here](https://ide.bitquery.io/latest-GMX-Events) . The following query retrieves the latest GMX events on the Arbitrum network: { EVM(network: arbitrum) { Events( where: { Log: { SmartContract: { is: "0x489ee077994B6658eAfA855C308275EAd8097C4A" } } } orderBy: { descending: Block_Time } limit: { count: 10 } ) { Log { Signature { Name Parsed Signature } } Arguments { Name Type Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Integer_Value_Arg { integer } } } Block { Time } } }} These queries help you explore the latest activities and positions on the GMX protocol. Frequently Asked Questions -------------------------- What GMX data can I query? GMX trades and related on-chain activity on Arbitrum via EVM DEX and protocol-specific filters. How do I filter GMX perpetual trades? Use the protocol filters and examples on this page for GMX on Arbitrum. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Video Tutorial on GMX and esGMX](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/#video-tutorial-on-gmx-and-esgmx) * [New Positions by Trader](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/#new-positions-by-trader) * [Latest Liquidated Positions](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/#latest-liquidated-positions) * [Latest GMX Events](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/#latest-gmx-events) --- # Arbitrum Transactions API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/Blocks_Transactions/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we'll have a look at some examples using the Arbitrum Transactions API. Latest Transactions[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/Blocks_Transactions/#latest-transactions "Direct link to Latest Transactions") -------------------------------------------------------------------------------------------------------------------------------------------------------- The query below retrieves the latest 10 transactions on the Arbitrum network. You can find the query [here](https://ide.bitquery.io/Latest-Transactions_3) { EVM(network: arbitrum, dataset: archive) { Transactions( limit: {count: 10, offset: 0} orderBy: {descending: Block_Time} where: {Block: {Date: {since: "2023-07-01", till: "2023-07-15"}}} ) { ChainId Block { Number Time } Transaction { To From Hash Value } Receipt { GasUsed } Fee { EffectiveGasPrice SenderFee } } }} Latest Transactions From/To a Wallet[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/Blocks_Transactions/#latest-transactions-fromto-a-wallet "Direct link to Latest Transactions From/To a Wallet") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- To retrieve the latest transactions from or to a specific wallet address we will be using the `any` filter which acts as the OR condition. This query fetches the 10 most recent transactions from/to the specified wallet address, ordered by the block time in descending order. { EVM(network: arbitrum, dataset: archive) { Transactions( limit: {count: 10} where: {any: {Transaction: {From: {is: "0x16a92c43b270fbb1916501470f70c42cf6f00326"}, To: {is: "0x16a92c43b270fbb1916501470f70c42cf6f00326"}}}} orderBy: {descending: Block_Time} ) { ChainId Block { Number Time } Transaction { To From Hash Value } Receipt { GasUsed } Fee { EffectiveGasPrice SenderFee } } }} Latest Blocks[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/Blocks_Transactions/#latest-blocks "Direct link to Latest Blocks") -------------------------------------------------------------------------------------------------------------------------------------- The query below retrieves the latest 10 blocks on the Arbitrum network. You can find the query [here](https://ide.bitquery.io/Latest-Arbitrum-blocks) query MyQuery { EVM(network: arbitrum) { Blocks(limit: {count: 10}, orderBy: {descending: Block_Time}) { Block { BaseFee Coinbase Difficulty Time Root } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest Transactions](https://docs.bitquery.io/docs/blockchain/Arbitrum/Blocks_Transactions/#latest-transactions) * [Latest Transactions From/To a Wallet](https://docs.bitquery.io/docs/blockchain/Arbitrum/Blocks_Transactions/#latest-transactions-fromto-a-wallet) * [Latest Blocks](https://docs.bitquery.io/docs/blockchain/Arbitrum/Blocks_Transactions/#latest-blocks) --- # Optimism DEX Trades API: Every Swap on Optimism, Pairs, Traders and Prices [Skip to main content](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Optimism's DEX trading runs through Uniswap v3, which carries most of the swaps, Uniswap v4, the `aerodrome_v1` family, which on Optimism holds pools and vaults built on the Velodrome and Aerodrome code base, Tarot's vaults among them, v2-style pairs, and Balancer. Bitquery indexes all of them into the chain cubes, `DEXTrades` for one row per swap and `DEXTradeByTokens` for one row per swap per token, and into the Trading cube, which adds the trader, USD price, market cap and supply on every row for the last month or so. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. Two Optimism details shape the examples: native USDC is `0x0b2c639c533813f4aa9d7837caf62653d097ff85` and the bridged USDC.e is `0x7f5c764cbc14f9669b88837ca1490cca17c31607`, and a few swaps in thin pools carry absurd USD values, so every USD sum here caps a single trade with `Side: { AmountInUSD: { lt: "10000000" } }`. Live swaps with trader and USD[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#live-swaps-with-trader-and-usd "Direct link to Live swaps with trader and USD") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The [Crypto Trades API](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) of the Trading cube, filtered to the Optimism market. Each message is one swap with the side, the trader, both amounts in USD and the token's supply. Paste it into the [IDE](https://ide.bitquery.io/) to run. subscription { Trading { Trades(where: { Pair: { Market: { Network: { is: "Optimism" } } } }) { Block { Time } Side Trader { Address } Amounts { Base Quote } AmountsInUsd { Base Quote } Pair { Currency { Symbol Id } QuoteCurrency { Symbol } Market { Protocol Address } } Supply { MarketCap } } }} Which DEXs trade on Optimism[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#which-dexs-trade-on-optimism "Direct link to Which DEXs trade on Optimism") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Group the last day by protocol. Saved query [here](https://ide.bitquery.io/trending-pairs-on-optimism) . { EVM(network: optimism) { DEXTradeByTokens( where: { Trade: { Side: { AmountInUSD: { lt: "10000000" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "trades" } limit: { count: 20 } ) { Trade { Dex { ProtocolFamily ProtocolName } } trades: count volumeUsd: sum(of: Trade_Side_AmountInUSD) traders: uniq(of: Transaction_From) } }} The busiest pairs[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#the-busiest-pairs "Direct link to The busiest pairs") ------------------------------------------------------------------------------------------------------------------------------------------------- Tokens traded against WETH, USDC or USDC.e over the last day, ranked by USD volume, with distinct buyers and sellers and the latest price. [DEXrabbit](https://dexrabbit.bitquery.io/optimism) shows the same table live. { EVM(network: optimism) { DEXTradeByTokens( where: { Trade: { Side: { AmountInUSD: { lt: "10000000" } Currency: { SmartContract: { in: [ "0x4200000000000000000000000000000000000006" "0x0b2c639c533813f4aa9d7837caf62653d097ff85" "0x7f5c764cbc14f9669b88837ca1490cca17c31607" ] } } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "volumeUsd" } limit: { count: 30 } ) { Trade { Currency { Symbol SmartContract } Side { Currency { Symbol } } } trades: count volumeUsd: sum(of: Trade_Side_AmountInUSD) buyers: uniq(of: Trade_Buyer) sellers: uniq(of: Trade_Seller) price: Trade { PriceInUSD(maximum: Block_Time) } } }} ![Trending pairs on Optimism](https://docs.bitquery.io/assets/images/optimism_trending_pairs-83303af6ee6e796dbf65ef985bf08d13.png) Latest swaps, live[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#latest-swaps-live "Direct link to Latest swaps, live") --------------------------------------------------------------------------------------------------------------------------------------------------- The raw `DEXTrades` stream for the chain: pool-side buy and sell with USD on both, the protocol and the transaction. Saved stream [here](https://ide.bitquery.io/Realtime-optimism-dex-trades-websocket) . subscription { EVM(network: optimism) { DEXTrades { Block { Time } Trade { Dex { ProtocolName SmartContract } Buy { Currency { Symbol } Amount AmountInUSD PriceInUSD } Sell { Currency { Symbol } Amount AmountInUSD } } Transaction { Hash From } } }} Top traders on Optimism[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#top-traders-on-optimism "Direct link to Top traders on Optimism") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Rank by `Transaction.From` over the last day. Saved query [here](https://ide.bitquery.io/top-traders-on-optimism) . { EVM(network: optimism) { DEXTradeByTokens( where: { Trade: { Side: { AmountInUSD: { lt: "10000000" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "volumeUsd" } limit: { count: 50 } ) { Transaction { From } trades: count volumeUsd: sum(of: Trade_Side_AmountInUSD) tokens: uniq(of: Trade_Currency_SmartContract) } }} ![Top traders on Optimism](https://docs.bitquery.io/assets/images/optimism_top_traders-216da2781e1b7843e6bfce1151b904d3.png) Top traders of one pair[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#top-traders-of-one-pair "Direct link to Top traders of one pair") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Fix the token and the quote. The example is WETH against native USDC over the last day; the saved query used WLD/USDC, a quieter pair that needs a week. Saved query [here](https://ide.bitquery.io/top-traders-for-wld-usdc-pair) . { EVM(network: optimism) { DEXTradeByTokens( where: { Trade: { Currency: { SmartContract: { is: "0x4200000000000000000000000000000000000006" } } Side: { AmountInUSD: { lt: "10000000" } Currency: { SmartContract: { is: "0x0b2c639c533813f4aa9d7837caf62653d097ff85" } } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "volumeUsd" } limit: { count: 20 } ) { Transaction { From } trades: count volumeUsd: sum(of: Trade_Side_AmountInUSD) bought: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: sell } } } }) sold: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: buy } } } }) } }} ![Top traders for a pair](https://docs.bitquery.io/assets/images/optimism_top_pair_traders-6fd8ec56b800eafa761c3308af3fe7a8.png) Latest price of a token[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#latest-price-of-a-token "Direct link to Latest price of a token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- The newest `DEXTradeByTokens` row for a token carries its price in USD and the quote it traded against; the example is WBTC. For a price in a specific quote, filter the quote under `Side` as well, as in the WETH in USDC.e example. Saved queries: [WBTC in USD](https://ide.bitquery.io/Get-latest-price-of-WBTC-in-USD-on-optimism) , [WETH in USDC.e](https://ide.bitquery.io/Price-of-WETH-in-terms-of-USDC-on-Optimism) . { EVM(network: optimism) { DEXTradeByTokens( where: { Trade: { Currency: { SmartContract: { is: "0x68f180fcCe6836688e9084f035309E29Bf0A2095" } } } } limit: { count: 1 } orderBy: { descending: Block_Time } ) { Block { Time } Trade { PriceInUSD Price Side { Currency { Symbol } } Dex { ProtocolName } } } }} Change `query` to `subscription` and drop `limit` and `orderBy` to stream each new price; WBTC trades often enough on Optimism for that to update every few minutes. Top tokens by trades[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#top-tokens-by-trades "Direct link to Top tokens by trades") ---------------------------------------------------------------------------------------------------------------------------------------------------------- Tokens ranked by number of trades over the last day, with buyers, sellers, pools and volume. Saved query [here](https://ide.bitquery.io/top-tokens-on-optimism) . { EVM(network: optimism) { DEXTradeByTokens( where: { Trade: { Side: { AmountInUSD: { lt: "10000000" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "trades" } limit: { count: 50 } ) { Trade { Currency { Symbol SmartContract } } trades: count volumeUsd: sum(of: Trade_Side_AmountInUSD) buyers: uniq(of: Trade_Buyer) sellers: uniq(of: Trade_Seller) pools: uniq(of: Trade_Dex_SmartContract) } }} ![Top tokens on Optimism](https://docs.bitquery.io/assets/images/optimism_top_tokens-69701c49271222fbf87840b443a7e038.png) Frequently Asked Questions -------------------------- Which DEXs does Bitquery index on Optimism? Uniswap v2, v3 and v4, the aerodrome\_v1 family of Velodrome-style pools and vaults, Balancer and the smaller venues. The protocol query on this page lists whatever traded in the window. What is aerodrome\_v1 on Optimism? The protocol name the cube gives to pools and vaults built on the Velodrome and Aerodrome code base. Filter Trade.Dex.ProtocolName on it and check Dex.SmartContract to see which contract a row came from. Why cap AmountInUSD in the queries? A swap in a pool with almost no liquidity can carry a nonsense USD value that swamps any sum. Keeping single trades under ten million dollars removes those rows from rankings. How do I get the price of a token on Optimism? Take the newest DEXTradeByTokens row for the token contract and read PriceInUSD, or filter the quote currency under Side for the price in that quote. Where do the trader addresses come from? Transaction.From is the account that sent the swap. The Trading cube's Trader field is the same idea with USD and market cap attached. Related pages[​](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------- * [Optimism API hub](https://docs.bitquery.io/docs/blockchain/Optimism/) * [Uniswap v4 on Optimism](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/) * [Optimism transfers API](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/) * [Crypto Trades API](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) * [DEXTrades vs DEXTradeByTokens vs Trades](https://docs.bitquery.io/docs/cubes/dextrades-dextradebytokens-trading-trades/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Live swaps with trader and USD](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#live-swaps-with-trader-and-usd) * [Which DEXs trade on Optimism](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#which-dexs-trade-on-optimism) * [The busiest pairs](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#the-busiest-pairs) * [Latest swaps, live](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#latest-swaps-live) * [Top traders on Optimism](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#top-traders-on-optimism) * [Top traders of one pair](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#top-traders-of-one-pair) * [Latest price of a token](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#latest-price-of-a-token) * [Top tokens by trades](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#top-tokens-by-trades) * [Related pages](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/#related-pages) --- # Ethereum Blocks API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/blocks/blocks-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Latest blocks in the Ethereum network[​](https://docs.bitquery.io/docs/blockchain/Ethereum/blocks/blocks-api/#latest-blocks-in-the-ethereum-network "Direct link to Latest blocks in the Ethereum network") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This GraphQL query retrieves the latest blocks in real time on the Ethereum network that were mined after March 3rd, 2023. It includes information on the block number, hash, mix digest, date, base fee, coinbase, transaction hash, transaction count, and result (including gas and errors). You can find the query [here](https://ide.bitquery.io/Latest-blocks-in-the-Ethereum-network_1) . subscription { EVM(network: eth) { Blocks( limit: { count: 10 } orderBy: { descending: Block_Time } where: { Block: { Date: { after: "2023-03-03" } } } ) { Block { Number Hash MixDigest Date BaseFee Coinbase TxHash TxCount Result { Errors Gas } } } }} ### Parameters[​](https://docs.bitquery.io/docs/blockchain/Ethereum/blocks/blocks-api/#parameters "Direct link to Parameters") * `network`: The blockchain network to query (e.g., `eth`, `bsc`, `polygon`). * `limit`: The maximum number of blocks to retrieve (here set to 10). * `orderBy`: The field and direction to sort the results (e.g., `orderBy: {descending: Block_Time}`). * `where`: Conditions to filter blocks by (e.g., `where: {Block: {Date: {after: "2023-03-03"}}}`). ### Results[​](https://docs.bitquery.io/docs/blockchain/Ethereum/blocks/blocks-api/#results "Direct link to Results") * **Block**: Information about each block, including: * `Number` * `Hash` * `MixDigest` * `Date` * `BaseFee` * `Coinbase` * `TxHash` * `TxCount` * **Result**: Execution details for each block: * `Errors` * `Gas` Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest blocks in the Ethereum network](https://docs.bitquery.io/docs/blockchain/Ethereum/blocks/blocks-api/#latest-blocks-in-the-ethereum-network) * [Parameters](https://docs.bitquery.io/docs/blockchain/Ethereum/blocks/blocks-api/#parameters) * [Results](https://docs.bitquery.io/docs/blockchain/Ethereum/blocks/blocks-api/#results) --- # Optimism Uniswap v4 API: Pools by PoolId, Swaps, Traders and Reserves [Skip to main content](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Uniswap v4 on Optimism is small next to Base or BNB Chain: a few hundred swaps an hour, most of them in ETH/USDC, in the pool that converts between native USDC and the bridged USDC.e, and in OP/USDC. That shapes the queries on this page: windows are a day rather than an hour, and the stream examples pick pools that move. The venue itself works like v4 everywhere: one PoolManager, `0x9a13f98cb987694c9f086b1f5eb990eea8264ec3`, holds every pool; a pool is a `PoolId`, the hash of its tokens, fee, tick spacing and hook; and on raw swap rows the buyer and seller are both the PoolManager, so the trader is `Transaction.From`. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The worked token is native USDC, `0x0b2c639c533813f4aa9d7837caf62653d097ff85`, and the worked pool is ETH/USDC, `PoolId 0x51bf4cc5b8d9f7f759e41f572fe2a25bc2aeb42432bf12544a350595e5c8bb43`. The v4 pools of USDC on Optimism[​](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#the-v4-pools-of-usdc-on-optimism "Direct link to The v4 pools of USDC on Optimism") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Group `DEXTradeByTokens` by `PoolId` with USDC in `Currency`. The rows are its pools with the counter token, trade count and USD volume; the ETH pool and the USDC.e pool lead. This is where a `PoolId` for the other queries comes from. Saved query [here](https://ide.bitquery.io/get-virtual-pool-address-for-a-token-on-uniswap-v4-optimism) . { EVM(network: optimism) { DEXTradeByTokens( where: { Trade: { Dex: { ProtocolName: { is: "uniswap_v4" } } Currency: { SmartContract: { is: "0x0b2c639c533813f4aa9d7837caf62653d097ff85" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "count" } limit: { count: 20 } ) { Trade { PoolId Side { Currency { Symbol SmartContract } } } count volumeUsd: sum(of: Trade_Side_AmountInUSD) } }} Latest swaps in the ETH/USDC pool[​](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#latest-swaps-in-the-ethusdc-pool "Direct link to Latest swaps in the ETH/USDC pool") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Saved query [here](https://ide.bitquery.io/Latest-Trades-for-a-currency-pair-on-optimism) . { EVM(network: optimism) { DEXTrades( where: { Trade: { PoolId: { is: "0x51bf4cc5b8d9f7f759e41f572fe2a25bc2aeb42432bf12544a350595e5c8bb43" } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Trade { Buy { Currency { Symbol } Amount AmountInUSD PriceInUSD } Sell { Currency { Symbol } Amount AmountInUSD } } Transaction { From Hash } } }} Live swaps across all v4 pools on Optimism[​](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#live-swaps-across-all-v4-pools-on-optimism "Direct link to Live swaps across all v4 pools on Optimism") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The protocol filter as a subscription. Messages arrive every few seconds, which is slow enough to watch by eye. Saved stream [here](https://ide.bitquery.io/Real-time-trades-for-uniswap-v4-optimism) . subscription { EVM(network: optimism) { DEXTrades(where: { Trade: { Dex: { ProtocolName: { is: "uniswap_v4" } } } }) { Block { Time } Trade { PoolId Buy { Currency { Symbol SmartContract } Amount AmountInUSD PriceInUSD } Sell { Currency { Symbol SmartContract } Amount AmountInUSD } } Transaction { From Hash } } }} Daily stats of the pool[​](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#daily-stats-of-the-pool "Direct link to Daily stats of the pool") --------------------------------------------------------------------------------------------------------------------------------------------------------------- Trades, distinct buyers and sellers, and USD volume by direction for the token you name. Saved query [here](https://ide.bitquery.io/trade-stats-for-a-token-pair-on-uniswap-v4-optimism) . { EVM(network: optimism) { DEXTradeByTokens( where: { Trade: { PoolId: { is: "0x51bf4cc5b8d9f7f759e41f572fe2a25bc2aeb42432bf12544a350595e5c8bb43" } Currency: { SmartContract: { is: "0x0b2c639c533813f4aa9d7837caf62653d097ff85" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Trade { Currency { Symbol } Side { Currency { Symbol } } } trades: count buyers: uniq(of: Trade_Buyer) sellers: uniq(of: Trade_Seller) volumeUsd: sum(of: Trade_Side_AmountInUSD) buyVolumeUsd: sum(of: Trade_Side_AmountInUSD, if: { Trade: { Side: { Type: { is: buy } } } }) sellVolumeUsd: sum(of: Trade_Side_AmountInUSD, if: { Trade: { Side: { Type: { is: sell } } } }) } }} Top traders of the pool[​](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#top-traders-of-the-pool "Direct link to Top traders of the pool") --------------------------------------------------------------------------------------------------------------------------------------------------------------- Rank by `Transaction.From`, since the PoolManager appears as buyer and seller on every raw v4 swap. `bought` sums the token the trader received and `sold` the token it paid; `Side.Type` describes the counter-side, which is why the conditions look swapped. On Optimism a handful of bots account for most of the pool's trades. Saved queries: [top buyers](https://ide.bitquery.io/top-buyers-of-a-currency-on-uniswap-v4-optimism) , [top sellers](https://ide.bitquery.io/top-sellers-of-a-token-on-uniswap-v4-pool-optimism) . { EVM(network: optimism) { DEXTradeByTokens( where: { Trade: { PoolId: { is: "0x51bf4cc5b8d9f7f759e41f572fe2a25bc2aeb42432bf12544a350595e5c8bb43" } Currency: { SmartContract: { is: "0x0b2c639c533813f4aa9d7837caf62653d097ff85" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "volumeUsd" } limit: { count: 20 } ) { Transaction { From } trades: count volumeUsd: sum(of: Trade_Side_AmountInUSD) bought: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: sell } } } }) sold: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: buy } } } }) } }} Reserves of the pool[​](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#reserves-of-the-pool "Direct link to Reserves of the pool") ------------------------------------------------------------------------------------------------------------------------------------------------------ `DEXPoolEvents` gives the reserves the PoolManager holds for the pool after each change, rebuilt from the concentrated positions around the current price and priced in USD. Filter on `PoolId`, or keep the protocol name alone to follow every v4 pool on Optimism. { EVM(network: optimism) { DEXPoolEvents( where: { PoolEvent: { Pool: { PoolId: { is: "0x51bf4cc5b8d9f7f759e41f572fe2a25bc2aeb42432bf12544a350595e5c8bb43" } } } } limit: { count: 5 } orderBy: { descending: Block_Time } ) { Block { Time } PoolEvent { Pool { PoolId CurrencyA { Symbol } CurrencyB { Symbol } } Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } AtoBPrice } } }} Frequently Asked Questions -------------------------- What is the Uniswap v4 PoolManager address on Optimism? 0x9a13f98cb987694c9f086b1f5eb990eea8264ec3. Every v4 pool on Optimism lives inside it and Trade.PoolId tells them apart. How do I get the PoolId of a v4 pool on Optimism? Group DEXTradeByTokens by Trade.PoolId with one token in Currency and ProtocolName uniswap\_v4. Each row is a pool of that token with its counter token, trade count and volume. Why do my one-hour queries return little on Optimism? Uniswap v4 on Optimism trades a few hundred times an hour across all pools. Use a day or longer as the window, and dataset: combined on the EVM root for anything older than the realtime window. Why are buyer and seller the same address on v4 swaps? The PoolManager settles both sides. Use Transaction.From for the account that sent the swap, or DEXTradeByTokens, whose Buyer and Seller fields are trader-aware. Which USDC is which on Optimism? 0x0b2c639c533813f4aa9d7837caf62653d097ff85 is native USDC and 0x7f5c764cbc14f9669b88837ca1490cca17c31607 is the bridged USDC.e; the v4 pool between them is one of the busiest on the chain. Related pages[​](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#related-pages "Direct link to Related pages") --------------------------------------------------------------------------------------------------------------------------------- * [Optimism DEX trades API](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-dextrades/) * [Optimism transfers API](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-transfers/) * [Uniswap v4 on Ethereum](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/) * [Uniswap v4 on Base](https://docs.bitquery.io/docs/blockchain/Base/uniswap-v4-api/) * [Uniswap v4 on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/uniswap-v4-api/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [The v4 pools of USDC on Optimism](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#the-v4-pools-of-usdc-on-optimism) * [Latest swaps in the ETH/USDC pool](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#latest-swaps-in-the-ethusdc-pool) * [Live swaps across all v4 pools on Optimism](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#live-swaps-across-all-v4-pools-on-optimism) * [Daily stats of the pool](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#daily-stats-of-the-pool) * [Top traders of the pool](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#top-traders-of-the-pool) * [Reserves of the pool](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#reserves-of-the-pool) * [Related pages](https://docs.bitquery.io/docs/blockchain/Optimism/uniswap-v4-api/#related-pages) --- # SmartContract Calls API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Frequently Asked Questions -------------------------- What is the Smart Contract Calls API? Query which functions were called on Ethereum contracts, with decoded inputs, gas usage, internal calls, and transaction context. When should I use Calls vs Events vs Transfers? Use Calls for function execution traces. Use Events for emitted logs. Use Transfers for token movements. See the Mental Model guide linked on this page. Can I track new contract deployments? Yes. Filter EVM.Calls with Call.Create true to list recent contract creation calls. Can I stream contract calls in real time? Yes. Convert your query to a GraphQL subscription or use Kafka ethereum.transactions.proto for high-volume monitoring. Smart Contract Calls API Guide[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract/#smart-contract-calls-api-guide "Direct link to Smart Contract Calls API Guide") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **Before you start**: Not sure when to use Calls vs Transfers vs Events vs DexTrades? Read our [Mental Model guide](https://docs.bitquery.io/docs/start/mental-model-transfers-events-calls/) > to understand which primitive to use for your use case. This API helps retrieve information about smart contract transactions, including details about the contract function that was called, the input and output parameters, and more. With this data, you can build applications that interact with smart contracts, perform analytics on contract activity, and more. Recent Smart Contract Calls[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract/#recent-smart-contract-calls "Direct link to Recent Smart Contract Calls") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query retrieves the most recent smart contract calls on the Ethereum network, focusing on contract creation calls. It provides comprehensive information about the call details, transaction data, and block information. Click to expand GraphQL query { EVM(dataset: realtime, network: eth) { Calls( limit: {count: 10} orderBy: {descending: Block_Time} ) { Call { LogCount InternalCalls Create EnterIndex ExitIndex } Transaction { Gas Hash From To Type Index } Block { Date } } }} Recent Smart Contract Creation Calls[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract/#recent-smart-contract-creation-calls "Direct link to Recent Smart Contract Creation Calls") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This GraphQL query fetches data from the "eth" network about the 10 most recent calls made in Ethereum that were contract creation calls. You can run the query [here](https://ide.bitquery.io/smart-contract-creation-on-EVM-chains) query MyQuery { EVM(dataset: realtime, network: eth) { Calls( limit: {count: 10} orderBy: {descending: Block_Time} where: {Call: {Create: true}} ) { Call { LogCount InternalCalls Create EnterIndex ExitIndex } Transaction { Gas Hash From To Type Index } Block { Date } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Smart Contract Calls API Guide](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract/#smart-contract-calls-api-guide) * [Recent Smart Contract Calls](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract/#recent-smart-contract-calls) * [Recent Smart Contract Creation Calls](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract/#recent-smart-contract-creation-calls) --- # Polygon Transfers API: Token and POL Transfers, Whale Alerts, Backfills [Skip to main content](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Every ERC-20, ERC-721, ERC-1155 and native POL transfer on Polygon is a row in the `Transfers` cube under `EVM(network: matic)`, with sender, receiver, amount, USD value where a price exists, the token, and the transaction. Polygon's volume has its own shape: stablecoin flows, Polymarket's conditional tokens, which are ERC-1155 and show up as NFT transfers, and bridge and distributor contracts that send tens of thousands of transfers an hour. The examples below pick from that. 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](https://ide.bitquery.io/) on a free account. Large USDC transfers[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#large-usdc-transfers "Direct link to Large USDC transfers") ---------------------------------------------------------------------------------------------------------------------------------------------------- Native USDC on Polygon is `0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`. The query form lists transfers of 10,000 or more in the last day; change `query` to `subscription` and drop `Block`, `limit` and `orderBy` for an alert. Saved stream [here](https://ide.bitquery.io/Whale-transfers-of-USDC-on-matic) . { EVM(network: matic) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359" } } Amount: { ge: "10000" } } Block: { Time: { since_relative: { hours_ago: 24 } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Transfer { Amount AmountInUSD Sender Receiver Currency { Symbol } } Transaction { Hash } } }} Transfers sent by one wallet[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#transfers-sent-by-one-wallet "Direct link to Transfers sent by one wallet") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- On the `combined` dataset the query shows a wallet's history even if it has been idle for months. Saved query [here](https://ide.bitquery.io/Sender-is-a-particular-address_2) . { EVM(network: matic, dataset: combined) { Transfers( where: { Transfer: { Sender: { is: "0x1A8f43e01B78979EB4Ef7feBEC60F32c9A72f58E" } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Transfer { Amount AmountInUSD Currency { Symbol SmartContract Native } Receiver } Transaction { Hash } } }} As a stream, pick an address that moves. The one below is a distributor contract that sends thousands of transfers an hour, so messages arrive at once; a personal wallet streams only when it transacts. subscription { EVM(network: matic) { Transfers( where: { Transfer: { Sender: { is: "0xe111180000d2663c0091e4f400237545b87b996b" } } } ) { Block { Time } Transfer { Amount Currency { Symbol SmartContract } Receiver } Transaction { Hash } } }} NFT transfers, including Polymarket positions[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#nft-transfers-including-polymarket-positions "Direct link to NFT transfers, including Polymarket positions") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `Currency.Fungible: false` keeps ERC-721 and ERC-1155 rows. On Polygon most of them are Polymarket outcome tokens, ERC-1155 positions minted and moved by the conditional tokens contract. Saved stream [here](https://ide.bitquery.io/NFT-Token-Transfers-API_3) . subscription { EVM(network: matic) { Transfers(where: { Transfer: { Currency: { Fungible: false } } }) { Block { Time } Transfer { Id Amount Sender Receiver Currency { Name SmartContract } } Transaction { Hash } } }} Has an address ever used Polymarket[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#has-an-address-ever-used-polymarket "Direct link to Has an address ever used Polymarket") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Polymarket settles positions through the conditional tokens contract, `0x4d97dCd97eC945f40cF65F87097ACe5EA0476045`. One received transfer of its tokens is enough for a yes, which is cheaper than scanning prediction trades when a yes or no is all you need. Saved query [here](https://ide.bitquery.io/check-if-an-address-interacted-with-polymarket-ever) . { EVM(dataset: combined, network: matic) { Transfers( limit: { count: 1 } orderBy: { descending: Block_Time } where: { Transfer: { Receiver: { is: "0x0c79f21ec570f5cc0d52d1bc640845faef430ad2" } Currency: { SmartContract: { is: "0x4d97dCd97eC945f40cF65F87097ACe5EA0476045" } } } } ) { Block { Time } Transfer { Id Amount } Transaction { Hash } } }} Deterministic pagination for backfilling[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#deterministic-pagination-for-backfilling "Direct link to Deterministic pagination for backfilling") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- To load transfers into your own index without gaps or repeats, page in a fixed order: the composite `orderBy` positions every transfer uniquely, and `offset` moves by `count` on each request, up to 25,000 rows per call. This ordering runs on the realtime window; on the `archive` dataset order by `Block_Number` and page one block range at a time. Saved query [here](https://ide.bitquery.io/Reliable-transfer-api) . { EVM(network: matic) { Transfers( where: { Transfer: { Success: true } } orderBy: { ascending: [ Block_Number Transaction_Index Call_Index Log_Index Transfer_Index Transfer_Type ] } limit: { count: 100, offset: 0 } ) { Block { Number Time } Transaction { Hash Index } Transfer { Amount Sender Receiver Index Type Currency { Symbol SmartContract Native } } Call { Index } Log { Index } } }} Frequently Asked Questions -------------------------- How do I get token transfers on Polygon? Query Transfers under EVM(network: matic) with a filter on the token contract, the sender or the receiver. Each row has the amount, USD value, both addresses, the token and the transaction; a subscription streams new rows. Which USDC address should I use on Polygon? Native USDC is 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359. The older bridged USDC.e is a different contract; filter on both if you want either. Why do Polymarket positions appear as NFT transfers? Polymarket outcome tokens are ERC-1155 positions on the conditional tokens contract, and ERC-1155 rows carry Currency.Fungible false with the position id in Transfer.Id. How do I check whether a wallet used Polymarket? Query one transfer of the conditional tokens contract received by the wallet on the combined dataset. A row means it has held a position; no row means it never received one. How do I backfill Polygon transfers without gaps? Page with the composite orderBy over block, transaction, call, log, transfer index and type on the realtime window, or by Block\_Number in block ranges on the archive dataset. Related pages[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------- * [Polygon API hub](https://docs.bitquery.io/docs/blockchain/Matic/) * [Polygon DEX trades API](https://docs.bitquery.io/docs/blockchain/Matic/matic-dextrades/) * [Polygon NFT API](https://docs.bitquery.io/docs/blockchain/Matic/matic-nft/) * [Transfers cube](https://docs.bitquery.io/docs/cubes/transfers-cube/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Large USDC transfers](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#large-usdc-transfers) * [Transfers sent by one wallet](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#transfers-sent-by-one-wallet) * [NFT transfers, including Polymarket positions](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#nft-transfers-including-polymarket-positions) * [Has an address ever used Polymarket](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#has-an-address-ever-used-polymarket) * [Deterministic pagination for backfilling](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#deterministic-pagination-for-backfilling) * [Related pages](https://docs.bitquery.io/docs/blockchain/Matic/matic-transfers/#related-pages) --- # Bitcoin API Documentation | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Bitcoin/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Overview[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#overview "Direct link to Overview") -------------------------------------------------------------------------------------------------- Bitquery's Bitcoin APIs cover the chain end-to-end through GraphQL — blocks, transactions, addresses, UTXO-level inputs and outputs, fees in BTC and USD, miner rewards, Omni Layer transactions (USDT-on-Bitcoin and other Omni tokens), and multi-hop fund flow tracing. Every query carries the historical USD value at the time of the transaction, which makes it easy to build wallet history feeds, tax / accounting tools, compliance dashboards, and mining analytics. If you need a data point that isn't covered here, reach out on [Telegram](https://t.me/Bloxy_info) . Endpoint Bitcoin GraphQL queries are served at `https://graphql.bitquery.io`. For real-time data, see the [Bitcoin Kafka stream](https://docs.bitquery.io/docs/streams/protobuf/chains/Bitcoin-protobuf/) . ### What you can do with the Bitcoin API[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#what-you-can-do-with-the-bitcoin-api "Direct link to What you can do with the Bitcoin API") * Pull blocks by height, hash, or time window with difficulty, size, and transaction counts. * Get transactions with input and output totals, fees in BTC and USD, and per-tx pagination. * Compute address balances from raw UTXOs — including balance at a historical block height. * List individual UTXOs received and spent by an address inside any date range. * Aggregate fees paid by an address or across the network for fee analytics. * Track miner activity, daily block rewards, and first-active timestamps for mining pools. * Query Omni Layer transactions and transfers (USDT on Bitcoin and other Omni tokens). * Trace inbound and outbound fund flows across multiple hops with Coinpath. ### How the Bitcoin API differs from running your own node[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#how-the-bitcoin-api-differs-from-running-your-own-node "Direct link to How the Bitcoin API differs from running your own node") | `bitcoind` / Bitcoin RPC | Bitquery Bitcoin API | | --- | --- | | Raw chain state — you build the indexer | Pre-indexed and parsed: blocks, txs, UTXOs, addresses, Omni Layer | | No historical analytics out of the box | History, joins, aggregations, USD conversion at trade time | | Re-scan the chain to compute balances | One query for current balance, balance at a height, or activity stats | | Best for submitting transactions and full validation | Best for analytics, dashboards, wallet UIs, compliance, and mining stats | ### Real-time Bitcoin data[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#real-time-bitcoin-data "Direct link to Real-time Bitcoin data") For live, low-latency Bitcoin data, use Bitquery's **[Bitcoin Kafka stream](https://docs.bitquery.io/docs/streams/protobuf/chains/Bitcoin-protobuf/) ** (`btc.transactions.proto`). It delivers every block and transaction as soon as it lands on-chain, with full input/output detail, script and address parsing, and miner data. GraphQL subscriptions are not available for Bitcoin — Kafka is the real-time path. For polling or historical pulls, the GraphQL queries below work the same way you'd expect on any other Bitquery chain. Quick start[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#quick-start "Direct link to Quick start") ----------------------------------------------------------------------------------------------------------- This query returns the 5 most recent Bitcoin blocks with height, difficulty, transaction count, and timestamp. { bitcoin(network: bitcoin) { blocks(options: {desc: "height", limit: 5}) { height difficulty transactionCount blockSizeBigInt timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } }} API reference[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#api-reference "Direct link to API reference") ----------------------------------------------------------------------------------------------------------------- ### Core data[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#core-data "Direct link to Core data") * [Bitcoin Blocks API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-blocks-api/) — block lookups by height or time, difficulty, size, and transaction counts. * [Bitcoin Transactions API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-transactions-api/) — transaction-level data with fees, inputs/outputs totals, and pagination patterns. * [Bitcoin Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-inputs-outputs/) — UTXO-level data, historical BTC price, balance at a block height, and miner rewards. ### Addresses and balances[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#addresses-and-balances "Direct link to Addresses and balances") * [Bitcoin Address API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-address-api/) — balances from UTXOs (current and at a height), `addressStats` aggregates, first/last-active. ### Fees[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#fees "Direct link to Fees") * [Bitcoin Fee API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-fee-api/) — per-transaction and aggregate fee queries in BTC and USD. ### Omni Layer (USDT on Bitcoin)[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#omni-layer-usdt-on-bitcoin "Direct link to Omni Layer (USDT on Bitcoin)") * [Bitcoin Omni Transactions & Transfers API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-omni-transactions/) — Omni transactions and per-address transfers for tokens like USDT-on-Bitcoin. ### Fund tracing[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#fund-tracing "Direct link to Fund tracing") * [Bitcoin Coinpath API](https://docs.bitquery.io/docs/blockchain/Bitcoin/bitcoin-coinpath-api/) — multi-hop fund flow tracing between Bitcoin addresses. ### Real-time[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#real-time "Direct link to Real-time") * [Bitcoin Kafka stream](https://docs.bitquery.io/docs/streams/protobuf/chains/Bitcoin-protobuf/) — `btc.transactions.proto` topic for sub-block-time delivery. More guides[​](https://docs.bitquery.io/docs/blockchain/Bitcoin/#more-guides "Direct link to More guides") ----------------------------------------------------------------------------------------------------------- * [Data Coverage & Retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) — how far back this chain's data goes * [Common errors and what to do](https://docs.bitquery.io/docs/start/errors/) * [Plans, Points & Limits](https://docs.bitquery.io/docs/plans/how-billing-works/) * [First query in 5 minutes](https://docs.bitquery.io/docs/start/first-query/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Overview](https://docs.bitquery.io/docs/blockchain/Bitcoin/#overview) * [What you can do with the Bitcoin API](https://docs.bitquery.io/docs/blockchain/Bitcoin/#what-you-can-do-with-the-bitcoin-api) * [How the Bitcoin API differs from running your own node](https://docs.bitquery.io/docs/blockchain/Bitcoin/#how-the-bitcoin-api-differs-from-running-your-own-node) * [Real-time Bitcoin data](https://docs.bitquery.io/docs/blockchain/Bitcoin/#real-time-bitcoin-data) * [Quick start](https://docs.bitquery.io/docs/blockchain/Bitcoin/#quick-start) * [API reference](https://docs.bitquery.io/docs/blockchain/Bitcoin/#api-reference) * [Core data](https://docs.bitquery.io/docs/blockchain/Bitcoin/#core-data) * [Addresses and balances](https://docs.bitquery.io/docs/blockchain/Bitcoin/#addresses-and-balances) * [Fees](https://docs.bitquery.io/docs/blockchain/Bitcoin/#fees) * [Omni Layer (USDT on Bitcoin)](https://docs.bitquery.io/docs/blockchain/Bitcoin/#omni-layer-usdt-on-bitcoin) * [Fund tracing](https://docs.bitquery.io/docs/blockchain/Bitcoin/#fund-tracing) * [Real-time](https://docs.bitquery.io/docs/blockchain/Bitcoin/#real-time) * [More guides](https://docs.bitquery.io/docs/blockchain/Bitcoin/#more-guides) --- # Get Supply and Marketcap of a Token | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/total-supply/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD We will use the [Transaction Balance Tracker APIs](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/) for this query. { EVM(network: eth) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Currency: { SmartContract: { is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } Fungible: true } } } ) { Block { Time Number } TokenBalance { Currency { Symbol Name SmartContract Decimals } TotalSupply Marketcap: TotalSupplyInUSD } } }} Alternative Method Using Transfer Cube[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/total-supply/#alternative-method-using-transfer-cube "Direct link to Alternative Method Using Transfer Cube") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Get Supply of a Token[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/total-supply/#get-supply-of-a-token "Direct link to Get Supply of a Token") query MyQuery { EVM(network: eth, dataset: combined) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x582d872A1B094FC48F5DE31D3B73F2D9bE47def1" } } Success: true } } ) { minted: sum( of: Transfer_Amount if: { Transfer: { Sender: { is: "0x0000000000000000000000000000000000000000" } } } ) burned: sum( of: Transfer_Amount if: { Transfer: { Receiver: { is: "0x0000000000000000000000000000000000000000" } } } ) } }} ### Getting Marketcap[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/total-supply/#getting-marketcap "Direct link to Getting Marketcap") { EVM(dataset: combined) { Transfers( limit: {count: 1} where: {Call: {Create: true}, Transfer: {Currency: {SmartContract: {is: "0x0f7dc5d02cc1e1f5ee47854d534d332a1081ccc8"}}, Sender: {is: "0x0000000000000000000000000000000000000000"}}} ) { Transfer { Amount Sender Receiver } joinDEXTradeByTokens( limit: {count: 1} join: inner Trade_Currency_SmartContract: Transfer_Currency_SmartContract ) { Trade { Price(maximum: Block_Time) PriceInUSD } } } }} First the query gets supply in the `amount` field then query uses join to get the `PriceInUSD`. Multiplying both of these will give you marketcap of the token. In this example, we are calculating marketcap of Pepes Dog (ZEUS) token which has smart contract address `0x0f7dC5D02CC1E1f5Ee47854d534D332A1081cCC8`. Try the query [here](https://ide.bitquery.io/supply-and-latest-price-of-token-to-get-marketcap) . Video Tutorial[​](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/total-supply/#video-tutorial "Direct link to Video Tutorial") -------------------------------------------------------------------------------------------------------------------------------------------- Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Alternative Method Using Transfer Cube](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/total-supply/#alternative-method-using-transfer-cube) * [Get Supply of a Token](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/total-supply/#get-supply-of-a-token) * [Getting Marketcap](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/total-supply/#getting-marketcap) * [Video Tutorial](https://docs.bitquery.io/docs/blockchain/Ethereum/transfers/total-supply/#video-tutorial) --- # Ethereum Fees API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Get Trades with Transaction fees[​](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#get-trades-with-transaction-fees "Direct link to Get Trades with Transaction fees") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get a list of successful DEX trades on EVM along with the transaction fee details for each trade. `SenderFee` and `SenderFeeInUSD` fields in query are the transaction fees in ETH and transaction fees in USD respectively. You can test the query [here](https://ide.bitquery.io/trades-with-the-transaction-fees_1#) . Click to expand GraphQL query query MyQuery { EVM { DEXTradeByTokens( where: {TransactionStatus: {Success: true}} ) { Block { Time } Trade { AmountInUSD Amount Buyer Seller Currency { SmartContract Name Symbol } Side { Currency { Symbol SmartContract Name } Seller Buyer AmountInUSD Amount } } Transaction { From To Hash } joinTransactions(join: inner, Transaction_Hash: Transaction_Hash) { Fee { SenderFee SenderFeeInUSD } } } }} Get Transfers by an address and Transaction fees paid for the transfer[​](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#get-transfers-by-an-address-and-transaction-fees-paid-for-the-transfer "Direct link to Get Transfers by an address and Transaction fees paid for the transfer") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track wallet token transfers and get the fees paid for each by the address. `SenderFee` and `SenderFeeInUSD` fields in query are the transaction fees in ETH and transaction fees in USD respectively. You can test the query [here](https://ide.bitquery.io/binancehot-wallet-transfers-with-transaction-fees) . Click to expand GraphQL query query MyQuery { EVM { Transfers( where: {Transaction: {From: {is: "0xF977814e90dA44bFA03b6295A0616a897441aceC"}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Block { Time } Fee { SenderFee SenderFeeInUSD } Transfer { Currency { Name SmartContract Symbol } Amount AmountInUSD } } }} Total transaction fees paid by an account[​](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#total-transaction-fees-paid-by-an-account "Direct link to Total transaction fees paid by an account") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get the total fees (in Eth and USD) paid by a specific EVM account across all transfers. `SenderFee` and `SenderFeeInUSD` fields in query are the transaction fees in ETH and transaction fees in USD respectively. You can test the query [here](https://ide.bitquery.io/total-txn-fees-paid-by-binance-hot-wallet-in-a-day) . Click to expand GraphQL query query MyQuery { EVM(dataset: combined, aggregates: yes) { Transfers( where: {Transaction: {From: {is: "0xF977814e90dA44bFA03b6295A0616a897441aceC"}}, TransactionStatus: {Success: true}, Block: {Time: {till: "2025-05-07T00:00:00Z", since: "2025-05-06T00:00:00Z"}}} ){ Total_Transaction_Fees_paid_in_ETH:sum(of:Fee_SenderFee) Total_Transaction_Fees_paid_in_USD:sum(of:Fee_SenderFeeInUSD) } }} Transaction fees paid by an account for each currency transfers[​](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#transaction-fees-paid-by-an-account-for-each-currency-transfers "Direct link to Transaction fees paid by an account for each currency transfers") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get total fees paid by a EVM account for transferring each type of token. `SenderFee` and `SenderFeeInUSD` fields in query are the transaction fees in ETH and transaction fees in USD respectively. You can test the query [here](https://ide.bitquery.io/Transaction-fees-paid-by-Binance-Hot-Wallet-aggregated-by-currency) . Click to expand GraphQL query query MyQuery { EVM(dataset: combined, aggregates: yes) { Transfers( where: {Transaction: {From: {is: "0xF977814e90dA44bFA03b6295A0616a897441aceC"}}, TransactionStatus: {Success: true}, Block: {Time: {till: "2025-05-07T00:00:00Z", since: "2025-05-06T00:00:00Z"}}} orderBy: {descendingByField: "Total_Transaction_Fees_paid_in_USD"} ) { Transfer { Currency { Name Symbol SmartContract } } Total_Transaction_Fees_paid_in_ETH: sum(of: Fee_SenderFee) Total_Transaction_Fees_paid_in_USD: sum(of: Fee_SenderFeeInUSD) } }} Video Tutorial | How to get Total Fees paid by a Account on EVM Network[​](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#video-tutorial--how-to-get-total-fees-paid-by-a-account-on-evm-network "Direct link to Video Tutorial | How to get Total Fees paid by a Account on EVM Network") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Trades with Transaction fees](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#get-trades-with-transaction-fees) * [Get Transfers by an address and Transaction fees paid for the transfer](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#get-transfers-by-an-address-and-transaction-fees-paid-for-the-transfer) * [Total transaction fees paid by an account](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#total-transaction-fees-paid-by-an-account) * [Transaction fees paid by an account for each currency transfers](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#transaction-fees-paid-by-an-account-for-each-currency-transfers) * [Video Tutorial | How to get Total Fees paid by a Account on EVM Network](https://docs.bitquery.io/docs/blockchain/Ethereum/fees/fees-api/#video-tutorial--how-to-get-total-fees-paid-by-a-account-on-evm-network) --- # Cardano Djed Stablecoin API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD [Djed](https://djed.xyz/) is an overcollateralized, USD-pegged stablecoin on Cardano, issued by COTI and designed in collaboration with Input Output Global. It trades under the ticker **DJED** (asset name `DjedMicroUSD`) and is backed by ADA reserves. Every issuance is an on-chain **mint** of the DJED native token, and every redemption is a **burn** — which means Djed's full lifecycle maps cleanly onto Bitquery's existing Cardano primitives: * Mint and burn activity → [Cardano Mints API](https://docs.bitquery.io/docs/blockchain/Cardano/mints/) * Holder balances → [Cardano Address API](https://docs.bitquery.io/docs/blockchain/Cardano/address/) * Movements between wallets → [Cardano Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/) You can verify the on-chain asset on Cardanoscan: [DjedMicroUSD token page](https://cardanoscan.io/token/8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344) . Endpoint Cardano GraphQL queries are served at `https://graphql.bitquery.io`. How to filter for DJED in Bitquery[​](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#how-to-filter-for-djed-in-bitquery "Direct link to How to filter for DJED in Bitquery") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Bitquery's `currency: {is: "..."}` filter on Cardano matches native tokens by their **`tokenId`** — the [CIP-14 asset fingerprint](https://cips.cardano.org/cip/CIP-0014) . For DJED, that value is: currency: {is: "asset15f3ymkjafxxeunv5gtdl54g5qs8ty9k84tq94x"} The asset name / symbol (`DjedMicroUSD`) and the `currency.address` field are **not** usable as filter values — Bitquery returns `currency.address` as `"-"` for Cardano native tokens. Always filter by the `tokenId` fingerprint above. Recent DJED mint and burn events[​](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#recent-djed-mint-and-burn-events "Direct link to Recent DJED mint and burn events") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Pulls the 25 most recent DJED mint events, filtered server-side. A positive `value` is a mint (DJED issued against ADA collateral), a negative `value` is a burn (redemption). Useful for tracking Djed supply changes, correlating large mints with ADA price moves, or driving an issuance dashboard. { cardano(network: cardano) { mints( currency: {is: "asset15f3ymkjafxxeunv5gtdl54g5qs8ty9k84tq94x"} options: {limit: 25, desc: "block.height"} ) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } value transaction { hash index } currency { name symbol tokenId tokenType decimals } } }} Sort with `desc: "value"` to surface the largest single mints and burns. Tighten the `date` filter or raise `limit` for deeper history. Wallet's DJED and ADA balances[​](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#wallets-djed-and-ada-balances "Direct link to Wallet's DJED and ADA balances") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Returns every asset a Cardano address holds, plus stake and rewards context. The `balance` block lists one entry per currency, so ADA and every native token in the wallet — including DJED — come back in the same response. On the client, match `currency.tokenId == "asset15f3ymkjafxxeunv5gtdl54g5qs8ty9k84tq94x"` to pull out just the DJED position. Good for portfolio tracking of Djed holders, wallet-level risk analytics, or balance widgets in Djed-aware wallet UIs. { cardano(network: cardano) { address( address: {is: "addr1q8de89fu0j09gze96nf8mfrcz056tw8nz35lqkr46zn52j9cvtjm8enawhyjjkcf6eves2cwz4c8y9tvhjuzpvmu4rwstxfht5"} ) { address { address annotation } balance { value currency { name symbol decimals tokenId tokenType } } staking { controlledTotalStake stakedAmount stakedAmountWithRewards rewardsAmount rewardsAvailable withdrawnAmount address { address annotation } } } }} Drop the `staking` block when you don't need stake context, or pair this with `addressStats` (see the [Cardano Address API](https://docs.bitquery.io/docs/blockchain/Cardano/address/) ) to combine per-asset balances with aggregate activity metrics in a single request. Recent DJED movements network-wide[​](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#recent-djed-movements-network-wide "Direct link to Recent DJED movements network-wide") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Lists the 10 most recent DJED movements across the chain. In the eUTXO model, `inputs` are UTXOs being spent (DJED "sent") and `outputs` are UTXOs being created (DJED "received"). Each row carries block height and timestamp, transaction hash, counterparty address, UTXO index, raw DJED `value`, and USD-equivalent `value_usd`. Good for live activity feeds, recent-transfers widgets, or auditing large DJED transactions. { cardano(network: cardano) { inputs( currency: {is: "asset15f3ymkjafxxeunv5gtdl54g5qs8ty9k84tq94x"} options: {desc: "block.height", limit: 10} ) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } transaction { hash } inputAddress { address annotation } inputIndex value value_usd: value(in: USD) currency { name symbol tokenId } } outputs( currency: {is: "asset15f3ymkjafxxeunv5gtdl54g5qs8ty9k84tq94x"} options: {desc: "block.height", limit: 10} ) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } transaction { hash } outputAddress { address annotation } outputIndex outputDirection value value_usd: value(in: USD) currency { name symbol tokenId } } }} Replace the `options` block with aggregates (`count`, `value(calculate: sum)`, `value(in: USD, calculate: sum)`) when you want totals instead of a row-level list. DJED received by a specific address[​](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#djed-received-by-a-specific-address "Direct link to DJED received by a specific address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Lists the 20 most recent DJED-bearing UTXOs received by an address, with block context, transaction hash, output index, DJED `value`, and USD equivalent. "Received" in eUTXO terms means the address appears as the `outputAddress` on a UTXO that contains DJED. Useful for merchant payment ingestion, on-chain invoicing, and exchange deposit monitoring. { cardano(network: cardano) { outputs( currency: {is: "asset15f3ymkjafxxeunv5gtdl54g5qs8ty9k84tq94x"} outputAddress: {is: "addr1q8de89fu0j09gze96nf8mfrcz056tw8nz35lqkr46zn52j9cvtjm8enawhyjjkcf6eves2cwz4c8y9tvhjuzpvmu4rwstxfht5"} options: {desc: "block.height", limit: 20} ) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } transaction { hash } outputIndex outputDirection value value_usd: value(in: USD) currency { name symbol tokenId } } }} Pass `outputAddress: {in: [...]}` with a list of addresses to aggregate receipts across several wallets. Replace `options` with aggregates to get totals received instead of per-UTXO rows. DJED sent by a specific address[​](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#djed-sent-by-a-specific-address "Direct link to DJED sent by a specific address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Same idea as above, in reverse. Lists the 20 most recent DJED-bearing UTXOs spent by an address — i.e. UTXOs where the address appears as `inputAddress` and the UTXO is being consumed. Useful for outflow tracking, spend-side accounting, and tax reporting. { cardano(network: cardano) { inputs( currency: {is: "asset15f3ymkjafxxeunv5gtdl54g5qs8ty9k84tq94x"} inputAddress: {is: "addr1q8de89fu0j09gze96nf8mfrcz056tw8nz35lqkr46zn52j9cvtjm8enawhyjjkcf6eves2cwz4c8y9tvhjuzpvmu4rwstxfht5"} options: {desc: "block.height", limit: 20} ) { block { height timestamp { time(format: "%Y-%m-%d %H:%M:%S") } } transaction { hash } inputIndex value value_usd: value(in: USD) currency { name symbol tokenId } } }} Combine this with the "received" query above to reconstruct a wallet's complete DJED ledger — net DJED held equals the sum of received `value` minus the sum of sent `value`. Related resources[​](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#related-resources "Direct link to Related resources") ---------------------------------------------------------------------------------------------------------------------------------- * [Cardano Mints API](https://docs.bitquery.io/docs/blockchain/Cardano/mints/) — generic mint and burn query patterns * [Cardano Address API](https://docs.bitquery.io/docs/blockchain/Cardano/address/) — wallet balances and the `addressStats` cube * [Cardano Inputs and Outputs API](https://docs.bitquery.io/docs/blockchain/Cardano/inputs-outputs/) — full UTXO query reference * [Cardano Coinpath API](https://docs.bitquery.io/docs/blockchain/Cardano/coinpath/) — multi-hop fund tracing * [Djed official site](https://djed.xyz/) * [Djed launch announcement on COTI Medium](https://medium.com/cotinetwork/a-new-era-for-stablecoins-begins-djed-is-live-on-mainnet-55971971f2a8) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [How to filter for DJED in Bitquery](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#how-to-filter-for-djed-in-bitquery) * [Recent DJED mint and burn events](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#recent-djed-mint-and-burn-events) * [Wallet's DJED and ADA balances](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#wallets-djed-and-ada-balances) * [Recent DJED movements network-wide](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#recent-djed-movements-network-wide) * [DJED received by a specific address](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#djed-received-by-a-specific-address) * [DJED sent by a specific address](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#djed-sent-by-a-specific-address) * [Related resources](https://docs.bitquery.io/docs/blockchain/Cardano/djed/#related-resources) --- # BNB Chain Transfers API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we'll have a look at some examples using the BSC Transfers API. Subscribe to Recent Whale Transactions of a particular currency[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#subscribe-to-recent-whale-transactions-of-a-particular-currency "Direct link to Subscribe to Recent Whale Transactions of a particular currency") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The subscription query below fetches the whale transactions on the BSC network. We have used WBNB address `0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c`. You can find the query [here](https://ide.bitquery.io/Whale-transfers-of-USDC-on-BSC) subscription{ EVM(network: bsc) { Transfers( where: {Transfer: {Currency: {SmartContract: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}}, Amount: {ge: "10000"}}} ) { Transaction { From Hash } Transfer { Amount Sender Receiver Currency { SmartContract Symbol Name Fungible Native } Id } } }} Sender is a particular address[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#sender-is-a-particular-address "Direct link to Sender is a particular address") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This websocket retrieves transfers where the sender is a particular address `0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c`. For this subscription query we use `where` keyword and in that we specify `{Transfer: {Sender: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}}}` to get the desired data. You can find the query [here](https://ide.bitquery.io/Transfers-where-sender-is-a-particular-address) subscription { EVM(network: bsc) { Transfers( where: {Transfer: {Sender: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}}} ) { Transfer { Amount AmountInUSD Currency { Name SmartContract Native Symbol Fungible } Receiver Sender } Transaction { Hash } } }} Transactions From/To An Address with Transfer Details[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#transactions-fromto-an-address-with-transfer-details "Direct link to Transactions From/To An Address with Transfer Details") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [Run Query](https://ide.bitquery.io/Sender-OR-Receiver-Transfer-Example-BSC) query MyQuery { EVM(dataset: archive, network: bsc) { Transfers( where: {any: [{Transaction: {From: {is: "0x2b9dfb290ad7b54a5b86da25c3a629bfc7152167"}}}, {Transaction: {To: {is: "0x2b9dfb290ad7b54a5b86da25c3a629bfc7152167"}}}], Transfer: {}, Block: {Date: {since: "2025-08-10", till: "2025-08-29"}}} limit: {count: 10000} orderBy: {descending: Block_Time} ) { Transfer { Amount AmountInUSD Sender Receiver Currency { Symbol Name } Index } Transaction { Hash } Block { Number Time } } }} Subscribe to the latest NFT token transfers on BSC[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#subscribe-to-the-latest-nft-token-transfers-on-bsc "Direct link to Subscribe to the latest NFT token transfers on BSC") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Let's see an example of NFT token transfers using GraphQL Subscription (Webhook). In the following NFT Token Transfers API, we will be subscribing to all NFT token transfers on BSC network. You can run the query [here](https://ide.bitquery.io/Track-realtime-NFT-Transfers-on-BSC-chain) subscription { EVM(network: bsc) { Transfers( where: { Transfer: { Currency: { Fungible: false } } } ) { Block { Hash Number } Transfer { Amount Currency { Name SmartContract Symbol Native } Sender Receiver } } }} Check if an address ever interacted with predict.fun (USDT → protocol receivers)[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#check-if-an-address-ever-interacted-with-predictfun-usdt--protocol-receivers "Direct link to Check if an address ever interacted with predict.fun (USDT → protocol receivers)") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Predict.fun flows on BSC often show up as USDT (`0x55d398326f99059fF775485246999027B3197955`) transfers **from** the user's wallet **to** one of the protocol contract addresses listed below. `limit: { count: 1 }` is enough for a historic “has this wallet interacted?” probe. **Try it:** [IDE — predict.fun interaction check](https://ide.bitquery.io/check-if-an-address-interacted-with-predictfun-ever) query ($address: String) { EVM(dataset: realtime, network: bsc) { Transfers( limit: { count: 1 } orderBy: { descending: Block_Time } where: { Transfer: { Currency: { SmartContract: { is: "0x55d398326f99059ff775485246999027b3197955" } } Sender: { is: $address } Receiver: { in: [ "0x8BC070BEdAB741406F4B1Eb65A72bee27894B689" "0x6bEb5a40C032AFc305961162d8204CDA16DECFa5" "0x365fb81bd4A24D6303cd2F19c349dE6894D8d58A" "0x8A289d458f5a134bA40015085a8F50Ffb681B41d" "0xF1f8F5C641F20C48526269EF7DFF19172Efa9783" "0xFbC2259aBB3F01c019ECE1d0200Ee673BB7BA34F" "0xF2311C668aAA8dEc48D5da577d3018eb94b3132F" "0xD172f3FBabe763Ee8E52D8b32421574236dA6057" ] } } } ) { Block { Time } Transaction { Hash } Transfer { Sender Receiver Amount } } }} **Variables:** { "address": "0x75b976434245E1Fc037f9c7645C5aCdDdA6b00A4"} Deterministic Pagination for Backfilling Transfers[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#deterministic-pagination-for-backfilling-transfers "Direct link to Deterministic Pagination for Backfilling Transfers") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ When backfilling BSC transfer data or building a historical index, use deterministic pagination to guarantee no records are missed or duplicated. **Try it live:** [Deterministic Transfer API](https://ide.bitquery.io/Reliable-transfer-api) { EVM(dataset: combined, network: bsc) { 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 } } }} The composite `orderBy` across `Block_Number`, `Transaction_Index`, `Call_Index`, `Log_Index`, `Transfer_Index`, and `Transfer_Type` uniquely positions every transfer, making offset-based pagination safe for backfilling. Increment `offset` by the `count` value on each request. You can pull up to **25,000 records in a single request** by setting `count: 25000`. Why does my wallet inflow/outflow query miss some transactions on BSC?[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#why-does-my-wallet-inflowoutflow-query-miss-some-transactions-on-bsc "Direct link to Why does my wallet inflow/outflow query miss some transactions on BSC?") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Bitquery indexes all transactions from the blockchain. If you're missing inflow/outflow records in your query, first verify you're using the correct dataset—either `realtime` or `combined`—based on your needs. If your query still appears to miss transactions, please report the issue to the Bitquery team via [Telegram](https://t.me/bloxy_info) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Subscribe to Recent Whale Transactions of a particular currency](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#subscribe-to-recent-whale-transactions-of-a-particular-currency) * [Sender is a particular address](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#sender-is-a-particular-address) * [Transactions From/To An Address with Transfer Details](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#transactions-fromto-an-address-with-transfer-details) * [Subscribe to the latest NFT token transfers on BSC](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#subscribe-to-the-latest-nft-token-transfers-on-bsc) * [Check if an address ever interacted with predict.fun (USDT → protocol receivers)](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#check-if-an-address-ever-interacted-with-predictfun-usdt--protocol-receivers) * [Deterministic Pagination for Backfilling Transfers](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#deterministic-pagination-for-backfilling-transfers) * [Why does my wallet inflow/outflow query miss some transactions on BSC?](https://docs.bitquery.io/docs/blockchain/BSC/bsc-transfers/#why-does-my-wallet-inflowoutflow-query-miss-some-transactions-on-bsc) --- # Arbitrum Address Balance API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Deprecated APIs On EVM, **`BalanceUpdates`** and **`TokenHolders`** were deprecated as of **20 May 2026** and removed on **15 June 2026**. Use **`EVM.Balances`** (this page) and **[Token Holders API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/) ** (`EVM.Holders`) instead. The **Balances** API returns current and historical token balances for an address on Arbitrum. To return only non-zero balances, add `Amount(selectWhere: { gt: "0" })` on the `Balance` field (not in `where`). Use `dataset: combined` or `dataset: archive` as follows: | Dataset | When to use | | --- | --- | | **`combined`** | Latest balances. Queries **realtime and archive** databases and merges results. | | **`archive`** | Historical snapshots with `Block.Date`, and balances for **addresses not recently active**. | Examples: [All Token Balances](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-of-an-address) · [Native ETH (Arbitrum)](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#native-eth-arbitrum-balance) · [Balance on a Date](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-on-a-specific-date) · [Specific Token](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-for-a-specific-token) · [Holder Snapshot](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#token-holder-snapshot) Balance of an Address[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-of-an-address "Direct link to Balance of an Address") --------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns token balances for a wallet address. Use `Amount(selectWhere: { gt: "0" })` to exclude zero balances. [Run in IDE](https://ide.bitquery.io/Arbitrum-Balance-of-an-Address) query { EVM(network: arbitrum, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Native ETH (Arbitrum) Balance[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#native-eth-arbitrum-balance "Direct link to Native ETH (Arbitrum) Balance") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the native ETH balance for a wallet on Arbitrum (not ERC-20 tokens). Filter with `Currency: { Native: true }` instead of a token contract address. [Run in IDE](https://ide.bitquery.io/arbitrum-native-balances-address) query { EVM(network: arbitrum, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF" } } Currency: { Native: true } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} **Parameters** * `network: arbitrum`: Arbitrum mainnet. * `dataset: combined`: Merges realtime and archive data for the latest balance state. * `Balance.Address`: Wallet address to query. * `Currency.Native: true`: Native ETH on Arbitrum only (see [Native ETH (Arbitrum) Balance](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#native-eth-arbitrum-balance) ). **Returned fields** * `Currency.Symbol`, `Currency.SmartContract`: Token metadata. * `Balance.Amount`, `Balance.AmountInUSD`: Token balance and USD value (use `selectWhere` to filter non-zero amounts). Balance on a Specific Date[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-on-a-specific-date "Direct link to Balance on a Specific Date") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Use `Block.Date.till` for a point-in-time snapshot. Use `dataset: archive` for historical dates and addresses not recently active. [Run in IDE](https://ide.bitquery.io/arbitrum-balances-by-date) query { EVM(network: arbitrum, dataset: archive) { Balances( where: { Block: { Date: { till: "2026-05-05" } } Balance: { Address: { is: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Balance for a Specific Token[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-for-a-specific-token "Direct link to Balance for a Specific Token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Add a `Currency.SmartContract` filter. Always use the contract address, not the token name. Use `0x` for native ETH on Arbitrum, or the ERC-20 contract address for a token. [Run in IDE](https://ide.bitquery.io/arbitrum-balances-specific-token) query { EVM(network: arbitrum, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF" } } Currency: { SmartContract: { is: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Token Holder Snapshot[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#token-holder-snapshot "Direct link to Token Holder Snapshot") --------------------------------------------------------------------------------------------------------------------------------------------------------------- The number of unique holders, token supply, and Gini coefficient for the balance amount before a specific timestamp can be derived using the query below. These stats provide a useful holder snapshot for any given time. [Run in IDE](https://ide.bitquery.io/token-holder-snapshot-arbitrum) Click to expand GraphQL query query { EVM(network: arbitrum, dataset: archive) { Holders( where: { Currency: { SmartContract: { is: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9" } } Balance: { Amount: { gt: "0" } LastChangeTime: { till: "2026-05-20T00:00:00Z" } } Holder: { Address: { not: "0x" } } } ) { Balance { LastChangeTime(maximum: Balance_LastChangeTime) } holders: uniq(of: Holder_Address) supply: sum(of: Balance_Amount) gini(of: Balance_Amount) } }} Balance History by Date[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-history-by-date "Direct link to Balance History by Date") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns balance snapshots over time for an address. Use `dataset: archive`. Order by `Block_Date` descending and use `limit` to paginate. Add `Currency.SmartContract` under `Currency` to filter by a specific token. [Run in IDE](https://ide.bitquery.io/arbitrum-balances-history) query { EVM(network: arbitrum, dataset: archive) { Balances( where: { Balance: { Address: { is: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF" } } } orderBy: { descending: Block_Date } limit: { count: 100 } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD } Block { Date } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Balance of an Address](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-of-an-address) * [Native ETH (Arbitrum) Balance](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#native-eth-arbitrum-balance) * [Balance on a Specific Date](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-on-a-specific-date) * [Balance for a Specific Token](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-for-a-specific-token) * [Token Holder Snapshot](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#token-holder-snapshot) * [Balance History by Date](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/#balance-history-by-date) --- # BNB Chain Slippage API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will see how to get BSC DEX pool slippage information using our API. The slippage API helps you understand price impact and liquidity depth for token swaps on BSC DEX pools. Understanding Slippage and Price Impact[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#understanding-slippage-and-price-impact "Direct link to Understanding Slippage and Price Impact") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Slippage refers to the difference between the expected price of a trade and the actual execution price. When swapping tokens in a DEX pool, larger trades can move the price due to limited liquidity, resulting in slippage. The DEXPoolSlippages API provides detailed information about: * Maximum input amounts that can be swapped at different slippage tolerances * Minimum output amounts guaranteed at each slippage level * Average execution prices for different trade sizes * Price impact calculations for both swap directions (A to B and B to A) For a comprehensive explanation of how DEX pools work, liquidity calculations, and price tables, refer to the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/) . Realtime Slippage Monitoring[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#realtime-slippage-monitoring "Direct link to Realtime Slippage Monitoring") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription query returns real-time slippage data for all DEX pools on BSC. You can monitor price impact and liquidity depth as trades occur. You can find the query [here](https://ide.bitquery.io/realtime-slippage-on-bsc) subscription { EVM(network: bsc) { DEXPoolSlippages { Price { BtoA { Price MinAmountOut MaxAmountIn } AtoB { Price MinAmountOut MaxAmountIn } Pool { PoolId SmartContract Pair { Decimals SmartContract Name } CurrencyB { Symbol SmartContract Name Decimals } CurrencyA { Symbol SmartContract Name Decimals } } Dex { SmartContract ProtocolVersion ProtocolName ProtocolFamily } SlippageBasisPoints } Block { Time Number } } }} Latest Slippage for a Specific Pool[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#latest-slippage-for-a-specific-pool "Direct link to Latest Slippage for a Specific Pool") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This query retrieves the latest slippage data for a specific DEX pool on BSC. Use this to check current liquidity depth and price impact for a particular token pair. You can find the query [here](https://ide.bitquery.io/Latest-slippage-of-a-pool-on-Pancakeswap) query { EVM(network: bsc) { DEXPoolSlippages( where: {Price: {Pool: {SmartContract: {is: "0x42161084d0672e1d3f26a9b53e653be2084ff19c"}}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Price { BtoA { Price MinAmountOut MaxAmountIn } AtoB { Price MinAmountOut MaxAmountIn } Pool { PoolId SmartContract Pair { Decimals SmartContract Name } CurrencyB { Symbol SmartContract Name Decimals } CurrencyA { Symbol SmartContract Name Decimals } } Dex { SmartContract ProtocolVersion ProtocolName ProtocolFamily } SlippageBasisPoints } Block { Time Number } } }} > **Note:** This query can be converted to a subscription to monitor in real-time. Simply replace `query` with `subscription` to receive live updates whenever the pool's liquidity changes. Realtime Slippage Data via Kafka Streams[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#realtime-slippage-data-via-kafka-streams "Direct link to Realtime Slippage Data via Kafka Streams") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Slippage data can also be obtained via Kafka streams for lower latency and better reliability. The Kafka topic for BSC DEX pools is: **`bsc.dexpools.proto`** Kafka streams provide the same slippage data as GraphQL subscriptions but with several advantages: * Lower latency due to shorter data pipeline * Better reliability with persistent connections * Ability to read from latest offset without gaps * Better scalability with multiple consumers For detailed information on how to connect to Kafka streams, subscribe to topics, and parse messages, refer to the [Kafka Streaming Concepts documentation](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/) . > **Note:** IDE credentials will not work with Kafka Streams. You need separate Kafka credentials. Please contact sales on our official telegram channel or fill out the [form on our website](https://bitquery.io/forms/api) > . Understanding the Response[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#understanding-the-response "Direct link to Understanding the Response") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `DEXPoolSlippages` API response contains the following information: * **`Price`**: Price information for swaps at a specific slippage tolerance * **`AtoB`**: Price data for swapping CurrencyA to CurrencyB * `Price`: Average execution price for swaps at this slippage level * `MinAmountOut`: Minimum output amount guaranteed at this slippage level * `MaxAmountIn`: Maximum input amount that can be swapped at this slippage level * **`BtoA`**: Price data for swapping CurrencyB to CurrencyA (same structure as AtoB) * **`SlippageBasisPoints`**: Slippage tolerance in basis points (100 = 1%) * **`Pool`**: Pool information including token pair details * **`Dex`**: DEX protocol information (Uniswap V2, V3, V4, etc.) * **`Block`**: Block information when the slippage data was recorded * `Time`: Timestamp of the block * `Number`: Block number For more details on how slippage is calculated and when new pool records are emitted, see the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/#when-is-a-new-dexpool-record-emitted-in-the-apis--streams) . Use Cases[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#use-cases "Direct link to Use Cases") ------------------------------------------------------------------------------------------------------------------ ### Liquidity Depth Analysis[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#liquidity-depth-analysis "Direct link to Liquidity Depth Analysis") Use the slippage API to analyze which pools can handle large trades without significant price impact. By examining `MaxAmountIn` values at different slippage levels, you can: * Identify pools with sufficient liquidity for your trade size * Determine optimal slippage tolerance settings * Estimate price impact before executing trades ### Multi-Pool Price Comparison[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#multi-pool-price-comparison "Direct link to Multi-Pool Price Comparison") Compare execution prices across different pools and slippage scenarios to: * Find the best pool for your specific trade size * Understand price differences between DEX protocols * Optimize trade execution strategies ### Trading Applications[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#trading-applications "Direct link to Trading Applications") #### Live Execution Testing[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#live-execution-testing "Direct link to Live Execution Testing") Use the slippage API to test and validate trade execution strategies in real-time: * **Pre-trade validation**: Check if your intended trade size can be executed within acceptable slippage bounds before submitting * **Execution simulation**: Calculate expected price impact and minimum output amounts for different trade sizes * **Strategy backtesting**: Monitor historical slippage data to validate trading algorithms and optimize entry/exit points * **Risk assessment**: Evaluate maximum position sizes that can be entered without exceeding your slippage tolerance #### Detecting Liquidity Shocks and Toxic Order Flow[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#detecting-liquidity-shocks-and-toxic-order-flow "Direct link to Detecting Liquidity Shocks and Toxic Order Flow") The slippage API helps identify temporary price dislocations and liquidity shocks that can be exploited or avoided: * **Flow toxicity detection**: Monitor sudden changes in `MaxAmountIn` values to detect when pools experience large outflows or inflows * **Price impact analysis**: Track how `MinAmountOut` changes relative to `MaxAmountIn` to identify when pools become less liquid * **Mean reversion opportunities**: Identify pools where large swaps have created temporary price dislocations that may revert * **Toxic order flow avoidance**: Use slippage data to avoid entering positions when liquidity is thin or when large trades are likely to move price against you For a practical implementation example of using slippage data for automated trading strategies, including flow toxicity detection and mean-reversion trading, see the [AMM Flow Toxicity Alpha Engine](https://github.com/Divyn/amm-flow-toxicity-alpha-engine) repository. This system demonstrates how to: * Detect large swaps that move price significantly (50-500 basis points) * Verify isolation from trending markets * Execute fade trades against temporary price impacts * Manage positions with dynamic stop losses and take profits based on slippage data For more advanced use cases, refer to the [DEXPools Cube documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/#advanced-use-cases-and-processing-patterns) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Understanding Slippage and Price Impact](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#understanding-slippage-and-price-impact) * [Realtime Slippage Monitoring](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#realtime-slippage-monitoring) * [Latest Slippage for a Specific Pool](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#latest-slippage-for-a-specific-pool) * [Realtime Slippage Data via Kafka Streams](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#realtime-slippage-data-via-kafka-streams) * [Understanding the Response](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#understanding-the-response) * [Use Cases](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#use-cases) * [Liquidity Depth Analysis](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#liquidity-depth-analysis) * [Multi-Pool Price Comparison](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#multi-pool-price-comparison) * [Trading Applications](https://docs.bitquery.io/docs/blockchain/BSC/bsc-slippage-api/#trading-applications) --- # Base Clanker API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/base-clanker-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD This section provides you with a set of queries that provides an insight about the Clank fun. Clank.fun is a platform on the Base blockchain that allows users to launch and trade meme coins. Each coin is deployed as an ERC-20 token on Uniswap V3 with permanently locked single-sided liquidity of 1,000,000,000 coin. To launch a token, users must hold at least 1,000,000 $CLANKFUN tokens. Token creators earn 0.4% of the trading volume in liquidity provider (LP) fees, which can be claimed anytime on clanker.world. You can see [Uniswap guide](https://docs.bitquery.io/docs/blockchain/Base/base-uniswap-api/) to get latest trades of these tokens, top traders, OHLCV, get token metadata, top bought tokens, top sold tokens, etc. For live DEX prices across Clanker-launched tokens, see [DEXrabbit's Clanker category](https://dexrabbit.bitquery.io/categories/clanker-ecosystem) . Latest Tokens created using Clanker[​](https://docs.bitquery.io/docs/blockchain/Base/base-clanker-api/#latest-tokens-created-using-clanker "Direct link to Latest Tokens created using Clanker") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Below query will get you latest tokens created using Clank.fun. The query respose will contain `name`, `symbol`, `tokenAddress`, `deployer`, `supply`, `fid` and `positionId` of the created token. Try out the API in the Bitquery IDE playground [here](https://ide.bitquery.io/Latest-token-created-on-Clanker-on-Base) . { EVM(network: base) { Events( limit: { count: 10 } orderBy: [{ descending: Block_Time }, { descending: Transaction_Index }] where: { Log: { Signature: { Name: { is: "TokenCreated" } } } LogHeader: { Address: { is: "0x375C15db32D28cEcdcAB5C03Ab889bf15cbD2c5E" } } } ) { Block { Time } Transaction { From Hash } Arguments { Name Value { __typename ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Log { Signature { Name } } } }} Latest Token created by specific user using Clanker[​](https://docs.bitquery.io/docs/blockchain/Base/base-clanker-api/#latest-token-created-by-specific-user-using-clanker "Direct link to Latest Token created by specific user using Clanker") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Below query will get you latest tokens created by a particular address using Clank.fun. The query respose will contain `name`, `symbol`, `tokenAddress`, `deployer`, `supply`, `fid` and `positionId` of the created token. Try out the API in the Bitquery IDE playground [here](https://ide.bitquery.io/Latest-token-created-on-Clanker-on-Base-by-specific-user) . { EVM(network: base) { Events( limit: { count: 10 } orderBy: [{ descending: Block_Time }, { descending: Transaction_Index }] where: { Transaction: { From: { is: "0x002f07b0d63e8ac14f8ef6b73ccd8caf1fef074c" } } Log: { Signature: { Name: { is: "TokenCreated" } } } LogHeader: { Address: { is: "0x375C15db32D28cEcdcAB5C03Ab889bf15cbD2c5E" } } } ) { Block { Time } Transaction { From Hash } Arguments { Name Value { __typename ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Log { Signature { Name } } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest Tokens created using Clanker](https://docs.bitquery.io/docs/blockchain/Base/base-clanker-api/#latest-tokens-created-using-clanker) * [Latest Token created by specific user using Clanker](https://docs.bitquery.io/docs/blockchain/Base/base-clanker-api/#latest-token-created-by-specific-user-using-clanker) --- # Polygon (Matic) Token Market Cap API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Use Bitquery’s **Trading** API **`Tokens`** cube to stream or query **market cap**, **fully diluted valuation (USD)**, **total supply**, **price** (OHLC and averages), and **volume** for tokens on **Polygon** (network id **`matic`** in the Trading API). Filter with **`matic:`** plus a **lowercase** contract address in **`Token.Id`** / **`Currency.Id`**. For schema details and field meanings, see the **[Tokens cube](https://docs.bitquery.io/docs/trading/crypto-price-api/tokens/) ** and **[Supply fields](https://docs.bitquery.io/docs/trading/crypto-price-api/supply-fields/) **. Trading API and EVM addresses On **Polygon** (**`matic`** in Trading), use **lowercase** hex in **`Id`** values (e.g. `matic:0xeb51…`, not mixed-case checksum addresses). Related APIs[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#related-apis "Direct link to Related APIs") -------------------------------------------------------------------------------------------------------------------------------------- * **[Ethereum Token Market Cap API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/ethereum-token-marketcap-api/) ** — **`eth:`** ids * **[BSC Token Market Cap API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-token-marketcap-api/) ** — **`bsc:`** ids * **[Base Token Market Cap API](https://docs.bitquery.io/docs/blockchain/Base/base-token-marketcap-api/) ** — **`base:`** ids * **[Arbitrum Token Market Cap API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-token-marketcap-api/) ** — **`arbitrum:`** ids * **[Solana Token Market Cap API](https://docs.bitquery.io/docs/blockchain/Solana/solana-token-marketcap-api/) ** — **`solana:`** ids * **[Crypto Price API — Tokens](https://docs.bitquery.io/docs/trading/crypto-price-api/tokens/) ** — full `Tokens` cube reference * * * How do I stream live Polygon (Matic) token market cap, price, and volume?[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-stream-live-polygon-matic-token-market-cap-price-and-volume "Direct link to How do I stream live Polygon (Matic) token market cap, price, and volume?") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Subscribe to **`Tokens`** where **currency id** includes **`matic`**, with **interval duration** greater than **1** (second). You can run this subscription [in the Bitquery IDE](https://ide.bitquery.io/matic-token-marketcap-stream) . subscription MyQuery { Trading { Tokens( where: { Currency: { Id: { includes: "matic" } } Interval: { Time: { Duration: { gt: 1 } } } } ) { Token { Name Id Address Symbol } Block { Time } Supply { TotalSupply FullyDilutedValuationUsd MarketCap } Price { Average { Mean } Ohlc { Open Low High Close } } Volume { Base BaseAttributedToUsd Quote Usd } } }} * * * How do I get the latest market cap for a specific token on Polygon?[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-get-the-latest-market-cap-for-a-specific-token-on-polygon "Direct link to How do I get the latest market cap for a specific token on Polygon?") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Use **`limit: { count: 1 }`**, **`orderBy: { descending: Block_Time }`**, and filter **`Token.Id`** with **`includes`** (or **`includesCaseInsensitive`**) for **`matic:`** + lowercase contract. You can run this query [in the Bitquery IDE](https://ide.bitquery.io/specific-matic-token-latest-marketcap) . query { Trading { Tokens( limit: { count: 1 } orderBy: { descending: Block_Time } where: { Token: { Id: { includes: "matic:0xeb51d9a39ad5eef215dc0bf39a8821ff804a0f01" } } Interval: { Time: { Duration: { gt: 1 } } } } ) { Token { Name Id Address Symbol } Block { Time } Supply { TotalSupply FullyDilutedValuationUsd MarketCap } Price { Average { Mean } Ohlc { Open Low High Close } } Volume { Base BaseAttributedToUsd Quote Usd } } }} Replace the `includes` value with your token’s **`matic:`** id (lowercase hex). * * * How do I stream Polygon tokens with market cap above $1 million?[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-stream-polygon-tokens-with-market-cap-above-1-million "Direct link to How do I stream Polygon tokens with market cap above $1 million?") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Subscribe when **`Token.Id`** matches **Polygon** (**`matic`**) and **`Supply.MarketCap`** **\>** **1,000,000** (USD). You can run this subscription [in the Bitquery IDE](https://ide.bitquery.io/realtime-stream-matic-tokens-with-marketcap-above-1-million) . subscription { Trading { Tokens( where: { Token: { Id: { includesCaseInsensitive: "matic" } } Interval: { Time: { Duration: { gt: 1 } } } Supply: { MarketCap: { gt: 1000000 } } } ) { Currency { Name Id Symbol } Supply { TotalSupply FullyDilutedValuationUsd MarketCap } } }} Threshold and interval Tune **`Supply.MarketCap`** and **`Interval.Time.Duration`** for your alerts or dashboards. See **[Tokens cube](https://docs.bitquery.io/docs/trading/crypto-price-api/tokens/) ** for more filters. * * * How do I get top Polygon (Matic) tokens by market cap?[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-get-top-polygon-matic-tokens-by-market-cap "Direct link to How do I get top Polygon (Matic) tokens by market cap?") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query ranks **Polygon** tokens by **`Supply.MarketCap`**. Set **`Token.Network`** to **Matic** (Polygon’s label in the Trading API). It uses roughly the **last 24 hours**, **1-second** intervals, at least **$1,000** **USD volume**, **`limitBy`** one row per **`Token_Id`**, and up to **50** tokens. You can run this query [in the Bitquery IDE](https://ide.bitquery.io/Top-Tokens-by-Market-Cap-on-Polygon_1) . { Trading { Tokens( limit: { count: 50 } limitBy: { count: 1, by: Token_Id } orderBy: { descending: Supply_MarketCap } where: { Block: { Time: { since_relative: { hours_ago: 24 } } } Interval: { Time: { Duration: { eq: 1 } } } Volume: { Usd: { gt: 1000 } } Token: { Network: { is: "Matic" } } } ) { Currency { Id Name Symbol } Price { Average { Mean(maximum: Block_Time) } } Volume { Base(maximum: Block_Time) Quote(maximum: Block_Time) Usd(maximum: Block_Time) } Token { Network Symbol Address } Supply { MarketCap(maximum: Block_Time) FullyDilutedValuationUsd(maximum: Block_Time) TotalSupply(maximum: Block_Time) } } }} * * * How do I get top Polygon tokens by market cap change in 1 hour?[​](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-get-top-polygon-tokens-by-market-cap-change-in-1-hour "Direct link to How do I get top Polygon tokens by market cap change in 1 hour?") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Uses a **1-hour** OHLC interval (`Duration: { eq: 3600 }`) and orders by **`change_mcap`**: **(close − open) × total supply**. **`Token.Network`** is **Matic**. You can run this query [in the Bitquery IDE](https://ide.bitquery.io/top-Polygon-tokens-by-Market-Cap-Change-1h) . { Trading { Tokens( limit: { count: 50 } orderBy: { descendingByField: "change_mcap" } where: { Interval: { Time: { Duration: { eq: 3600 } } } Token: { Network: { is: "Matic" } } } ) { Currency { Id Name Symbol } Token { Network Symbol Address } Supply { MarketCap FullyDilutedValuationUsd CirculatingSupply TotalSupply MaxSupply } change_mcap: calculate( expression: "($Price_Ohlc_Close-$Price_Ohlc_Open) * Supply_TotalSupply" ) Price { Ohlc { Open Close } } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Related APIs](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#related-apis) * [How do I stream live Polygon (Matic) token market cap, price, and volume?](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-stream-live-polygon-matic-token-market-cap-price-and-volume) * [How do I get the latest market cap for a specific token on Polygon?](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-get-the-latest-market-cap-for-a-specific-token-on-polygon) * [How do I stream Polygon tokens with market cap above $1 million?](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-stream-polygon-tokens-with-market-cap-above-1-million) * [How do I get top Polygon (Matic) tokens by market cap?](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-get-top-polygon-matic-tokens-by-market-cap) * [How do I get top Polygon tokens by market cap change in 1 hour?](https://docs.bitquery.io/docs/blockchain/Matic/matic-token-marketcap-api/#how-do-i-get-top-polygon-tokens-by-market-cap-change-in-1-hour) --- # Lighter Perp DEX on Robinhood Chain API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD [Lighter](https://lighter.xyz/) is the perpetual-futures DEX integrated into Robinhood Wallet. When Robinhood Chain mainnet went live on July 1, 2026, Lighter launched alongside it as the venue behind in-app perps: eligible users post **USDG** margin from their wallet, and the funds are locked in Lighter's smart contract on Robinhood Chain while positions are managed by Lighter's zk engine. What actually lives on Robinhood Chain is a full **ZkLighter rollup contract** — not just a token vault. It receives every margin deposit, queues and pays withdrawals, and records the rollup's batch lifecycle (`commit → verify → execute`) at roughly **one batch per minute**. This page shows how to query and stream all of it with Bitquery's `EVM` cubes on `network: robinhood`. API Key Required To query or stream data outside the Bitquery IDE, you need an API access token. Follow the steps here: [How to generate Bitquery API token ➤](https://docs.bitquery.io/docs/authorization/how-to-generate/) Related docs * [Robinhood Chain API overview](https://docs.bitquery.io/docs/blockchain/robinhood/) — every Robinhood Chain API, launchpad guide and stream in one place * [Robinhood Events API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-events-api/) * [Robinhood Transfers](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-transfers/) * [Robinhood Calls API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-calls-api/) * [Robinhood Balances API](https://docs.bitquery.io/docs/blockchain/robinhood/robinhood-balances-api/) * [EVM Events schema](https://docs.bitquery.io/docs/schema/evm/events/) **On this page:** [What is on-chain](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#what-is-on-chain-and-what-is-not) · [Contracts](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#contract-map) · [Event reference](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#event-reference-topic0-map) · [Deposits](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#track-margin-deposits) · [Withdrawals](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#track-withdrawals) · [Margin flow & history](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#usdg-margin-flow-full-history) · [Rollup heartbeat](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#monitor-the-rollup-heartbeat) · [Deposit calls](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#deposit-calls-by-selector) · [Decoding notes](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#decoding-notes) * * * What is on-chain (and what is not)[​](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#what-is-on-chain-and-what-is-not "Direct link to What is on-chain (and what is not)") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Lighter's matching engine, order book, positions, funding, and liquidations run inside its zk rollup — they are **not** individual Robinhood Chain transactions. What settles on Robinhood Chain, and what Bitquery therefore indexes, is: | On Robinhood Chain (queryable here) | Inside the Lighter engine (not on-chain) | | --- | --- | | USDG margin **deposits** into the ZkLighter contract | Individual trades and fills | | **Withdrawal** queue events and USDG payouts back to users | Open positions and PnL | | Rollup **batch lifecycle**: commit, verification, execution, state roots | Funding payments (hourly, peer-to-peer) | | Priority requests (forced operations, key changes, escape hatches) | Order placement and cancellation (except the on-chain `cancelAllOrders` escape hatch) | | Market/asset registry events | Liquidation events themselves (only the margin effects appear) | This makes the on-chain data ideal for **money-flow questions** — who is depositing margin, how much, net flows, contract TVL, whether the rollup operator is alive — rather than trade-level analytics. * * * Contract map[​](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#contract-map "Direct link to Contract map") ------------------------------------------------------------------------------------------------------------------------------------- | Role | Address | | --- | --- | | **ZkLighter proxy** — receives margin, pays withdrawals, emits every Lighter event | `0x94bab9693ba2f6358507effcbd372b0660afff9d` | | Current verified implementation (`ZkLighter`) | `0x82DE5B1161C93afDFE21bA0D5343f01Cd7401d90` | | USDG (Global Dollar, 6 decimals) — canonical currency address in Bitquery cubes | `0x5fc5360d0400a0fd4f2af552add042d716f1d168` | | Robinhood deposit router (sweeps in-app deposits into `deposit()`) | `0x8062df5b3220ad1f528365650a3eb3e8c7b0dad1` | Filter by LogHeader.Address, not Log.SmartContract The ZkLighter proxy delegates to implementation modules, so `Log.SmartContract` shows the **implementation** address — and implementations rotate on upgrades (implementations rotate over time; older module addresses you may see in results include `0x1be72833…`, `0xe470e41c…`, and `0xda2b59ff…`). The stable anchor is `LogHeader.Address` = the proxy `0x94bab969…`, combined with the event's `SignatureHash` (topic0). Every query below follows that pattern. * * * Event reference (topic0 map)[​](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#event-reference-topic0-map "Direct link to Event reference (topic0 map)") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- All events are emitted with the proxy as `LogHeader.Address`. Hash fields in Bitquery are hex strings **without** a `0x` prefix. | Event | topic0 (`Log.Signature.SignatureHash`) | | --- | --- | | `Deposit(uint48 toAccountIndex, address toAddress, uint16 assetIndex, uint8 routeType, uint128 baseAmount)` | `493c3b8240368e8343bcd42cac5f4b8b161c06d061710e542a72f06a40ddd9d1` | | `WithdrawPending(address indexed owner, uint16 assetIndex, uint128 baseAmount)` | `ef80235b5f4cf1822ad6a8621af41ac64372ff672c402874f507fc63dbe5e06f` | | `NewPriorityRequest(address sender, uint64 serialId, uint8 pubdataType, bytes pubData, uint64 expirationTimestamp)` | `efdd379e3e15772fcc7d2a67fa5bbb0790b932724153aded4648307094733b2f` | | `BatchCommit(uint64 batchNumber, uint32 batchSize, uint64 endBlockNumber)` | `181b25ea9d4d730f30d779f3d2099c03b26b653c889d33eef253d54baaacbd0d` | | `BatchVerification(uint64 batchNumber, uint32 batchSize, uint64 endBlockNumber)` | `5c836e1ff20ea85c52b6e3d2ef0124d3304bf3b37cc8fb0e2c84ae7d44c0593e` | | `BatchesExecuted(uint64 batchNumber, uint64 endBlockNumber)` | `5d490d991d08230b7690c7511bb854b7b8a05fb7c87e2348e1909384cb325511` | | `StateRootUpdate(uint64 batchNumber, bytes32 oldStateRoot, bytes32 newStateRoot)` | `645e0b8f839353842bdac87abd27fc8bdda536e0731cdb7cc75e4f0740b575ac` | | `CreateMarket((uint16,uint8,bytes), uint8 sizeDecimals, uint8 priceDecimals, bytes32 symbol)` | `134f63a6bbe3b3ef885ce4067eb2753fe1c912c51c4b8e0cc7966f21773c047e` | | `RegisterAssetConfig(uint16 assetIndex, address tokenAddress, …)` | `f1b24e81016b9f39e2290cf2a9303264a07534a569df7e6200a39573d7f26b0c` | The remaining admin events (`UpdateMarket`, `UpdateAssetConfig`, `BatchesRevert`, `DesertMode`, `TreasuryUpdate`, `InsuranceFundOperatorUpdate`, `Initialized`) exist in the ABI but fire rarely; the full verified ABI is on the [Robinhood Chain explorer](https://robinhoodchain.blockscout.com/address/0x82DE5B1161C93afDFE21bA0D5343f01Cd7401d90?tab=contract) . * * * Track margin deposits[​](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#track-margin-deposits "Direct link to Track margin deposits") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Every deposit into Lighter emits one `Deposit` event. This query returns the latest ones; turn it into a live stream by replacing `query` with `subscription` and dropping `dataset`/`limit`/`orderBy`. { EVM(network: robinhood, dataset: realtime) { Events( limit: { count: 10 } orderBy: { descending: Block_Number } where: { LogHeader: { Address: { is: "0x94bab9693ba2f6358507effcbd372b0660afff9d" } } Log: { Signature: { SignatureHash: { is: "493c3b8240368e8343bcd42cac5f4b8b161c06d061710e542a72f06a40ddd9d1" } } } } ) { Block { Number Time } Transaction { Hash From } Log { SmartContract Signature { SignatureHash } } LogHeader { Address Data } } }} `Deposit` has no indexed parameters, so all five fields sit in `LogHeader.Data` as 32-byte words, in ABI order: | Word | Field | Notes | | --- | --- | --- | | 0 | `toAccountIndex` | The user's Lighter account index | | 1 | `toAddress` | The wallet credited — for Robinhood-app deposits this is the user's deposit address, while the ERC-20 transfer arrives via the router `0x8062df5b…` | | 2 | `assetIndex` | `3` = USDG on this deployment | | 3 | `routeType` | `0` for ~98% of deposits | | 4 | `baseAmount` | Raw token units — divide by 10⁶ for USDG (verified to match the ERC-20 transfer in the same transaction) | * * * Track withdrawals[​](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#track-withdrawals "Direct link to Track withdrawals") ---------------------------------------------------------------------------------------------------------------------------------------------------- Withdrawals are two-step: the rollup queues the amount (`WithdrawPending`, with the receiving wallet **indexed** as `Topics[1]`), then operator transactions push the USDG payout to the user via `withdrawPendingBalance`. To watch the queue: { EVM(network: robinhood, dataset: realtime) { Events( limit: { count: 10 } orderBy: { descending: Block_Number } where: { LogHeader: { Address: { is: "0x94bab9693ba2f6358507effcbd372b0660afff9d" } } Log: { Signature: { SignatureHash: { is: "ef80235b5f4cf1822ad6a8621af41ac64372ff672c402874f507fc63dbe5e06f" } } } } ) { Block { Number Time } Transaction { Hash } Topics { Hash } # Topics[1] = padded owner address LogHeader { Data } # [assetIndex, baseAmount(6dp)] } }} The actual payout is a plain USDG transfer **from** the proxy, so the Transfers query below covers the money leg of withdrawals too. * * * USDG margin flow (full history)[​](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#usdg-margin-flow-full-history "Direct link to USDG margin flow (full history)") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The simplest lens on Lighter needs no event decoding at all: USDG transfers to the proxy are margin in, transfers from it are margin out. The `combined` dataset holds Robinhood Chain history back to the chain's start, so this works from Lighter's first deposit (June 26, 2026 — a soft start a few days before the public July 1 launch). Monthly deposit and withdrawal totals since launch: { EVM(network: robinhood, dataset: combined) { deposits: Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x5fc5360d0400a0fd4f2af552add042d716f1d168" } } Receiver: { is: "0x94bab9693ba2f6358507effcbd372b0660afff9d" } } } ) { Block { Date(interval: { count: 1, in: months }) } count sum(of: Transfer_Amount) } withdrawals: Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0x5fc5360d0400a0fd4f2af552add042d716f1d168" } } Sender: { is: "0x94bab9693ba2f6358507effcbd372b0660afff9d" } } } ) { Block { Date(interval: { count: 1, in: months }) } count sum(of: Transfer_Amount) } }} Swap the monthly interval for a `days` interval for daily flow charts, or drop the aggregation and add `limit`/`orderBy` to list individual transfers with sender and receiver. The difference between lifetime deposits and withdrawals is the contract's standing USDG balance — Lighter-on-Robinhood's margin TVL. To size total activity, an aggregate probe over full history: { EVM(network: robinhood, dataset: combined) { Events( where: { LogHeader: { Address: { is: "0x94bab9693ba2f6358507effcbd372b0660afff9d" } } Log: { Signature: { SignatureHash: { is: "493c3b8240368e8343bcd42cac5f4b8b161c06d061710e542a72f06a40ddd9d1" } } } } ) { count earliest: Block { Time(minimum: Block_Time) } latest: Block { Time(maximum: Block_Time) } } }} * * * Monitor the rollup heartbeat[​](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#monitor-the-rollup-heartbeat "Direct link to Monitor the rollup heartbeat") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Lighter posts its zk batch lifecycle to Robinhood Chain about once a minute. Streaming the three lifecycle events is a ready-made **liveness monitor** for the venue — if commits stop, the engine or its operator has a problem: subscription { EVM(network: robinhood) { Events( where: { LogHeader: { Address: { is: "0x94bab9693ba2f6358507effcbd372b0660afff9d" } } Log: { Signature: { SignatureHash: { in: [ "181b25ea9d4d730f30d779f3d2099c03b26b653c889d33eef253d54baaacbd0d" "5c836e1ff20ea85c52b6e3d2ef0124d3304bf3b37cc8fb0e2c84ae7d44c0593e" "5d490d991d08230b7690c7511bb854b7b8a05fb7c87e2348e1909384cb325511" ] } } } } ) { Block { Number Time } Transaction { Hash From } Log { Signature { SignatureHash } } LogHeader { Data } # batchNumber, batchSize, endBlockNumber } }} Each of `commitBatch`, `verifyBatch`, and `executeBatches` is sent by a single operator EOA, so `Transaction.From` also identifies the Lighter operator. * * * deposit() calls by selector[​](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#deposit-calls-by-selector "Direct link to deposit() calls by selector") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The Calls cube gives the function-call view of the same activity — useful for catching deposits, forced withdrawals (`withdraw`, selector `d20191bd`), key registrations (`changePubKey`, `17010c68`), and escape-hatch cancels (`cancelAllOrders`, `a4b6f756`): { EVM(network: robinhood, dataset: realtime) { Calls( limit: { count: 10 } orderBy: { descending: Block_Number } where: { Call: { To: { is: "0x94bab9693ba2f6358507effcbd372b0660afff9d" } Signature: { SignatureHash: { is: "8a857083" } } # deposit(address,uint16,uint8,uint256) } } ) { Block { Number Time } Call { From Value Signature { SignatureHash } } Transaction { Hash From } } }} * * * Decoding notes[​](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#decoding-notes "Direct link to Decoding notes") ------------------------------------------------------------------------------------------------------------------------------------------- * **Signatures currently arrive unparsed** — `Log.Signature.Name` is empty for ZkLighter events until the ABI is registered in the decoding pipeline, so filter by `SignatureHash` (as every query on this page does) and decode `LogHeader.Data` client-side with the word layouts above. Once the ABI lands, the same queries also return decoded `Arguments`. * `LogHeader.Address` is the address a node's `eth_getLogs` would report; `Log.SmartContract` is the implementation behind the proxy and changes on upgrades. Pin queries to `LogHeader.Address`. * Amounts (`baseAmount` and USDG `Transfer.Amount`) are 6-decimal USDG units; `Transfer.Amount` in the API is already decimal-adjusted. * Robinhood in-app deposits are swept from per-user deposit addresses through the router `0x8062df5b…`, so the ERC-20 `Transfer.Sender` into the proxy is often the router while the credited wallet is `Deposit.toAddress`. Count depositors from the `Deposit` event, not from transfer senders. * For trade-level perps data (fills, positions, funding), use Lighter's own venue APIs — that activity never touches Robinhood Chain. On-chain data here answers flow, TVL, user-count, and liveness questions. Every query on this page was executed against the production `streaming.bitquery.io/graphql` endpoint before publishing. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [What is on-chain (and what is not)](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#what-is-on-chain-and-what-is-not) * [Contract map](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#contract-map) * [Event reference (topic0 map)](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#event-reference-topic0-map) * [Track margin deposits](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#track-margin-deposits) * [Track withdrawals](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#track-withdrawals) * [USDG margin flow (full history)](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#usdg-margin-flow-full-history) * [Monitor the rollup heartbeat](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#monitor-the-rollup-heartbeat) * [deposit() calls by selector](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#deposit-calls-by-selector) * [Decoding notes](https://docs.bitquery.io/docs/blockchain/robinhood/lighter-perp-dex-api/#decoding-notes) --- # Ethereum Transaction Balance Tracker | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Ethereum Transaction Balance Tracker API provides real-time balance updates for all addresses involved in transactions on the Ethereum blockchain, including detailed information about the reason for each balance change. Subscribe to All Transaction Balances[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#subscribe-to-all-transaction-balances "Direct link to Subscribe to All Transaction Balances") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription provides real-time balance updates for all addresses involved in transactions on the Ethereum network. Try the API [here](https://ide.bitquery.io/Subscribe-to-All-Transaction-Balances) . subscription { EVM(network: eth) { TransactionBalances { Block { Time } TokenBalance { Currency { Symbol HasURI SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode TotalSupplyInUSD TotalSupply TokenOwnership { Owns Id } PostBalanceInUSD } Transaction { Hash } } }} Subscribe to Transaction Balances for a Specific Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#subscribe-to-transaction-balances-for-a-specific-address "Direct link to Subscribe to Transaction Balances for a Specific Address") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This subscription filters transaction balances for a specific address. Try the API [here](https://ide.bitquery.io/Subscribe-to-Transaction-Balances-for-a-Specific-Address) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { Address: { is: "0xYourAddressHere" } } } ) { Block { Time } TokenBalance { Currency { Symbol HasURI SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode TotalSupplyInUSD TotalSupply TokenOwnership { Owns Id } PostBalanceInUSD } Transaction { Hash } } }} Latest native balance of an address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#latest-native-balance-of-an-address "Direct link to Latest native balance of an address") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This API gives you latest balance of a specific address (here in example `0xd194daef0cd90675a3b823fcda248f76fccb49f3`) for the native currency. Try it out [here](https://ide.bitquery.io/Latest-native-balance-of-an-address) . { EVM(network: eth) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0xd194daef0cd90675a3b823fcda248f76fccb49f3" } Currency: { Native: true } } } ) { Block { Time } TokenBalance { Currency { Symbol HasURI SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode TotalSupplyInUSD TotalSupply TokenOwnership { Owns Id } PostBalanceInUSD } Transaction { Hash } } }} Latest balance of an address for a specific token[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#latest-balance-of-an-address-for-a-specific-token "Direct link to Latest balance of an address for a specific token") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This API gives you latest balance of a specific address (here in example `0xd194daef0cd90675a3b823fcda248f76fccb49f3`) for a specific token (here we have taken example of USDC `0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48`). Try it out [here](https://ide.bitquery.io/Latest-balance-of-an-address-for-a-specific-token) . { EVM(network: eth) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0xd194daef0cd90675a3b823fcda248f76fccb49f3" } Currency: { SmartContract: { is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } } } } ) { Block { Time } TokenBalance { Currency { Symbol HasURI SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode TotalSupplyInUSD TotalSupply TokenOwnership { Owns Id } PostBalanceInUSD } Transaction { Hash } } }} Latest liquidity of EVM Pool[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#latest-liquidity-of-evm-pool "Direct link to Latest liquidity of EVM Pool") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This API provides the latest liquidity information for multiple EVM pools in one API call. The example shows results for two pool addresses using a query updated to support multiple addresses. You can try 500 as well,just put them as a list in `where` clause. Try it out [here](https://ide.bitquery.io/latest-liquidity-of-multiple-pools#) . { EVM(network: base) { TransactionBalances( limitBy: { by: TokenBalance_Address, count: 2 } orderBy: { descendingByField: "TokenBalance_PostBalanceInUSD" } where: { TokenBalance: { Address: { in: [ "0x3f0296BF652e19bca772EC3dF08b32732F93014A" "0x22AEe3699b6A0fEd71490C103Bd4E5f3309891D5" ] } } } ) { TokenBalance { Currency { Symbol HasURI SmartContract } PostBalance(maximum: Block_Time) PostBalanceInUSD(maximum: Block_Time) Address } } }} Latest Supply and Marketcap of a specific token on EVM[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#latest-supply-and-marketcap-of-a-specific-token-on-evm "Direct link to Latest Supply and Marketcap of a specific token on EVM") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This API gives you latest Supply and Marketcap of a token on EVM (here as example we have taken BITGET Token `0x54D2252757e1672EEaD234D27B1270728fF90581` ). Try it out [here](https://ide.bitquery.io/Total-Supply-and-onchain-Marketcap-of-a-specific-token) . { EVM(network: eth) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Currency: { SmartContract: { is: "0x54D2252757e1672EEaD234D27B1270728fF90581" } } } } ) { Block { Time Number } TokenBalance { Currency { Symbol HasURI SmartContract } TotalSupplyInUSD TotalSupply } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Subscribe to All Transaction Balances](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#subscribe-to-all-transaction-balances) * [Subscribe to Transaction Balances for a Specific Address](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#subscribe-to-transaction-balances-for-a-specific-address) * [Latest native balance of an address](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#latest-native-balance-of-an-address) * [Latest balance of an address for a specific token](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#latest-balance-of-an-address-for-a-specific-token) * [Latest liquidity of EVM Pool](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#latest-liquidity-of-evm-pool) * [Latest Supply and Marketcap of a specific token on EVM](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/#latest-supply-and-marketcap-of-a-specific-token-on-evm) --- # Ethereum NFT Calls API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-calls-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD This API helps retrieve information about smart contract transactions, including details about the contract function that was called, the input and output parameters, and more. Latest Calls for an NFT[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-calls-api/#latest-calls-for-an-nft "Direct link to Latest Calls for an NFT") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Here's an example query that retrieve the most recent smart contract calls made on an NFT token contract. { EVM { Calls( limit: {count: 10} orderBy: {descending: Block_Time} where: {Call: {To: {is: "0x60e4d786628fea6478f785a6d7e704777c86a7c6"}}} ) { Call { From Gas GasUsed To Value } Transaction { Hash } Arguments { Name Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} **Parameters** * `orderBy` : Orders the results in descending order based on the Block\_Time. * `limit` : Specifies the maximum results to return. In this query, the limit is 10. * `where` : It filters the results to include only calls made to the smart contract with the specified address ("0x60e4d786628fea6478f785a6d7e704777c86a7c6"). **Returned Data** * `Transaction` : The `Hash` field represents the hash of the transaction. * `Call` : Retrieves information about the call - * `From`: The address from which the call was made. * `Gas`: The gas limit specified for the call. * `GasUsed`: The amount of gas used during the call. * `To` : The address of the NFT token contract that received the call. * `Value` : The amount of Ether transferred in the call. * `Arguments { Name Value {....} }` : Retrieves Array of arguments passed in the smart contract call, including their names and values, refer to [arguments](https://docs.bitquery.io/docs/schema/evm/arguments/) for data structure. You can find the graphql query [here](https://ide.bitquery.io/Smart-contract-calls-to-an-nft-contract) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest Calls for an NFT](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-calls-api/#latest-calls-for-an-nft) --- # Getting Latest Pairs | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/latest-trading-pairs-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Latest Trading Pairs for a DEX[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/latest-trading-pairs-api/#latest-trading-pairs-for-a-dex "Direct link to Latest Trading Pairs for a DEX") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Let's see how we can get latest trading pairs created on DEXs. In this example we use Smart Contract Events to track PoolCreated event for [Uniswap v3 factory contract](https://explorer.bitquery.io/ethereum/smart_contract/0x1f98431c8ad98523631ae4a59f267346ea31f984/events) . Because whenever a new pool gets created Uniswap v3 factory contract emits a PoolCreated event with the details of the pool. { EVM(dataset: realtime, network: eth) { Events( orderBy: {descending: Block_Number} limit: {count: 10} where: {Log: {SmartContract: {is: "0x1f98431c8ad98523631ae4a59f267346ea31f984"}, Signature: {Name: {is: "PoolCreated"}}}} ) { Log { Signature { Name Parsed Signature } SmartContract } Transaction { Hash } Block { Date Number } Arguments { Name Value { __typename ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} Open this query on our GraphQL IDE using this [link](https://ide.bitquery.io/uniswap-v3-pairs) . Subscribe to the Latest Pairs for Uniswap V3[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/latest-trading-pairs-api/#subscribe-to-the-latest-pairs-for-uniswap-v3 "Direct link to Subscribe to the Latest Pairs for Uniswap V3") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- You can use our GraphQL Subscription (Webhook) to subscribe to these events in case you don't want to call our APIs periodically. subscription { EVM { Events( where: {Log: {SmartContract: {is: "0x1f98431c8ad98523631ae4a59f267346ea31f984"}, Signature: {Name: {is: "PoolCreated"}}}} ) { Log { Signature { Name Parsed Signature } SmartContract } Transaction { Hash } Block { Date Number } Arguments { Name Value { __typename ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} Open this query on our GraphQL IDE using this [link](https://ide.bitquery.io/uniswap-v3-pairs-websocket) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest Trading Pairs for a DEX](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/latest-trading-pairs-api/#latest-trading-pairs-for-a-dex) * [Subscribe to the Latest Pairs for Uniswap V3](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/latest-trading-pairs-api/#subscribe-to-the-latest-pairs-for-uniswap-v3) --- # Pair Creation Time API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pair-creation-time/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Pair Creation Time for a Specific Pair[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pair-creation-time/#pair-creation-time-for-a-specific-pair "Direct link to Pair Creation Time for a Specific Pair") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Let's see how we can get pair creation time for a specific pair. We will use Events API for this. Filter for `PairCreated` event and also put one more filter, for which pair address you want the creation time. We have used `0x5c6919B79FAC1C3555675ae59A9ac2484f3972F5` pair address in our example. Open this query on our GraphQL IDE using this [link](https://ide.bitquery.io/when-a-pair-was-created-for-EVM) . query MyQuery { EVM(network: eth, dataset: combined) { Events( where: { Log: { Signature: { Name: { is: "PairCreated" } } } TransactionStatus: { Success: true } Arguments: { includes: { Value: { Address: { is: "0x5c6919B79FAC1C3555675ae59A9ac2484f3972F5" } } } } } ) { Block { Time } Transaction { Hash } } }} Track newly created pairs on uniswap v3[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pair-creation-time/#track-newly-created-pairs-on-uniswap-v3 "Direct link to Track newly created pairs on uniswap v3") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- You can track newly created pairs on uniswap v3. Open this query on our GraphQL IDE using this [link](https://ide.bitquery.io/Latest-pools-created-Uniswap-v3_9) . subscription { EVM(network: eth) { Events( orderBy: { descending: Block_Number } limit: { count: 10 } where: { Log: { SmartContract: { is: "0x1f98431c8ad98523631ae4a59f267346ea31f984" } Signature: { Name: { is: "PoolCreated" } } } } ) { Log { Signature { Name Parsed Signature } SmartContract } Transaction { Hash } Block { Date Number } Arguments { Type Value { ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Integer_Value_Arg { integer } } Name } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Pair Creation Time for a Specific Pair](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pair-creation-time/#pair-creation-time-for-a-specific-pair) * [Track newly created pairs on uniswap v3](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/pair-creation-time/#track-newly-created-pairs-on-uniswap-v3) --- # Ethereum Transaction Balance Tracker API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD What is Transaction Balance Tracker?[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#what-is-transaction-balance-tracker "Direct link to What is Transaction Balance Tracker?") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The **Ethereum Transaction Balance Tracker API** provides real-time balance updates for all addresses involved in transactions on the Ethereum blockchain. Unlike traditional balance APIs that only show current balances, our Transaction Balance Tracker captures every balance change with detailed information about the reason for each change, making it perfect for building comprehensive transaction monitoring, portfolio tracking, and blockchain analytics applications. Our Transaction Balance Tracker APIs track balance changes across different scenarios including regular transactions, validator rewards, miner rewards, MEV activities, and contract self-destruct events. Each balance change is enriched with reason codes, pre/post balances, USD values, and transaction context. Key Features[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#key-features "Direct link to Key Features") ---------------------------------------------------------------------------------------------------------------------------------------------------- * **Real-time Balance Updates**: Stream balance changes as they happen via GraphQL subscriptions * **Balance Change Reason Codes**: Understand why each balance changed (transfers, rewards, gas, self-destruct, etc.) * **Comprehensive Coverage**: Track native ETH, ERC-20 tokens, ERC-721, and ERC-1155 NFTs * **Historical Data**: Access complete historical balance change data since Ethereum genesis * **USD Values**: Get balance values in USD for portfolio tracking and analytics * **Multiple Use Cases**: Monitor validators, miners, MEV bots, self-destruct events, and more Getting Started[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#getting-started "Direct link to Getting Started") ------------------------------------------------------------------------------------------------------------------------------------------------------------- New to Transaction Balance Tracker? Here's how to get started: 1. **[Create a free account](https://ide.bitquery.io/) ** - Get instant access to our GraphQL IDE 2. **[Generate your API key](https://docs.bitquery.io/docs/authorization/how-to-generate/) ** - Required for API access 3. **[Run your first query](https://docs.bitquery.io/docs/start/first-query/) ** - Learn the basics in 5 minutes 4. **[Explore examples](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-transaction-balance-tracker-apis) ** - Copy-paste ready queries below Need help crafting a query or subscription? Message us on [support](https://t.me/Bloxy_info) . How is it different from regular Balance APIs?[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#how-is-it-different-from-regular-balance-apis "Direct link to How is it different from regular Balance APIs?") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Real-time streaming of all balance changes * Pre/post balance values for every change * Balance change reason codes explain why balance changed * Track all addresses in transactions automatically * Historical data with complete change history * Support for native currency, tokens, and NFTs Real-time Data & Streaming[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#real-time-data--streaming "Direct link to Real-time Data & Streaming") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get live Ethereum balance updates through our streaming solutions: * **GraphQL Subscriptions**: Convert any query to a live stream by changing `query` to `subscription` * **Kafka Streaming**: High-throughput streaming for enterprise applications See examples and code snippets [here](https://docs.bitquery.io/docs/subscriptions/websockets/) for GraphQL subscription implementation, and learn about [Kafka streaming](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/) for high-volume use cases. Ethereum Transaction Balance Tracker APIs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-transaction-balance-tracker-apis "Direct link to Ethereum Transaction Balance Tracker APIs") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### [Ethereum Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/) [​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-transaction-balance-tracker "Direct link to ethereum-transaction-balance-tracker") The core Transaction Balance Tracker API provides real-time balance updates for all addresses involved in transactions on the Ethereum network, including detailed information about the reason for each balance change. Track native ETH, ERC-20 tokens, and NFTs with pre/post balances, USD values, and balance change reason codes. **Key Features:** * Subscribe to all transaction balances in real-time * Filter by specific addresses or tokens * Get balance change reason codes for native currency * Track ERC-20, ERC-721, and ERC-1155 tokens * Access pre and post balance values ### [Ethereum Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transfer-balance-tracker/) [​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-transaction-balance-tracker-1 "Direct link to ethereum-transaction-balance-tracker-1") Transfer Balance Tracker API provides real-time balance updates for all addresses involved in transfer of Native Currency on the Ethereum network. **Key Features:** * Subscribe to all transfer balances in real-time * Filter by specific addresses * Access pre and post balance values ### [Ethereum Validator Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/) [​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-validator-balance-tracker "Direct link to ethereum-validator-balance-tracker") Track Ethereum validator balances, staking rewards, and withdrawals from the beacon chain. Monitor validator activity including block rewards, withdrawal events, and transaction fee rewards. **Key Features:** * Track validator staking rewards (Code 2) * Monitor beacon chain withdrawals (Code 3) * Track transaction fee rewards (Code 5) * Filter by specific validator addresses * Real-time validator balance updates ### [Ethereum Gas Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/) [​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-gas-balance-tracker "Direct link to ethereum-gas-balance-tracker") Track Ethereum balance changes for gas burn, unused gas returned for unused gas at the end of execution, and transaction tips. **Key Features:** * Track transaction tips (Code 5) * Track gas burnt (Code 6) * Track gas returned for unused gas at the end of execution (Code 7) ### [Ethereum Miner Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/) [​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-miner-balance-tracker "Direct link to ethereum-miner-balance-tracker") Monitor Ethereum miner balances, mining rewards, uncle block rewards, and transaction fee rewards. Track historical and real-time mining activity across the Ethereum network. **Key Features:** * Track block mining rewards (Code 2) * Monitor uncle block rewards (Code 1) * Track transaction fee rewards (Code 5) * Filter by specific miner addresses * Historical mining reward data ### [Ethereum MEV Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/) [​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-mev-balance-tracker "Direct link to ethereum-mev-balance-tracker") Track MEV (Maximal Extractable Value) related balance changes including transaction fee rewards, block builder rewards, and other MEV extraction activities. Monitor MEV bots and block builders in real-time. **Key Features:** * Track transaction fee rewards (Code 5) * Monitor block builder rewards * Filter by MEV bot or builder addresses * Track large MEV transactions * Aggregate MEV reward statistics ### [Ethereum Self-Destruct Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-self-destruct-balance-api/) [​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-self-destruct-balance-tracker "Direct link to ethereum-self-destruct-balance-tracker") Monitor contract self-destruct events, ephemeral contracts (like MEV bots), and security incidents. Track contracts that self-destruct and addresses that receive funds from self-destructed contracts. **Key Features:** * Track contract self-destruct events (Codes 12, 13, 14) * Monitor ephemeral MEV contracts * Track MEV builder payments * Security incident monitoring * Aggregate self-destruct statistics ### [Ethereum Token Balance API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/) [​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-token-balance-api "Direct link to ethereum-token-balance-api") Track ERC-20 fungible token balances, total supply, and market capitalization for any address on Ethereum. Monitor token holdings, portfolio values, and token balance changes in real-time. **Key Features:** * Get latest token balance for an address * Retrieve all token balances for an address * Track token balance history over time * Get token total supply and market cap * Filter tokens by minimum balance threshold * Stream token balance updates in real-time * Monitor token balance changes by transaction ### [Ethereum NFT Balance API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/) [​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-nft-balance-api "Direct link to ethereum-nft-balance-api") Track ERC-721 and ERC-1155 non-fungible token balances, ownership, and token IDs for any address on Ethereum. Monitor NFT collections, ownership changes, and specific token ownership in real-time. **Key Features:** * Get latest NFT balance for an address * Retrieve all NFT collections for an address * Get NFT owner for specific token ID * Track NFT ownership history * Get NFT balances for multiple addresses * Stream NFT balance updates in real-time * Monitor NFT balance changes by collection Balance Change Reason Codes[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#balance-change-reason-codes "Direct link to Balance Change Reason Codes") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The Transaction Balance Tracker API uses numeric codes to indicate why a balance changed. These codes are only available for native currency (ETH) transactions, not for fungible tokens or NFTs. | **Code** | **Reason** | **Description** | | --- | --- | --- | | 0 | BalanceChangeUnspecified | Unspecified balance change reason | | 1 | BalanceIncreaseRewardMineUncle | Reward for mining an uncle block | | 2 | BalanceIncreaseRewardMineBlock | Reward for mining a block | | 3 | BalanceIncreaseWithdrawal | ETH withdrawn from the beacon chain | | 4 | BalanceIncreaseGenesisBalance | ETH allocated at the genesis block | | 5 | BalanceIncreaseRewardTransactionFee | Transaction tip increasing block builder's balance | | 6 | BalanceDecreaseGasBuy | ETH spent to purchase gas for transaction execution | | 7 | BalanceIncreaseGasReturn | ETH returned for unused gas at the end of execution | | 8 | BalanceIncreaseDaoContract | ETH sent to the DAO refund contract | | 9 | BalanceDecreaseDaoAccount | ETH taken from a DAO account to be moved to the refund contract | | 10 | BalanceChangeTransfer | ETH transferred via a call | | 11 | BalanceChangeTouchAccount | Transfer of zero value to touch-create an account | | 12 | BalanceIncreaseSelfdestruct | Balance added to the recipient as indicated by a self-destructing account | | 13 | BalanceDecreaseSelfdestruct | Balance deducted from a contract due to self-destruct | | 14 | BalanceDecreaseSelfdestructBurn | ETH sent to an already self-destructed account within the same transaction | | 15 | BalanceChangeRevert | Balance reverted back to a previous value due to call failure | Field Availability by Currency Type[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#field-availability-by-currency-type "Direct link to Field Availability by Currency Type") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The availability of fields in the `TokenBalance` object depends on the type of currency being tracked: ### Native Currency (ETH)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#native-currency-eth "Direct link to Native Currency (ETH)") * **Available**: `BalanceChangeReasonCode`, `PreBalance`, `PostBalance`, `PostBalanceInUSD` * **Not Provided**: `TotalSupply`, `TokenOwnership` ### Fungible Tokens (ERC-20)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#fungible-tokens-erc-20 "Direct link to Fungible Tokens (ERC-20)") * **Available**: `PostBalance`, `PostBalanceInUSD`, `TotalSupply`, `TotalSupplyInUSD` * **Not Provided**: `PreBalance`, `BalanceChangeReasonCode`, `TokenOwnership` ### NFTs (ERC-721 / ERC-1155)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#nfts-erc-721--erc-1155 "Direct link to NFTs (ERC-721 / ERC-1155)") * **Available**: `PostBalance`, `TokenOwnership` * **Not Provided**: `PreBalance`, `BalanceChangeReasonCode`, `TotalSupply`, `TotalSupplyInUSD`, `PostBalanceInUSD` Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [What is Transaction Balance Tracker?](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#what-is-transaction-balance-tracker) * [Key Features](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#key-features) * [Getting Started](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#getting-started) * [How is it different from regular Balance APIs?](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#how-is-it-different-from-regular-balance-apis) * [Real-time Data & Streaming](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#real-time-data--streaming) * [Ethereum Transaction Balance Tracker APIs](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-transaction-balance-tracker-apis) * [Ethereum Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-transaction-balance-tracker) * [Ethereum Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-transaction-balance-tracker-1) * [Ethereum Validator Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-validator-balance-tracker) * [Ethereum Gas Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-gas-balance-tracker) * [Ethereum Miner Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-miner-balance-tracker) * [Ethereum MEV Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-mev-balance-tracker) * [Ethereum Self-Destruct Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-self-destruct-balance-tracker) * [Ethereum Token Balance API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-token-balance-api) * [Ethereum NFT Balance API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#ethereum-nft-balance-api) * [Balance Change Reason Codes](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#balance-change-reason-codes) * [Field Availability by Currency Type](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#field-availability-by-currency-type) * [Native Currency (ETH)](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#native-currency-eth) * [Fungible Tokens (ERC-20)](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#fungible-tokens-erc-20) * [NFTs (ERC-721 / ERC-1155)](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/#nfts-erc-721--erc-1155) --- # Solana Fee Anatomy - Base, Priority and Jito Tips [Skip to main content](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD A Solana transaction costs money in up to three ways, and only two of them appear in `Transaction.Fee`: | Component | In `Transaction.Fee`? | What it is | | --- | --- | --- | | **Base fee** | Yes | 5,000 lamports per signature, fixed by the protocol | | **Priority fee** | Yes | compute unit price × compute units requested, set by the sender | | **Jito tip** | **No** | a normal SOL transfer to a Jito tip account | That third row is the one that causes miscounting. A Jito tip is a transfer instruction, not a fee, so it never shows up in `Fee`. Add it separately from [the Jito Bundle API](https://docs.bitquery.io/docs/blockchain/Solana/Solana-Jito-Bundle-api/) if you want true all-in cost. Splitting base from priority[​](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#splitting-base-from-priority "Direct link to Splitting base from priority") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The cube exposes the total `Fee` but not its components, so you derive the split. Base fee is 5,000 lamports per signature, so for a single-signature transaction: priority_lamports = fee_lamports - 5000 const feeLamports = Math.round(Number(tx.Fee) * 1e9);const signatures = 1; // see the caveat belowconst baseFee = 5000 * signatures;const priorityFee = Math.max(0, feeLamports - baseFee); Signature count is not exposed, so the split is inexact `Transactions` does not return the number of signatures, and a two-signature transaction with no priority fee costs exactly the same as a one-signature transaction paying 5,000 lamports of priority. In a sample of recent successful transactions, fees cluster hard on 5,000 and 10,000 lamports, which are one and two signatures at zero priority. Treat `fee - 5000` as an **upper bound** on the priority fee for an unknown transaction, and as exact only where you know the transaction is single-signature. How much priority is actually being paid[​](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#how-much-priority-is-actually-being-paid "Direct link to How much priority is actually being paid") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Quantiles answer this in one query, without pulling rows: query SolanaFeeDistribution { Solana { Transactions(where: { Transaction: { Result: { Success: true } } }, limit: { count: 1 }) { transactions: count p25: quantile(of: Transaction_Fee, level: 0.25) median: median(of: Transaction_Fee) p75: quantile(of: Transaction_Fee, level: 0.75) p99: quantile(of: Transaction_Fee, level: 0.99) maxFee: quantile(of: Transaction_Fee, level: 0.999) } }} The shape of the answer is consistent even as the numbers move: the median sits **at the base fee**, the quartiles sit at or barely above it, and the distribution only lifts in the last percentile or two. Most Solana transactions pay no meaningful priority fee at all; a small minority bidding for block position accounts for nearly all of the priority spend. This matters when you size a fee strategy. Comparing your fee against the mean puts you against a number dragged upward by a handful of bots. Compare against the median and the p99 instead, and decide which population you are competing with. Transactions that paid real priority[​](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#transactions-that-paid-real-priority "Direct link to Transactions that paid real priority") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Filter on `Fee` to isolate the bidders: query HighPriorityTransactions { Solana { Transactions( where: { Transaction: { Result: { Success: true }, Fee: { gt: "0.0001" } } } orderBy: { descending: Block_Time } limit: { count: 25 } ) { Block { Time } Transaction { Signature Fee FeeInUSD FeePayer InstructionsCount } } }} `0.0001` SOL is 100,000 lamports, twenty times the base fee, so anything returned is paying to be included early rather than merely to be included. What a wallet spends on fees[​](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#what-a-wallet-spends-on-fees "Direct link to What a wallet spends on fees") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Group by `FeePayer` to rank fee spend, which is a good proxy for who is running bots: query TopFeePayers { Solana { Transactions( where: { Transaction: { Result: { Success: true } } } orderBy: { descendingByField: "totalFee" } limit: { count: 25 } ) { Transaction { FeePayer } totalFee: sum(of: Transaction_Fee) totalFeeUsd: sum(of: Transaction_FeeInUSD) transactions: count avgFee: average(of: Transaction_Fee) } }} Drop the success filter and add `Transaction { Result { Success } }` to the selection to see how much of a payer's spend goes on transactions that never landed. Failed transactions still cost money[​](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#failed-transactions-still-cost-money "Direct link to Failed transactions still cost money") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Grouping by result is the query most worth running once: query FeeSpentOnFailures { Solana { Transactions(limit: { count: 4 }) { Transaction { Result { Success } } transactions: count totalFee: sum(of: Transaction_Fee) avgFee: average(of: Transaction_Fee) } }} Two things fall out of it, and both hold across runs: * **Failed transactions pay a higher average fee than successful ones.** That is not a paradox. Priority fees are highest exactly where competition is fiercest, and most racers lose. * **A substantial share of all fees paid on Solana is spent on transactions that fail.** If you are estimating the cost of a strategy from successful transactions alone, you are understating it, and the gap widens the more aggressively you bid. This is also the honest counterweight to any landing-rate comparison: a venue that fails often is not merely slower, it is charging you for the failures. Related[​](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#related "Direct link to Related") ----------------------------------------------------------------------------------------------------------------- * [Jito Bundle API](https://docs.bitquery.io/docs/blockchain/Solana/Solana-Jito-Bundle-api/) — tips, which sit outside `Fee` * [Solana Fees API](https://docs.bitquery.io/docs/blockchain/Solana/solana_fees_api/) — fees attached to trades and transfers * [Solana Transactions API](https://docs.bitquery.io/docs/blockchain/Solana/solana-transactions/) * [Solana Blocks API](https://docs.bitquery.io/docs/blockchain/Solana/solana-blocks-api/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Splitting base from priority](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#splitting-base-from-priority) * [How much priority is actually being paid](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#how-much-priority-is-actually-being-paid) * [Transactions that paid real priority](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#transactions-that-paid-real-priority) * [What a wallet spends on fees](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#what-a-wallet-spends-on-fees) * [Failed transactions still cost money](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#failed-transactions-still-cost-money) * [Related](https://docs.bitquery.io/docs/blockchain/Solana/solana-fee-anatomy/#related) --- # Ethereum NFT Balance API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Ethereum NFT Balance API provides real-time balance updates for ERC-721 and ERC-1155 non-fungible tokens on the Ethereum blockchain. Track NFT ownership, token IDs, and ownership status for any address holding NFTs. note For NFTs (ERC-721 / ERC-1155), the following fields are available: * **Available**: `PostBalance`, `TokenOwnership` * **Not Provided**: `PreBalance`, `BalanceChangeReasonCode`, `TotalSupply`, `TotalSupplyInUSD`, `PostBalanceInUSD` Get Latest NFT Balance for an Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-latest-nft-balance-for-an-address "Direct link to Get Latest NFT Balance for an Address") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get the latest NFT balance for a specific address and NFT collection. This query returns the current NFT count and ownership information. Try the API [here](https://ide.bitquery.io/Get-Latest-NFT-Balance-for-an-Address) . { EVM(network: eth) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0x2906bF2d33bAd2041B31bd22a728724e23F6e764" } Currency: { SmartContract: { is: "0xbe9371326F91345777b04394448c23E2BFEaa826" } Fungible: false } } } ) { Block { Time Number } TokenBalance { Currency { Symbol Name SmartContract HasURI } PostBalance Address TokenOwnership { Owns Id } } Transaction { Hash } } }} Stream NFT Balance Updates in Real Time[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#stream-nft-balance-updates-in-real-time "Direct link to Stream NFT Balance Updates in Real Time") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Subscribe to real-time NFT balance updates for a specific address and collection. This subscription will notify you whenever NFT ownership changes. Try the API [here](https://ide.bitquery.io/Stream-NFT-Balance-Updates-in-Real-Time) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { Address: { is: "0x2906bF2d33bAd2041B31bd22a728724e23F6e764" } Currency: { SmartContract: { is: "0xbe9371326F91345777b04394448c23E2BFEaa826" } Fungible: false } } } ) { Block { Time Number } TokenBalance { Currency { Symbol Name SmartContract HasURI } PostBalance Address TokenOwnership { Owns Id } } Transaction { Hash From To } } }} Get All NFT Collections for an Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-all-nft-collections-for-an-address "Direct link to Get All NFT Collections for an Address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Retrieve all NFT collections held by a specific address. This query returns balances for all NFT collections the address owns. Try the API [here](https://ide.bitquery.io/Get-All-NFT-Collections-for-an-Address_1) . { EVM(network: eth) { TransactionBalances( orderBy: { descendingByField: "TokenBalance_PostBalanceInUSD_maximum" } where: { TokenBalance: { Address: { is: "0x2906bF2d33bAd2041B31bd22a728724e23F6e764" } Currency: { Fungible: false } } } ) { TokenBalance { Address Currency { Symbol Name SmartContract Decimals } PostBalance(maximum: Block_Time, selectWhere: { ne: "0" }) PostBalanceInUSD(maximum: Block_Time) Address } } }} Get NFT Balances for Multiple Addresses[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-nft-balances-for-multiple-addresses "Direct link to Get NFT Balances for Multiple Addresses") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get NFT balances for multiple addresses in a single query. Useful for portfolio tracking or wallet monitoring applications. Try the API [here](https://ide.bitquery.io/Get-NFT-Balances-for-Multiple-Addresses_1) . { EVM(network: eth) { TransactionBalances( orderBy: { descendingByField: "TokenBalance_PostBalanceInUSD_maximum" } where: { TokenBalance: { Address: { in: [ "0x2906bF2d33bAd2041B31bd22a728724e23F6e764" "0x3c6559E241f6A2e15a98f3270bc66447e0B6222b" ] } Currency: { Fungible: false } } } ) { TokenBalance { Address Currency { Symbol Name SmartContract Decimals } PostBalance(maximum: Block_Time, selectWhere: { ne: "0" }) PostBalanceInUSD(maximum: Block_Time) Address } } }} Get NFT Ownership History[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-nft-ownership-history "Direct link to Get NFT Ownership History") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Retrieve the NFT ownership history of a specific NFT over a specific time period. This helps track NFT transfers and ownership changes. Try the API [here](https://ide.bitquery.io/Get-NFT-Ownership-History_2) . { EVM(network: eth) { TransactionBalances( orderBy: { descending: Block_Time } where: { TokenBalance: { PostBalance: { eq: "1" } Currency: { SmartContract: { is: "0xbe9371326F91345777b04394448c23E2BFEaa826" } Fungible: false } TokenOwnership: { Id: { eq: "24010" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Block { Time Number Hash } TokenBalance { Currency { Symbol Name SmartContract HasURI } PostBalance Address TokenOwnership { Owns Id } } Transaction { Hash From To } } }} Track specific NFT Balance Changes[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#track-specific-nft-balance-changes "Direct link to Track specific NFT Balance Changes") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor NFT transfers for a specific collection across all transactions. This helps track NFT movements and ownership changes. Try the API [here](https://ide.bitquery.io/Track-specific-NFTs-Balance-Changes) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { Currency: { SmartContract: { is: "0xbe9371326F91345777b04394448c23E2BFEaa826" } Fungible: false } } } ) { Block { Time Number } TokenBalance { Currency { Symbol Name SmartContract HasURI } PostBalance Address TokenOwnership { Owns Id } } Transaction { Hash From To } } }} Get NFT Owner for Specific Token ID[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-nft-owner-for-specific-token-id "Direct link to Get NFT Owner for Specific Token ID") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Check the current owner of a specific NFT token ID. This query returns ownership information for a particular token. `0xF9c362CDD6EeBa080dd87845E88512AA0A18c615` is the NFT Contract address and `3042` is the NFT Token ID. Try the API [here](https://ide.bitquery.io/Get-NFT-Owner-for-Specific-Token-ID) . { EVM(network: eth) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { PostBalance: { eq: "1" } Currency: { SmartContract: { is: "0xF9c362CDD6EeBa080dd87845E88512AA0A18c615" } Fungible: false } TokenOwnership: { Id: { eq: "3042" } } } } ) { Block { Time Number } TokenBalance { Currency { Symbol Name SmartContract HasURI } PostBalance Address TokenOwnership { Owns Id } } Transaction { Hash } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Latest NFT Balance for an Address](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-latest-nft-balance-for-an-address) * [Stream NFT Balance Updates in Real Time](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#stream-nft-balance-updates-in-real-time) * [Get All NFT Collections for an Address](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-all-nft-collections-for-an-address) * [Get NFT Balances for Multiple Addresses](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-nft-balances-for-multiple-addresses) * [Get NFT Ownership History](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-nft-ownership-history) * [Track specific NFT Balance Changes](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#track-specific-nft-balance-changes) * [Get NFT Owner for Specific Token ID](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/#get-nft-owner-for-specific-token-id) --- # Ethereum Smartcontract Filterby | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract-filterby/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Smart Contract Calls by Method Signature[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract-filterby/#smart-contract-calls-by-method-signature "Direct link to Smart Contract Calls by Method Signature") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query retrieves the 10 most recent smart contract calls that match a specific function signature (harvest()) on the Binance Smart Chain (BSC) network. It also includes transaction and block data associated with each call. You can find the GraphQL query [here](https://ide.bitquery.io/Calls-by-Method-Signature) query MyQuery { EVM(dataset: archive, network: bsc) { Calls( limit: {count: 10} orderBy: {descending: Block_Date} where: {Call: {Signature: {Signature: {is: "harvest()"}}}, Block: {Date: {after: "2023-01-01"}}} ) { Call { LogCount InternalCalls } Transaction { Gas Hash From To Type Index } Block { Date } } }} **Parameters** * `EVM(dataset: archive, network: bsc)`: This parameter specifies the blockchain network and dataset to query. In this case, we are querying the Binance Smart Chain network with the [combined](https://docs.bitquery.io/docs/graphql/dataset/combined/) dataset. * `Calls`: This parameter retrieves the list of smart contract calls that match the specified conditions. * `limit`: {count: 10}: This parameter limits the number of results returned to 10. * `orderBy`: {descending: Block\_Date}: This parameter orders the results in descending order based on the block date of the calls. * `where: {Call: {Signature: {Signature: \{is: "harvest()"\}}}, Block: {Date: \{after: "2023-01-01"\}}}:` This parameter specifies the conditions to filter the smart contract calls. In this case, we filter calls based on the function signature harvest() and a block date after January 1, 2023. **Returned Data** The query returns the following data for each smart contract call: * `Call.LogCount`: The number of log entries emitted by the call. * `Call.InternalCalls`: The list of internal calls made by the call. * `Gas`: The amount of gas used by the transaction. * `Hash`: The hash of the transaction. * `From`: The address of the sender of the transaction. * `To`: The address of the receiver of the transaction. * `Type`: The type of the transaction (e.g., contract creation or message call). * `Index`: The index of the transaction within the block. * `Block.Date`: The date and time when the block was added to the blockchain. Smart Contract Calls by Opcode[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract-filterby/#smart-contract-calls-by-opcode "Direct link to Smart Contract Calls by Opcode") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This GraphQL query retrieves information about the latest STATICCALL EVM (Ethereum Virtual Machine) calls on the Binance Smart Chain network. You can find the GraphQL query [here](https://ide.bitquery.io/Smart-Contract-Calls-by-Opcode) query MyQuery { EVM(dataset: archive, network: bsc) { Calls( limit: {count: 10} orderBy: {descending: Block_Date} where: {Block: {Date: {after: "2023-01-01"}}, Call: {Opcode: {Name: {is: "STATICCALL"}}}} ) { Call { LogCount InternalCalls Opcode { Name } } Transaction { Gas Hash From To Type Index } Block { Date } } }} **Parameters** * `dataset` parameter specifies the dataset to be queried, which is set to combined. * `network` parameter specifies the network to be queried, which is set to bsc. * `limit` parameter is used to limit the number of results returned and is set to 10. * `orderBy` parameter is used to sort the results by the Block\_Date field in descending order. * `where` parameter is used to filter the results based on certain conditions. In this case, the where parameter filters the results to include only STATICCALL calls made after January 1st, 2023. **Returned Data** * `Call`: Returns information about the STATICCALL call, including the number of logs generated, internal calls made, and the name of the opcode used. * `Transaction`: Returns information about the transaction that contains the STATICCALL call, including the gas used, transaction hash, sender address, recipient address, transaction type, and transaction index. * `Block`: Returns the date of the block in which the STATICCALL call was made. Smart Contract Calls by Arguments[​](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract-filterby/#smart-contract-calls-by-arguments "Direct link to Smart Contract Calls by Arguments") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The Array-like structure of [Arguments and Returns](https://docs.bitquery.io/docs/schema/evm/arguments/) in Smart Contract Calls allows us to insert specific filters, enabling us to effectively narrow down our search. Further we can better understand the details of smart contract interactions in specific contexts. **Example 1** This [query](https://ide.bitquery.io/smart_contract_argument_transfer) demonstrates how we can trace transfer calls to a particular token contract, Matic Token in this case, that are being transferred to a specified wallet address. This is useful for monitoring the inflow of a specific token to a certain wallet. query MyQuery { EVM(dataset: archive, network: eth) { Calls( where: {Call: {Signature: {Name: {is: "transfer"}}, To: {is: "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"}}, Arguments: {includes: {Index: {eq: 0}, Name: {is: "to"}, Type: {is: "address"}, Value: {Address: {is: "0xB53E1f6322629b9435E95AeC13eC34aF9C8fB8bA"}}}}} limit: {count: 10} ) { Arguments { Name Value { ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Returns { Type Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } } } } }} **Parameters** * `dataset` : parameter specifies the combined dataset and `network` parameter specifies the network. * `where` : parameter sets filters on the function calls and arguments. The 'Signature' filter specifies "transfer" function calls made to Matic's token contract. The 'includes' filter under Arguments targets the recipient of the transfer (argument with index 0) with a specific wallet address. **Returned Data** The response includes the first 10 matching calls along with the arguments details and the return values for each call. As usual, you can adjust the filter values and arguments based on your specific use case. **Example 2** Let's consider a scenario where we're interested in tracking large liquidity additions to a specific Uniswap pair, like the ETH/USDT pair. By [this](https://ide.bitquery.io/addLiquidityETH_function) query, We can track calls to the function `addLiquidityETH` which is a common function used in Uniswap for adding liquidity to a pool. query MyQuery { EVM(dataset: archive, network: eth) { Calls( where: {Transaction: {Hash: {is: "0x60ce9acd0053f20092e7871868afe5187c95ff6d7750ad65a8d4ff99a052c357"}}, Call: {Signature: {Name: {is: "addLiquidityETH"}}}, Arguments: {length: {eq: 6}, includes: [{Index: {eq: 0}, Value: {Address: {is: "0x9cbc0be914e480beee4014e190fdbfc48ed5a4a8"}}}, {Index: {eq: 3}, Value: {BigInteger: {ge: "1000000000000000000"}}}, {Index: {eq: 5}, Value: {BigInteger: {ge: "1690878863"}}}]}} limit: {count: 10} ) { Arguments { Index Name Type Path { Name Index Type } Name Value { ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_Boolean_Value_Arg { bool } } } Call { Signature { Name Signature } } } }} **Parameters** * `dataset` : parameter specifies the combined dataset and `network` parameter specifies the network * `where` : parameter mentions the filters on the Call and Arguments. The 'Signature' filter specifies that we want function calls where the function name is "addLiquidityETH".The 'includes' filter under Arguments specifies that we want the first argument (Index 0) to be the specific token contract address, the third argument (Index 3) 'uint256' value greater than or equal to 1000000000000000000, and the last argument (Index 5) to be a deadline timestamp that is greater than or equal to "1690878863". **Returned Data** The response will contain the first 10 calls that match these filter conditions, along with the details of the arguments and the function signature of each call. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Smart Contract Calls by Method Signature](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract-filterby/#smart-contract-calls-by-method-signature) * [Smart Contract Calls by Opcode](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract-filterby/#smart-contract-calls-by-opcode) * [Smart Contract Calls by Arguments](https://docs.bitquery.io/docs/blockchain/Ethereum/calls/smartcontract-filterby/#smart-contract-calls-by-arguments) --- # Ethereum Mempool API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD `BalanceUpdates` sunsets 10 August 2026 Queries on this page that use **`BalanceUpdates`** will stop working on **10 August 2026**. Migrate to the **`Balances`** and **`Holders`** cubes, which return the current balance directly instead of summing deltas. See the [migration mapping](https://docs.bitquery.io/docs/cubes/balances-cube/#migrating-from-balanceupdates) for the query-by-query translation. In this section we will look at some examples of how to write mempool queries to extract the necessary data from broadcasted transactions. To read more about how we offer mempool data, read the introduction [here](https://docs.bitquery.io/docs/subscriptions/mempool-subscriptions/) How do I get unconfirmed/pending transactions for an address?[​](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#how-do-i-get-unconfirmedpending-transactions-for-an-address "Direct link to How do I get unconfirmed/pending transactions for an address?") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Subscribe to **`EVM(mempool: true)`** **`Transactions`** with **`where.any`** on **`Transaction.From`** and **`Transaction.To`** so you see pending txs **to or from** the wallet. Mempool support varies by **`network`**; the example under [Transactions from an Address](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#transactions-from-an-address) shows a **from** filter you can extend with `any`. For **BSC**\-specific streaming, see [BSC mempool stream](https://docs.bitquery.io/docs/blockchain/BSC/bsc-mempool-stream/) . Simulating Pending Transactions[​](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#simulating-pending-transactions "Direct link to Simulating Pending Transactions") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The below query retrieves information about in-flight transactions, helping you simulate the most recent state. It is a way to see if they will succeed without sending them on-chain. The `Success` field tells you if your mempool tranaction is successful and `FaultError` and `FaultError` indicate otherwise. You can find query [here](https://ide.bitquery.io/Simulating-Pending-Transactions_1) subscription{ EVM(mempool: true) { Transfers{ Log { Index } Transaction { Time Type To Gas From Cost Hash } Transfer { Amount Currency { Name } Type } TransactionStatus { Success FaultError FaultError } Block { Time } } }} Get Recommended Fees[​](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#get-recommended-fees "Direct link to Get Recommended Fees") ----------------------------------------------------------------------------------------------------------------------------------------------------------- The Recommended Fees API provides real-time data from the mempool. It returns fields such as block time, block number, transaction hash, transaction cost, sender address, recipient address, base fee, burnt fees, sender fees, priority fees per gas, miner rewards, gas refunds, effective gas prices, and potential savings. You can use it to build applications that require up-to-date information about recommended transaction fees. You can run the query [here](https://ide.bitquery.io/Get-Mempool-Fees) { EVM(mempool: true) { Transactions(limit: {count: 100}) { Block { Time Number BaseFee } Transaction { Hash Cost To From } Fee { Burnt SenderFee PriorityFeePerGas MinerReward GasRefund EffectiveGasPrice Savings } } }} PairCreated Events[​](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#paircreated-events "Direct link to PairCreated Events") ----------------------------------------------------------------------------------------------------------------------------------------------------- This query returns information about transactions that have triggered the `PairCreated` event in the mempool, including the transaction hash, log signature, and argument values. You can run the query [here](https://ide.bitquery.io/PairCreated-in-Mempool) subscription { EVM(mempool: true) { Events(where: {Log: {Signature: {Name: {is: "PairCreated"}}}}) { Transaction { Hash } Log{ Signature{ Name } } Arguments { Name Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} Token Trades[​](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#token-trades "Direct link to Token Trades") ----------------------------------------------------------------------------------------------------------------------------------- This subscription provides information about the most recent token trades in the mempool, including the block number and time, transaction details, and trade information such as buyer, seller, price, and currencies involved. You can run the query [here](https://ide.bitquery.io/mempool-token-trades_1) subscription { EVM(mempool: true) { buyside: DEXTrades { Block { Number Time } Transaction { From To Hash } Trade { Buy { Amount Buyer Currency { Name Symbol SmartContract } Seller Price } Sell { Amount Buyer Currency { Name SmartContract Symbol } Seller Price } } } }} Transfers[​](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#transfers "Direct link to Transfers") -------------------------------------------------------------------------------------------------------------------------- This subscription returns details about the latest token transfers in the mempool, including the transfer amount, currency name and symbol, sender, receiver, and transfer type. You can run the query [here](https://ide.bitquery.io/mempool-transfers_1) subscription { EVM(mempool: true) { Transfers { Transfer { Amount Currency { Name Symbol } Receiver Sender Type } } }} Transactions from an Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#transactions-from-an-address "Direct link to Transactions from an Address") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Mempool Transactions API provides real-time data from the Binance mempool. You can use it to build applications that require up-to-date information about transactions associated with a specific address. The example below retrieves mempool transactions **from** the specified address (Binance / BSC mempool context). To also include pending txs **to** that address, use `where: { any: [ { Transaction: { From: { is: "..." } } }, { Transaction: { To: { is: "..." } } } ] }` in the same subscription shape. Results include block time, block number, hash, cost, and from/to fields where available. You can run the query [here](https://ide.bitquery.io/Binance-Mempool-Transactions_1) subscription { EVM(mempool: true) { Transactions( where: {Transaction: {From: {is: "0x21a31ee1afc51d94c2efccaa2092ad1028285549"}}} ) { Block { Time Number } Transaction { Hash Cost To From } } }} Balance Updates in Mempool in Real-time[​](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#balance-updates-in-mempool-in-real-time "Direct link to Balance Updates in Mempool in Real-time") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- You can track changes in balance after each transaction in the mempool, even before it is confirmed. You can run it [here](https://ide.bitquery.io/Mempool-balance-updates-on-Ethereum-Arbitrum-BNB-subscription) subscription { EVM(network: eth, mempool: true) { BalanceUpdates { Currency { Name } Block { Date } BalanceUpdate { Amount Type } Transaction { Hash } } }} V, R, S Signature of Mempool Transactions[​](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#v-r-s-signature-of-mempool-transactions "Direct link to V, R, S Signature of Mempool Transactions") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The following subscription query retrieves real-time mempool transactions and includes key details such as the block time, block number, transaction hash, transaction cost, and the V, R, S components of the transaction signature. You can run it [here](https://ide.bitquery.io/vrs-signature) subscription { EVM(network: eth, mempool: true) { Transactions { Block { Time Number } Transaction { Hash Cost } Signature { V S R } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [How do I get unconfirmed/pending transactions for an address?](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#how-do-i-get-unconfirmedpending-transactions-for-an-address) * [Simulating Pending Transactions](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#simulating-pending-transactions) * [Get Recommended Fees](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#get-recommended-fees) * [PairCreated Events](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#paircreated-events) * [Token Trades](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#token-trades) * [Transfers](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#transfers) * [Transactions from an Address](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#transactions-from-an-address) * [Balance Updates in Mempool in Real-time](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#balance-updates-in-mempool-in-real-time) * [V, R, S Signature of Mempool Transactions](https://docs.bitquery.io/docs/blockchain/Ethereum/mempool/mempool-api/#v-r-s-signature-of-mempool-transactions) --- # Ethereum MEV Balance Tracker | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Ethereum MEV (Maximal Extractable Value) Balance Tracker API provides real-time balance updates related to MEV activities, including transaction fee rewards, block builder rewards, and other MEV-related balance changes. Track MEV-Boost Relay Transaction Balances[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-mev-boost-relay-transaction-balances "Direct link to Track MEV-Boost Relay Transaction Balances") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track balance changes for MEV-boost relay addresses to monitor their activity and rewards. This example uses the `BloXroute Max Profit` address. [Run query](https://ide.bitquery.io/BloXroute-Max-Profit-Tx-Balance-Tracker) { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { Address: { is: "0xF2f5C73fa04406b1995e397B55c24aB1f3eA726C" } } } limit: { count: 10 } orderBy: { descending: Block_Time } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance PreBalanceInUSD PostBalanceInUSD Address BalanceChangeReasonCode } Transaction { Hash From To Value ValueInUSD GasPrice Index } } }} Track MEV-Related Balance Updates[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-mev-related-balance-updates "Direct link to Track MEV-Related Balance Updates") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor balance changes related to MEV activities, including transaction fee rewards and block builder rewards. Try the API [here](https://ide.bitquery.io/Track-MEV-Related-Balance-Updates) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} **Balance Change Reason Code for MEV:** * **Code 5**: `BalanceIncreaseRewardTransactionFee` - Transaction tip increasing block builder's balance (MEV-related) Track MEV Payout Transaction Balances with MEV Reward[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-mev-payout-transaction-balances-with-mev-reward "Direct link to Track MEV Payout Transaction Balances with MEV Reward") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query focuses on a block builder address and returns the most recent payouts, including the token metadata, pre/post balances, and USD valuations, so you can quickly see how large each MEV reward was. [Try the API](https://ide.bitquery.io/QuasarBuilder-MEV-Payout-Transaction-Balance) { EVM(network: eth) { TransactionBalances( limit: {count: 10} where: {Transaction: {}, TokenBalance: {BalanceChangeReasonCode: {eq: 6}, Address: {is: "0x396343362be2a4da1ce0c1c210945346fb82aa49"}}} orderBy: {descending: Block_Time} ) { Block { Time } TokenBalance { Currency { Symbol HasURI SmartContract } PreBalance PostBalance Address BalanceChangeReasonCode TotalSupplyInUSD TotalSupply TokenOwnership { Owns Id } PostBalanceInUSD } Transaction { Hash MEV_reward: Value ValueInUSD } } }} Track Block Builder Rewards[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-block-builder-rewards "Direct link to Track Block Builder Rewards") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor transaction fee rewards received by block builders (MEV extractors): Try the API [here](https://ide.bitquery.io/Track-Block-Builder-Rewards) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Number: { gt: "0" } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash GasPrice } } }} Filter by MEV Bot or Builder Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#filter-by-mev-bot-or-builder-address "Direct link to Filter by MEV Bot or Builder Address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track balance changes for specific MEV bots or block builders: Try the API [here](https://ide.bitquery.io/Filter-by-MEV-Bot-or-Builder-Address) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { Address: { is: "0xMEVBotOrBuilderAddressHere" } BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash GasPrice } } }} Track Large MEV Transactions[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-large-mev-transactions "Direct link to Track Large MEV Transactions") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor large transaction fee rewards that may indicate significant MEV extraction: Try the API [here](https://ide.bitquery.io/Track-Large-MEV-Transactions) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } PostBalanceInUSD: { gt: "1000" } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash GasPrice } } }} Aggregate MEV Rewards[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#aggregate-mev-rewards "Direct link to Aggregate MEV Rewards") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Calculate total MEV rewards for a specific address or time period: Try the API [here](https://ide.bitquery.io/Aggregate-MEV-Rewards) . { EVM(dataset: archive, network: eth) { TransactionBalances( where: { TokenBalance: { Address: { is: "0xMEVBotOrBuilderAddressHere" } BalanceChangeReasonCode: { eq: 5 } } } ) { TokenBalance { Currency { Symbol } totalRewards: sum(of: TokenBalance_PostBalanceInUSD) totalRewardsETH: sum(of: TokenBalance_PostBalance) rewardCount: count } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track MEV-Boost Relay Transaction Balances](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-mev-boost-relay-transaction-balances) * [Track MEV-Related Balance Updates](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-mev-related-balance-updates) * [Track MEV Payout Transaction Balances with MEV Reward](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-mev-payout-transaction-balances-with-mev-reward) * [Track Block Builder Rewards](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-block-builder-rewards) * [Filter by MEV Bot or Builder Address](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#filter-by-mev-bot-or-builder-address) * [Track Large MEV Transactions](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#track-large-mev-transactions) * [Aggregate MEV Rewards](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/#aggregate-mev-rewards) --- # Ethereum Miner Balance Tracker: Block Producer Income After the Merge [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Ethereum stopped mining at the Merge in September 2022. The mining codes stay in the balance schema, 1 for an uncle reward and 2 for a block reward, but the `TransactionBalances` cube covers the recent realtime window only, so on Ethereum they never appear and a filter on them returns nothing. What a block producer earns today shows up under other codes: * **Priority fees**, reason code 5, credited to the block's fee recipient for each transaction. In practice that address is a block builder, since most blocks are built through MEV-Boost. * **Consensus-layer rewards**, which reach validators through consensus-layer withdrawals. Withdrawals are not transactions, so this cube does not record them; reason code 3 exists in the schema for them but returns no rows in live data. The [validator balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/) covers what can be tracked on the execution layer. * **Builder payments to the proposer**, ordinary transfers in the last transaction of a block, covered by the [MEV balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/) . This page tracks the first of these. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The example builder is Titan Builder, `0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97`; the query under "Who collected fees" lists the others. Stream fee credits as they happen[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#stream-fee-credits-as-they-happen "Direct link to Stream fee credits as they happen") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Each message is one transaction's priority fee. `tip` is the balance after minus the balance before, in ETH. Saved stream [here](https://ide.bitquery.io/Track-Transaction-Fee-Rewards) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Number Time } TokenBalance { Address PreBalance PostBalance Currency { Symbol } } Transaction { Hash From } tip: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) } }} Largest tips in the last ten minutes[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#largest-tips-in-the-last-ten-minutes "Direct link to Largest tips in the last ten minutes") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Sort on the computed field. `calculate` only sees fields that are selected, so `PreBalance` and `PostBalance` stay in the query. Saved query [here](https://ide.bitquery.io/Track-Block-Mining-Rewards) . { EVM(network: eth) { TransactionBalances( limit: { count: 20 } orderBy: { descendingByField: "tip" } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Time: { since_relative: { minutes_ago: 10 } } } } ) { Block { Number Time } TokenBalance { Address PreBalance PostBalance } Transaction { Hash From } tip: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) } }} One builder's income per block[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#one-builders-income-per-block "Direct link to One builder's income per block") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Group by block for one address. The balance before the first credit and after the last credit in the block bracket the block's fee income, so `end` minus `start` is what the builder collected in that block, and `count` is the number of transactions that paid. Saved query [here](https://ide.bitquery.io/Filter-by-Miner-Address) . { EVM(network: eth) { TransactionBalances( limit: { count: 20 } orderBy: { descending: Block_Number } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } Address: { is: "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97" } } Block: { Time: { since_relative: { minutes_ago: 30 } } } } ) { Block { Number } count start: TokenBalance { PreBalance(minimum: Transaction_Index) } end: TokenBalance { PostBalance(maximum: Transaction_Index) } } }} Who collected fees in the last hour[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#who-collected-fees-in-the-last-hour "Direct link to Who collected fees in the last hour") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Group the code 5 rows by receiving address to see which builders and fee recipients were active, ranked by the number of transactions that paid them. Saved query [here](https://ide.bitquery.io/Track-Miner-Balance-Updates) . { EVM(network: eth) { TransactionBalances( limit: { count: 20 } orderBy: { descendingByField: "count" } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { TokenBalance { Address } count } }} Why the mining codes return nothing[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#why-the-mining-codes-return-nothing "Direct link to Why the mining codes return nothing") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Codes 1 and 2 belong to proof-of-work blocks. The cube has no archive dataset on Ethereum, so the pre-Merge era is out of reach and the count below is zero in any window. Saved query [here](https://ide.bitquery.io/Track-Uncle-Block-Rewards) . { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [1, 2] } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { count } }} Video walkthrough[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#video-walkthrough "Direct link to Video walkthrough") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Frequently Asked Questions -------------------------- Does Ethereum still have mining rewards? No. Mining ended at the Merge in September 2022. Reason codes 1 and 2 never appear in the realtime balance data, and the cube has no archive, so the pre-Merge era cannot be queried through it. Who receives reason code 5 on Ethereum? The block's fee recipient, which for most blocks is a builder such as Titan Builder. Group code 5 rows by TokenBalance.Address to list the active builders and how many transactions paid each. How do I compute a builder's income for one block? Filter code 5 rows on the builder's address, group by block, and take PostBalance at the maximum transaction index minus PreBalance at the minimum transaction index. The difference is the block's fee income. Where are the proposer's earnings? Builder payments to the proposer are regular transfers at the end of a block, covered by the MEV balance tracker. Consensus-layer rewards arrive as consensus-layer withdrawals, which are not transactions, so this cube does not record them and reason code 3 returns no rows. Related pages[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#related-pages "Direct link to Related pages") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * [Ethereum MEV balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/) * [Ethereum validator balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/) * [Ethereum gas balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/) * [Ethereum transaction balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Stream fee credits as they happen](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#stream-fee-credits-as-they-happen) * [Largest tips in the last ten minutes](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#largest-tips-in-the-last-ten-minutes) * [One builder's income per block](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#one-builders-income-per-block) * [Who collected fees in the last hour](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#who-collected-fees-in-the-last-hour) * [Why the mining codes return nothing](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#why-the-mining-codes-return-nothing) * [Video walkthrough](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#video-walkthrough) * [Related pages](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-miner-balance-tracker/#related-pages) --- # Arbitrum Slippage API: How Much a Pool Can Absorb at Each Slippage Level [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The `DEXPoolSlippages` cube under `EVM(network: arbitrum)` publishes a slippage table for a pool every time its reserves change. For seven slippage levels, 0, 10, 50, 100, 200, 500 and 1000 basis points, it gives the largest input the pool can take before the price moves past that level, the minimum output that trade would return, and the average execution price, in both directions. That answers the pre-trade question directly: can this pool take my size at my tolerance, and what do I get back. The tables cover the same pools as the [Arbitrum liquidity API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/) : Uniswap v2, v3 and v4 and PancakeSwap v3. The cube holds the recent realtime window only; record the stream for history. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The worked pool is the Uniswap v3 WETH/ARB pool, `0xc6f780497a95e246eb9449f5e4770916dcd6396a`. The slippage table of one pool[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#the-slippage-table-of-one-pool "Direct link to The slippage table of one pool") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Seven rows per update, one per level. At 50 basis points the `AtoB.MaxAmountIn` row reads as: selling this much WETH moves the price by no more than 0.5%, and `MinAmountOut` is the ARB you get for it. The 0 basis point row carries the spot price with zero size. Saved query [here](https://ide.bitquery.io/Latest-slippage-of-a-pool-on-Uniswap-v3) . { EVM(network: arbitrum) { DEXPoolSlippages( where: { Price: { Pool: { SmartContract: { is: "0xc6f780497a95e246eb9449f5e4770916dcd6396a" } } } } limit: { count: 7 } orderBy: { descending: Block_Time } ) { Block { Time Number } Price { SlippageBasisPoints AtoB { Price MaxAmountIn MinAmountOut } BtoA { Price MaxAmountIn MinAmountOut } Pool { SmartContract CurrencyA { Symbol SmartContract } CurrencyB { Symbol SmartContract } } Dex { ProtocolName } } } }} One level, as a stream[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#one-level-as-a-stream "Direct link to One level, as a stream") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Fix `SlippageBasisPoints` to the tolerance you trade with and subscribe: each message is the pool's new capacity at that level. Saved stream [here](https://ide.bitquery.io/realtime-slippage-on-arbitrum) . subscription { EVM(network: arbitrum) { DEXPoolSlippages( where: { Price: { Pool: { SmartContract: { is: "0xc6f780497a95e246eb9449f5e4770916dcd6396a" } } SlippageBasisPoints: { eq: 50 } } } ) { Block { Time } Price { SlippageBasisPoints AtoB { Price MaxAmountIn MinAmountOut } BtoA { Price MaxAmountIn MinAmountOut } } } }} The deepest pool for a token at a given tolerance[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#the-deepest-pool-for-a-token-at-a-given-tolerance "Direct link to The deepest pool for a token at a given tolerance") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Which pool takes the largest WETH sell within 0.5%? Keep the newest row per pool with `limitBy`, fix the level, and compare `AtoB.MaxAmountIn` across pools that list WETH first. On Arbitrum the large WETH pools against USDC and USDT0 lead. Repeat with WETH under `CurrencyB` and read `BtoA` for pools that list it second. { EVM(network: arbitrum) { DEXPoolSlippages( where: { Price: { SlippageBasisPoints: { eq: 50 } Pool: { CurrencyA: { SmartContract: { is: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" } } } } Block: { Time: { since_relative: { hours_ago: 1 } } } } limitBy: { by: Price_Pool_SmartContract, count: 1 } orderBy: { descending: Block_Time } limit: { count: 20 } ) { Price { Pool { SmartContract CurrencyB { Symbol SmartContract } } Dex { ProtocolName } AtoB { MaxAmountIn MinAmountOut Price } } } }} Reading the fields[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#reading-the-fields "Direct link to Reading the fields") ------------------------------------------------------------------------------------------------------------------------------------------------------- | Field | Meaning | | --- | --- | | `Price.SlippageBasisPoints` | The level of the row: 0, 10, 50, 100, 200, 500 or 1000 (100 = 1%) | | `Price.AtoB.MaxAmountIn` | Largest amount of CurrencyA the pool takes within that level | | `Price.AtoB.MinAmountOut` | CurrencyB returned for that input | | `Price.AtoB.Price` | Average execution price of that trade | | `Price.BtoA` | The same three numbers for selling CurrencyB | | `Price.Pool`, `Price.Dex` | Pool contract, the two tokens, protocol name | The `arbitrum.dexpools.proto` Kafka topic carries the same tables as protobuf messages; Kafka needs its own credentials, see the [Kafka streams hub](https://docs.bitquery.io/docs/category/kafka-streams/) . Frequently Asked Questions -------------------------- How do I check price impact before a trade on Arbitrum? Query DEXPoolSlippages for the pool and read the row for your tolerance. If your size is below MaxAmountIn at that level, the trade stays within it, and MinAmountOut is the least you receive. Which slippage levels are available? Seven fixed levels per update: 0, 10, 50, 100, 200, 500 and 1000 basis points. Filter on Price.SlippageBasisPoints to keep one. How do I find the deepest pool for a token on Arbitrum? Fix the slippage level, filter the token as CurrencyA, keep the latest row per pool with limitBy, and compare AtoB.MaxAmountIn. Run it again with the token as CurrencyB and compare BtoA. Which pools have slippage tables on Arbitrum? The same set as the liquidity cube: Uniswap v2, v3 and v4 pools and PancakeSwap v3 pools. Balancer, Curve, Fluid and DODO pools have no tables here. Is there history for slippage data? No. The cube holds the recent realtime window and has no archive. Subscribe, or consume the Kafka topic, and store the rows you need. Related pages[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#related-pages "Direct link to Related pages") ---------------------------------------------------------------------------------------------------------------------------------------- * [Arbitrum liquidity API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/) * [Arbitrum DEX trades API](https://docs.bitquery.io/docs/blockchain/Arbitrum/DexTrades/) * [DEXPools cube](https://docs.bitquery.io/docs/cubes/evm-dexpool/) * [Base slippage API](https://docs.bitquery.io/docs/blockchain/Base/base-slippage-api/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [The slippage table of one pool](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#the-slippage-table-of-one-pool) * [One level, as a stream](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#one-level-as-a-stream) * [The deepest pool for a token at a given tolerance](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#the-deepest-pool-for-a-token-at-a-given-tolerance) * [Reading the fields](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#reading-the-fields) * [Related pages](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/#related-pages) --- # Ethereum Eth Gasprice | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_gasPrice/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) Copy MD In this section, we will build a data stream that returns the gas fee of the latest transaction in WEI. Unlike any JSON RPC method like eht\_gasPrice that returns the hexadecimal equivalent of an integer representing the current gas price in WEI, this returns the integer value itself. [This](https://ide.bitquery.io/eth_gasPrice_1) is the stream that returns the current gas price in `WEI`. subscription { EVM { Transactions { Transaction { Gas } ChainId } }} The above stream returns the following response. { "EVM": { "Transactions": [ { "ChainId": "1", "Transaction": { "Gas": "100000" } }, ] }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) --- # debug_traceTransaction | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceTransaction/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD debug\_traceTransaction is a JSON RPC method that returns tracing results for the specified transaction. In this section, we are looking for a way to build an alternative for the same using Bitquery API. Debug Trace Transaction[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceTransaction/#debug-trace-transaction "Direct link to Debug Trace Transaction") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- To trace a transaction using the debug\_traceTransaction we need the `transaction hash`. We are using [this](https://ide.bitquery.io/debug_traceTransaction) API given below for tracing the transaction, with transaction hash as `0x4fe59dcf4f834f17acdcd0f244538c119523009ce47817ccd56423404ba34ffa`. query MyQuery { EVM { Calls( where: { Transaction: { Hash: { is: "0x4fe59dcf4f834f17acdcd0f244538c119523009ce47817ccd56423404ba34ffa" } } } ) { Call { From Gas GasUsed Input Output To Value InternalCalls Error Create } } }} Response Recieved[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceTransaction/#response-recieved "Direct link to Response Recieved") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- The response from running the above API is given below, and returns. * `Create` - (boolean) If the transaction is a smart contract creation or not. * `From` - The address from which the transaction originated. * `To` - The address to which the transaction is sent. * `Gas` - Gas provided for the transaction in `WEI`. * `GasUsed` - Gas used in the transaction in `WEI`. * `Input` - Call Data. * `Output` - Data Returned. * `Value` - Amount of value transfer. * `Error` - Error string (if any), otherwise an empty string. * `InternalCalls` - Number of sub-calls. { "EVM": { "Calls": [ { "Call": { "Create": false, "Error": "", "From": "0xd2241065700f763d0390725d00bfd3fbef0b525e", "Gas": "120748", "GasUsed": "87170", "Input": "0x42842e0e000000000000000000000000d2241065700f763d0390725d00bfd3fbef0b525e000000000000000000000000ad6df549cc5c3427fe2c54207620e3555c4350aa000000000000000000000000000000000000000000000000000000000000057e", "InternalCalls": 0, "Output": "0x", "To": "0xbb3f21dd9b16741e9822392f753d07da4c6b6cd6", "Value": "0.000000000000000000" } } ] }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Debug Trace Transaction](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceTransaction/#debug-trace-transaction) * [Response Recieved](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceTransaction/#response-recieved) --- # Ethereum Fluid DEX API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/fluid-dex-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Need real-time Fluid DEX data or anything from the last ~30 days? For **real-time + last ~30 days**, use the [**Trading cube**](https://docs.bitquery.io/docs/trading/trading-data-overview/) — [`Trading.Trades`](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) gives you clean, MEV-filtered Fluid DEX swaps with **USD price, market cap, and supply on every row** across **9 chains in one API**. Use this page when you need **historical Fluid DEX data older than ~30 days**, raw per-swap detail, or call / event context. Fluid DEX is a decentralized exchange protocol built on Ethereum and other EVM chains. Bitquery's APIs support tracking Fluid DEX vault positions, events, and contract interactions in real-time and across historical data. You can get data on other EVM chains like Base, Arbitrum, and Polygon by changing the contract address based on the [Fluid contracts deployments](https://github.com/Instadapp/fluid-contracts-public/blob/main/deployments/deployments.md) and the `network` parameter New Position Mint on Fluid Vault Factory[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/fluid-dex-api/#new-position-mint-on-fluid-vault-factory "Direct link to New Position Mint on Fluid Vault Factory") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track new position mints on the Fluid DEX Vault Factory contract. This query monitors the `NewPositionMinted` event which is emitted when a new position is created on the vault factory. [Run Query](https://ide.bitquery.io/new-position-mints-on-Fluid-DEX-Vault) | [Run Stream](https://ide.bitquery.io/stream-new-position-mints-on-Fluid-DEX-Vault) { EVM(dataset: realtime, network: eth) { Events( limit: {count: 20} where: { Log: { Signature: {Name: {is: "NewPositionMinted"}} SmartContract: {is: "0x324c5Dc1fC42c7a4D43d92df1eBA58a54d13Bf2d"} } } ) { Block { Time Number Hash } Receipt { ContractAddress } TransactionStatus { Success } LogHeader { Address Index Data } Transaction { Hash From To } Log { EnterIndex ExitIndex Index LogAfterCallIndex Pc SmartContract Signature { Name Signature } } Arguments { Name Value { ... on EVM_ABI_Integer_Value_Arg { integer } ... on EVM_ABI_Address_Value_Arg { address } ... on EVM_ABI_String_Value_Arg { string } ... on EVM_ABI_BigInt_Value_Arg { bigInteger } ... on EVM_ABI_Bytes_Value_Arg { hex } ... on EVM_ABI_Boolean_Value_Arg { bool } } } } }} Recent Transfers to a Fluid Token Vault[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/fluid-dex-api/#recent-transfers-to-a-fluid-token-vault "Direct link to Recent Transfers to a Fluid Token Vault") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Track all recent token transfers to a specific Fluid DEX vault. This query is useful for monitoring deposits and liquidity flows into a particular vault. [Run Query](https://ide.bitquery.io/Recent-Transfers-to-cbBTC-Fluid-Vault) **Example Vault Address:** `0x5dae640956711E11016C1b27CF9968Ba5B4a69CC` (cbBTC Fluid Vault) query RecentTransfers { EVM(dataset: realtime, network: eth) { Transfers( where: { Transaction: {To: {is: "0x5dae640956711E11016C1b27CF9968Ba5B4a69CC"}} } orderBy: {descending: Block_Number} limit: {count: 100} ) { Block { Time Number } Transaction { Hash } Transfer { Amount Sender Receiver Currency { Symbol Name SmartContract } } } }} All Events on Fluid Vault Factory Contract[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/fluid-dex-api/#all-events-on-fluid-vault-factory-contract "Direct link to All Events on Fluid Vault Factory Contract") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get a comprehensive list of all events emitted by the Fluid DEX Vault Factory contract. This query aggregates event counts by signature to identify which events are most frequently emitted, helping you understand the contract's activity patterns. [Run Query](https://ide.bitquery.io/all-events-on-fluid-DEX-VaultFactory) **VaultFactory Address:** `0x324c5Dc1fC42c7a4D43d92df1eBA58a54d13Bf2d` { EVM(dataset: archive, network: eth) { Events( limit: {count: 20} where: { Log: { SmartContract: {is: "0x324c5Dc1fC42c7a4D43d92df1eBA58a54d13Bf2d"} } } orderBy: {descendingByField: "txc"} ) { txc: count Log { SmartContract Signature { Name Signature } } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [New Position Mint on Fluid Vault Factory](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/fluid-dex-api/#new-position-mint-on-fluid-vault-factory) * [Recent Transfers to a Fluid Token Vault](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/fluid-dex-api/#recent-transfers-to-a-fluid-token-vault) * [All Events on Fluid Vault Factory Contract](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/fluid-dex-api/#all-events-on-fluid-vault-factory-contract) --- # Ethereum NFT Metadata API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-metadata-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The NFT Metadata API retrieves the metadata of NFT. Get the Metadata of an NFT[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-metadata-api/#get-the-metadata-of-an-nft "Direct link to Get the Metadata of an NFT") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Let see an example query that retrieves the metadata of an NFT based on its token ID and the smart contract address. It fetches the latest transfer of the NFT by ordering the results based on the block Number in descending order. { EVM(dataset: archive, network: eth) { Transfers( where: {Transfer: {Currency: {SmartContract: {is: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"}}, Id: {eq: "4226"}}} limit: {count: 1, offset: 0} orderBy: {descending: Block_Number} ) { Transfer { Currency { SmartContract Name Decimals Fungible HasURI Symbol } Id URI Data owner: Receiver } } }} **Parameters** * `network` : Specifies the Ethereum network. * `dataset` : Indicates the [combined](https://docs.bitquery.io/docs/graphql/dataset/combined/) dataset to be used. * `orderBy` : Orders the results in descending order based on the Block\_Number. * `where` : This parameter specifies the conditions to filter the results by. In this case, the token ID is `4226` and the Currency with the Smart Contract being `0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D`. **Returned Data** * `Currency {....}` : Represent currency details. * `owner` : Specifies the address of the current owner of the NFT. * `URI` : Represents the URL associated with the NFT. You can find the graphql query [here](https://ide.bitquery.io/NFT-metadata_1_1) . Get the Creator of an NFT[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-metadata-api/#get-the-creator-of-an-nft "Direct link to Get the Creator of an NFT") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The Following query retrieves the Creator of the NFT. { EVM(dataset: combined, network: eth) { Calls( limit: {count: 1} orderBy: {descending: Block_Time} where: {Call: {To: {is: "0x23581767a106ae21c074b2276d25e5c3e136a68b"}, Create: true}} ) { Call { creator: From Create } Transaction { Hash } } }} **Parameters** * `orderBy` : Orders the results in descending order based on the Block\_Time. * `limit` : Specifies the maximum results to return. In this query, the limit is 1. * `where` : It filters the results to include only calls made to the smart contract with the specified address `0x23581767a106ae21c074b2276d25e5c3e136a68b` and only includes create call. **Returned Data** * `Call`: The `creator: From` field represent the address of the creator. * `Transaction` : Represents hash of the transaction at which this NFT was created. You can find the graphql query [here](https://ide.bitquery.io/Creator_of_an_NFT) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get the Metadata of an NFT](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-metadata-api/#get-the-metadata-of-an-nft) * [Get the Creator of an NFT](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-metadata-api/#get-the-creator-of-an-nft) --- # Base MEV Balance Tracker | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Base MEV (Maximal Extractable Value) Balance Tracker API provides real-time balance updates related to MEV activities, including transaction fee rewards, block builder rewards, and other MEV-related balance changes. Track MEV-Related Balance Updates[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/#track-mev-related-balance-updates "Direct link to Track MEV-Related Balance Updates") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor balance changes related to MEV activities, including transaction fee rewards and block builder rewards. Try the API [here](https://ide.bitquery.io/Track-MEV-Related-Balance-Updates-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} **Balance Change Reason Code for MEV:** * **Code 5**: `BalanceIncreaseRewardTransactionFee` - Transaction tip increasing block builder's balance (MEV-related) Track Block Builder Rewards[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/#track-block-builder-rewards "Direct link to Track Block Builder Rewards") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor transaction fee rewards received by block builders (MEV extractors): Try the API [here](https://ide.bitquery.io/Track-Block-Builder-Rewards-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Number: { gt: "0" } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash GasPrice } } }} Filter by MEV Bot or Builder Address[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/#filter-by-mev-bot-or-builder-address "Direct link to Filter by MEV Bot or Builder Address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track balance changes for specific MEV bots or block builders: Try the API [here](https://ide.bitquery.io/Filter-by-MEV-Bot-or-Builder-Address-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { Address: { is: "0xMEVBotOrBuilderAddressHere" } BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash GasPrice } } }} Track Large MEV Transactions[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/#track-large-mev-transactions "Direct link to Track Large MEV Transactions") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor large transaction fee rewards that may indicate significant MEV extraction: Try the API [here](https://ide.bitquery.io/Track-Large-MEV-Transactions-base) . subscription { EVM(network: base) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } PostBalanceInUSD: { gt: "1000" } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash GasPrice } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track MEV-Related Balance Updates](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/#track-mev-related-balance-updates) * [Track Block Builder Rewards](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/#track-block-builder-rewards) * [Filter by MEV Bot or Builder Address](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/#filter-by-mev-bot-or-builder-address) * [Track Large MEV Transactions](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-mev-balance-tracker/#track-large-mev-transactions) --- # Ethereum Gas Balance Tracker | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Ethereum Gas Balance Tracker API provides real-time balance updates related to Gas Fee activities, including transaction fee rewards, monitoring gas fee spent, and other Gas-related balance changes. Get Top Gas Fee Collectors[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#get-top-gas-fee-collectors "Direct link to Get Top Gas Fee Collectors") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/top-gas-fee-collectors_1) API endpoint returns the list of top gas fee collectors. We are tracking the Gas Collection Event causing Balance Update by appliying condition on `BalanceChangeReasonCode` to be equal to `5`. query TopGasGainers { EVM(network: eth) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 5}}} orderBy: {descendingByField: "gain", descending: Block_Time} limitBy: {by: TokenBalance_Address, count: 1} ) { TokenBalance { Address Currency { Name Symbol SmartContract } PreBalance PostBalance } gain: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) } }} Track the Balance after Latest Gas Fee Burn[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#track-the-balance-after-latest-gas-fee-burn "Direct link to Track the Balance after Latest Gas Fee Burn") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Latest-balance-and-gas-fee-paid-for-an-address_1#) API endpoint returns the Balance and the Gas Fee burnt for a particular address after the latest Gas Fee Burn Event. We are tracking the Gas Burn Event causing Balance Update by appliying condition on `BalanceChangeReasonCode` to be equal to `6`. query MyQuery { EVM(network: eth) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 6}, Address: {is: "0x18bb896994283bd9c16aa2072777a97c12f1b290"}}} limit: {count: 1} orderBy: {descending: Block_Time} ) { Block{ Time } TokenBalance { PreBalance PreBalanceInUSD PostBalance PostBalanceInUSD } fee_paid: calculate( expression: "$TokenBalance_PreBalance - $TokenBalance_PostBalance" ) fee_paid_usd: calculate( expression: "$TokenBalance_PreBalanceInUSD - $TokenBalance_PostBalanceInUSD" ) } }} Track the Balance after Latest Gas Fee Burn for Multiple Addresses[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#track-the-balance-after-latest-gas-fee-burn-for-multiple-addresses "Direct link to Track the Balance after Latest Gas Fee Burn for Multiple Addresses") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Latest-balance-and-gas-fee-paid-for-multiple-addresses) API endpoint returns the Balance and the Gas Fee burnt for a list of addresses after the latest Gas Fee Burn Event. query MyQuery { EVM(network: eth) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 6}, Address: {in: ["0x18bb896994283bd9c16aa2072777a97c12f1b290", "0xdadb0d80178819f2319190d340ce9a924f783711"]}}} limitBy: {by: TokenBalance_Address count: 1} orderBy: {descending: Block_Time} ) { Block{ Time } TokenBalance { PreBalance PreBalanceInUSD PostBalance PostBalanceInUSD } fee_paid: calculate( expression: "$TokenBalance_PreBalance - $TokenBalance_PostBalance" ) fee_paid_usd: calculate( expression: "$TokenBalance_PreBalanceInUSD - $TokenBalance_PostBalanceInUSD" ) } }} Monitoring Balance after Latest Gas Fee Burn[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#monitoring-balance-after-latest-gas-fee-burn "Direct link to Monitoring Balance after Latest Gas Fee Burn") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Monitor-balance-and-gas-fee-paid-for-an-address-using-stream_1) stream returns the Balance and the Gas Fee burnt for a particular address in real time. subscription { EVM(network: eth) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 6}, Address: {is: "0x18bb896994283bd9c16aa2072777a97c12f1b290"}}} ) { Block{ Time } TokenBalance { PreBalance PreBalanceInUSD PostBalance PostBalanceInUSD } fee_paid: calculate( expression: "$TokenBalance_PreBalance - $TokenBalance_PostBalance" ) fee_paid_usd: calculate( expression: "$TokenBalance_PreBalanceInUSD - $TokenBalance_PostBalanceInUSD" ) } }} Monitoring Balance after Latest Gas Fee Burn for Multiple Addresses[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#monitoring-balance-after-latest-gas-fee-burn-for-multiple-addresses "Direct link to Monitoring Balance after Latest Gas Fee Burn for Multiple Addresses") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Monitor-balance-and-gas-fee-paid-for-multiple-addresses--stream_1) stream returns the Balance and the Gas Fee burnt for a list of addresses in real time. query MyQuery { EVM(network: eth) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 6}, Address: {in: ["0x18bb896994283bd9c16aa2072777a97c12f1b290", "0xdadb0d80178819f2319190d340ce9a924f783711"]}}} limitBy: {by: TokenBalance_Address count: 1} orderBy: {descending: Block_Time} ) { Block{ Time } TokenBalance { PreBalance PreBalanceInUSD PostBalance PostBalanceInUSD } fee_paid: calculate( expression: "$TokenBalance_PreBalance - $TokenBalance_PostBalance" ) fee_paid_usd: calculate( expression: "$TokenBalance_PreBalanceInUSD - $TokenBalance_PostBalanceInUSD" ) } }} Track the Balance after Latest Gas Return[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#track-the-balance-after-latest-gas-return "Direct link to Track the Balance after Latest Gas Return") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Latest-balance-after-unused-gas-fee-returned--for-an-address#) API endpoint returns the Balance and the Gas Returned for a particular address after the latest Gas Return Event. We are tracking the Gas Return Event causing Balance Update by appliying condition on `BalanceChangeReasonCode` to be equal to `7`. query MyQuery { EVM(network: eth) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 7}, Address: {is: "0x18bb896994283bd9c16aa2072777a97c12f1b290"}}} limit: {count: 1} orderBy: {descending: Block_Time} ) { Block{ Time } TokenBalance { PreBalance PreBalanceInUSD PostBalance PostBalanceInUSD } fee_paid: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) fee_paid_usd: calculate( expression: "$TokenBalance_PostBalanceInUSD - $TokenBalance_PreBalanceInUSD" ) } }} Track the Balance after Latest Gas Return for Multiple Addresses[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#track-the-balance-after-latest-gas-return-for-multiple-addresses "Direct link to Track the Balance after Latest Gas Return for Multiple Addresses") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Latest-balance-after-unused-gas-fee-returned--for-multiple-addresses#) API endpoint returns the Balance and the Gas Returned for a list of addresses after the latest Gas Return Event. query MyQuery { EVM(network: eth) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 7}, Address: {in: ["0x18bb896994283bd9c16aa2072777a97c12f1b290", "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97"]}}} limitBy: {by:TokenBalance_Address count: 1} orderBy: {descending: Block_Time} ) { Block{ Time } TokenBalance { PreBalance PreBalanceInUSD PostBalance PostBalanceInUSD } fee_paid: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) fee_paid_usd: calculate( expression: "$TokenBalance_PostBalanceInUSD - $TokenBalance_PreBalanceInUSD" ) } }} Monitoring Balance after Latest Gas Return[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#monitoring-balance-after-latest-gas-return "Direct link to Monitoring Balance after Latest Gas Return") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Monitor-balance-after-unused-gas-fee-returned--for-an-address--stream#) stream returns the Balance and the Gas Returned for a particular address in real time. subscription { EVM(network: eth) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 7}, Address: {is: "0x18bb896994283bd9c16aa2072777a97c12f1b290"}}} limit: {count: 1} orderBy: {descending: Block_Time} ) { Block{ Time } TokenBalance { PreBalance PreBalanceInUSD PostBalance PostBalanceInUSD } fee_paid: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) fee_paid_usd: calculate( expression: "$TokenBalance_PostBalanceInUSD - $TokenBalance_PreBalanceInUSD" ) } }} Monitoring Balance after Latest Gas Return for Multiple Addresses[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#monitoring-balance-after-latest-gas-return-for-multiple-addresses "Direct link to Monitoring Balance after Latest Gas Return for Multiple Addresses") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/Monitor-balance-after-unused-gas-fee-returned--for-multiple-addresses--stream#) stream returns the Balance and the Gas Returned for a list of addresses in real time. subscription { EVM(network: eth) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 7}, Address: {in: ["0x18bb896994283bd9c16aa2072777a97c12f1b290", "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97"]}}} ) { Block{ Time } TokenBalance { PreBalance PreBalanceInUSD PostBalance PostBalanceInUSD } fee_paid: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) fee_paid_usd: calculate( expression: "$TokenBalance_PostBalanceInUSD - $TokenBalance_PreBalanceInUSD" ) } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Top Gas Fee Collectors](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#get-top-gas-fee-collectors) * [Track the Balance after Latest Gas Fee Burn](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#track-the-balance-after-latest-gas-fee-burn) * [Track the Balance after Latest Gas Fee Burn for Multiple Addresses](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#track-the-balance-after-latest-gas-fee-burn-for-multiple-addresses) * [Monitoring Balance after Latest Gas Fee Burn](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#monitoring-balance-after-latest-gas-fee-burn) * [Monitoring Balance after Latest Gas Fee Burn for Multiple Addresses](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#monitoring-balance-after-latest-gas-fee-burn-for-multiple-addresses) * [Track the Balance after Latest Gas Return](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#track-the-balance-after-latest-gas-return) * [Track the Balance after Latest Gas Return for Multiple Addresses](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#track-the-balance-after-latest-gas-return-for-multiple-addresses) * [Monitoring Balance after Latest Gas Return](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#monitoring-balance-after-latest-gas-return) * [Monitoring Balance after Latest Gas Return for Multiple Addresses](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-gas-balance-tracker/#monitoring-balance-after-latest-gas-return-for-multiple-addresses) --- # Ethereum Validator Balance Tracker | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Ethereum Validator Balance Tracker API provides real-time balance updates for Ethereum validators, tracking their staking rewards, withdrawals, and balance changes. For a sample application, see the [Validators Rewards Tax Calculator](https://docs.bitquery.io/crypto-reward-tax-calculator) . Track Validator Balance Updates[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#track-validator-balance-updates "Direct link to Track Validator Balance Updates") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor balance changes for Ethereum validators, including staking rewards and withdrawals from the beacon chain. Try the API [here](https://ide.bitquery.io/Track-Validator-Balance-Updates) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 3 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} **Note:** BalanceChangeReasonCode 3 corresponds to `BalanceIncreaseWithdrawal` - ETH withdrawn from the beacon chain. Track Validator Rewards[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#track-validator-rewards "Direct link to Track Validator Rewards") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track validator rewards and balance increases from staking activities. Try the API [here](https://ide.bitquery.io/Track-Validator-Rewards) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [2, 5] } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} **Balance Change Reason Codes for Validators:** * **Code 2**: `BalanceIncreaseRewardMineBlock` - Reward for mining a block * **Code 3**: `BalanceIncreaseWithdrawal` - ETH withdrawn from the beacon chain * **Code 5**: `BalanceIncreaseRewardTransactionFee` - Transaction tip increasing block builder's balance Filter by Validator Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#filter-by-validator-address "Direct link to Filter by Validator Address") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track balance changes for a specific validator address: Try the API [here](https://ide.bitquery.io/Filter-by-Validator-Address) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { Address: { is: "0xValidatorAddressHere" } BalanceChangeReasonCode: { in: [2, 3, 5] } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Top Validators by Total Tips earned in last 24 hrs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#top-validators-by-total-tips-earned-in-last-24-hrs "Direct link to Top Validators by Total Tips earned in last 24 hrs") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Ranks validators by cumulative priority fees (reason code 5) received in the last 24 hours. Test the query [here](https://ide.bitquery.io/top-validators-by-total-tips-in-last-24-hrs#) . query MyQuery { EVM(network: eth, dataset: realtime) { TransactionBalances( limit: { count: 10 } orderBy: { descendingByField: "Total_tip_native" } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { TokenBalance { Address BalanceChangeReasonCode Currency { Name Symbol SmartContract } } Post: sum(of: TokenBalance_PostBalance) Post_USD: sum(of: TokenBalance_PostBalanceInUSD) Pre: sum(of: TokenBalance_PreBalance) Pre_USD: sum(of: TokenBalance_PreBalanceInUSD) Total_tip_native: calculate(expression: "$Post - $Pre") Total_tip_usd: calculate(expression: "$Post_USD - $Pre_USD") number_of_tips: count } }} Total Tips earned by a Validator in last 24 hrs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#total-tips-earned-by-a-validator-in-last-24-hrs "Direct link to Total Tips earned by a Validator in last 24 hrs") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the total priority fees (native and USD) earned by a specific validator over the last 24 hours. Test the query [here](https://ide.bitquery.io/total-tips-received-by-a-validator-in-last-24-hrs#) . query MyQuery { EVM(network: eth, dataset: realtime) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } Address: { is: "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97" } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { TokenBalance { Address BalanceChangeReasonCode Currency { Name Symbol SmartContract } } Post: sum(of: TokenBalance_PostBalance) Post_USD: sum(of: TokenBalance_PostBalanceInUSD) Pre: sum(of: TokenBalance_PreBalance) Pre_USD: sum(of: TokenBalance_PreBalanceInUSD) Total_tip_native: calculate(expression: "$Post - $Pre") Total_tip_usd: calculate(expression: "$Post_USD - $Pre_USD") number_of_tips: count } }} Avg Tip in last 10 Blocks[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#avg-tip-in-last-10-blocks "Direct link to Avg Tip in last 10 Blocks") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Calculates the average tip for each of the last 10 blocks. Test the query [here](https://ide.bitquery.io/last-10-blocks-avg-tip-in-native-eth_3) . query MyQuery { EVM(network: eth, dataset: realtime) { TransactionBalances( limit: { count: 10 } orderBy: { descending: Block_Number } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Number } TokenBalance { BalanceChangeReasonCode Currency { Name Symbol SmartContract } } Post: sum(of: TokenBalance_PostBalance) Post_USD: sum(of: TokenBalance_PostBalanceInUSD) Pre: sum(of: TokenBalance_PreBalance) Pre_USD: sum(of: TokenBalance_PreBalanceInUSD) Total_tip_native: calculate(expression: "$Post - $Pre") Total_tip_usd: calculate(expression: "$Post_USD - $Pre_USD") number_of_tips: count avg_tip_in_this_block: calculate( expression: "$Total_tip_native / $number_of_tips" ) avg_tip_usd_in_this_block: calculate( expression: "$Total_tip_usd / $number_of_tips" ) } }} Avg Tip given in terms of Avg Gas Fees in last 10 blocks[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#avg-tip-given-in-terms-of-avg-gas-fees-in-last-10-blocks "Direct link to Avg Tip given in terms of Avg Gas Fees in last 10 blocks") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Compares average user tip to average total gas fee per block across the last 10 blocks. Test the query [here](https://ide.bitquery.io/Average-Tip-in-terms-of-avg-gas-Fee_4) . query MyQuery { EVM(network: eth, dataset: realtime) { TransactionBalances( limit: { count: 10 } orderBy: { descending: Block_Number } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Block { Number } TokenBalance { BalanceChangeReasonCode Currency { Name Symbol SmartContract } } avg_gasfees_in_this_block: average(of: Fee_SenderFee) Post: sum(of: TokenBalance_PostBalance) Post_USD: sum(of: TokenBalance_PostBalanceInUSD) Pre: sum(of: TokenBalance_PreBalance) Pre_USD: sum(of: TokenBalance_PreBalanceInUSD) Total_tip_native: calculate(expression: "$Post - $Pre") Total_tip_usd: calculate(expression: "$Post_USD - $Pre_USD") number_of_tips: count avg_tip_in_this_block: calculate( expression: "$Total_tip_native / $number_of_tips" ) avg_tip_usd_in_this_block: calculate( expression: "$Total_tip_usd / $number_of_tips" ) tip_in_terms_of_gasfees: calculate( expression: "( $avg_gasfees_in_this_block - $avg_tip_in_this_block ) / $avg_gasfees_in_this_block" ) } }} Video Tutorial[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#video-tutorial "Direct link to Video Tutorial") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track Validator Balance Updates](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#track-validator-balance-updates) * [Track Validator Rewards](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#track-validator-rewards) * [Filter by Validator Address](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#filter-by-validator-address) * [Top Validators by Total Tips earned in last 24 hrs](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#top-validators-by-total-tips-earned-in-last-24-hrs) * [Total Tips earned by a Validator in last 24 hrs](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#total-tips-earned-by-a-validator-in-last-24-hrs) * [Avg Tip in last 10 Blocks](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#avg-tip-in-last-10-blocks) * [Avg Tip given in terms of Avg Gas Fees in last 10 blocks](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#avg-tip-given-in-terms-of-avg-gas-fees-in-last-10-blocks) * [Video Tutorial](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-validator-balance-tracker/#video-tutorial) --- # BNB Chain Uniswap API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD This section provides you with a set of queries that provides an insight about the Uniswap DEX on BSC. Live Uniswap v3 Trades on BSC (Trading API — recommended)[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#live-uniswap-v3-trades-on-bsc-trading-api--recommended "Direct link to Live Uniswap v3 Trades on BSC (Trading API — recommended)") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This subscription streams every Uniswap v3 trade on BSC in real time with **USD price and USD amounts on every row**, MEV-filtered. Run it [in the IDE](https://ide.bitquery.io/Trading-API-Uniswap-v3-Trades-BSC) . subscription { Trading { Trades( where: {Pair: {Market: {Network: {is: "Binance Smart Chain"}, Protocol: {is: "uniswap_v3"}}}} ) { Block { Time } Price PriceInUsd AmountsInUsd { Base Quote } Trader { Address } Pair { Token { Symbol } QuoteToken { Symbol } Market { Protocol } } } }} Get Latest Trades on Uniswap v3[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-latest-trades-on-uniswap-v3 "Direct link to Get Latest Trades on Uniswap v3") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Below query will subscribe you to the latest DEX Trades on BSC Uniswap v3. Try out the API [here](https://ide.bitquery.io/uniswap-v3-trades-bsc) query MyQuery { EVM(dataset: realtime, network: bsc) { DEXTrades( where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v3"}}}} limit: {count: 10} orderBy:{descending:Block_Time} ) { Transaction { From To } Trade { Dex { ProtocolName SmartContract } Buy { Currency { Name } Price Amount } Sell { Amount Currency { Name } Price } } Block { Time } } }} Get Top Traders of a token on uniswap v3[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-top-traders-of-a-token-on-uniswap-v3 "Direct link to Get Top Traders of a token on uniswap v3") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query will fetch you top traders of a token for the selected network. You can test the query [here](https://ide.bitquery.io/top-traders-of-a-token-on-uniswapv3-bsc) . query topTraders($network: evm_network, $token: String) { EVM(network: $network) { DEXTradeByTokens( orderBy: {descendingByField: "volumeUsd"} limit: {count: 100} where: {Trade: {Currency: {SmartContract: {is: $token}}, Dex: {ProtocolName: {is: "uniswap_v3"}}}} ) { Trade { Dex { OwnerAddress ProtocolFamily ProtocolName } Buyer } bought: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: buy}}}}) sold: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}}) volume: sum(of: Trade_Amount) volumeUsd: sum(of: Trade_Side_AmountInUSD) } }}{ "network": "bsc", "token": "0x55d398326f99059ff775485246999027b3197955"} OHLC in USD of a Token[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#ohlc-in-usd-of-a-token "Direct link to OHLC in USD of a Token") -------------------------------------------------------------------------------------------------------------------------------------------------------- This query retrieves the Open, High, Low, and Close (OHLC) prices in USD for a specific token traded on Uniswap v3 over a defined time period and interval. You can try out the API [here](https://ide.bitquery.io/OHLC-on-BSC-Uniswap-v3) on Bitquery Playground. { EVM(network: bsc, dataset: realtime) { DEXTradeByTokens( orderBy: {descendingByField: "Block_testfield"} where: {Trade: {Currency: {SmartContract: {is: "0x55d398326f99059ff775485246999027b3197955"}}, PriceAsymmetry: {lt: 0.1}, Dex: {ProtocolName: {is: "uniswap_v3"}}, Side: {Currency: {SmartContract: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}}, Type: {is: buy}}}} limit: {count: 10} ) { Block { testfield: Time(interval: {in: hours, count: 1}) } volume: sum(of: Trade_Amount) Trade { high: Price(maximum: Trade_Price) low: Price(minimum: Trade_Price) open: Price(minimum: Block_Number) close: Price(maximum: Block_Number) } count } }} Get trading volume, buy volume, sell volume of a token[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-trading-volume-buy-volume-sell-volume-of-a-token "Direct link to Get trading volume, buy volume, sell volume of a token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This query fetches you the traded volume, buy volume and sell volume of a token `0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c`. Try out the API [here](https://ide.bitquery.io/trade_volume_bsc_uniswapv3) . query MyQuery { EVM(network: bsc) { DEXTradeByTokens( where: {Trade: {Currency: {SmartContract: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}}}, TransactionStatus: {Success: true}, Block: {Time: {since: "2025-02-12T00:00:00Z"}}} ) { Trade { Currency { Name Symbol SmartContract Decimals } } traded_volume_in_usd: sum(of: Trade_Side_AmountInUSD) sell_volume_in_usd: sum( of: Trade_Side_AmountInUSD if: {Trade: {Side: {Type: {is: buy}}}} ) buy_volume_in_usd: sum( of: Trade_Side_AmountInUSD if: {Trade: {Side: {Type: {is: sell}}}} ) } }} Get top bought tokens on uniswap v3[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-top-bought-tokens-on-uniswap-v3 "Direct link to Get top bought tokens on uniswap v3") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query will fetch you the top bought tokens on uniswap v3. Try out the query [here](https://ide.bitquery.io/top-bought-tokens-on-bsc-uniswap-v3) . query timeDiagram($network: evm_network) { EVM(network: $network) { DEXTradeByTokens( orderBy: {descendingByField: "buy"} limit: {count: 100} where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v3"}}}} ) { Trade { Currency { Symbol Name SmartContract } Dex{ ProtocolName } } buy: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}}) sell: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}}) } }}{ "network": "bsc"} Get top sold tokens on uniswap v3[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-top-sold-tokens-on-uniswap-v3 "Direct link to Get top sold tokens on uniswap v3") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query will fetch you the top bought tokens on uniswap v3. Try out the query [here](https://ide.bitquery.io/top-sold-tokens-on-bsc-uniswap-v3) . query timeDiagram($network: evm_network) { EVM(network: $network) { DEXTradeByTokens( orderBy: {descendingByField: "sell"} limit: {count: 100} where: {Trade: {Dex: {ProtocolName: {is: "uniswap_v3"}}}} ) { Trade { Currency { Symbol Name SmartContract } Dex{ ProtocolName } } buy: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}}) sell: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: sell}}}}) } }}{ "network": "bsc"} Get Metadata of a token[​](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-metadata-of-a-token "Direct link to Get Metadata of a token") ----------------------------------------------------------------------------------------------------------------------------------------------------------- Use the below query to get Token's metadata like `Name`, `symbol`, `SmartContract Address`, `Decimals`. Try out the API [here](https://ide.bitquery.io/get-metadata_1) in the Bitquery Playground. query MyQuery { EVM(network: bsc, dataset: realtime) { DEXTradeByTokens( limit: {count: 1} orderBy: {descending: Block_Time} where: {Trade: {Currency: {SmartContract: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}}, Dex: {ProtocolName: {is: "uniswap_v3"}}}} ) { Trade { Currency { Name Symbol SmartContract ProtocolName HasURI Fungible Decimals } } } }} Frequently Asked Questions -------------------------- How do I get Uniswap trades on BSC? Query EVM.DEXTrades with network bsc and filter Trade.Dex.ProtocolName for Uniswap versions on BNB Chain. Does this include Uniswap v3 on BSC? Yes — see v3 pool and trade examples on this page. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Live Uniswap v3 Trades on BSC (Trading API — recommended)](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#live-uniswap-v3-trades-on-bsc-trading-api--recommended) * [Get Latest Trades on Uniswap v3](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-latest-trades-on-uniswap-v3) * [Get Top Traders of a token on uniswap v3](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-top-traders-of-a-token-on-uniswap-v3) * [OHLC in USD of a Token](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#ohlc-in-usd-of-a-token) * [Get trading volume, buy volume, sell volume of a token](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-trading-volume-buy-volume-sell-volume-of-a-token) * [Get top bought tokens on uniswap v3](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-top-bought-tokens-on-uniswap-v3) * [Get top sold tokens on uniswap v3](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-top-sold-tokens-on-uniswap-v3) * [Get Metadata of a token](https://docs.bitquery.io/docs/blockchain/BSC/bsc-uniswap-api/#get-metadata-of-a-token) --- # Crypto Coin Ticker API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/crypto-coin-ticker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD You can build your crypto coin ticker using our [DEX APIs](https://bitquery.io/products/dex) based on the requirements of the data field. For pre-aggregated price data with OHLC, consider using our [Crypto Price API](https://docs.bitquery.io/docs/trading/crypto-price-api/) . For **per-swap ticks**, see the **[Crypto Trades API](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) **. Using Crypto price API[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/crypto-coin-ticker/#using-crypto-price-api "Direct link to Using Crypto price API") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- For a **live ticker**, use the **[Crypto Price API](https://docs.bitquery.io/docs/trading/crypto-price-api/) ** stream. [Open the 1-second price stream in the IDE](https://ide.bitquery.io/1-second-crypto-price-stream) . > Note: A `Volume: {Usd: {gt: 5}}` filter is applied to remove extreme outliers; the price stream already pre-filters outliers—this is an additional check. subscription { Trading { Tokens( where: { Interval: { Time: { Duration: { eq: 1 } } } Volume: { Usd: { gt: 5 } } } ) { Token { Address Id IsNative Name Network Symbol TokenId } Block { Date Time Timestamp } Interval { Time { Start Duration End } } Volume { Base Quote Usd } Supply { MarketCap FullyDilutedValuationUsd CirculatingSupply TotalSupply MaxSupply } Price { IsQuotedInUsd Ohlc { Close High Low Open } Average { ExponentialMoving Mean SimpleMoving WeightedSimpleMoving } } } }} OHLC ticker from DEXTradeByTokens[​](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/crypto-coin-ticker/#ohlc-ticker-from-dextradebytokens "Direct link to OHLC ticker from DEXTradeByTokens") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Open this API on our [GraphQL IDE](https://ide.bitquery.io/Coin-ticker-api_4) . { EVM(dataset: realtime) { DEXTradeByTokens( orderBy: {descendingByField: "Block_Timefield"} where: {Trade: {Side: {Currency: {SmartContract: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}}}, Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, PriceAsymmetry: {lt: 0.1}}} ) { Block { Timefield: Time(interval: {in: minutes, count: 10}) lastTradeTime: Time(maximum: Block_Time) FirstTradeTime: Time(minimum: Block_Time) LastTradeBlock: Number(maximum: Block_Number) FirstTradeBlock: Number(minimum: Block_Number) } volume: sum(of: Trade_Amount) Trade { Currency { Name Symbol } Side { Currency { Name Symbol } } high: Price(maximum: Trade_Price) low: Price(minimum: Trade_Price) open: Price(minimum: Block_Number) close: Price(maximum: Block_Number) } count } }} We are getting OHLC (Open High Low Close) data, with the last trade details on 10-minute intervals. You can change this interval like the following. * Time(interval: {in: minutes, count: 5}) * Time(interval: {in: seconds, count: 10}) * Time(interval: {in: hours, count: 3}) * Time(interval: {in: days, count: 14}) * Time(interval: {in: weeks, count: 3}) * Time(interval: {in: months, count: 1}) * Time(interval: {in: years, count: 2}) You can also add additional information if you want; there are many more fields available. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Using Crypto price API](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/crypto-coin-ticker/#using-crypto-price-api) * [OHLC ticker from DEXTradeByTokens](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/crypto-coin-ticker/#ohlc-ticker-from-dextradebytokens) --- # eth_getTransactionReceipt | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionReceipt/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section, we will build an alternative to the eth\_getTransactionReceipt JSON RPC method using the Bitquery APIs. The method is used to provide the receipt of a transaction given `transaction hash`. Note that the receipt is not available for pending transactions. Get Transaction Receipt[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionReceipt/#get-transaction-receipt "Direct link to Get Transaction Receipt") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- We can get the receipt of a transaction using the transaction hash, `0x4fe59dcf4f834f17acdcd0f244538c119523009ce47817ccd56423404ba34ffa` for this example, using [this](https://ide.bitquery.io/eth_getTransactionReceipt_1) API given below. { EVM { Transactions( where: { Transaction: { Hash: { is: "0x4fe59dcf4f834f17acdcd0f244538c119523009ce47817ccd56423404ba34ffa" } } } ) { Block { Hash Number } Transaction { From GasPrice Hash Index To } Receipt { ContractAddress CumulativeGasUsed GasUsed Status Type Bloom } } }} Response Received[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionReceipt/#response-received "Direct link to Response Received") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- The response of the above API is given below. { "EVM": { "Transactions": [ { "Block": { "Hash": "0x8b0d94963d1cb307ff0b83a60bb43bb53bf471a6644161eb882169c782ec5e5c", "Number": "20540273" }, "Receipt": { "Bloom": "0x0000000000000000000000000000000000000000000000000000000000000000000002000000040000000000000000000000000000000000000000000000000000020000000000000000000a000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000010000000000000000000000040000000000000000000008001000000000000000000000000000000000000000000000000000000000000000000002000000000000000002000000002000000000004000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000", "ContractAddress": "0x0000000000000000000000000000000000000000", "CumulativeGasUsed": "4656412", "GasUsed": "99510", "Status": "1", "Type": 0 }, "Transaction": { "From": "0xd2241065700f763d0390725d00bfd3fbef0b525e", "GasPrice": "0.000000005000000000", "Hash": "0x4fe59dcf4f834f17acdcd0f244538c119523009ce47817ccd56423404ba34ffa", "Index": "24", "To": "0xbb3f21dd9b16741e9822392f753d07da4c6b6cd6" } } ] }} Now, you may note that unlike the JSON RPC method, this API does'nt return any `log` object. However, if that is something you might need then checkout the following page for [eth\_getLogs](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getLogs/) . Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Transaction Receipt](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionReceipt/#get-transaction-receipt) * [Response Received](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getTransactionReceipt/#response-received) --- # Ethereum Eth Subscribe | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_subscribe/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Ethereum Subscription API allows developers to build websockets that receive real-time notifications about the Ethereum blockchain. In this section we will see how to create subscription for each eth\_subscribe JSON RPC method and how to customize it to get data we need. eth\_subscribe(“pendingTransactions”)[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_subscribe/#eth_subscribependingtransactions "Direct link to eth_subscribe(“pendingTransactions”)") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- To subscribe to incoming pending transactions, use the below subscription. You can run it [here](https://ide.bitquery.io/eth_subscribependingTransactions) subscription { EVM(mempool: true) { Transactions { Transaction { CostInUSD Cost Data From Hash To Type ValueInUSD Value Time Index Gas } TransactionStatus { FaultError EndError Success } } }} eth\_subscribe("logs")[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_subscribe/#eth_subscribelogs "Direct link to eth_subscribe("logs")") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- You can subscribe to all incoming logs filtered by any of the fields including method signature, tx value,sender , receiver and so on. In the below example we are tracking only logs where the method name is `transfer`. You can run it [here](https://ide.bitquery.io/eth_subscribelogs) subscription { EVM(mempool: true) { Events(where: {Log: {Signature: {Name: {is: "Transfer"}}}}) { Log { SmartContract Signature { Name Signature } } Block { Number Hash Time } Transaction { Hash From ValueInUSD Value To Type } LogHeader { Data Address Index Removed } } }} eth\_subscribe("newBlockHeaders")[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_subscribe/#eth_subscribenewblockheaders "Direct link to eth_subscribe("newBlockHeaders")") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- You can subscribe to new blocks as they arrive in real-time. This includes information about the new block, such as its block number, hash,transaction count and timestamp. subscription { EVM { Blocks { Block { Number ParentHash Hash TxCount Time } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [eth\_subscribe(“pendingTransactions”)](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_subscribe/#eth_subscribependingtransactions) * [eth\_subscribe("logs")](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_subscribe/#eth_subscribelogs) * [eth\_subscribe("newBlockHeaders")](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_subscribe/#eth_subscribenewblockheaders) --- # Ethereum Eth Getcode | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getCode/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) Copy MD In this section we will build a query that serves as an alternative to the eth\_getCode JSON RPC method. However unlike the method that requires two arameters, namely `address` and `block number`, this API only needs an `address`. The [below](https://ide.bitquery.io/eth_getCode) query serves as the alternative API to the method, with address as `0xc923D39fA2d97fb4B660Fc66DAdB1421605975E0`. { EVM(dataset: archive, network: eth) { creates: Calls( where: { Call: { To: { is: "0xc923D39fA2d97fb4B660Fc66DAdB1421605975E0" }, Create: true } } ) { Call { Output } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) --- # eth_getBlockReceipts | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getBlockReceipts/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD In this section we will build an API that serves as an alternative to the eth\_getBlockReceipts JSON RPC method that takes `Block Number` as an input and returns all transaction receipts for the given block. Get Block Receipts[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getBlockReceipts/#get-block-receipts "Direct link to Get Block Receipts") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/eth_getBlockReceipt) query serves as an alternative to the eth\_getBlockReceipts method with `Block Number` as `20525804`. query MyQuery { EVM { Transactions(where: {Block: {Number: {eq: "20525804"}}}) { Block { Hash Number } Transaction { From To Hash Index } Receipt { ContractAddress CumulativeGasUsed GasUsed Status Type } } }} The above API returns the following output. { "EVM": { "Transactions": [ { "Block": { "Hash": "0x399bf82bde7d84d36f9deb7e7ddb5f2b11b6d454960f3a6243ec51d50ccd4300", "Number": "20525804" }, "Receipt": { "ContractAddress": "0x0000000000000000000000000000000000000000", "CumulativeGasUsed": "4227373", "GasUsed": "27329", "Status": "1", "Type": 2 }, "Transaction": { "From": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5", "Gas": "27329", "Hash": "0xcc9ce436a02e8a4b44546affebe036fdd54b70c27ea3c2df18c0a1ed78ec9fbe", "Index": "23", "To": "0x1876207dbfd106372d289d06e89cb75a4ff40231" } }, { "Block": { "Hash": "0x399bf82bde7d84d36f9deb7e7ddb5f2b11b6d454960f3a6243ec51d50ccd4300", "Number": "20525804" }, "Receipt": { "ContractAddress": "0x0000000000000000000000000000000000000000", "CumulativeGasUsed": "4273342", "GasUsed": "45969", "Status": "0", "Type": 2 }, "Transaction": { "From": "0xffdfafbe24182f0cb5da28905aeb4109ef97d536", "Gas": "2000000", "Hash": "0xe255e765b5acec3f3c07d0294454e75f25f0c939d8a983f0832169aefaaf481f", "Index": "24", "To": "0xc7e9f886639beeba04c135abeb96365c01969552" } }, ] }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Block Receipts](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_getBlockReceipts/#get-block-receipts) --- # Ethereum Eth Getbalance API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth-getbalance/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Ethereum getBalance is an API endpoint that retrieves the balance for a particular address for any given currency on the Ethereum blockchain. In this section we will see how to create queries that serves as an alternative for the eth\_getBalance JSON RPC method and how to customize it to get data we need. eth\_getBalance for One Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth-getbalance/#eth_getbalance-for-one-address "Direct link to eth_getBalance for One Address") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Get balance for all currencies[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth-getbalance/#get-balance-for-all-currencies "Direct link to Get balance for all currencies") [Run in IDE](https://ide.bitquery.io/ethereum-balances-address) query { EVM(network: eth, dataset: combined) { Balances( where: { Balance: { Address: { is: "0x21a31ee1afc51d94c2efccaa2092ad1028285549" } } } ) { Currency { Name Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD } } }} ### Get balance for one currency[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth-getbalance/#get-balance-for-one-currency "Direct link to Get balance for one currency") [Run in IDE](https://ide.bitquery.io/ethereum-balances-native-eth) Returns the balance for native ETH (`SmartContract: "0x"`). query { EVM(network: eth, dataset: combined) { Balances( where: { Balance: { Address: { is: "0x21a31ee1afc51d94c2efccaa2092ad1028285549" } } Currency: { SmartContract: { is: "0x" } } } ) { Currency { Name Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD } } }} eth\_getBalance for Multiple Addresses[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth-getbalance/#eth_getbalance-for-multiple-addresses "Direct link to eth_getBalance for Multiple Addresses") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Query each address in the `in` list. [Run in IDE](https://ide.bitquery.io/ethereum-balances-multiple-addresses) query { EVM(network: eth, dataset: combined) { Balances( where: { Balance: { Address: { in: [ "0xD51a44d3FaE010294C616388b506AcdA1bfAAE46", "0x6d07d7bac25d9e836bbceb3ed5e2a910214de846", "0x354e9fa5c6ee7e6092158a8c1b203ccac932d66d" ] } } } ) { Currency { Name Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [eth\_getBalance for One Address](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth-getbalance/#eth_getbalance-for-one-address) * [Get balance for all currencies](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth-getbalance/#get-balance-for-all-currencies) * [Get balance for one currency](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth-getbalance/#get-balance-for-one-currency) * [eth\_getBalance for Multiple Addresses](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth-getbalance/#eth_getbalance-for-multiple-addresses) --- # Arbitrum Liquidity API: Pool Reserves and Liquidity Changes in Real Time [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The `DEXPoolEvents` cube under `EVM(network: arbitrum)` emits one row every time a pool's reserves change, whether by a swap, a deposit or a withdrawal. Each row carries the reserves of both tokens after the change, in token units and in USD, the spot price in both directions, the pool and its protocol, and the transaction that moved it. On Arbitrum the rows come from Uniswap v2, v3 and v4 pools and PancakeSwap v3 pools. Balancer, Curve, Fluid and DODO pools have their swaps in the [DEX trades API](https://docs.bitquery.io/docs/blockchain/Arbitrum/DexTrades/) but no reserve rows here, and Camelot is not indexed at all. The cube holds the recent realtime window only and has no archive dataset: to keep a history, record the stream. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The worked pool is the Uniswap v3 WETH/ARB pool, `0xc6f780497a95e246eb9449f5e4770916dcd6396a`, one of the busiest on the chain. Reserves of one pool now[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#reserves-of-one-pool-now "Direct link to Reserves of one pool now") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The newest rows for a pool. `AmountCurrencyA` and `AmountCurrencyB` are the reserves after each change, the `InUSD` twins price them, and `AtoBPrice` is how much of B one unit of A buys at the spot. Saved query [here](https://ide.bitquery.io/latest-liquidity-changes-of-a-specific-pool) . { EVM(network: arbitrum) { DEXPoolEvents( limit: { count: 10 } orderBy: { descending: Block_Time } where: { PoolEvent: { Pool: { SmartContract: { is: "0xc6f780497a95e246eb9449f5e4770916dcd6396a" } } } } ) { Block { Time Number } PoolEvent { AtoBPrice BtoAPrice Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } Pool { SmartContract CurrencyA { Symbol SmartContract } CurrencyB { Symbol SmartContract } } Dex { ProtocolName } } Transaction { Hash } } }} Stream one pool[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#stream-one-pool "Direct link to Stream one pool") ----------------------------------------------------------------------------------------------------------------------------------------------- The same filter as a subscription delivers a row on every reserve change, which for this pool means several per minute. Saved stream [here](https://ide.bitquery.io/realtime-liquidity-stream-of-a-specific-pool) . subscription { EVM(network: arbitrum) { DEXPoolEvents( where: { PoolEvent: { Pool: { SmartContract: { is: "0xc6f780497a95e246eb9449f5e4770916dcd6396a" } } } } ) { Block { Time Number } PoolEvent { AtoBPrice BtoAPrice Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } Pool { SmartContract CurrencyA { Symbol } CurrencyB { Symbol } } } Transaction { Hash } } }} Every Uniswap v4 pool on Arbitrum[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#every-uniswap-v4-pool-on-arbitrum "Direct link to Every Uniswap v4 pool on Arbitrum") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Filter on the protocol to follow a whole family of pools. Uniswap v4 keeps all pools inside one PoolManager contract, `0x360e68faccca8ca495c1b759fd9eee466db9fb32` on Arbitrum, so `Pool.SmartContract` is the same on every row and `Pool.PoolId` is the field that tells pools apart. For v2 and v3 pools `PoolId` is empty and `SmartContract` is the pool. Saved stream [here](https://ide.bitquery.io/latest-liquidity-changes-in-uniswap-v4-pools) . subscription { EVM(network: arbitrum) { DEXPoolEvents( where: { PoolEvent: { Dex: { ProtocolName: { is: "uniswap_v4" } } } } ) { Block { Time } PoolEvent { Pool { PoolId SmartContract CurrencyA { Symbol SmartContract } CurrencyB { Symbol SmartContract } } Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } AtoBPrice } Transaction { Hash } } }} Other protocol names that report on Arbitrum: `uniswap_v3`, `uniswap_v2` and `pancake_swap_v3`. Pools that hold a token, with their current reserves[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#pools-that-hold-a-token-with-their-current-reserves "Direct link to Pools that hold a token, with their current reserves") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `limitBy` on the pool address keeps the newest row per pool, so the result is the current state of every pool that had the token as `CurrencyA` and changed inside the window. Run it a second time with the token under `CurrencyB` to catch pools that list it second. The example is ARB, `0x912ce59144191c1204e64559fe8253a0e49e6548`; sort the rows by the USD reserve in your code to rank the pools. Saved query [here](https://ide.bitquery.io/realtime-liquidity-stream_1) . { EVM(network: arbitrum) { DEXPoolEvents( limit: { count: 20 } limitBy: { by: PoolEvent_Pool_SmartContract, count: 1 } orderBy: { descending: Block_Time } where: { PoolEvent: { Pool: { CurrencyA: { SmartContract: { is: "0x912ce59144191c1204e64559fe8253a0e49e6548" } } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Block { Time } PoolEvent { Dex { ProtocolName } Pool { SmartContract PoolId CurrencyB { Symbol SmartContract } } Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } } } }} Fields on every row[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#fields-on-every-row "Direct link to Fields on every row") ----------------------------------------------------------------------------------------------------------------------------------------------------------- | Field | Meaning | | --- | --- | | `PoolEvent.Liquidity.AmountCurrencyA`, `AmountCurrencyB` | Reserves of each token after the change, in token units | | `AmountCurrencyAInUSD`, `AmountCurrencyBInUSD` | The same reserves priced in USD | | `PoolEvent.AtoBPrice`, `BtoAPrice` | Spot price in each direction after the change | | `PoolEvent.Pool.SmartContract`, `PoolId` | Pool contract; for Uniswap v4 the PoolManager plus the pool id | | `PoolEvent.Dex.ProtocolName` | `uniswap_v2`, `uniswap_v3`, `uniswap_v4` or `pancake_swap_v3` | | `Transaction.Hash` | The transaction that changed the reserves | The same data over Kafka[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#the-same-data-over-kafka "Direct link to The same data over Kafka") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `arbitrum.dexpools.proto` topic carries the same rows as protobuf messages with lower latency and no WebSocket to keep alive. Kafka needs its own credentials, separate from the IDE token; see the [Kafka streams hub](https://docs.bitquery.io/docs/category/kafka-streams/) . The slippage tables for the same pools are on the [Arbitrum slippage API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/) page. Frequently Asked Questions -------------------------- How do I get the reserves of a pool on Arbitrum? Query DEXPoolEvents under EVM(network: arbitrum) with the pool contract in PoolEvent.Pool.SmartContract, ordered by Block\_Time descending. The newest row holds both reserves in token units and USD plus the spot price. Which DEXs does the Arbitrum liquidity cube cover? Rows come from Uniswap v2, v3 and v4 pools and PancakeSwap v3 pools. Balancer, Curve, Fluid and DODO have swaps in the DEX trades cube but no reserve rows here, and Camelot is not indexed. How do I tell Uniswap v4 pools apart? All v4 pools share the PoolManager address 0x360e68faccca8ca495c1b759fd9eee466db9fb32, so filter and group on PoolEvent.Pool.PoolId instead of SmartContract. How far back does liquidity data go on Arbitrum? DEXPoolEvents keeps the recent realtime window only and has no archive dataset. Record the subscription or the Kafka topic to build a history. Does a liquidity row tell me whether it was a swap or a deposit? Not directly. Compare consecutive rows for the pool: a swap moves the two reserves in opposite directions, a deposit or withdrawal moves both the same way. The transaction hash links to the call for detail. Related pages[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#related-pages "Direct link to Related pages") ----------------------------------------------------------------------------------------------------------------------------------------- * [Arbitrum slippage API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/) * [Arbitrum DEX trades API](https://docs.bitquery.io/docs/blockchain/Arbitrum/DexTrades/) * [DEXPools cube](https://docs.bitquery.io/docs/cubes/evm-dexpool/) * [BNB Chain liquidity API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-liquidity-api/) * [Base liquidity API](https://docs.bitquery.io/docs/blockchain/Base/base-liquidity-api/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Reserves of one pool now](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#reserves-of-one-pool-now) * [Stream one pool](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#stream-one-pool) * [Every Uniswap v4 pool on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#every-uniswap-v4-pool-on-arbitrum) * [Pools that hold a token, with their current reserves](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#pools-that-hold-a-token-with-their-current-reserves) * [Fields on every row](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#fields-on-every-row) * [The same data over Kafka](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#the-same-data-over-kafka) * [Related pages](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/#related-pages) --- # Base Address Balance API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Deprecated APIs On EVM, **`BalanceUpdates`** and **`TokenHolders`** were deprecated as of **20 May 2026** and removed on **15 June 2026**. Use **`EVM.Balances`** (this page) and **[Token Holders API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/) ** (`EVM.Holders`) instead. The **Balances** API returns current and historical token balances for an address on Base. To return only non-zero balances, add `Amount(selectWhere: { gt: "0" })` on the `Balance` field (not in `where`). Use `dataset: combined` or `dataset: archive` as follows: | Dataset | When to use | | --- | --- | | **`combined`** | Latest balances. Queries **realtime and archive** databases and merges results. | | **`archive`** | Historical snapshots with `Block.Date`, and balances for **addresses not recently active**. | Examples: [All Token Balances](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-of-an-address) · [Native ETH (Base)](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#native-eth-base-balance) · [Balance on a Date](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-on-a-specific-date) · [Specific Token](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-for-a-specific-token) · [Holder Snapshot](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#token-holder-snapshot) Balance of an Address[​](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-of-an-address "Direct link to Balance of an Address") ----------------------------------------------------------------------------------------------------------------------------------------------------------- Returns token balances for a wallet address. Use `Amount(selectWhere: { gt: "0" })` to exclude zero balances. [Run in IDE](https://ide.bitquery.io/base-balances-address) { EVM(network: base, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xbaed383ede0e5d9d72430661f3285daa77e9439f" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) Address } } }} Native ETH (Base) Balance[​](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#native-eth-base-balance "Direct link to Native ETH (Base) Balance") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the native ETH balance for a wallet on Base (not ERC-20 tokens). Filter with `Currency: { Native: true }` instead of a token contract address. [Run in IDE](https://ide.bitquery.io/base-native-balances-address) { EVM(network: base, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xbaed383ede0e5d9d72430661f3285daa77e9439f" } } Currency: { Native: true } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) Address } } }} **Parameters** * `network: base`: Base mainnet. * `dataset: combined`: Merges realtime and archive data for the latest balance state. * `Balance.Address`: Wallet address to query. * `Currency.Native: true`: Native ETH on Base only (see [Native ETH (Base) Balance](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#native-eth-base-balance) ). **Returned fields** * `Currency.Symbol`, `Currency.SmartContract`: Token metadata. * `Balance.Amount`, `Balance.AmountInUSD`: Token balance and USD value (use `selectWhere` to filter non-zero amounts). Balance on a Specific Date[​](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-on-a-specific-date "Direct link to Balance on a Specific Date") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Use `Block.Date.till` for a point-in-time snapshot. Use `dataset: archive` for historical dates and addresses not recently active. [Run in IDE](https://ide.bitquery.io/base-balances-by-date) query { EVM(network: base, dataset: archive) { Balances( where: { Block: { Date: { till: "2026-05-01" } } Balance: { Address: { is: "0xbaed383ede0e5d9d72430661f3285daa77e9439f" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Balance for a Specific Token[​](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-for-a-specific-token "Direct link to Balance for a Specific Token") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add a `Currency.SmartContract` filter. Always use the contract address, not the token name. Use `0x` for native ETH on Base, or the ERC-20 contract address for a token. [Run in IDE](https://ide.bitquery.io/base-balances-specific-token) query { EVM(network: base, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xbaed383ede0e5d9d72430661f3285daa77e9439f" } } Currency: { SmartContract: { is: "0x09403da25c27024c7418fc942dda8ffa70bc7c62" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Token Holder Snapshot[​](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#token-holder-snapshot "Direct link to Token Holder Snapshot") ----------------------------------------------------------------------------------------------------------------------------------------------------------- The number of unique holders, token supply, and Gini coefficient for the balance amount before a specific timestamp can be derived using the query below. These stats provide a useful holder snapshot for any given time. [Run in IDE](https://ide.bitquery.io/token-holder-snapshot-base) Click to expand GraphQL query query MyQuery($network: evm_network!, $address: String!) { EVM(network: $network, dataset: combined) { Holders( where: {Currency: {SmartContract: {is: $address}}, Balance: {Amount: {gt: "0"}, LastChangeTime: {till: "2026-06-30T00:00:00Z"}}} ) { Balance { LastChangeTime(maximum: Balance_LastChangeTime) } holders: uniq(of: Holder_Address) supply: sum(of: Balance_Amount) gini(of: Balance_Amount) } }} { "network": "base", "address": "0x940181a94A35A4569E4529A3CDfB74e38FD98631"} Balance History by Date[​](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-history-by-date "Direct link to Balance History by Date") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns balance snapshots over time for an address. Use `dataset: archive`. Order by `Block_Date` descending and use `limit` to paginate. Add `Currency.SmartContract` under `Currency` to filter by a specific token. [Run in IDE](https://ide.bitquery.io/base-balances-history) query { EVM(network: base, dataset: archive) { Balances( where: { Balance: { Address: { is: "0xbaed383ede0e5d9d72430661f3285daa77e9439f" } } Currency: {} } orderBy: { descending: Block_Date } limit: { count: 100 } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD } Block { Date } } }} Wallet Balance for a Specific Token on a Date[​](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#wallet-balance-for-a-specific-token-on-a-date "Direct link to Wallet Balance for a Specific Token on a Date") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Get a wallet's balance for a specific token with `Balance.Address` and `Currency.SmartContract`. This example uses native ETH (`SmartContract: "0x"`) with `dataset: combined`. For a balance on a calendar date, use [Balance on a Specific Date](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-on-a-specific-date) with `dataset: archive` and `Block.Date.till`. [Run in IDE](https://ide.bitquery.io/base-wallet-balance-token-at-date) query { EVM(network: base, dataset: combined) { Balances( where: { Balance: { Address: { is: "0xbaed383ede0e5d9d72430661f3285daa77e9439f" } } Currency: { SmartContract: { is: "0x" } } } ) { Currency { Symbol SmartContract } Balance { Amount(selectWhere: { gt: "0" }) AmountInUSD Address } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Balance of an Address](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-of-an-address) * [Native ETH (Base) Balance](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#native-eth-base-balance) * [Balance on a Specific Date](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-on-a-specific-date) * [Balance for a Specific Token](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-for-a-specific-token) * [Token Holder Snapshot](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#token-holder-snapshot) * [Balance History by Date](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#balance-history-by-date) * [Wallet Balance for a Specific Token on a Date](https://docs.bitquery.io/docs/blockchain/Base/base-balance-updates/#wallet-balance-for-a-specific-token-on-a-date) --- # Ethereum NFT Collection API: Token List, Holders and Transfers [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD An NFT collection is one contract, and two Bitquery cubes describe it. `Transfers` on the archive dataset holds every mint and transfer of every token id since the contract was deployed, which gives you the full token list with each token's metadata URI. `Holders` holds the current owners, ranked by how many tokens of the collection each address holds, without you aggregating transfers yourself. Both examples use the Bored Ape Yacht Club contract `0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d`; put any ERC-721 or ERC-1155 contract in its place. Every query runs in the [IDE](https://ide.bitquery.io/) on a free account. All token ids in a collection[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/#all-token-ids-in-a-collection "Direct link to All token ids in a collection") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Group the collection's transfers by token id on the `archive` dataset. Each row is one token, `count` is how many times it has moved, and `offset` pages through the whole collection in id order. For the current owner of one token, take its latest transfer with `Id` in the filter: the `Receiver` is the owner. Saved query [here](https://ide.bitquery.io/Get-all-NFTs-for-a-collection) . { EVM(dataset: archive, network: eth) { Transfers( where: {Transfer: {Currency: {SmartContract: {is: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"}}}} limit: {count: 1000, offset: 0} orderBy: {ascendingByField: "Transfer_Id"} ) { Transfer { Id } count } }} Holders of a collection, ranked[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/#holders-of-a-collection-ranked "Direct link to Holders of a collection, ranked") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `Holders` cube returns current balances per address for the collection contract, so the top rows are the largest holders. Add `date: "YYYY-MM-DD"` to see the holder set on a past day. { EVM(network: eth) { Holders( limit: { count: 100 } orderBy: { descending: Balance_Amount } where: { Currency: { SmartContract: { is: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" } } } ) { Holder { Address } Balance { Amount } } }} The older way, summing `BalanceUpdates` per address, is retired; the [Balances and Holders cubes](https://docs.bitquery.io/docs/cubes/balances-cube/) page maps each old query to its replacement. Transfer history and mints[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/#transfer-history-and-mints "Direct link to Transfer history and mints") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Plain rows come from the same filter without the grouping. Add the zero address as `Sender` to keep only mints, `Id` for one token, or a `Block.Time` window for a period; the example lists the first BAYC mints from the collection's launch weeks on the archive dataset. Change `query` to `subscription` and drop the dataset argument to stream new transfers of the collection as they happen. { EVM(dataset: archive, network: eth) { Transfers( where: { Transfer: { Currency: { SmartContract: { is: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" } } Sender: { is: "0x0000000000000000000000000000000000000000" } } Block: { Time: { since: "2021-04-01T00:00:00Z", till: "2021-05-31T00:00:00Z" } } } limit: { count: 20 } orderBy: { ascending: Block_Time } ) { Block { Time } Transfer { Id Receiver URI } Transaction { Hash } } }} Frequently Asked Questions -------------------------- How do I list every NFT in a collection? Group Transfers on the archive dataset by Transfer.Id with count, filtered by the collection contract, and page with limit and offset; each row is one token id. Plain transfer rows carry the URI for metadata. How do I get the holders of an NFT collection on Ethereum? Query the Holders cube with the collection contract in Currency.SmartContract and sort by Balance\_Amount. It returns current owners with their token counts; a date argument returns the owners on a past day. Does this work for ERC-1155 collections? Yes. Transfers carry the token id and amount for ERC-1155 as well, and Holders returns per-address balances, which can be larger than one for the same id. How do I get NFT metadata? The URI field on a transfer row is the token's metadata link, and Data holds on-chain metadata when the contract stores it. Fetch the URI yourself for the image and attributes. Can I do the same on other EVM chains? Yes. Change EVM(network: eth) to bsc, base, arbitrum, optimism, matic or robinhood; the Transfers and Holders cubes have the same fields on every EVM chain. Related pages[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/#related-pages "Direct link to Related pages") ----------------------------------------------------------------------------------------------------------------------------------------- * [Ethereum NFT API](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-api/) * [Balances and Holders cubes](https://docs.bitquery.io/docs/cubes/balances-cube/) * [Transfers cube](https://docs.bitquery.io/docs/cubes/transfers-cube/) * [Optimism NFT API](https://docs.bitquery.io/docs/blockchain/Optimism/optimism-nft/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [All token ids in a collection](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/#all-token-ids-in-a-collection) * [Holders of a collection, ranked](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/#holders-of-a-collection-ranked) * [Transfer history and mints](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/#transfer-history-and-mints) * [Related pages](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-collection-api/#related-pages) --- # Arbitrum API Documentation | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Arbitrum/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Unlock the full potential of Arbitrum with comprehensive blockchain data—from GMX perpetual trading analytics and DEX swaps to liquidity monitoring, slippage analysis, cross-chain bridge monitoring, and smart contract interactions. This complete guide delivers production-ready GraphQL APIs, real-time streaming data, and practical examples for tracking trades, balances, liquidity pools, slippage, events, and more across the Arbitrum ecosystem. Whether you're building DeFi dashboards, trading algorithms, or cross-chain applications, discover all the Arbitrum data solutions you need here. Need help crafting a query or subscription? Message us on [support](https://t.me/Bloxy_info) . What is the Bitquery Arbitrum API?[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#what-is-the-bitquery-arbitrum-api "Direct link to What is the Bitquery Arbitrum API?") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Building a trading app or DEX UI on Arbitrum? For **real-time trades and prices on Arbitrum** (and the last ~30 days), use the curated [**Trading cube**](https://docs.bitquery.io/docs/trading/trading-data-overview/) — [`Trading.Trades`](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) gives you clean, MEV-filtered swaps with **USD price, market cap, and supply on every row** across **9 chains in one API**. For **historical Arbitrum data older than ~30 days**, use the chain-level `DEXTrades` / `DEXTradeByTokens` APIs documented below. It's a GraphQL interface over curated, indexed Arbitrum data. Write powerful queries instead of building and maintaining your own indexer for the fastest L2 solution. What can you build with it?[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#what-can-you-build-with-it "Direct link to What can you build with it?") ----------------------------------------------------------------------------------------------------------------------------------------------------------- Track GMX perpetual positions, monitor DEX liquidity, pool reserves, slippage, and trading volumes, analyze cross-chain bridge flows, stream smart contract events, compute trading KPIs, and power real-time dashboards for the most active L2 ecosystem. How is it different from raw Arbitrum RPC?[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#how-is-it-different-from-raw-arbitrum-rpc "Direct link to How is it different from raw Arbitrum RPC?") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Feature | Arbitrum RPC | Bitquery Arbitrum API | | --- | --- | --- | | **Data Format** | Raw JSON-RPC responses | Pre-indexed, enriched GraphQL | | **Historical Data** | No built-in history | Full historical data since L2 | | **Analytics** | Manual aggregation required | Built-in joins, aggregations | | **Real-time** | Basic subscription support | Rich streaming with filtering | | **Use Case** | Transaction submission, node ops | Analytics, monitoring, trading | | **Infrastructure** | Run your own nodes | Fully managed, auto-scaling | WebSockets and Webhooks[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#websockets-and-webhooks "Direct link to WebSockets and Webhooks") ------------------------------------------------------------------------------------------------------------------------------------------------ Most queries can be turned into live streams by switching `query` to `subscription`, and consumed over WebSocket. See examples and code snippets [here](https://docs.bitquery.io/docs/subscriptions/websockets/) . DEX and Perp APIs[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#dex-and-perp-apis "Direct link to DEX and Perp APIs") ------------------------------------------------------------------------------------------------------------------------------ * [Arbitrum Dex Trades](https://docs.bitquery.io/docs/blockchain/Arbitrum/DexTrades/) * [GMX API](https://docs.bitquery.io/docs/blockchain/Arbitrum/gmx-api/) * [esGMX API](https://docs.bitquery.io/docs/blockchain/Arbitrum/esgmx-api/) Query and subscribe to perpetual trading data, DEX swaps, liquidity events, and trading analytics across Arbitrum's leading protocols. Arbitrum Slippage API[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#arbitrum-slippage-api "Direct link to Arbitrum Slippage API") ------------------------------------------------------------------------------------------------------------------------------------------ * [Arbitrum Slippage API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-slippage-api/) Get slippage and price impact data for Arbitrum DEX pools. Understand price impact and liquidity depth for token swaps, calculate maximum input amounts at different slippage tolerances, and monitor real-time slippage data across all DEX pools on Arbitrum. Arbitrum Liquidity API[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#arbitrum-liquidity-api "Direct link to Arbitrum Liquidity API") --------------------------------------------------------------------------------------------------------------------------------------------- * [Arbitrum Liquidity API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-liquidity-api/) Monitor real-time liquidity changes, track pool reserves, and analyze liquidity depth for token pairs on Arbitrum DEX pools. Track when liquidity is added or removed, monitor pool health and depth, and analyze liquidity patterns across different pools. Core Arbitrum APIs[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#core-arbitrum-apis "Direct link to Core Arbitrum APIs") --------------------------------------------------------------------------------------------------------------------------------- * [Blocks & Transactions](https://docs.bitquery.io/docs/blockchain/Arbitrum/Blocks_Transactions/) * [Smart Contract Calls](https://docs.bitquery.io/docs/blockchain/Arbitrum/Smart_Contract_Calls/) * [Smart Contract Events](https://docs.bitquery.io/docs/blockchain/Arbitrum/Smart_Contract_Events/) * [Balance API](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-balance-api/) Access comprehensive blockchain data including blocks, transactions, contract interactions, and real-time balance updates. Cross-chain[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#cross-chain "Direct link to Cross-chain") ------------------------------------------------------------------------------------------------------------ * [Arbitrum Cross Chain](https://docs.bitquery.io/docs/blockchain/Arbitrum/arbitrum-cross-chain/) Monitor cross-chain bridge activities, deposits, withdrawals, and asset flows between Arbitrum and other networks. Videos[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#videos "Direct link to Videos") --------------------------------------------------------------------------------------------- ### Video Tutorial | GMX and esGMX[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--gmx-and-esgmx "Direct link to Video Tutorial | GMX and esGMX") ### Video Tutorial | Across Bridge Deposits on Arbitrum[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--across-bridge-deposits-on-arbitrum "Direct link to Video Tutorial | Across Bridge Deposits on Arbitrum") ### Video Tutorial | Top Traders of a Token on Arbitrum[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--top-traders-of-a-token-on-arbitrum "Direct link to Video Tutorial | Top Traders of a Token on Arbitrum") ### Video Tutorial | Track Realtime DEXTrades of a Token on Arbitrum[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--track-realtime-dextrades-of-a-token-on-arbitrum "Direct link to Video Tutorial | Track Realtime DEXTrades of a Token on Arbitrum") ### Video Tutorial | OHLC Data of a Token Pair on Arbitrum[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--ohlc-data-of-a-token-pair-on-arbitrum "Direct link to Video Tutorial | OHLC Data of a Token Pair on Arbitrum") ### Video Tutorial | Top Bought & Top Sold Tokens on Arbitrum[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--top-bought--top-sold-tokens-on-arbitrum "Direct link to Video Tutorial | Top Bought & Top Sold Tokens on Arbitrum") More guides[​](https://docs.bitquery.io/docs/blockchain/Arbitrum/#more-guides "Direct link to More guides") ------------------------------------------------------------------------------------------------------------ * [Data Coverage & Retention](https://docs.bitquery.io/docs/graphql/data-coverage-retention/) — how far back this chain's data goes * [Common errors and what to do](https://docs.bitquery.io/docs/start/errors/) * [Plans, Points & Limits](https://docs.bitquery.io/docs/plans/how-billing-works/) * [First query in 5 minutes](https://docs.bitquery.io/docs/start/first-query/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [What is the Bitquery Arbitrum API?](https://docs.bitquery.io/docs/blockchain/Arbitrum/#what-is-the-bitquery-arbitrum-api) * [What can you build with it?](https://docs.bitquery.io/docs/blockchain/Arbitrum/#what-can-you-build-with-it) * [How is it different from raw Arbitrum RPC?](https://docs.bitquery.io/docs/blockchain/Arbitrum/#how-is-it-different-from-raw-arbitrum-rpc) * [WebSockets and Webhooks](https://docs.bitquery.io/docs/blockchain/Arbitrum/#websockets-and-webhooks) * [DEX and Perp APIs](https://docs.bitquery.io/docs/blockchain/Arbitrum/#dex-and-perp-apis) * [Arbitrum Slippage API](https://docs.bitquery.io/docs/blockchain/Arbitrum/#arbitrum-slippage-api) * [Arbitrum Liquidity API](https://docs.bitquery.io/docs/blockchain/Arbitrum/#arbitrum-liquidity-api) * [Core Arbitrum APIs](https://docs.bitquery.io/docs/blockchain/Arbitrum/#core-arbitrum-apis) * [Cross-chain](https://docs.bitquery.io/docs/blockchain/Arbitrum/#cross-chain) * [Videos](https://docs.bitquery.io/docs/blockchain/Arbitrum/#videos) * [Video Tutorial | GMX and esGMX](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--gmx-and-esgmx) * [Video Tutorial | Across Bridge Deposits on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--across-bridge-deposits-on-arbitrum) * [Video Tutorial | Top Traders of a Token on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--top-traders-of-a-token-on-arbitrum) * [Video Tutorial | Track Realtime DEXTrades of a Token on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--track-realtime-dextrades-of-a-token-on-arbitrum) * [Video Tutorial | OHLC Data of a Token Pair on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--ohlc-data-of-a-token-pair-on-arbitrum) * [Video Tutorial | Top Bought & Top Sold Tokens on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/#video-tutorial--top-bought--top-sold-tokens-on-arbitrum) * [More guides](https://docs.bitquery.io/docs/blockchain/Arbitrum/#more-guides) --- # Base Transfer Balance Tracker | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transfer-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The Base Transfer Balance Tracker API provides real-time balance updates for all addresses involved in Transfers on the Base blockchain, and provides option to filter out based on the direction of transfer you want to target. The Base Transfer Balance is tracked by marking the the `BalanceUpdateReason` equals `10`. note The queries covered this section are only valid for the Native Currency Transfer. Get Balance Info for an Address after Transfer[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transfer-balance-tracker/#get-balance-info-for-an-address-after-transfer "Direct link to Get Balance Info for an Address after Transfer") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [This](https://ide.bitquery.io/balance-update-from-transfer-for-an-address-base) query returns the Balance Info such as PreBalance, PostBalance, Balances in USD and transfer amount for a particular address after a transfer, irrespective of the direction of transfer. Click here to expand query MyQuery { EVM(network: base) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 10}, Address: {is: "0xYourAddressInput"}}} orderBy: {descending: Block_Time} limit: {count: 1} ) { Block { Time } TokenBalance { PostBalance PostBalanceInUSD PreBalance PreBalanceInUSD } amt: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) amt_usd: calculate( expression: "$TokenBalance_PostBalanceInUSD - $TokenBalance_PreBalanceInUSD" ) Transaction { From To } } }} Stream Balance Info for Transfer in Real Time[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transfer-balance-tracker/#stream-balance-info-for-transfer-in-real-time "Direct link to Stream Balance Info for Transfer in Real Time") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [This](https://ide.bitquery.io/balance-update-from-transfer-for-an-address--stream-base) subscription allows us to stream Balance Updates for an address due to transfer in Real Time. Click here to expand subscription { EVM(network: base) { TransactionBalances( where: {TokenBalance: {BalanceChangeReasonCode: {eq: 10}, Address: {is: "0xYourAddressInput"}}} ) { Block { Time } TokenBalance { PostBalance PostBalanceInUSD PreBalance PreBalanceInUSD } amt: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) amt_usd: calculate( expression: "$TokenBalance_PostBalanceInUSD - $TokenBalance_PreBalanceInUSD" ) Transaction { From To } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get Balance Info for an Address after Transfer](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transfer-balance-tracker/#get-balance-info-for-an-address-after-transfer) * [Stream Balance Info for Transfer in Real Time](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transfer-balance-tracker/#stream-balance-info-for-transfer-in-real-time) --- # Balances API Documentation | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD This section covers how to fetch balance-related data on Ethereum via **Bitquery GraphQL APIs** and **Streams**. To get started, [signup](https://account.bitquery.io/user/account) with Bitquery and get your [Access Token](https://account.bitquery.io/user/api_v2/access_tokens) by following [these](https://docs.bitquery.io/docs/authorization/how-to-generate/) steps. If you need help getting balance data, reach out to [support](https://t.me/Bloxy_info) . Modes Supported[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/#modes-supported "Direct link to Modes Supported") --------------------------------------------------------------------------------------------------------------------------------- * GraphQL API * GraphQL Stream * Kafka Stream Primary APIs[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/#primary-apis "Direct link to Primary APIs") ------------------------------------------------------------------------------------------------------------------------ | API | Documentation | Description | | --- | --- | --- | | **Balances** | [Address Balance API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/) | Current and historical token balances for wallet addresses (`EVM.Balances`). | | **Holders** | [Token Holders API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/) | Top holders, holder counts, and holder activity (`EVM.Holders`). | | **TransactionBalances** | [Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/) | Per-transaction balance updates with supply, market cap, reason codes, and streams (`EVM.TransactionBalances`). | What is the Balance API?[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/#what-is-the-balance-api "Direct link to What is the Balance API?") ----------------------------------------------------------------------------------------------------------------------------------------------------------- On Ethereum, use the **Balances** cube for address-level balances and the **Holders** cube for token holder lists and counts. Both support `dataset: combined` (realtime + archive) and `dataset: archive` (historical and inactive addresses). See the [Address Balance API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/) , [Token Holders API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/) , and [Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/) for queries and IDE examples. The [Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/) section also covers validator, miner, MEV, gas, NFT, and self-destruct balance tracking. When to Use Which API or Stream?[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/#when-to-use-which-api-or-stream "Direct link to When to Use Which API or Stream?") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Use Case | API/Stream | Description | | --- | --- | --- | | **Latest wallet balances** | [Balances API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-of-an-address) | Token balances for an address (`dataset: combined`; use `Amount(selectWhere: { gt: "0" })` for non-zero). | | **Balance on a date** | [Balances API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-on-a-specific-date) | Point-in-time snapshot with `Block.Date.till` (`dataset: archive`). | | **Wallet balance for one token on a date** | [Balances API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#wallet-balance-for-a-specific-token-on-a-date) | `Block.Date`, `limit: 1`, `orderBy: Block_Date`. | | **Balance history over time** | [Balances API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/balance-api/#balance-history-by-date) | Snapshots ordered by `Block_Date`. | | **Top token holders** | [Holders API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#top-holders-of-a-currency-current) | `orderBy: Balance_Amount`, `limit`. | | **Token holder count** | [Holders API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#token-holder-count-for-an-erc-20-token) | `uniq(of: Holder_Address)` with `dataset: combined`. | | **Holders above a threshold** | [Holders API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-holders/token-holder-api/#holder-count-with-balance-above-a-threshold) | `uniq` with `if: { Balance: { Amount: { gt: "..." } } } }`. | | **Token balance with supply and market cap** | [Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/) | `EVM.TransactionBalances` — post balance, supply, USD value per transaction. | | **Real-time balance change streams** | [Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/) | Subscribe to balance updates with reason codes. | | **Validator / miner / MEV balance tracking** | [Transaction Balance Tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/) | Specialized trackers for rewards and MEV. | Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Modes Supported](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/#modes-supported) * [Primary APIs](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/#primary-apis) * [What is the Balance API?](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/#what-is-the-balance-api) * [When to Use Which API or Stream?](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/#when-to-use-which-api-or-stream) --- # Ethereum Token Balance API: ERC-20 Balances, Supply and Market Cap [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Every transaction that moves an ERC-20 token writes one row per affected address into the `TransactionBalances` cube, with the balance after the transaction, its USD value, and the token's total supply and on-chain market cap at that moment. That makes the cube a balance API for any wallet that has been active recently: the newest row for a wallet and a token is its current balance. Token rows carry no reason code and no pre-balance; those belong to native ETH rows, covered on the [transaction balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/) . The cube holds the recent realtime window only, so a wallet that has not moved a token inside it has no row; for those use the [Balances cube](https://docs.bitquery.io/docs/cubes/balances-cube/) , which does not depend on recent activity. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The worked wallet is a busy one that moves stablecoins and meme tokens all day, `0x9642b23Ed1E01Df1092B92641051881a322F5D4E`, and the worked token is USDT, `0xdac17f958d2ee523a2206206994597c13d831ec7`. Balance of one token for one wallet[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#balance-of-one-token-for-one-wallet "Direct link to Balance of one token for one wallet") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Filter on the wallet and the token contract and take the newest row. Saved query [here](https://ide.bitquery.io/Get-Latest-Token-Balance-for-an-Address) . { EVM(network: eth) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0x9642b23Ed1E01Df1092B92641051881a322F5D4E" } Currency: { SmartContract: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" } } } } ) { Block { Time } TokenBalance { PostBalance PostBalanceInUSD Currency { Symbol Name SmartContract Decimals } } Transaction { Hash } } }} Every token a wallet holds[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#every-token-a-wallet-holds "Direct link to Every token a wallet holds") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `limitBy` on the token contract keeps the newest row per token, so one query returns the wallet's current balance in every token it moved inside the window, largest USD value first once you sort the rows. Saved query [here](https://ide.bitquery.io/Get-All-Token-Balances-for-an-Address) . { EVM(network: eth) { TransactionBalances( limit: { count: 50 } limitBy: { by: TokenBalance_Currency_SmartContract, count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0x9642b23Ed1E01Df1092B92641051881a322F5D4E" } Currency: { Native: false, Fungible: true } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Block { Time } TokenBalance { PostBalance PostBalanceInUSD Currency { Symbol SmartContract } } } }} Add `PostBalanceInUSD: { gt: "1000000" }` inside `TokenBalance` to keep only positions worth more than a million dollars, which is the saved [minimum balance](https://ide.bitquery.io/Filter-Tokens-by-Minimum-Balance) query. Several wallets at once[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#several-wallets-at-once "Direct link to Several wallets at once") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `in` takes a list of addresses; with the token fixed and `limitBy` on the address, the result is the latest USDT balance of each wallet in one call. Saved query [here](https://ide.bitquery.io/Get-Token-Balances-for-Multiple-Addresses) . { EVM(network: eth) { TransactionBalances( limitBy: { by: TokenBalance_Address, count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { in: [ "0x9642b23Ed1E01Df1092B92641051881a322F5D4E" "0xf977814e90da44bfa03b6295a0616a897441acec" ] } Currency: { SmartContract: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Block { Time } TokenBalance { Address PostBalance PostBalanceInUSD } } }} Balance history of one token[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#balance-history-of-one-token "Direct link to Balance history of one token") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Every row for the wallet and token, newest first, is the balance after each transaction that touched it. Saved query [here](https://ide.bitquery.io/Get-Token-Balance-History) . { EVM(network: eth) { TransactionBalances( limit: { count: 100 } orderBy: { descending: Block_Time } where: { TokenBalance: { Address: { is: "0x9642b23Ed1E01Df1092B92641051881a322F5D4E" } Currency: { SmartContract: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" } } } } ) { Block { Time Number } TokenBalance { PostBalance PostBalanceInUSD } Transaction { Hash } } }} Total supply and market cap of a token[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#total-supply-and-market-cap-of-a-token "Direct link to Total supply and market cap of a token") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Token rows carry `TotalSupply` and `TotalSupplyInUSD` as of that transaction, so the newest row for a token, from any wallet, is its current supply and on-chain market cap. Saved query [here](https://ide.bitquery.io/Get-Token-Total-Supply-and-Market-Cap) . { EVM(network: eth) { TransactionBalances( limit: { count: 1 } orderBy: { descending: Block_Time } where: { TokenBalance: { Currency: { SmartContract: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" } } } } ) { Block { Time } TokenBalance { Currency { Symbol Name } TotalSupply TotalSupplyInUSD } } }} Stream balance changes of a token[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#stream-balance-changes-of-a-token "Direct link to Stream balance changes of a token") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The token filter as a subscription delivers a row for every address whose USDT balance changes, as each transaction is indexed. Add the wallet to the filter to follow one holder. Saved stream [here](https://ide.bitquery.io/Track-Token-Balance-Changes-by-Transaction) . subscription { EVM(network: eth) { TransactionBalances( where: { TokenBalance: { Currency: { SmartContract: { is: "0xdac17f958d2ee523a2206206994597c13d831ec7" } } } } ) { Block { Time } TokenBalance { Address PostBalance PostBalanceInUSD } Transaction { Hash From To } } }} Frequently Asked Questions -------------------------- How do I get an ERC-20 balance for a wallet on Ethereum? Query TransactionBalances with the wallet in TokenBalance.Address and the token contract in Currency.SmartContract, ordered by Block\_Time descending with limit 1. PostBalance is the balance after the wallet's latest transaction in that token. What if the wallet has not moved the token recently? Then it has no row in the realtime window. Use the Balances cube, which returns the current balance of any address without depending on recent activity. Do token rows have a reason code or a pre-balance? No. Reason codes and PreBalance exist for native ETH rows only. Token rows carry PostBalance, its USD value and the token's total supply. How do I get a token's total supply and market cap? Take the newest TransactionBalances row for the token contract, from any address; TotalSupply and TotalSupplyInUSD on it are the supply and on-chain market cap at that transaction. Can I list every token a wallet holds? Within the realtime window, yes: filter the wallet, keep the newest row per token with limitBy on the token contract, and sort by PostBalanceInUSD. For a full holdings list use the Balances cube. Related pages[​](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * [Ethereum transaction balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-transaction-balance-tracker/) * [Ethereum NFT balance API](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/nft-balance-api/) * [Balances and Holders cubes](https://docs.bitquery.io/docs/cubes/balances-cube/) * [Ethereum token market cap API](https://docs.bitquery.io/docs/blockchain/Ethereum/token-supply/ethereum-token-marketcap-api/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Balance of one token for one wallet](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#balance-of-one-token-for-one-wallet) * [Every token a wallet holds](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#every-token-a-wallet-holds) * [Several wallets at once](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#several-wallets-at-once) * [Balance history of one token](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#balance-history-of-one-token) * [Total supply and market cap of a token](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#total-supply-and-market-cap-of-a-token) * [Stream balance changes of a token](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#stream-balance-changes-of-a-token) * [Related pages](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/token-balance-api/#related-pages) --- # Solana Raydium Cpmm API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Solana/raydium-cpmm-API/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Need real-time Raydium CPMM data or anything from the last ~30 days? For **real-time + last ~30 days**, use the [**Trading cube**](https://docs.bitquery.io/docs/trading/trading-data-overview/) — [`Trading.Trades`](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) gives you clean, MEV-filtered Raydium CPMM swaps with **USD price, market cap, and supply on every row** across **9 chains in one API**. Use this page when you need **historical Raydium CPMM data older than ~30 days**, raw per-swap detail, or call / event context. In this section we will see how to get data on Raydium CPMM trades in real-time. You can check out our [Pump Fun docs](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/) , [Raydium v4 docs](https://docs.bitquery.io/docs/blockchain/Solana/Solana-Raydium-DEX-API/) and [Raydium LaunchPad docs](https://docs.bitquery.io/docs/blockchain/Solana/launchpad-raydium/) too. note `Trade Side Account` field will not be available as aggregates in Archive and Combined Datasets Subscribe to Realtime CPMM Trades[​](https://docs.bitquery.io/docs/blockchain/Solana/raydium-cpmm-API/#subscribe-to-realtime-cpmm-trades "Direct link to Subscribe to Realtime CPMM Trades") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This query subscribes to real-time trades on the Raydium CPMM on the Solana blockchain by filtering using `{Program: {Address: {is: "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"}}}:`. You can run the query [here](https://ide.bitquery.io/CPMM-trades) . subscription MyQuery { Solana { DEXTrades( where: {Instruction: {Program: {Address: {is: "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"}}}, Transaction: {Result: {Success: true}}} ) { Instruction { Program { Method } } Trade { Buy { Amount Account { Address } Currency { Name Symbol MintAddress Decimals Fungible Uri } } Sell { Amount Account { Address } Currency { Name Symbol MintAddress Decimals Fungible Uri } } } Transaction { Signature } } }} Latest Pool Creation on Raydium CPMM[​](https://docs.bitquery.io/docs/blockchain/Solana/raydium-cpmm-API/#latest-pool-creation-on-raydium-cpmm "Direct link to Latest Pool Creation on Raydium CPMM") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The below query tracks latest pool creation on raydium CPMM. The `"Program": {"AccountNames"}` includes the order in which account addresses are mentioned in `Accounts` list. This includes `poolCreator`, token vaults (`tokenVault0`, `tokenVault1`) and token mints (`tokenMint0`, `tokenMint1`). The mint addresses for the tokens being used in the pool are listed for example `tokenMint1` and `tokenMint0` , indicating which tokens the CPMM will support. You can run the query [here](https://ide.bitquery.io/CPMM-pools-created_1) { Solana { Instructions( where: {Instruction: {Program: {Address: {is: "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK"}, Method: {is: "initialize"}}}, Transaction: {Result: {Success: true}}} limit: {count: 10} orderBy: {descending: Block_Time} ) { Instruction { Accounts { Address IsWritable Token { Mint Owner ProgramId } } Program { AccountNames Address Arguments { Value { ... on Solana_ABI_Json_Value_Arg { json } ... on Solana_ABI_Float_Value_Arg { float } ... on Solana_ABI_Boolean_Value_Arg { bool } ... on Solana_ABI_Bytes_Value_Arg { hex } ... on Solana_ABI_BigInt_Value_Arg { bigInteger } ... on Solana_ABI_Address_Value_Arg { address } ... on Solana_ABI_String_Value_Arg { string } ... on Solana_ABI_Integer_Value_Arg { integer } } Name } } } Transaction { Signature Signer } } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Subscribe to Realtime CPMM Trades](https://docs.bitquery.io/docs/blockchain/Solana/raydium-cpmm-API/#subscribe-to-realtime-cpmm-trades) * [Latest Pool Creation on Raydium CPMM](https://docs.bitquery.io/docs/blockchain/Solana/raydium-cpmm-API/#latest-pool-creation-on-raydium-cpmm) --- # Ethereum NFT Ownership API | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-ownership-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD `BalanceUpdates` sunsets 10 August 2026 Queries on this page that use **`BalanceUpdates`** will stop working on **10 August 2026**. Migrate to the **`Balances`** and **`Holders`** cubes, which return the current balance directly instead of summing deltas. See the [migration mapping](https://docs.bitquery.io/docs/cubes/balances-cube/#migrating-from-balanceupdates) for the query-by-query translation. The NFT Ownership API can be used to retrieve information about the ownership of a specific NFT ( Non-Fungible Token ) on the supported blockchain. For instance using this we can access the owners of an NFT including their addresses and associated metadata and also we can retrieve a list of the top holders of a particular NFT. Get NFT Owners[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-ownership-api/#get-nft-owners "Direct link to Get NFT Owners") ------------------------------------------------------------------------------------------------------------------------------------------- This query fetches the most recent owner of the NFT. The API leverages the BalanceUpdates method, which keeps track of all balance updates. Alternatively, you can achieve similar results by utilizing the Transfers API. query MyQuery { EVM(dataset: combined, network: eth) { BalanceUpdates( orderBy: { descending: Block_Time } limit: { count: 1 } where: { BalanceUpdate: { Id: { eq: "9996" } } Currency: { Fungible: false SmartContract: { is: "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" } } } ) { Currency { Name SmartContract } BalanceUpdate { Address Amount Id } Block { Number Date } } }} **Parameters** * `network` : This specifies the Ethereum network to use. * `dataset` : This specifies the dataset to use. In this case, the dataset is [combined](https://docs.bitquery.io/docs/graphql/dataset/combined/) . * `limit` : Specifies the maximum results to return. In this query, the limit is 1. * `orderBy` : Results are in descending order by Block\_Time. * `where` : This parameter allows you to filter the results based on specific conditions. In this case, the token ID is "9996" and the Currency is non-fungible, with the Smart Contract being `0x8a90cab2b38dba80c64b7734e58ee1db38b8992e`. **Returned Data** * `Currency` : Specifies the NFT currency. `Name` represents the currency name, and `SmartContract` contains its smart contract address. * `BalanceUpdate` : Contains the address of the NFT holder, along with the amount and ID of the token involved in the balance update. * `Block` : Includes the block number and date. You can find the graphql query [here](https://ide.bitquery.io/Who-owns-specific-NFT) . Top Holders of an NFT[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-ownership-api/#top-holders-of-an-nft "Direct link to Top Holders of an NFT") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Let's see an example showcasing the retrieval of the top 10 holders for a particular NFT, with their balances. **Migrated query** — use this. `BalanceUpdates` sunsets 10 August 2026. query MyQuery { EVM(dataset: combined, network: eth) { Balances( orderBy: { descending: Balance_Amount } limit: { count: 10 } where: { Currency: { SmartContract: { is: "0x7dD4F223D9155F412790D696Fa30923489d4Ad34" } } } ) { Balance { Address } Balance { Amount(selectWhere: { gt: "0" }) } } }} Old `BalanceUpdates` version (stops working 10 August 2026) query MyQuery { EVM(dataset: combined, network: eth) { BalanceUpdates( orderBy: { descendingByField: "Balance" } limit: { count: 10 } where: { Currency: { SmartContract: { is: "0x7dD4F223D9155F412790D696Fa30923489d4Ad34" } } } ) { BalanceUpdate { Address } Balance: sum(of: BalanceUpdate_Amount, selectWhere: { gt: "0" }) } }} In this query, you'll need to replace `0x7dD4F223D9155F412790D696Fa30923489d4Ad34` with the contract address of the NFT you'd like to retrieve top holders for. **Parameters** * `dataset` : Specifies combined dataset that includes both realtime & archive data. * `network` : Specifies that the Ethereum network is being queried. * `orderBy` : Orders the results based on the "Balance" field in descending order, meaning the holder with highest balance will appear first. * `limit` : Limits the number of results returned to 10. * `where` : It filters the query results based on the NFT smart contract address `0x7dD4F223D9155F412790D696Fa30923489d4Ad34` . `Currency: {SmartContract: {is: ""}}` specifies the filter for the smart contract address. **Returned Data** * `Balance` : Specifies the balance amount in the results. * `BalanceUpdate` : The `Address` field specifies the address who holds the NFT. You can find the graphql query [here](https://ide.bitquery.io/top-token-holders-of-Moonwalker-NFT) . Find NFT Creator Address[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-ownership-api/#find-nft-creator-address "Direct link to Find NFT Creator Address") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The creator of the NFT can be inferred from the sender of the first transfer. By setting, `Transfers(limit: {count: 1} orderBy: {ascending: Block_Time})` we fetch the earliest (first) transfer record based on block time. You can run the query [here](https://ide.bitquery.io/Fidenza-725) query MyQuery { EVM(dataset: archive) { Transfers( limit: {count: 1} orderBy: {ascending: Block_Time} where: {Transfer: {Currency: {SmartContract: {is: "0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270"}}, Id: {eq: "78000725"}}} ) { Block { Time } Transfer { Amount Currency { Symbol SmartContract ProtocolName Native Name HasURI Fungible DelegatedTo Delegated Decimals } Data Id Receiver Success Type } } }} Past (churned) holders of tokens[​](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-ownership-api/#past-churned-holders-of-tokens "Direct link to Past (churned) holders of tokens") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Check past (churned) token holders of a NFT token [using following query](https://ide.bitquery.io/past-token-holder-of-a-token_1) . { EVM(dataset: combined) { BalanceUpdates( limit: {count: 10} where: {Currency: {Fungible: false, SmartContract: {is: "0x364c828ee171616a39897688a831c2499ad972ec"}}} ) { BalanceUpdate { Address } Block { lastHoldingDate: Time( maximum: Block_Time if: {Currency: {SmartContract: {is: "0x364c828ee171616a39897688a831c2499ad972ec"}}} ) fistHoldingDate: Time( minimum: Block_Time if: {Currency: {SmartContract: {is: "0x364c828ee171616a39897688a831c2499ad972ec"}}} ) } sum(of: BalanceUpdate_Amount, selectWhere: {le: "0"}) } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Get NFT Owners](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-ownership-api/#get-nft-owners) * [Top Holders of an NFT](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-ownership-api/#top-holders-of-an-nft) * [Find NFT Creator Address](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-ownership-api/#find-nft-creator-address) * [Past (churned) holders of tokens](https://docs.bitquery.io/docs/blockchain/Ethereum/nft/nft-ownership-api/#past-churned-holders-of-tokens) --- # BSC MEV Balance Tracker: Priority Fees and Block Producer Income [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD MEV on BNB Chain leaves one clean trace in balance data: the fee a transaction pays to be included ahead of others. The `TransactionBalances` cube records that credit as a balance change with reason code 5, `BalanceIncreaseRewardTransactionFee`, with the balance before and after it, so the tip is the difference between the two. This page streams those credits, ranks the largest, follows what one bot pays and shows how the fees reach the validator that produced the block. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. The cube holds the recent realtime window only, so queries need a time filter and history has to be collected as it streams. Where the fee credit lands on BNB Chain[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#where-the-fee-credit-lands-on-bnb-chain "Direct link to Where the fee credit lands on BNB Chain") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- On Ethereum a code 5 credit goes to the block builder's own address. On BNB Chain it goes to one fixed address, `0xfffffffffffffffffffffffffffffffffffffffe`, the fee holder that the Parlia consensus uses as the coinbase while a block's transactions execute. At the end of the block the validator moves the collected fees into the ValidatorSet system contract, `0x0000000000000000000000000000000000001000`, with a system transaction whose `Value` is the block's fee income. Two consequences for your filters: * Every code 5 row carries the fee holder as `TokenBalance.Address`; the transaction that paid the tip is in `Transaction`. * Rows on the ValidatorSet contract with `Transaction.Value` above zero are one per block; `Transaction.From` is the validator that earned them. Stream every priority fee[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#stream-every-priority-fee "Direct link to Stream every priority fee") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `tip` field subtracts the balance before from the balance after, so each message carries the fee in BNB. Saved stream [here](https://ide.bitquery.io/Track-MEV-Related-Balance-Updates-bsc) . subscription { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Number Time } TokenBalance { Address PreBalance PostBalance Currency { Symbol } } Transaction { Hash From To GasPrice } tip: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) } }} Largest tips in the last ten minutes[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#largest-tips-in-the-last-ten-minutes "Direct link to Largest tips in the last ten minutes") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sort by the computed field to find the transactions that paid most for their position. `calculate` can only reference fields that are selected, so keep `PreBalance` and `PostBalance` in the query. Saved query [here](https://ide.bitquery.io/Track-Large-MEV-Transactions-bsc) . { EVM(network: bsc) { TransactionBalances( limit: { count: 20 } orderBy: { descendingByField: "tip" } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Time: { since_relative: { minutes_ago: 10 } } } } ) { Block { Number Time } TokenBalance { PreBalance PostBalance } Transaction { Hash From To GasPrice } tip: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) } }} What one bot pays[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#what-one-bot-pays "Direct link to What one bot pays") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Filter on `Transaction.From` to follow a single sender. The example address is a bot that pays some of the largest tips on the network; put any sender in its place. Saved query [here](https://ide.bitquery.io/Filter-by-MEV-Bot-or-Builder-Address-bsc) . { EVM(network: bsc) { TransactionBalances( limit: { count: 20 } orderBy: { descending: Block_Time } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Transaction: { From: { is: "0x4848489f0b2bedd788c696e2d79b6b69d7484848" } } Block: { Time: { since_relative: { hours_ago: 1 } } } } ) { Block { Number Time } TokenBalance { PreBalance PostBalance } Transaction { Hash To } tip: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) } }} Change `query` to `subscription` and drop `limit`, `orderBy` and the time filter to get an alert each time the address pays a tip. Fee income per block and per validator[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#fee-income-per-block-and-per-validator "Direct link to Fee income per block and per validator") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The validator's deposit into the ValidatorSet contract closes each block. `limitBy` on the transaction hash keeps one row per block, `Transaction.Value` is the block's fee income and `Transaction.From` is the validator. Saved query [here](https://ide.bitquery.io/Aggregate-MEV-Rewards-bsc) . { EVM(network: bsc) { TransactionBalances( limit: { count: 20 } limitBy: { by: Transaction_Hash, count: 1 } orderBy: { descending: Block_Number } where: { TokenBalance: { Address: { is: "0x0000000000000000000000000000000000001000" } Currency: { Native: true } } Transaction: { Value: { gt: "0" } } Block: { Time: { since_relative: { minutes_ago: 10 } } } } ) { Block { Number Time } Transaction { Hash From Value } } }} Group the same rows by `Transaction.From` with `uniq(of: Transaction_Hash)` to count the blocks each validator produced in the window; the [BSC miner balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/) shows that query. Frequently Asked Questions -------------------------- How do I detect MEV on BNB Chain with balance data? Filter TransactionBalances on reason code 5. Each row is a priority fee credited to the fee holder, and the difference between PostBalance and PreBalance is the tip the transaction paid; sort by that difference to find the transactions that paid most. Why does every code 5 row show the address 0xffff...fffe? BNB Chain credits transaction fees to a fixed fee holder while the block executes. The validator moves the total into the ValidatorSet contract at the end of the block, so per-block income appears on 0x...1000, not on the fee holder. How do I find which validator earned a block's fees? Query rows on the ValidatorSet contract 0x0000000000000000000000000000000000001000 with Transaction.Value above zero. Transaction.From is the validator and Value is the fee income of that block. Can I query MEV history on BNB Chain? TransactionBalances holds the recent realtime window only; there is no archive dataset for this cube. Stream the rows and store them, or use the Kafka balance streams, to build a longer history. Does the same page work on Ethereum? The code 5 filter does, but on Ethereum the credit goes to the block builder's own address, so you can filter by builder. See the Ethereum MEV balance tracker. Related pages[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#related-pages "Direct link to Related pages") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- * [BSC transaction balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/) * [BSC miner balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-miner-balance-tracker/) * [BSC validator balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/) * [Ethereum MEV balance tracker](https://docs.bitquery.io/docs/blockchain/Ethereum/balances/transaction-balance-tracker/eth-mev-balance-tracker/) * [Balance change reason codes](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/#balance-change-reason-codes) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Where the fee credit lands on BNB Chain](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#where-the-fee-credit-lands-on-bnb-chain) * [Stream every priority fee](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#stream-every-priority-fee) * [Largest tips in the last ten minutes](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#largest-tips-in-the-last-ten-minutes) * [What one bot pays](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#what-one-bot-pays) * [Fee income per block and per validator](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#fee-income-per-block-and-per-validator) * [Related pages](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/#related-pages) --- # BSC Gas Balance Tracker: Gas Bought, Refunded and Collected on BNB Chain [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD BNB Chain reports gas the way Ethereum does, in three balance changes per transaction: the sender's BNB drops by the gas limit times the gas price before execution, reason code 6; whatever gas was not used comes back after execution, reason code 7; and the fee for the gas that was used is credited to the block producer, reason code 5. The `TransactionBalances` cube records all three with the balance before and after, so the gas an address paid is the code 6 debit minus the code 7 refund, transaction by transaction. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account; the cube holds the recent realtime window only. The example address is a bot that sends transactions every few seconds, `0x10168749958f03a7c95432bd934058c77be787b0`; swap in any sender. Gas bought per transaction for one address[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#gas-bought-per-transaction-for-one-address "Direct link to Gas bought per transaction for one address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Code 6 rows for the sender over the last hour; the time window keeps the scan small on a chain this busy. `gasBought` is the balance before minus the balance after, which equals `Gas` times `GasPrice` on the transaction. `calculate` only sees fields that are selected, so keep both balances in the query. Saved query [here](https://ide.bitquery.io/Latest-balance-and-gas-fee-paid-for-an-address-bsc) . { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 6 } Address: { is: "0x10168749958f03a7c95432bd934058c77be787b0" } } Block: { Time: { since_relative: { hours_ago: 1 } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time Number } TokenBalance { PreBalance PostBalance PostBalanceInUSD } Transaction { Hash Gas GasPrice } gasBought: calculate( expression: "$TokenBalance_PreBalance - $TokenBalance_PostBalance" ) } }} Gas refunded to the same address[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#gas-refunded-to-the-same-address "Direct link to Gas refunded to the same address") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Code 7 rows are the unused gas coming back; a transaction that used its whole gas limit has none. Subtract this from the code 6 debit of the same hash to get the gas the transaction really cost. Saved query [here](https://ide.bitquery.io/Latest-balance-after-unused-gas-fee-returned--for-an-address-bsc) . { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 7 } Address: { is: "0x10168749958f03a7c95432bd934058c77be787b0" } } Block: { Time: { since_relative: { hours_ago: 1 } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } TokenBalance { PreBalance PostBalance } Transaction { Hash } refund: calculate( expression: "$TokenBalance_PostBalance - $TokenBalance_PreBalance" ) } }} The busiest gas payers right now[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#the-busiest-gas-payers-right-now "Direct link to The busiest gas payers right now") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Group code 6 rows by address over a short window and count them. The top of the list is bots and exchange hot wallets. Saved query [here](https://ide.bitquery.io/top-gas-fee-collectors-bsc) . { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 6 } } Block: { Time: { since_relative: { minutes_ago: 10 } } } } orderBy: { descendingByField: "transactions" } limit: { count: 20 } ) { TokenBalance { Address } transactions: count } }} Several addresses at once[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#several-addresses-at-once "Direct link to Several addresses at once") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `in` takes a list, and `limitBy` on the address keeps the newest row per address, so one query returns the latest gas debit of every wallet you watch. Saved query [here](https://ide.bitquery.io/Latest-balance-and-gas-fee-paid-for-multiple-addresses-bsc) . { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 6 } Address: { in: [ "0x10168749958f03a7c95432bd934058c77be787b0" "0x42d73da3daca18374ee1ab8d700351350a3b0064" ] } } Block: { Time: { since_relative: { hours_ago: 1 } } } } limitBy: { by: TokenBalance_Address, count: 1 } orderBy: { descending: Block_Time } ) { Block { Time } TokenBalance { Address PreBalance PostBalance } Transaction { Hash Gas GasPrice } gasBought: calculate( expression: "$TokenBalance_PreBalance - $TokenBalance_PostBalance" ) } }} Stream the gas one address pays[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#stream-the-gas-one-address-pays "Direct link to Stream the gas one address pays") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The code 6 filter as a subscription delivers a message for every transaction the address sends, as it is indexed. Saved stream [here](https://ide.bitquery.io/Monitor-balance-and-gas-fee-paid-for-an-address-using-stream-bsc) . subscription { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 6 } Address: { is: "0x10168749958f03a7c95432bd934058c77be787b0" } } } ) { Block { Time } TokenBalance { PreBalance PostBalance } Transaction { Hash GasPrice } gasBought: calculate( expression: "$TokenBalance_PreBalance - $TokenBalance_PostBalance" ) } }} Where the fees go[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#where-the-fees-go "Direct link to Where the fees go") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The fee for used gas is credited with reason code 5 to BNB Chain's fee holder, `0xfffffffffffffffffffffffffffffffffffffffe`, and moved to the ValidatorSet contract at the end of each block. The [BSC MEV balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/) streams those credits and shows fee income per block and per validator. Frequently Asked Questions -------------------------- How do I get the gas an address paid on BNB Chain? Take its reason code 6 rows: PreBalance minus PostBalance is the gas bought for that transaction. Subtract the code 7 refund of the same hash for the amount finally spent. Why are there two balance changes for gas in one transaction? The gas limit is charged before execution (code 6) and the unused part is returned after it (code 7). The difference is the gas actually used times the gas price. Can I see who pays the most gas on BSC? Group reason code 6 rows by TokenBalance.Address over a window and count. Sorting by count gives the busiest senders; bots and exchange wallets lead. Does Base use the same codes? No. Base folds gas into the sender's code 0 balance change and credits fees to its fee vaults with code 5; see the Base gas balance tracker. How far back does this data go? TransactionBalances holds the recent realtime window only. For older gas costs use the Transactions cube, which carries gas and cost per transaction on the archive dataset. Related pages[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#related-pages "Direct link to Related pages") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- * [BSC transaction balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-transaction-balance-tracker/) * [BSC MEV balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-mev-balance-tracker/) * [Base gas balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/) * [Balance change reason codes](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/#balance-change-reason-codes) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Gas bought per transaction for one address](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#gas-bought-per-transaction-for-one-address) * [Gas refunded to the same address](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#gas-refunded-to-the-same-address) * [The busiest gas payers right now](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#the-busiest-gas-payers-right-now) * [Several addresses at once](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#several-addresses-at-once) * [Stream the gas one address pays](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#stream-the-gas-one-address-pays) * [Where the fees go](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#where-the-fees-go) * [Related pages](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-gas-balance-tracker/#related-pages) --- # Pump.fun to PumpSwap API - Token Migration Tracking [Skip to main content](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD Need real-time Pump.fun & PumpSwap data or anything from the last ~30 days? For **real-time + last ~30 days**, use the [**Trading cube**](https://docs.bitquery.io/docs/trading/trading-data-overview/) — [`Trading.Trades`](https://docs.bitquery.io/docs/trading/crypto-trades-api/trades-api/) gives you clean, MEV-filtered Pump.fun & PumpSwap swaps with **USD price, market cap, and supply on every row** across **9 chains in one API**. Use this page when you need **historical Pump.fun & PumpSwap data older than ~30 days**, raw per-swap detail, or call / event context. Post-migration AMM activity is covered end-to-end by the [PumpSwap API](https://bitquery.io/products/pumpswap-api) — the product page lists swaps, pools and OHLCV coverage with plans. For the productized feed of these migration events — channels, pricing, free trial — see the [Pump.fun API product page](https://bitquery.io/products/pumpfun-api) . Pump.fun is a Solana-based memecoin launchpad that has reshaped how tokens are created and traded. At its core is a bonding curve model that lets anyone launch a token with a fixed supply of 1 billion tokens, of which around 800 million are made available for bonding. As traders buy into the curve, the price increases non-linearly—early buyers benefit the most. The bonding curve progress, a very useful metric for developers and traders, can be computed as: note **Simplified Formula**: BondingCurveProgress = 100 - (((balance - 206900000) \* 100) / 793100000) where `balance` is the balance of the bonding curve for that specific token. This helps identify tokens nearing sell-out, a common signal for tokens “about to pump.” Once a token reaches full bonding (100%), it automatically migrates to PumpSwap, Pump.fun’s native AMM DEX. From there, it trades like any other Solana token—no manual listing is needed; the system handles everything. To help developers, traders, and analysts follow this journey, Bitquery offers a comprehensive real-time API suite that spans the entire lifecycle of a Pump.fun token. Let’s walk through it: ProductUsing this in production? See the [PumpSwap API](https://bitquery.io/products/pumpswap-api) page for plans, free trial and enterprise delivery options. Track New Token Creations in Real-Time[​](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#track-new-token-creations-in-real-time "Direct link to Track New Token Creations in Real-Time") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Every token on Pump.fun starts with a launch event. You can track these launches in real time using a streaming API: * [Track Pump.fun Token Creations in Real-Time Using a Subscription](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-get-newly-created-pumpfun-tokens) This API streams metadata such as token name, symbol, mint, creator address, and timestamp the moment a new token is created. Follow Real-Time Market Data as Tokens Trade on Pump.fun[​](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#follow-real-time-market-data-as-tokens-trade-on-pumpfun "Direct link to Follow Real-Time Market Data as Tokens Trade on Pump.fun") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Pump.fun tokens are actively traded as they climb the bonding curve. Traders need up-to-the-second price feeds and trade streams: * [Track Price of a Token in Real-Time](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-track-the-price-of-a-pumpfun-token-in-real-time) * [Get Real-Time Trades on Pump Fun](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-get-live-trades-from-pumpfun-using-bitquery) * [Get OHLC Data of a Token](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-get-pumpfun-token-ohlcv-data-historically) These APIs provide: * Price ticks per trade * Trade sides (buy/sell) * Volume and trader addresses * 1-minute OHLC data for charting and analysis Analyze Token Performance[​](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#analyze-token-performance "Direct link to Analyze Token Performance") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- For deeper insights and analytics, developers can extract: * [Token Price Change Over Time (Delta from X Minutes Back)](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-get-token-price-change-over-time-delta-from-x-minutes-back) * [ATH Market Cap in a Specific Timeframe](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-get-a-tokens-all-time-high-ath-price-on-pumpfun) * [Get Market Cap, Price, Liquidity, Bonding Curve, and Volume](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-get-bonding-curve-progress-for-a-pumpfun-token) * [Get Detailed Trade Stats: Volume, Buys, Sells, Makers, Buyers, Sellers](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-get-detailed-trade-stats-volume-buys-sells-makers-buyers-sellers) These endpoints help answer questions like: * What’s the token’s current liquidity? * Has it reached its all-time high market cap? * How many unique wallets are buying/selling? Identify Hot Tokens and Dev Insights[​](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#identify-hot-tokens-and-dev-insights "Direct link to Identify Hot Tokens and Dev Insights") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Traders constantly seek trending tokens or insider holds: * [Top Pump Fun Tokens by Market Cap](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-get-top-pumpfun-tokens-by-market-cap) * [Track “King of the Hill” Tokens (30K–35K Market Cap)](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-track-king-of-the-hill-pumpfun-tokens-30k35k-market-cap) * [Get Dev’s Holdings of a Token](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-API/#how-do-i-get-devs-holdings-of-a-pumpfun-token) These tools surface: * Top-performing memecoins * Tokens nearing PumpSwap graduation (30k–35k cap) * Developer-controlled balances Graduation to PumpSwap and Further Trading[​](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#graduation-to-pumpswap-and-further-trading "Direct link to Graduation to PumpSwap and Further Trading") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- A Pump.fun token graduates (i.e., migrates to PumpSwap) when its bonding curve is fully sold out, meaning 100% of the 800 million tradable tokens have been bought. Here’s what triggers graduation: * Total tokens sold reaches the maximum sellable limit (excluding the reserved ~200M tokens) * The market cap typically approaches $30K–$35K, depending on SOL price and trading dynamics * The Pump.fun platform then automatically creates a PumpSwap liquidity pool for the token; no manual action is needed Once graduated: * Token trading stops on Pump.fun * Trading resumes on PumpSwap as an AMM pair You can track these graduation events in real-time using Bitquery’s API: * [Track Pump Fun Token Migrations to PumpSwap](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/Pump-Fun-Marketcap-Bonding-Curve-API/#track-pump-fun-token-migrations-to-pumpswap-in-realtime---subscription) Post-migration, tokens trade as standard AMM pairs. Bitquery continues to offer real-time data support: * [Latest Trades for a Token on Pumpswap - Websocket](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-swap-api/#latest-trades-for-a-token-on-pumpswap---websocket) * [Get Buy Volume, Sell Volume, Buys, Sells, Makers, Total Trade Volume, Buyers, Sellers of a Specific Token](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-swap-api/#get-buy-volume-sell-volume-buys-sells-makers-total-trade-volume-buyers-sellers-of-a-specific-token) Tracking a Pump.fun Token’s Journey with Bitquery Shred Streams[​](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#tracking-a-pumpfun-tokens-journey-with-bitquery-shred-streams "Direct link to Tracking a Pump.fun Token’s Journey with Bitquery Shred Streams") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Bitquery’s Kafka streams offer ultra-low-latency access to blockchain data by tapping directly into Solana’s Shred-level architecture. On Solana, a shred is the smallest fragment of a block—and it’s the first unit of data propagated between validators. Bitquery’s Shred Streams capture transactions as they’re broadcast to validators, often before the block is finalized and even before timestamps are attached. This means you receive transaction data faster than any traditional block-based solution, giving you a true edge in latency-sensitive use cases such as arbitrage, sniping, and real-time analytics. **You can use this to track Pump.fun tokens as shown in [this tutorial](https://youtu.be/UlqZ8DgzNLc) .** Bitquery offers three main Kafka topics for Solana: * `solana.dextrades.proto` — includes all trade and liquidity pool change data * `solana.tokens.proto` — covers token transfers, supply changes, and balance updates at both the account and instruction level * `solana.transactions.proto` — delivers detailed data for blocks, transactions, and instructions You can find more details about the Solana Shred Streams provided by Bitquery [here](https://docs.bitquery.io/docs/streams/protobuf/chains/Solana-protobuf/) and Python code examples [here](https://docs.bitquery.io/docs/streams/protobuf/kafka-protobuf-python/) . Conclusion[​](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#conclusion "Direct link to Conclusion") ------------------------------------------------------------------------------------------------------------------------------------- Pump.fun has become the meme-fueled engine of Solana’s token economy. It has launched millions of tokens, introduced a playful but potent market dynamic, and evolved into a serious arena for real-time trading. For developers and analysts who want to build tools around this phenomenon, Bitquery offers a plug-and-play data layer that covers every phase of a Pump.fun token’s lifecycle—from minting to AMM trading. Whether you’re building dashboards, bots, trading tools, or alpha groups, these APIs let you track the entire journey without writing indexers or running infrastructure. Start querying. Stay real-time. And ride the next pump. Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track New Token Creations in Real-Time](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#track-new-token-creations-in-real-time) * [Follow Real-Time Market Data as Tokens Trade on Pump.fun](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#follow-real-time-market-data-as-tokens-trade-on-pumpfun) * [Analyze Token Performance](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#analyze-token-performance) * [Identify Hot Tokens and Dev Insights](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#identify-hot-tokens-and-dev-insights) * [Graduation to PumpSwap and Further Trading](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#graduation-to-pumpswap-and-further-trading) * [Tracking a Pump.fun Token’s Journey with Bitquery Shred Streams](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#tracking-a-pumpfun-tokens-journey-with-bitquery-shred-streams) * [Conclusion](https://docs.bitquery.io/docs/blockchain/Solana/Pumpfun/pump-fun-to-pump-swap/#conclusion) --- # BSC Validator Balance Tracker | Bitquery Docs [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The BSC Validator Balance Tracker API provides real-time balance updates for BSC validators, tracking their staking rewards, withdrawals, and balance changes. Track Validator Balance Updates[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#track-validator-balance-updates "Direct link to Track Validator Balance Updates") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Monitor balance changes for BSC validators, including staking rewards and withdrawals from the beacon chain. Try the API [here](https://ide.bitquery.io/Track-Validator-Balance-Updates-bsc_1) . subscription { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [211, 5] } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} **Note:** BalanceChangeReasonCode 3 corresponds to `BalanceIncreaseWithdrawal` - ETH withdrawn from the beacon chain. Track Validator Rewards[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#track-validator-rewards "Direct link to Track Validator Rewards") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track validator rewards and balance increases from staking activities. Try the API [here](https://ide.bitquery.io/Track-Validator-Rewards-bsc_1) . subscription { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 211 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} **Balance Change Reason Codes for Validators:** * **Code 211**: `BalanceIncreaseRewardMineBlock` - BalanceChangeCode when BSC is distributing rewards to validator. Filter by Validator Address[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#filter-by-validator-address "Direct link to Filter by Validator Address") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Track balance changes for a specific validator address: Try the API [here](https://ide.bitquery.io/Filter-by-Validator-Address-bsc_1) . subscription { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { Address: { is: "0xValidatorAddressHere" } BalanceChangeReasonCode: { eq: 211 } } } ) { Block { Time Number } TokenBalance { Currency { Symbol } PreBalance PostBalance Address BalanceChangeReasonCode PostBalanceInUSD } Transaction { Hash } } }} Top Validators by Total Tips earned in last 24 hrs[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#top-validators-by-total-tips-earned-in-last-24-hrs "Direct link to Top Validators by Total Tips earned in last 24 hrs") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Ranks validators by cumulative priority fees (reason code 5) received in the last 24 hours. Test the query [here](https://ide.bitquery.io/top-validators-by-total-tips-in-last-24-hrs-bsc) . query MyQuery { EVM(network: bsc, dataset: realtime) { TransactionBalances( limit: { count: 10 } orderBy: { descendingByField: "Total_tip_native" } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { TokenBalance { Address BalanceChangeReasonCode Currency { Name Symbol SmartContract } } Post: sum(of: TokenBalance_PostBalance) Post_USD: sum(of: TokenBalance_PostBalanceInUSD) Pre: sum(of: TokenBalance_PreBalance) Pre_USD: sum(of: TokenBalance_PreBalanceInUSD) Total_tip_native: calculate(expression: "$Post - $Pre") Total_tip_usd: calculate(expression: "$Post_USD - $Pre_USD") number_of_tips: count } }} Total Tips earned by a Validator in last 24 hrs[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#total-tips-earned-by-a-validator-in-last-24-hrs "Direct link to Total Tips earned by a Validator in last 24 hrs") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Returns the total priority fees (native and USD) earned by a specific validator over the last 24 hours. Test the query [here](https://ide.bitquery.io/total-tips-received-by-a-validator-in-last-24-hrs-bsc) . query MyQuery { EVM(network: bsc, dataset: realtime) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } Address: { is: "0xValidatorAddressHere" } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { TokenBalance { Address BalanceChangeReasonCode Currency { Name Symbol SmartContract } } Post: sum(of: TokenBalance_PostBalance) Post_USD: sum(of: TokenBalance_PostBalanceInUSD) Pre: sum(of: TokenBalance_PreBalance) Pre_USD: sum(of: TokenBalance_PreBalanceInUSD) Total_tip_native: calculate(expression: "$Post - $Pre") Total_tip_usd: calculate(expression: "$Post_USD - $Pre_USD") number_of_tips: count } }} Avg Tip in last 10 Blocks[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#avg-tip-in-last-10-blocks "Direct link to Avg Tip in last 10 Blocks") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Calculates the average tip for each of the last 10 blocks. Test the query [here](https://ide.bitquery.io/last-10-blocks-avg-tip-in-native-bnb) . query MyQuery { EVM(network: bsc, dataset: realtime) { TransactionBalances( limit: { count: 10 } orderBy: { descending: Block_Number } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } } ) { Block { Number } TokenBalance { BalanceChangeReasonCode Currency { Name Symbol SmartContract } } Post: sum(of: TokenBalance_PostBalance) Post_USD: sum(of: TokenBalance_PostBalanceInUSD) Pre: sum(of: TokenBalance_PreBalance) Pre_USD: sum(of: TokenBalance_PreBalanceInUSD) Total_tip_native: calculate(expression: "$Post - $Pre") Total_tip_usd: calculate(expression: "$Post_USD - $Pre_USD") number_of_tips: count avg_tip_in_this_block: calculate( expression: "$Total_tip_native / $number_of_tips" ) avg_tip_usd_in_this_block: calculate( expression: "$Total_tip_usd / $number_of_tips" ) } }} Avg Tip given in terms of Avg Gas Fees in last 10 blocks[​](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#avg-tip-given-in-terms-of-avg-gas-fees-in-last-10-blocks "Direct link to Avg Tip given in terms of Avg Gas Fees in last 10 blocks") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Compares average user tip to average total gas fee per block across the last 10 blocks. Test the query [here](https://ide.bitquery.io/Average-Tip-in-terms-of-avg-gas-Fee-bsc) . query MyQuery { EVM(network: bsc, dataset: realtime) { TransactionBalances( limit: { count: 10 } orderBy: { descending: Block_Number } where: { TokenBalance: { BalanceChangeReasonCode: { eq: 5 } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Block { Number } TokenBalance { BalanceChangeReasonCode Currency { Name Symbol SmartContract } } avg_gasfees_in_this_block: average(of: Fee_SenderFee) Post: sum(of: TokenBalance_PostBalance) Post_USD: sum(of: TokenBalance_PostBalanceInUSD) Pre: sum(of: TokenBalance_PreBalance) Pre_USD: sum(of: TokenBalance_PreBalanceInUSD) Total_tip_native: calculate(expression: "$Post - $Pre") Total_tip_usd: calculate(expression: "$Post_USD - $Pre_USD") number_of_tips: count avg_tip_in_this_block: calculate( expression: "$Total_tip_native / $number_of_tips" ) avg_tip_usd_in_this_block: calculate( expression: "$Total_tip_usd / $number_of_tips" ) tip_in_terms_of_gasfees: calculate( expression: "( $avg_gasfees_in_this_block - $avg_tip_in_this_block ) / $avg_gasfees_in_this_block" ) } }} Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Track Validator Balance Updates](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#track-validator-balance-updates) * [Track Validator Rewards](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#track-validator-rewards) * [Filter by Validator Address](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#filter-by-validator-address) * [Top Validators by Total Tips earned in last 24 hrs](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#top-validators-by-total-tips-earned-in-last-24-hrs) * [Total Tips earned by a Validator in last 24 hrs](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#total-tips-earned-by-a-validator-in-last-24-hrs) * [Avg Tip in last 10 Blocks](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#avg-tip-in-last-10-blocks) * [Avg Tip given in terms of Avg Gas Fees in last 10 blocks](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-validator-balance-tracker/#avg-tip-given-in-terms-of-avg-gas-fees-in-last-10-blocks) --- # BNB Chain Uniswap v4 API: Stablecoin Pools, Swaps, Traders and Reserves [Skip to main content](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD On BNB Chain, Uniswap v4 is above all a stablecoin venue: the USDT/USDC pools inside its PoolManager, `0x28e2ea090877bf75740558f6bfb36a5ffee9e9df`, turn over tens of millions of dollars a day, while meme launches route a long tail of smaller pools through the same contract. Because v4 keeps every pool inside the PoolManager, pools are told apart by `PoolId`, a hash of the two tokens, the fee, the tick spacing and the hook, and on swap rows the buyer and seller fields both show the PoolManager, so the trader is `Transaction.From`. PancakeSwap Infinity uses the same singleton design on BNB Chain and has [its own page](https://docs.bitquery.io/docs/blockchain/BSC/bsc-pancakeswap-infinity-api/) . Every example runs in the [IDE](https://ide.bitquery.io/) on a free account; the worked token is USDT, `0x55d398326f99059ff775485246999027b3197955`, and the worked pool is the busiest USDT/USDC pool, `PoolId 0x628ea54a6450645d2bb7b2911c8c6f3d7f3944c2f4703c259a1b85bf5569870b`. Which v4 pools trade USDT[​](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#which-v4-pools-trade-usdt "Direct link to Which v4 pools trade USDT") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Start here to get a `PoolId`. Grouping `DEXTradeByTokens` by `PoolId` with USDT in `Currency` lists every v4 pool of the token, its counter token, and the trades and USD volume in the window. Saved query [here](https://ide.bitquery.io/get-virtual-pool-address-for-a-token-on-uniswap-v4-bsc) . { EVM(network: bsc) { DEXTradeByTokens( where: { Trade: { Dex: { ProtocolName: { is: "uniswap_v4" } } Currency: { SmartContract: { is: "0x55d398326f99059ff775485246999027b3197955" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "count" } limit: { count: 20 } ) { Trade { PoolId Side { Currency { Symbol SmartContract } } } count volumeUsd: sum(of: Trade_Side_AmountInUSD) } }} Daily stats of the USDT/USDC pool[​](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#daily-stats-of-the-usdtusdc-pool "Direct link to Daily stats of the USDT/USDC pool") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Trades, distinct buyers and sellers, and USD volume split by direction, for the pool and the token you name. Saved query [here](https://ide.bitquery.io/trade-stats-for-a-token-pair-on-uniswap-v4-bsc_1) . { EVM(network: bsc) { DEXTradeByTokens( where: { Trade: { PoolId: { is: "0x628ea54a6450645d2bb7b2911c8c6f3d7f3944c2f4703c259a1b85bf5569870b" } Currency: { SmartContract: { is: "0x55d398326f99059ff775485246999027b3197955" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { Trade { Currency { Symbol } Side { Currency { Symbol } } } trades: count buyers: uniq(of: Trade_Buyer) sellers: uniq(of: Trade_Seller) volumeUsd: sum(of: Trade_Side_AmountInUSD) buyVolumeUsd: sum(of: Trade_Side_AmountInUSD, if: { Trade: { Side: { Type: { is: buy } } } }) sellVolumeUsd: sum(of: Trade_Side_AmountInUSD, if: { Trade: { Side: { Type: { is: sell } } } }) } }} Latest swaps in the pool[​](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#latest-swaps-in-the-pool "Direct link to Latest swaps in the pool") ------------------------------------------------------------------------------------------------------------------------------------------------------------- Filter `DEXTrades` on the `PoolId`. Saved query [here](https://ide.bitquery.io/Latest-Trades-for-a-currency-pair-on-bsc) . { EVM(network: bsc) { DEXTrades( where: { Trade: { PoolId: { is: "0x628ea54a6450645d2bb7b2911c8c6f3d7f3944c2f4703c259a1b85bf5569870b" } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Trade { Buy { Currency { Symbol } Amount AmountInUSD PriceInUSD } Sell { Currency { Symbol } Amount AmountInUSD } } Transaction { From Hash } } }} Live swaps across every v4 pool on BNB Chain[​](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#live-swaps-across-every-v4-pool-on-bnb-chain "Direct link to Live swaps across every v4 pool on BNB Chain") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The protocol filter as a subscription. On BNB Chain this stream is busy, so filter on `PoolId` or on a token when you only need part of it. Saved stream [here](https://ide.bitquery.io/Real-time-trades-for-uniswap-v4-bsc) . subscription { EVM(network: bsc) { DEXTrades(where: { Trade: { Dex: { ProtocolName: { is: "uniswap_v4" } } } }) { Block { Time } Trade { PoolId Buy { Currency { Symbol SmartContract } Amount AmountInUSD PriceInUSD } Sell { Currency { Symbol SmartContract } Amount AmountInUSD } } Transaction { From Hash } } }} Top traders of the pool[​](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#top-traders-of-the-pool "Direct link to Top traders of the pool") ---------------------------------------------------------------------------------------------------------------------------------------------------------- The PoolManager settles both sides of every v4 swap, so `Trade.Buyer` and `Trade.Seller` on `DEXTrades` are the PoolManager; rank accounts by `Transaction.From` instead. `bought` sums the token the trader received and `sold` the token it paid; `Side.Type` describes the counter-side, which is why the conditions look swapped. Saved query [here](https://ide.bitquery.io/top-buyers-of-a-currency-on-uniswap-v4-bsc) ; the [top sellers](https://ide.bitquery.io/top-sellers-of-a-token-on-uniswap-v4-pool-bsc) query is the same sorted on `sold`. { EVM(network: bsc) { DEXTradeByTokens( where: { Trade: { PoolId: { is: "0x628ea54a6450645d2bb7b2911c8c6f3d7f3944c2f4703c259a1b85bf5569870b" } Currency: { SmartContract: { is: "0x55d398326f99059ff775485246999027b3197955" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } orderBy: { descendingByField: "volumeUsd" } limit: { count: 20 } ) { Transaction { From } trades: count volumeUsd: sum(of: Trade_Side_AmountInUSD) bought: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: sell } } } }) sold: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: buy } } } }) } }} Reserves of the pool[​](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#reserves-of-the-pool "Direct link to Reserves of the pool") ------------------------------------------------------------------------------------------------------------------------------------------------- `DEXPoolEvents` rows carry the reserves the PoolManager holds for the pool after each change, in token units and USD. For v4 they are rebuilt from the concentrated positions around the current price. Filter on `PoolId`, or keep only the protocol name to stream every v4 pool. Saved queries [by pool](https://ide.bitquery.io/uniswap-v4-pool-liquidity-by-poolid-bsc) and [all pools](https://ide.bitquery.io/uniswap-v4-pool-liquidity-bsc) . subscription { EVM(network: bsc) { DEXPoolEvents( where: { PoolEvent: { Pool: { PoolId: { is: "0x628ea54a6450645d2bb7b2911c8c6f3d7f3944c2f4703c259a1b85bf5569870b" } } } } ) { Block { Time } PoolEvent { Pool { PoolId CurrencyA { Symbol } CurrencyB { Symbol } } Liquidity { AmountCurrencyA AmountCurrencyAInUSD AmountCurrencyB AmountCurrencyBInUSD } AtoBPrice } } }} Frequently Asked Questions -------------------------- What is the Uniswap v4 PoolManager address on BNB Chain? 0x28e2ea090877bf75740558f6bfb36a5ffee9e9df. All v4 pools on BNB Chain live inside it; Trade.PoolId tells them apart. How do I get the PoolId of a Uniswap v4 pool on BSC? Group DEXTradeByTokens by Trade.PoolId with one of the tokens in Currency and ProtocolName uniswap\_v4. The rows list each pool of that token with its counter token and volume. Why does every v4 swap show the PoolManager as buyer and seller? The PoolManager settles both sides. Use Transaction.From for the account that sent the swap, or DEXTradeByTokens, whose Buyer and Seller are trader-aware. Is PancakeSwap Infinity the same as Uniswap v4? Same singleton design, separate protocol. Filter ProtocolName pancakeswap\_infinity for it; its manager on BNB Chain is a different contract with its own PoolIds. How far back does Uniswap v4 data go on BNB Chain? DEXTrades and DEXTradeByTokens reach history on the archive and combined datasets. DEXPoolEvents is realtime-only, so record the reserve stream if you need it later. Related pages[​](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#related-pages "Direct link to Related pages") ---------------------------------------------------------------------------------------------------------------------------- * [BNB Chain liquidity API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-liquidity-api/) * [BNB Chain DEX trades API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-dextrades/) * [PancakeSwap Infinity API](https://docs.bitquery.io/docs/blockchain/BSC/bsc-pancakeswap-infinity-api/) * [Uniswap v4 on Ethereum](https://docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api/) * [Uniswap v4 on Arbitrum](https://docs.bitquery.io/docs/blockchain/Arbitrum/uniswap-v4-api/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Which v4 pools trade USDT](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#which-v4-pools-trade-usdt) * [Daily stats of the USDT/USDC pool](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#daily-stats-of-the-usdtusdc-pool) * [Latest swaps in the pool](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#latest-swaps-in-the-pool) * [Live swaps across every v4 pool on BNB Chain](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#live-swaps-across-every-v4-pool-on-bnb-chain) * [Top traders of the pool](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#top-traders-of-the-pool) * [Reserves of the pool](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#reserves-of-the-pool) * [Related pages](https://docs.bitquery.io/docs/blockchain/BSC/uniswap-v4-api/#related-pages) --- # Get the Latest Block Number with Bitquery Instead of eth_blockNumber [Skip to main content](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD `eth_blockNumber` is the JSON-RPC call that returns the height of the newest block. On Bitquery the same answer comes from the `Blocks` cube in two shapes: a query that returns the newest block with its timestamp, and a subscription that pushes a row every time a block is produced, so you never poll. Both run on Ethereum and, by changing `network`, on BNB Chain, Base, Arbitrum, Optimism, Polygon and Robinhood Chain. No node, no RPC key: an access token from [account.bitquery.io](https://account.bitquery.io/) and the same query runs in the [IDE](https://ide.bitquery.io/) on a free account. Latest block number as a query[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#latest-block-number-as-a-query "Direct link to Latest block number as a query") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- One row, sorted by block number descending. `Time` is the block timestamp, so the same row tells you how fresh the tip is. { EVM(network: eth) { Blocks(limit: { count: 1 }, orderBy: { descending: Block_Number }) { Block { Number Time } } }} Latest block number as a stream[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#latest-block-number-as-a-stream "Direct link to Latest block number as a stream") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Every new Ethereum block arrives as one message. Open it in the IDE [here](https://ide.bitquery.io/eth_blockNumber-stream) . subscription { EVM(network: eth) { Blocks { Block { Number } } }} Other EVM chains[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#other-evm-chains "Direct link to Other EVM chains") ---------------------------------------------------------------------------------------------------------------------------------------------------------- Change the network name and nothing else. This is the BNB Chain stream, saved [here](https://ide.bitquery.io/eth_blockNumber-stream-bsc) ; `base`, `arbitrum`, `optimism`, `matic` and `robinhood` work the same way. subscription { EVM(network: bsc) { Blocks { Block { Number } } }} What else the Blocks cube returns[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#what-else-the-blocks-cube-returns "Direct link to What else the Blocks cube returns") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add fields to the same selection: `Block { Hash ParentHash Time Number GasUsed GasLimit BaseFee Difficulty }` and `TxCount`. That covers `eth_getBlockByNumber` for the header, without a second call. For the transactions inside a block, filter the `Transactions` cube on `Block: { Number: { is: "..." } }`; the [EVM blocks schema](https://docs.bitquery.io/docs/schema/evm/blocks/) lists every field. Frequently Asked Questions -------------------------- How do I get the latest Ethereum block number without an RPC node? Query the Blocks cube with limit 1 and orderBy descending Block\_Number; the row carries the number and the timestamp. Or open a subscription on Blocks to receive each new block as it is produced. Is the block number from Bitquery the same as eth\_blockNumber from a node? It is the height of the newest block Bitquery has indexed, which trails the chain tip by the indexing delay of the realtime pipeline. For most uses that is a matter of seconds; for chain-tip-critical logic, compare with your node. Does this work on chains other than Ethereum? Yes. The Blocks cube exists under EVM(network: ...) for BNB Chain, Base, Arbitrum, Optimism, Polygon and Robinhood Chain, and Solana has its own Blocks cube under the Solana root. Can I get the block hash and gas fields with the number? Yes. Add Hash, ParentHash, Time, GasUsed, GasLimit, BaseFee or Difficulty to the Block selection, and TxCount for the number of transactions. Related pages[​](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------------------- * [EVM blocks schema](https://docs.bitquery.io/docs/schema/evm/blocks/) * [debug\_traceCall with Bitquery](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/debug_traceCall/) * [WebSocket subscriptions](https://docs.bitquery.io/docs/subscriptions/subscription/) * [Ethereum API hub](https://docs.bitquery.io/docs/blockchain/Ethereum/) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Latest block number as a query](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#latest-block-number-as-a-query) * [Latest block number as a stream](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#latest-block-number-as-a-stream) * [Other EVM chains](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#other-evm-chains) * [What else the Blocks cube returns](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#what-else-the-blocks-cube-returns) * [Related pages](https://docs.bitquery.io/docs/blockchain/Ethereum/ethers-library/eth_blockNumber/#related-pages) --- # Base Self-Destruct Balance Tracker: Why Base Shows None, and What to Watch [Skip to main content](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#__docusaurus_skipToContent_fallback) NewPricing plans starting at **$49/mo**[Explore plans →](https://bitquery.io/pricing#plans-anchor) On this page Copy MD The balance schema has three reason codes for `selfdestruct`: 13 for the contract whose balance empties, 12 for the address that receives it, and 14 for value sent to an account already destroyed in the same transaction. On Base none of them fire. Since the Cancun rules reached the OP Stack, `SELFDESTRUCT` only deletes a contract created in the same transaction; in every other case it just moves the balance, and Base's balance cube reports every native movement as reason code 0 or, for fees, code 5. On top of that, live Base data shows no `SELFDESTRUCT` calls at all in the `Calls` cube over a day. This page gives you the two queries that prove it, so an empty result is a fact rather than a bug, and the queries that catch the patterns people are usually looking for. Every example runs in the [IDE](https://ide.bitquery.io/) on a free account. Confirm it: the codes are empty[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#confirm-it-the-codes-are-empty "Direct link to Confirm it: the codes are empty") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ A count over the last day. Change the network to `bsc` and the same query returns a few hundred rows, which is the quickest way to see that the schema is shared and the behaviour is the chain's. Saved query [here](https://ide.bitquery.io/Aggregate-Self-Destruct-Statistics-base) . { EVM(network: base) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [12, 13, 14] } } Block: { Time: { since_relative: { hours_ago: 24 } } } } ) { count } }} Confirm it: no SELFDESTRUCT calls[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#confirm-it-no-selfdestruct-calls "Direct link to Confirm it: no SELFDESTRUCT calls") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The `Calls` cube keeps the opcode of every internal call, so it would show a destruction even for a contract that held nothing. Saved query [here](https://ide.bitquery.io/Track-recent-ephemeral-contract-patterns-base) . { EVM(network: base) { Calls( where: { Call: { Opcode: { Name: { is: "SELFDESTRUCT" } } } Block: { Time: { since_relative: { hours_ago: 24 } } } } limit: { count: 20 } orderBy: { descending: Block_Time } ) { Block { Time } Call { From To Value } Transaction { Hash From } } }} Leave this one running as a subscription if you want to be told the moment a destruction does happen: drop `limit`, `orderBy` and the time filter and change `query` to `subscription`. What people are usually looking for on Base[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#what-people-are-usually-looking-for-on-base "Direct link to What people are usually looking for on Base") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Short-lived helper contracts.** On BNB Chain and Ethereum, MEV bots destroy their helpers; on Base they simply leave them. Find them with the `Calls` cube: filter `Call.Opcode.Name` on `CREATE` or `CREATE2` and group by `Transaction.From` to see who deploys contracts in bulk, then query the [transaction balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/) for the balances those contracts hold. * **A contract being emptied.** Filter `TransactionBalances` on the contract as `TokenBalance.Address` with `Currency: { Native: true }`; a code 0 row whose `PostBalance` is zero is the sweep. * **Fees and sequencer income.** Reason code 5 rows on the fee vaults, covered on the [Base gas balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/) . The self-destruct queries, ready for other chains[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#the-self-destruct-queries-ready-for-other-chains "Direct link to The self-destruct queries, ready for other chains") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Both blocks below run unchanged on `bsc` and `eth`, where the codes do fire. Code 13 rows are the contracts that emptied, code 12 rows the recipients. Saved stream [here](https://ide.bitquery.io/All-Self-Destruct-Event-Balances-Stream-base) . subscription { EVM(network: bsc) { TransactionBalances( where: { TokenBalance: { BalanceChangeReasonCode: { in: [12, 13] } } } ) { Block { Time Number } TokenBalance { Address BalanceChangeReasonCode PreBalance PostBalance PostBalanceInUSD } Transaction { Hash From To } } }} The [BSC self-destruct balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-self-destruct-balance-api/) walks through the full set on a chain where the pattern is live. Frequently Asked Questions -------------------------- Does Base have self-destruct balance data? The codes exist in the schema but return no rows on Base, and the Calls cube shows no SELFDESTRUCT opcode in live data. Native balance movements on Base are reported as reason code 0, fees as code 5. Why did selfdestruct stop showing up? Under the Cancun rules the OP Stack adopted, SELFDESTRUCT only deletes a contract created in the same transaction and otherwise just transfers the balance. Contracts on Base do not use it in practice. How do I check whether a contract on Base was destroyed? Query Calls with Call.Opcode.Name SELFDESTRUCT and the contract as Call.From. No row means no destruction; a contract that still answers calls was never destroyed. Where do the self-destruct examples work? On BNB Chain and Ethereum. Run the queries on this page with network bsc or eth and reason codes 12 and 13 return rows within the realtime window. Related pages[​](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#related-pages "Direct link to Related pages") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * [Base transaction balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-transaction-balance-tracker/) * [Base gas balance tracker](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-gas-balance-tracker/) * [BSC self-destruct balance tracker](https://docs.bitquery.io/docs/blockchain/BSC/transaction-balance-tracker/bsc-self-destruct-balance-api/) * [Balance change reason codes](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/#balance-change-reason-codes) Build with Bitquery 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. [Get your API key](https://account.bitquery.io/user/api_v2/access_tokens) [See pricing](https://bitquery.io/pricing) [Try the MCP server](https://docs.bitquery.io/docs/mcp/mcp-server/) [Subscribe to newsletter](https://bitquery.substack.com/) Talk to the team[Telegram](https://t.me/Bloxy_info) [Email](mailto:support@bitquery.io) On this page * [Confirm it: the codes are empty](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#confirm-it-the-codes-are-empty) * [Confirm it: no SELFDESTRUCT calls](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#confirm-it-no-selfdestruct-calls) * [What people are usually looking for on Base](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#what-people-are-usually-looking-for-on-base) * [The self-destruct queries, ready for other chains](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#the-self-destruct-queries-ready-for-other-chains) * [Related pages](https://docs.bitquery.io/docs/blockchain/Base/transaction-balance-tracker/base-self-destruct-balance-api/#related-pages) ---