DEX Trades API - Bitquery OHLCV, Transfers, Balances, Holders
Pricing
$5.00 / 1,000 blockchain record returneds
DEX Trades API - Bitquery OHLCV, Transfers, Balances, Holders
Blockchain DEX trades API for Bitquery: token swaps, OHLCV candles, token transfers, wallet balances and token holders on Ethereum, BSC, Base, Arbitrum, Optimism, Polygon, Solana and Tron, with token, trader, pool, DEX and time filters. Bring your own Bitquery access token.
Pricing
$5.00 / 1,000 blockchain record returneds
Rating
0.0
(0)
Developer
Nabeel Hassan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
14 days ago
Last modified
Categories
Share
DEX Trades API: OHLCV, Transfers, Balances and Holders (works with the Bitquery API)
Pull on-chain DEX trades, swaps, OHLCV candles, token transfers, wallet balances and token holders for Ethereum, BNB Smart Chain, Base, Arbitrum, Optimism, Polygon, Solana and Tron into a clean dataset, using your own Bitquery access token.
Features
- Token DEX trades: every swap of one token from the token's point of view (Bitquery
DEXTradeByTokenscube): amount, USD value, price in USD, counter token, buyer, seller, DEX protocol and pool. Filter by counter token, trader, pool, DEX protocol and time window. - DEX swaps: raw swaps from the pool's point of view (
DEXTradescube), filtered by token, DEX protocol (uniswap_v3, pancake_swap_v3, pump_amm and so on) or transaction signer. - OHLCV candles: open, high, low, close, USD volume, market rank, market cap and fully diluted valuation per interval from the cross-chain
Trading.Pairscube, from 1 second to 1 hour bars, on the token's top market or every market. - Token transfers: ERC-20, TRC-20, SPL and native transfers by token, sender, receiver or a list of wallets.
- Wallet balances: what up to 100 addresses hold right now, per token or native coin only, with USD value, update count and last change time (EVM chains and Tron).
- Token holders: a token's holders ranked by balance on a snapshot date, with a minimum balance floor (EVM chains and Tron).
- Realtime, archive or combined datasets; the full record Bitquery returns is kept beside the flat columns.
- Read only GraphQL queries. Pay per result; empty answers are never charged.
How to get a Bitquery access token
- Sign in at account.bitquery.io.
- Open Authorization, Applications and click New Application. Pick a token lifespan.
- Open Authorization, Tokens, choose the application and click Generate New Token. Copy the token (it starts
ory_at_). - Paste it into the Bitquery access token field, or store it as the
DATA_API_KEYsecret.
You can instead paste your application's client_id:client_secret: the actor then mints a token for the run with the documented OAuth client credentials grant (scope=api). A token generated in the IDE without an application expires every 12 hours, so an application token is the better choice for scheduled runs. Without a token the run ends cleanly with a message and no charge.
Input
| Field | Modes | What it does |
|---|---|---|
mode | all | tokenTrades, dexTrades, ohlcv, transfers, balances or tokenHolders |
chain | all | eth, bsc, base, arbitrum, optimism, matic, solana, tron |
tokenAddress | all | Token contract or mint address. Required for token trades, OHLCV and holders |
sideTokenAddress | tokenTrades | Keep trades against this counter token |
traderAddress | tokenTrades, dexTrades | Buyer or seller (EVM, Tron) or signer (Solana) |
poolAddress | tokenTrades | DEX pair contract (EVM, Tron) or market address (Solana) |
dexProtocol | tokenTrades, dexTrades | Bitquery protocol name, for example uniswap_v3 |
senderAddress, receiverAddress | transfers | Transfers from or to one address |
walletAddresses | transfers, balances | Up to 100 addresses, one per line |
nativeOnly | balances | Native coin only (ETH, BNB, POL, TRX) |
intervalSeconds | ohlcv | 1, 3, 5, 10, 30, 60, 300, 900, 1800 or 3600 |
topMarketOnly | ohlcv | Rank 1 market only (default on) |
quotedInUsd | ohlcv | Prices in USD (default on) or in quote token units |
holdersDate, minBalance | tokenHolders | Snapshot day and minimum balance |
since, until | trades, swaps, OHLCV, transfers | UTC date or time window |
dataset | trades, swaps, transfers, balances | auto, realtime, archive or combined |
maxResults | all | Row cap, default 100 |
apiKey | all | Your Bitquery access token (secret) |
Example output
A token DEX trades row. The flat columns come first; data holds the record exactly as the Bitquery DEXTradeByTokens query returns it.
{"mode": "tokenTrades","recordType": "tokenTrade","chain": "eth","found": true,"time": "2026-10-11T09:14:23Z","block": "23561042","txHash": "0x5f1c...e2a9","protocol": "uniswap_v3","tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","tokenSymbol": "WETH","sideTokenSymbol": "USDC","side": "buy","amount": "1.250000000000000000","amountUsd": "4512.37","priceUsd": 3609.9,"sender": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640","receiver": "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad","data": {"Block": { "Time": "2026-10-11T09:14:23Z", "Number": "23561042" },"Transaction": { "Hash": "0x5f1c...e2a9", "From": "0x7a25...b81c" },"Trade": {"Amount": "1.250000000000000000", "AmountInUSD": "4512.37", "Price": 3609.9, "PriceInUSD": 3609.9,"Buyer": "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad", "Seller": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640","Currency": { "Symbol": "WETH", "Name": "Wrapped Ether", "SmartContract": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" },"Dex": { "ProtocolName": "uniswap_v3", "ProtocolFamily": "Uniswap", "SmartContract": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640" },"Side": { "Type": "buy", "Amount": "4512.370000", "AmountInUSD": "4512.37", "Currency": { "Symbol": "USDC", "SmartContract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } }}}}
OHLCV rows fill open, high, low, close, volumeUsd and marketCap; balance and holder rows fill address, amount and amountUsd. A query that matches nothing becomes one uncharged row with found: false and a note.
FAQ
What is the Bitquery API?
Bitquery is a blockchain data platform that indexes DEX trades, transfers, balances, holders, transactions and mempool data for 40+ chains and serves it over GraphQL. This actor uses its V2 API at streaming.bitquery.io, which covers Ethereum, BNB Smart Chain, Base, Arbitrum, Optimism, Polygon, Solana and Tron.
Which chains and DEXs does this DEX trades API cover?
Ethereum, BNB Smart Chain, Base, Arbitrum, Optimism, Polygon (Matic), Solana and Tron. DEX coverage is whatever Bitquery indexes on each chain, including Uniswap v2, v3 and v4, PancakeSwap, Four Meme, Raydium, Meteora, Pump.fun, PumpSwap and SunPump.
How far back does the data go?
The realtime dataset, which every plan can read, keeps a recent window only: about 12 hours of Solana DEX trades, a few days of EVM trades and transfers, and about 30 days of OHLCV in the Trading cube. It returns fewer rows rather than an error when asked beyond that. Full history needs the archive or combined dataset, which requires the historical data add-on on your Bitquery plan. Combined does not currently work on Solana.
How do I get OHLCV candles for a token?
Choose OHLCV candles, set the chain and the token address, and pick an interval. With "Top market only" on, the actor reads the token's rank 1 market, which Bitquery recommends for the price of one token. For candles older than about 30 days, use token DEX trades with the archive dataset.
Why are wallet balances not available on Solana?
Bitquery has no Balances or Holders cube on Solana; Solana balances are derived from balance updates. Use token transfers with wallet addresses on Solana instead.
What does a run cost?
You pay the actor's per-result price for each row that carries a record, plus your own Bitquery points for the queries, which Bitquery bills to your account. Empty answers and refused queries are never charged by the actor.
Is my token safe?
The token is a secret input, sent only in the Authorization header to Bitquery, and never written to the log or the dataset.
Keywords
DEX trades API, blockchain data API, Bitquery API, on-chain DEX data, crypto OHLCV API, token transfers API, wallet balance API, token holders API, Uniswap trades, PancakeSwap trades, Solana DEX trades, Pump.fun trades, Tron TRC-20 transfers, Base and Arbitrum DEX data.
Licensing
Data comes from your own Bitquery account and stays under Bitquery's Terms of Service. Those terms limit data from free plans to technical development, allow publication of data only for paid plans, and forbid reselling Bitquery material or using the service as a substitute for Bitquery. Use the results within your own plan's rights.