Bitquery
Blockchain data APIs and real-time crypto streams for 40+ chains. Kafka, WebSocket, Solana gRPC, DEX trades, OHLCV, Pump.fun, Polymarket and more.
bitquery.ioBlockchain data APIs and real-time crypto streams for 40+ chains. Kafka, WebSocket, Solana gRPC, DEX trades, OHLCV, Pump.fun, Polymarket and more.
bitquery.ioFILL line from left to right. Take the second FILL line. Its market, cut short in the image, is "Exact Score: Jeonbuk FC 3 - 3 Gamba Osaka?". A wallet bet against that score: it bought "No" at 98.7 cents a share. It bought 77.9 shares for $76.90 and filled two resting orders, the makers. lag is the time from the Polygon block to the moment the line reached us. A RESOLVED line names the winning outcome. Here, seven markets on one Counter-Strike match settled in the same block, and two of them had no single winner. A PAYOUT line is winning shares cashed in for USDC. The first payouts on that match arrived six seconds after its result. The code is on GitHub, bitquery/polymarket-trade-feed. Run it in four commands: bash git clone https://github.com/bitquery/polymarket-trade-feed && cd polymarket-trade-feed pip install -r requirements.txt echo 'BITQUERY_TOKEN=your_access_token' > .env python feed.py To get an access token, sign up for Bitquery and create one under API access tokens, as the token guide shows. The free trial allows two streams at once, so start with python feed.py --no-payouts, which needs two. ## How the feed works Polymarket is a prediction market. Each market asks a question, such as "Bitcoin above 61,600 on December 2?", and sells shares in each answer. A share pays $1 if its answer wins and $0 if it loses, so its price, between 0 and 1, reads as the crowd's odds. People trade those shares on an order book. When two orders match, the trade settles on Polygon, and the exchange contract emits one OrderFilled event for each order in the match. Bitquery decodes those events, ties each one to its market question and outcome, and serves them in three datasets, which Bitquery calls cubes: | Cube | What it holds | What the feed does with it | | ----------------------- | ---------------------------------------------------------------- | ---------------------------- | | PredictionTrades | Every OrderFilled event, with market, outcome, shares and cash | Prints each trade once | | PredictionManagements | Markets created and markets resolved, with the winning outcome | Marks the market as resolved | | PredictionSettlements | Splits, merges and redemptions of outcome shares | Prints each payout | The feed sends one query with all three cubes over wss://streaming.bitquery.io/graphql. Each cube counts as a separate stream for billing, which the cost section covers. The Polymarket API page lists the same three datasets, and the docs have a page for each: trades, market results and payouts. ## Step 1: subscribe to fills, results and payouts Open a socket with your token in the URL and the graphql-ws protocol, as the socket docs describe. Then send the query. This is the part for fills; queries.py holds all three cubes: graphql subscription PolymarketFeed { EVM(network: matic) { PredictionTrades( where: { TransactionStatus: {Success: true} Trade: {Prediction: {Marketplace: {ProtocolName: {is: "polymarket"}}}} } ) { Block { Time Number } Transaction { Hash To } Log { Index SmartContract } Trade { OutcomeTrade { Buyer Seller IsOutcomeBuy Amount CollateralAmount CollateralAmountInUSD Price Fee { AmountInUSD } } Prediction { ConditionId Question { Title } Outcome { Label } } } } } } network: matic is Polygon. The ProtocolName filter drops other betting markets on Polygon. Transaction.To and Log.SmartContract look like extras, but step 2 needs both. The connection takes a few lines of Python: python async with websockets.connect(f"wss://streaming.bitquery.io/graphql?token={token}", subprotocols=["graphql-ws"], max_size=None) as ws: await ws.send(json.dumps({"type": "connection_init"})) await ws.send(json.dumps({"id": "1", "type": "start", "payload": {"query": feed_subscription()}})) while True: raw = await asyncio.wait_for(ws.recv(), timeout=10) received = time.time() # stamp first, parse later queue.put_nowait((received, raw)) Each message holds every new row from one Polygon block. A separate task reads the queue and prints, so a slow terminal never delays the arrival time, which the lag is measured from. ## Step 2: print each trade once One trade comes back as several rows. When a taker's order crosses the book, it can fill many resting orders, called maker orders, at once. The exchange emits one OrderFilled event for each maker order and one more for the taker's order. All of them land in PredictionTrades. On the taker's own row, the other side is a Polymarket contract. It is either the exchange that emitted the event, or a router contract that passed the trade to the exchange. The feed keeps that row and counts the others: python def is_taker(row): o = row["Trade"]["OutcomeTrade"] contracts = {row["Log"]["SmartContract"].lower(), row["Transaction"]["To"].lower()} return o["Buyer"].lower() in contracts or o["Seller"].lower() in contracts On 1 December, this rule found exactly one taker row in every trade of the day, more than a million of them. Checking the exchange contract alone is not enough. Most trades on exchange 0x862f…4e55 route through 0xe333…00aa, and the other side on their taker row is that router. The first trap below shows what happens if you skip this step. On the taker's row, IsOutcomeBuy is the taker's direction: true means the taker bought the outcome named in Outcome.Label. The wallet that is not the contract is the taker. ## Step 3: work out the price yourself Price is null on the stream. In a 40-second capture on 2 December, every one of 952 streamed rows came back with Price: null. The same field is filled in the HTTP query. Compute it from the two amounts instead. The price of an outcome share is the cash paid divided by the shares: python price = o["Price"] if o["Price"] is not None else float(o["CollateralAmount"]) / float(o["Amount"]) We checked the formula on every row of an HTTP sample, where Price is filled. It matched each one to the last decimal. ## Step 4: mark results and payouts When a market resolves, PredictionManagements returns a Resolved row with the winning outcome in Outcome.Label. The feed stores the result under the market's ConditionId, the on-chain ID of the question, and tags later fills on that market: python def on_resolution(self, m): p = m["Management"]["Prediction"] winner = p["Outcome"]["Label"] or "no single winner (split payout)" self.resolved[p["Condition"]["Id"]] = winner An empty label is a real result. The fourth trap below explains it. Payouts come from PredictionSettlements rows whose EventType is Redemption. A holder redeems outcome shares after the result, and the contract pays $1 for each winning share. The stream query drops redemptions that pay nothing, on the server, with Amounts: {CollateralAmount: {gt: "0"}}. ## Step 5: recover fills after a dropped socket A socket can go quiet without closing. Bitquery sends keep-alive messages between data messages, so the feed treats 10 seconds of silence as a dead connection, as the reconnect guide suggests. It then opens a new socket. Fills that settled while the socket was down never arrive on the new one. So the feed asks the HTTP API for every fill from the last block it printed, and skips the ones it already has: graphql query Backfill($since: String!, $limit: Int!) { EVM(network: matic) { PredictionTrades( limit: {count: $limit} orderBy: [{ascending: Block_Number}, {ascending: Log_Index}] where: { TransactionStatus: {Success: true} Trade: {Prediction: {Marketplace: {ProtocolName: {is: "polymarket"}}}} Block: {Number: {ge: $since}} } ) { ...same fields as the subscription... } } } We tested it by cutting the socket for eight seconds. The backfill recovered 85 fills, with no duplicates and no missing blocks. ## Step 6: measure the lag The feed writes each fill's lag to a CSV file with --log. Lag is the time the message arrived minus the time of the Polygon block that holds the fill. latency.py reads the file: bash python feed.py --log data/fills.csv --minutes 60 python latency.py data/fills.csv ## How fast is the Polymarket stream? The feed timed every fill for an hour on 2 December, from a server in Singapore. The median fill, the one in the middle when you line up all the lags, arrived 0.86 seconds after its block. Seven in ten arrived within a second, and 96% within a second and a half. The table below has the rest. | Measure | Median | 90% within | 99% within | Slowest | | ----------------------------------------- | ------ | ---------- | ---------- | ------- | | Stream, per fill | 0.86 s | 1.26 s | 2.41 s | 16.43 s | | Stream, first fill of each block | 0.76 s | 1.16 s | | | | HTTP polling once a second, per new block | 2.62 s | 3.15 s | | | {/* FIG:latency /} 51,003 fills over the WebSocket stream, 166 new blocks seen by polling. 90% of streamed fills arrived within 1.26 s; 90% of polled blocks within 3.15 s.} > {/ /FIG:latency /} For comparison, poll_compare.py asked the HTTP API once a second for the newest fill, for the first five minutes of the same run. It saw each new block a median of 2.62 seconds after the block was made. A poller also needs a request every second, and each request costs API points. {/ FIG:latency-time /} 18 blocks arrived more than 3 seconds late. 12 of them landed 20 to 35 seconds after a five-minute mark on the clock. The socket never dropped, and every fill arrived.} > {/ /FIG:latency-time /} The median held steady all hour, between 0.63 and 1.03 seconds in every minute. The slow tail came from a few late blocks. Of the 18 blocks that arrived more than 3 seconds late, 12 landed 20 to 35 seconds after a five-minute mark on the clock: 09:20, 09:25, 09:30 and so on. Polymarket's five-minute bitcoin and ether markets open and close on those marks. The slowest were three blocks at 09:37 UTC, 12 to 16 seconds late. The socket stayed open the whole time, so the feed's silence check never fired, and every fill still arrived. Plan for late blocks like these. A bot that acts on a fill should compare the block time with the clock, and skip a signal that is already stale. ## What breaks: four traps in Polymarket trade data Four traps gave our feed wrong numbers on live data in late 2026. Each one below comes with the rows that show it. ### 1. Every trade shows up twice PredictionTrades returns one row for each order in a match, so the taker's row and the maker rows describe the same shares. Here is one trade from 2 December, an NBA game: {/ FIG:match /} From the HTTP query. The resting orders bought Grizzlies at 0.31 while the taker bought Pistons at 0.69: together they paid $1 a pair, and the trade created new shares.} > {/ /FIG:match /} Sum every row, and you count those shares twice. On 1 December, the rows held exactly twice the shares that traded: {/ FIG:double /} Share counts double exactly. Dollar totals differ by side because, in most matches, the two sides paid complementary prices for opposite outcomes.} > {/ /FIG:double /} In dollars, the two sides differ, so pick one and say which. Bitquery's Polymarket dataset in the Data Store counts volume from the maker rows. For a trade tape, print the taker's row, as the feed does. ### 2. The two sides often hold opposite outcomes The trade in the figure above created new shares. The taker bought Pistons at 69 cents while the resting orders bought Grizzlies at 31 cents. Together they paid $1 a pair, and the exchange minted one share of each team for each dollar. In our hour of fills, 75% of trades matched opposite outcomes this way. Build a Pistons price chart from every row, and the line jumps between 0.69 and 0.31 on the same trade. Chart one outcome's rows only, or turn the other outcome's price around with 1 − price. That works for markets with two outcomes. ### 3. One exchange sends no market ID On 1 December, Polymarket fills came from three exchange contracts. On one of them, 0x862f…4e55, the Question.MarketId field is empty. That exchange carried about a fifth of the rows that day, and nearly two thirds of the rows in our hour a day later. Code that groups trades by MarketId puts all of them in one bucket with no name. Key markets on ConditionId instead. All three cubes carry it: Trade.Prediction.ConditionId, Management.Prediction.Condition.Id and Settlement.Prediction.ConditionId hold the same value for the same market. ### 4. Payouts of $0 and results with no winner On 1 December 2026, 28% of payout events paid nothing. A holder can redeem the losing side of a market, and the contract records a redemption of $0. A payout alert that prints every redemption is mostly noise. The same day, about one resolved market in a hundred returned an empty winning outcome. We read the on-chain result of each one. All of them paid both sides half: their payoutNumerators were [1, 1]. Most were voided sports markets and over/under lines. Treat an empty label as a split result. The market has resolved. {/ FIG:payouts /} A $0 payout is a holder redeeming the losing side. The 211 markets with no single winner all paid both sides half, by their on-chain payout numbers.} > {/ /FIG:payouts /} ## Polymarket API pricing: streams, minutes and GB Bitquery bills a stream on three meters: the number of streams, stream-minutes and the data pushed over the socket. Each cube in a stream query counts as one stream, so the full feed uses three. We counted the data with feed.py itself, which adds up the size of every message it receives. Over the hour, the full feed received 116.7 MB, or 1.95 MB a minute. At that rate, the Pro plan's 5 GB lasts under two days. Traffic rises and falls with Polymarket's activity, so measure your own feed before you pick a plan. {/ FIG:bandwidth /} Included stream data per plan, read from the pricing page on 2 December 2026. On the free trial, the 17 stream-minutes run out first: about 8 minutes of the feed. Extra data is sold in add-on packs.} > {/ /FIG:bandwidth */} | Run | Streams | Stream-minutes | Stream data | Plan that covers it | | ---------------------- | ------- | --------------------------- | ------------------- | ----------------------------------------------------------------------------------- | | Try it, --no-payouts | 2 | 16 for 8 minutes | under 0.02 GB | Free trial: 17 stream-minutes, 0.2 GB | | Full feed, all month | 3 | 129,600 | about 84.0 GB | Scale, $299 a month: 2 million minutes and 50 GB, plus seven 5 GB packs at $50 each | | Full feed on Pro | 3 | 129,600, over Pro's 100,000 | 5 GB lasts 1.8 days | Pro, $99 a month, needs add-ons that cost more than Scale | We read these prices on the pricing page on 2 December 2026. A stream-minute is one stream connected for any part of a minute. The backfill and the polling script use API points instead. Each HTTP query costs points, and the trial includes 1,000. For a feed that runs all day, the stream data runs out first. Three things cut it. Drop fields you do not print. Filter on the server, as the feed does for $0 payouts. Or subscribe to the markets you follow, with a ConditionId filter. For an unmetered firehose, Bitquery sells Kafka streams on Enterprise plans. ## Limits - Polygon only. The feed reads Polygon and nothing else. Bitquery's Polygon API covers the rest of the chain. - Fills only, no order book. The feed sees trades after they settle. It does not see resting orders, cancelled orders or the book's depth. Polymarket's own order book API serves those. - About four days of history on the HTTP API. On 2 December, the oldest fill in the real-time dataset was from 28 November. The backfill is for dropped sockets. It cannot reach back months. - Older history is an add-on. The Polymarket history add-on starts on 1 September 2025 and costs $150 a month. The Data Store sells the same history as files, below. - No order placement. The code reads data only. It places no orders and holds no keys. - Lag depends on your network. We ran the feed on one server in Singapore. From another region, the network path to Bitquery's endpoint changes, and so does the lag. ## How we tested - Latency. One run of feed.py for 60 minutes on 2 December, 09:16 to 10:16 UTC, on the live endpoint wss://streaming.bitquery.io/graphql. It ran on a small AWS server (t3.micro) in Singapore. Lag is arrival time minus block time. The server synced its clock to Amazon's time service, and the clock sat within a microsecond of it when the run began. Percentiles are exact, by nearest rank. - Polling. poll_compare.py, one request a second for the first five minutes of the same run, on the same server. - Completeness. We read every fill in the run's blocks again over HTTP later. The HTTP API returned 51,003 trades in those blocks. The stream had delivered every one of them, with none missing and none extra. - Spot check. For the 10 busiest markets of the run, nine of them five-minute bitcoin markets, we pulled every trade from Polymarket's own Data API and matched transaction hashes. Polymarket listed all 16,225 of our transactions and no others, and every one matched on the taker's price and size. - Day figures. Counts and sums for 1 December 2026, 00:00 to 24:00 UTC, from the HTTP API with exact unique counts. - Split results. We read the ConditionResolution event of each of the 211 markets with an empty winning outcome. We used AI tools to write and run the test queries, and we checked each figure against the live API. The data behind every number and chart is saved with the article. ## Polymarket history as files The API keeps about four days of fills. For a backtest or a dashboard with months of history, use the Polymarket dataset in the Data Store. It has every fill, payout and market result since 1 September 2025 as Parquet files, with a free sample of each table. The latest month costs $400 and the full history $4,000. ## FAQ ### Is the Polymarket API free? Polymarket's own APIs are free to read. The Bitquery API, which this guide uses, has a free trial for a week with two streams, enough to run this feed for a few minutes. Streaming after that needs the Pro plan at $99 a month, as read on 2 December 2026. ### Does Polymarket have a WebSocket for trades? Yes. Polymarket's own socket streams order book updates. The Bitquery stream sends trades after they settle on Polygon, with the market question, outcome, price, size and fee, plus market results and payouts. In our test, a fill reached our code a median of 0.86 seconds after its Polygon block, and 99% within 2.4 seconds. ### How do I get Polymarket trade data in Python? Open a socket to wss://streaming.bitquery.io/graphql with the graphql-ws protocol and subscribe to PredictionTrades on EVM(network: matic), filtered to Polymarket. Keep the taker's row of each trade, and compute the price as CollateralAmount / Amount. The repo bitquery/polymarket-trade-feed has the full code. ### Why does my Polymarket volume look twice as high? You are summing both sides of each trade. Every match returns a row for the taker and a row for each maker order, and they hold the same shares. On 1 December 2026, summing every row gave exactly twice the shares that traded. ### How do I get Polymarket historical data? The Bitquery HTTP API keeps about four days of fills in its real-time dataset. For older data, the Polymarket history add-on starts on 1 September 2025, and the Data Store sells the same history as Parquet files. ## Related reading - Bitquery Polymarket API: the product behind this feed - Prediction market API in the docs - WebSocket streams and Bitquery MCP server - How much of Polymarket is bots? - Polymarket built a casino. Almost all of the players have left. - One Polymarket disputer is 80 for 80: who decides disputes - How much of Polygon is Polymarket? We counted every transactionbash git clone https://github.com/bitquery/tokenized-stocks-api && cd tokenized-stocks-api pip install -r requirements.txt export BITQUERY_TOKEN=your_access_token python feed.py --ticker NVDA --json To get an access token, sign up for Bitquery and create a token in your account. One row of the JSON output: json { "ticker": "NVDA", "issuer": "Backpack", "network": "Solana", "symbol": "NVDA", "contract": "NVDAVuiB7hwd3m5Wa1JuHNovPaPG6BH1QNztbKFxNjv", "price_per_share": 149.944, "token_price": 149.94403, "multiplier": 1.0, "price_time": "2026-11-30T16:33:10Z", "age_minutes": 0.0, "liquidity_usd": 1072351, "trust": "ok", "nyse_core_session_open": true, "as_of": "2026-11-30T16:32:51Z" } The API names two chains differently from this article. BNB Chain appears as Binance Smart Chain in the output, and Robinhood Chain appears as Robinhood. ## Stock tokens covered: xStocks, Ondo, Robinhood, Coinbase, Binance bStocks and Backpack The feed covers 1,723 stock tokens from xStocks, Ondo, Robinhood, Coinbase, Binance bStocks and Backpack on seven chains. The token list, tokens.csv, holds every stock token in our registry that had a price on the Bitquery API in November 2026. | Issuer | Chain | Tokens | Trusted prices on 30 Nov 2026 | |---|---|---|---| | Ondo | Solana | 371 | 0 | | Ondo | BNB Chain | 298 | 7 | | Ondo | Ethereum | 168 | 8 | | Robinhood | Robinhood Chain | 200 | 58 | | xStocks | Solana | 197 | 24 | | xStocks | BNB Chain | 121 | 0 | | xStocks | Ethereum | 84 | 2 | | xStocks | Arbitrum and Optimism | 9 | 0 | | Binance bStocks | BNB Chain | 106 | 32 | | Backpack | Solana | 91 | 74 | | Coinbase | Base | 78 | 37 | | Total | | 1,723 | 242 | Our registry is a list of stock token contracts that we tie to each issuer with an on-chain test. For Robinhood, the test checks that the issuer's own factory contract deployed the token. The feed never finds tokens by name. In November 2026, 341 traded tokens carried a "Backpack Securities" name and 223 carried an "xStock" name without being in our registry. They include copies on chains the issuer does not use. ## Step 1: get the latest price for 50 tokens in one query To get the latest price of a tokenized stock, query the Tokens cube in the Trading root of the Bitquery API with the token's address and chain. Bitquery calls each dataset a cube, and cubes sit under roots. The Trading root holds prices for tokens that trade on a decentralized exchange (DEX) on the chains Bitquery indexes. A DEX trade happens in a pool, a contract that holds two tokens and swaps one for the other. The Tokens cube returns price bars from 1 second to 1 hour long. A bar is the open, high, low and close price of one time slot. The price query asks for the newest 60-second bar of each token. It takes 50 addresses per call: graphql { Trading { Tokens( limit: {count: 1000} limitBy: {by: Token_Id, count: 1} orderBy: {descending: Block_Time} where: { Token: {Address: {in: ["NVDAVuiB7hwd3m5Wa1JuHNovPaPG6BH1QNztbKFxNjv", "0xc845b2894dbddd03858fd2d643b4ef725fe0849d"]}} Interval: {Time: {Duration: {eq: 60}}} Block: {Time: {since: "2026-10-31T00:00:00Z"}} } ) { Block { Time } Token { Address Network } Price { Ohlc { Close } } Liquidity { Usd Source } } } } Three parts of the query matter: - limitBy: {by: Token_Id, count: 1} keeps one row per token, the newest. Token_Id joins the chain and the address, so one address on two chains gives two rows. - Liquidity { Usd Source } returns the USD value of the pool behind the price. Source says how the API got that value: real is a measured pool reserve, and volume is an estimate from the last hour of trading. The liquidity fields page in the docs lists every value. The feed uses both fields to mark thin pools. - Block: {Time: {since: ...}} bounds the search. The Trading root holds about 30 days of bars, and feed.py sets since to 30 days before each run. Send the query to https://streaming.bitquery.io/graphql with your access token in the Authorization header: bash curl -s https://streaming.bitquery.io/graphql \\ -H "Content-Type: application/json" \\ -H "Authorization: Bearer $BITQUERY_TOKEN" \\ -d '{"query": "{ Trading { Tokens(limit: {count: 1}, orderBy: {descending: Block_Time}, where: {Token: {Address: {is: \\"NVDAVuiB7hwd3m5Wa1JuHNovPaPG6BH1QNztbKFxNjv\\"}, Network: {is: \\"Solana\\"}}, Interval: {Time: {Duration: {eq: 60}}}}) { Block { Time } Price { Ohlc { Close } } Liquidity { Usd Source } } } }"}' A GraphQL error comes back with HTTP status 200, so read the errors field before you read data. The 1,723 tokens have 1,650 distinct addresses, and the feed prices them in 33 calls. ## Step 2: convert each token price to a price per share One stock token does not always equal one share. Each issuer keeps a share multiplier: the number of shares one raw token represents. The multiplier rises a little when the issuer reinvests a dividend, and it jumps on a stock split. The Bitquery API applies the multiplier on Solana, so a Solana price is per share. The API does not apply the multiplier on EVM chains, the chains that run the Ethereum Virtual Machine: Ethereum, BNB Chain, Base, Arbitrum, Optimism and Robinhood Chain. A price on those chains is per raw token. The feed handles three cases: | Stock tokens | Rule | Source of the multiplier | |---|---|---| | All Solana tokens, and xStocks on EVM chains | Use the API price as it is | Not needed | | Ondo on Ethereum and BNB Chain | Divide by the multiplier of the Ondo Solana token of the same stock | Bitquery API, Solana.DEXTradeByTokens | | Robinhood, Coinbase and Binance bStocks | Divide by uiMultiplier() | The token contract, read through a chain RPC | xStocks is the EVM exception. After a split or a dividend, xStocks changes each holder's token balance, so one xStocks token stays one share. The Ondo rule rests on a check. On 30 November 2026, Ondo's SanDisk token on Ethereum printed $720.51, and the Ondo Solana multiplier was 8. The division gives $90.06, in line with the other SanDisk tokens that day. The Solana multiplier is a field on every Solana DEX trade: graphql { Solana(dataset: combined) { DEXTradeByTokens( limit: {count: 1000} limitBy: {by: Trade_Currency_MintAddress, count: 1} orderBy: {descending: Block_Time} where: { Trade: {Currency: {MintAddress: {in: ["EJmUVvDqAdfH5zEohkdS4234bi3c6iunqEMobjmondo"]}}} Block: {Time: {since: "2026-10-31T00:00:00Z"}} } ) { Block { Time } Trade { Currency { MintAddress Multiplier } } } } } For Robinhood, Coinbase and Binance bStocks tokens, the multiplier lives in the token contract, and the Bitquery API does not return it. The feed reads it from a chain RPC, the JSON interface of a blockchain node. It sends one eth_call, a read-only contract call, per token: python UI_MULTIPLIER = "0xa60bf13d" # uiMultiplier(), 18 decimals: shares per raw token call = {"jsonrpc": "2.0", "id": 0, "method": "eth_call", "params": [{"to": token_address, "data": UI_MULTIPLIER}, "latest"]} multiplier = int(reply["result"], 16) / 1e18 price_per_share = token_price / multiplier All 384 Robinhood, Coinbase and Binance bStocks tokens answered the call. The public RPC for Robinhood Chain limits request rates, so the feed sends 4 calls per batch there and waits 1.5 seconds between batches. Those waits add up to 75 seconds of the run. Robinhood's docs describe the multiplier as part of the ERC-8056 standard. The same docs list two more read calls, newUIMultiplier() and effectiveAt(), which return a scheduled multiplier and the time it takes effect. feed.py reads the current multiplier only. ## Step 3: mark thin, stale and outlier prices The feed gives each row a trust mark, because a DEX price is only the last trade in a pool. If the pool is nearly empty, a small trade moves the price a long way. The first check that fails names the row: | Trust mark | Check | Rows on 30 Nov 2026 | |---|---|---| | no_price | The API returned no price in the last 30 days | 0 | | no_multiplier | The feed could not read the multiplier | 52 | | stale_multiplier | The Solana multiplier comes from a trade more than 7 days old | 100 | | thin | Pool liquidity is under $10,000, or the API could not measure it | 1,279 | | stale | The last trade is more than 60 minutes old | 50 | | outlier | The price is more than 5% from the same stock's trusted tokens | 0 | | ok | Every check passed | 242 | Old prices are more common than the stale row suggests. Only 395 of the 1,723 prices were under 60 minutes old. Most old prices already carry the thin mark. We set the liquidity line at $10,000 after a 30-day test. For 23 stocks, at least three tokens had deep pools in the same 30 minutes. A deep pool here held $100,000 or more, measured from its reserves. We compared every token of those stocks with the median price of the deep-pool tokens: | Pool liquidity | Bars compared | Bars more than 5% from the deep-pool median | |---|---|---| | Under $1,000 | 3,749 | 10% | | $1,000 to $10,000 | 2,591 | 1.5% | | $10,000 to $50,000 | 2,512 | 0.4% | | $50,000 to $100,000 | 1,289 | 0.2% | | $100,000 and above | 40,293 | under 0.1% | Under $1,000, 10% of bars sat more than 5% from the deep pools. Between $10,000 and $50,000, 0.4% of bars did. The last row includes the deep pools themselves. The trust rule in feed.py: python row["trust"] = ("stale_multiplier" if now - multiplier_seen > MAX_MULTIPLIER_AGE else "thin" if liquidity < MIN_LIQUIDITY_USD or bar["Liquidity"]["Source"] not in ("real", "volume") else "stale" if age > MAX_AGE else "ok") ## Step 4: flag NYSE market hours The feed returns nyse_core_session_open, a flag that says whether the NYSE core session is open at the time of the run. A stock token trades at any hour, but the stock trades only while its exchange is open. When the NYSE is closed, no live share price exists to check the token price against. The flag is true from 09:30 to 16:00 New York time on a full trading day. The exchange_calendars library supplies the holidays and the half days: python import exchange_calendars def nyse_core_session_open(now): calendar = exchange_calendars.get_calendar("XNYS") return bool(calendar.is_open_on_minute(now.replace(second=0, microsecond=0))) Our 30-day window had 19 sessions. Thanksgiving, 26 November 2026, had none. The session on 27 November closed at 13:00 New York time. A flag built on weekdays alone gets both days wrong. We named the flag for the NYSE core session because "market closed" differs per issuer. Binance bStocks and Backpack tokens trade every hour of the week. Robinhood mints and burns its tokens from Monday to Saturday morning, Central European Time, according to its docs. In our Robinhood Chain study, 64% of DEX trading in Robinhood stock tokens took place outside regular market hours. ## DEX price or oracle price? The feed in this guide returns the price that stock tokens traded at on DEXs. Issuers also publish oracle prices, which they derive from the share price. The two prices answer different questions. Robinhood Chain has Chainlink price feeds for a subset of its stock tokens. Each feed returns the share price times the multiplier, and Robinhood's docs say the stock feeds update five days per week, following market hours. Chainlink lists tokenized equity feeds for Ondo and Coinbase tokens too. Base has an API that returns each Coinbase token's multiplier and a Chainlink-based value. An oracle price tells you what the issuer says a token is worth. A DEX price tells you what someone paid, at any hour, on any chain where the token trades. Use the oracle price to value a holding, and the DEX price to see where the market is. The gap section below compares DEX prices with the share price directly. ## Four traps that give a stock token price feed wrong prices Four traps gave a stock token price feed wrong prices on live data in November 2026: a stock split, a shared contract address, a thin pool and a wrong liquidity reading. ### A stock split leaves two prices for one stock SanDisk split 8-for-1 on 20 November 2026. On Solana, the multiplier of each SanDisk token went from 1 to 8 that day, and the API price stayed a price per share. On EVM chains the raw token price did not change. On 30 November 2026 the feed read: | Issuer | Chain | API price | Divisor the feed applies | Price per share | |---|---|---|---|---| | Backpack | Solana | $89.59 | 1 | $89.59 | | Coinbase | Base | $714.80 | 8 | $89.35 | | Binance bStocks | BNB Chain | $714.00 | 8 | $89.25 | | Robinhood | Robinhood Chain | $715.30 | 8 | $89.41 | A feed that skips step 2 shows SanDisk at $715 and $90 in the same minute. Of the 798 tokens whose multiplier the feed reads, 139 sit more than 1% from 1, and 33 sit more than 5% from 1. Ondo's Netflix tokens carry a multiplier of 10. The Ondo and Robinhood CrowdStrike tokens carry a multiplier of 4. Do not store a multiplier. A registry we built on 27 October 2026 listed SanDisk at 1. Read the multiplier on every refresh. ### The same address is a different token on each chain xStocks deploys a token at the same contract address on Ethereum, BNB Chain, Arbitrum and Optimism. Our registry holds 1,531 xStocks addresses that exist on all four chains. In the feed's list, 64 addresses have a price on two or more chains. The NVIDIA address 0xc845b2894dbddd03858fd2d643b4ef725fe0849d returned three rows on 30 November 2026: | Chain | Price | Pool liquidity | Age of last trade | |---|---|---|---| | Arbitrum | $166.89 | $9 | 10 hours | | Ethereum | $162.74 | $60 | 14 hours | | BNB Chain | $106.66 | $419 | 46 hours | The xStocks token on Solana, with $1.5 million in its pool, read $149.77 in the same run. A query by address with limit: {count: 1} returns one of the three rows above, and you do not choose which. Match the address and the chain in your code, as feed.py does. ### A thin pool prints a price no one can trade On 30 November 2026, the Apple xStocks token on Ethereum printed $298.16 while the five trusted Apple tokens printed $353.87 to $354.49. The pool held $1,008. In 30 days the token had 19 trades worth $84 in total, and its last ten trades ran from $251 to $447. The same address on BNB Chain printed $1,764.03 from a pool of $676. No field marks these rows as bad. Compare Liquidity.Usd with a threshold in your own code. Our study of how large an order tokenized stocks can take measures pool depth on six chains. ### The liquidity field can be wrong for one bar On 18 November 2026 at 18:00 UTC, the NVIDIA xStocks token on Ethereum printed $1,676.81, about 11 times the share price. The liquidity field on that row read $735,841, so the thin-pool check passes the row. Every other bar of that token in the 30 days showed $8,276 or less. We did not trace the cause. feed.py therefore compares the tokens of one stock. When a stock has three or more trusted prices, a price more than 5% from their median gets the outlier mark. The repository has a unit test built on this row. ## Do tokenized stocks track the real stock price? Liquid stock tokens traded a median of 0.11% from the share price while the NYSE was open, from 31 October to 29 November 2026. We measured the gap between the feed's price per share and the share price for those 30 days. A bar counts as liquid when the token traded $10,000 or more across that bar and the bar before it, added together, and its pool held $10,000 or more. | Period | Bars | Tokens | Stocks | Median gap | 90% of bars within | |---|---|---|---|---|---| | NYSE core session | 22,506 | 296 | 139 | 0.11% | 0.46% | | Weekday, NYSE closed | 44,717 | 269 | 131 | 0.93% | 3.9% | | Weekend and holiday | 25,485 | 187 | 89 | 0.98% | 3.5% | In the core session, we compare each token bar with the share-price bar of the same 30 minutes. In closed hours, we compare each bar with the last close. The gap grows with time since the close: the median was 0.52% in the first four hours and 1.15% overnight and before the open. We did not measure why. News that arrives while the exchange is shut is the likely cause. Tokens traded neither below nor above the share price overall. The median signed gap in the core session was -0.01%. The 0.11% figure is a median over bars, and ten stocks hold 44% of the bars. The median token sat 0.24% from its stock. The 157 tokens with 20 or more bars sat 0.14% away. By issuer, in the core session: | Issuer | Chain | Bars | Tokens | Median gap | |---|---|---|---|---| | Coinbase | Base | 3,219 | 22 | 0.05% | | xStocks | Solana | 4,199 | 38 | 0.09% | | Binance bStocks | BNB Chain | 3,081 | 32 | 0.12% | | Robinhood | Robinhood Chain | 5,917 | 50 | 0.13% | | Backpack | Solana | 4,832 | 83 | 0.13% | | Ondo | BNB Chain | 290 | 8 | 0.14% | | xStocks | Ethereum | 87 | 3 | 0.19% | | Ondo | Solana | 152 | 43 | 0.37% | | Ondo | Ethereum | 725 | 16 | 1.18% | Not shown: xStocks on BNB Chain, with 4 bars. In an earlier 30-day study, a wallet our labels tie to Wintermute settled 37% of Coinbase stock-token trades. Our earlier study of six NVIDIA tokens found a gap of the same size: the four largest agreed within 0.12%. For closed hours, see how tokenized stocks trade on weekends. ## Tokenized stocks API pricing: points and plans A full refresh of the feed takes 39 Bitquery API calls. At 5 points per call, that is 195 points. Bitquery bills API use in points. | Run | Bitquery API calls | Points at 5 per call | |---|---|---| | One stock, such as --ticker NVDA | 1 or 2 | 5 or 10 | | Full refresh, 1,723 tokens | 39 | 195 | Each Trading.Tokens call spent 5 points in our account's usage log, whatever the number of tokens in the call. Our key is not charged for the six multiplier calls, so we count them at the same 5 points. The pricing page states 5 points per call. The points page in the docs says that cost follows query complexity. Check your own usage after the first run. The trial gives 1,000 points over 7 days. By points, that covers five full refreshes or at least 100 single-stock runs. We did not test the feed with a trial key. The Personal plan costs $49 per month for 100,000 points and is for non-commercial use. A company starts at the Pro plan, $99 per month for 1 million points. A refresh every 5 minutes for 30 days is 8,640 refreshes, or about 1.7 million points. That is more than the Pro plan includes, so refresh less often or shorten the token list. We read these prices on 30 November 2026. A full refresh also sends about 60 batch requests to public RPC endpoints, which are free. Those endpoints limit request rates, so use your own for production. ## Limits: history, multipliers and coverage The feed has seven limits that a production user must plan for. - History is 30 days. The Trading root keeps about 30 days of bars. For a longer record, the Data Store sells full trade history as Parquet files for Solana tokenized stocks and Robinhood tokenized stocks, each from $300 for the latest month. Those two datasets cover two of the seven chains. They hold trades and no price series. - Three issuers need a chain RPC. The API does not return the share multiplier for Robinhood, Coinbase or Binance bStocks tokens. The feed does not read a scheduled multiplier change before it takes effect. - 52 Ondo tokens have no multiplier. They trade on Ethereum or BNB Chain. For 39 of them, our list has no Ondo token on Solana. For the other 13, the Solana token did not trade in the last 30 days. The feed returns the raw price of each and marks it no_multiplier. - The liquidity field can be an estimate. Only the real value is a measured reserve. One Ondo NVIDIA row on BNB Chain read $77 million, far above every other NVIDIA pool. We did not check that figure against the chain. - The feed prices DEX trades only. It does not read an issuer's quote or an exchange order book. - The token list is dated 30 November 2026. A new token does not appear until we rebuild the list. We left out pre-IPO tokens because they have no public share price. - The trust mark and the gap use different bars. The gap uses liquid 30-minute bars. The trust mark uses the newest 60-second bar and has no volume check. An ok mark does not promise that a row sits 0.11% from the share price. No share prices ship with the code, because share-price data has license terms. Plug in your own source. ## How we tested We ran every query on the production Bitquery API, https://streaming.bitquery.io/graphql, on 30 November 2026. We used AI tools to write and run the test queries, and we checked each result against the production API. - Feed numbers come from one full run at 16:32 UTC that day. - Gap numbers use 355,879 thirty-minute bars from Trading.Tokens for 31 October to 29 November 2026. The liquid-bar rule left 106,765 bars on 359 tokens and 161 stocks. - Share prices are 30-minute bars from Yahoo Finance. We report medians and counts only. - Left out of the gap: SanDisk and the SOXX fund, which split inside the window. For 16 stocks, we also left out the Robinhood, Coinbase and Binance bStocks tokens. Those stocks paid a dividend in the window, or their multiplier changed before our 30 November read. We read those multipliers once, so the earlier bars of those tokens would be wrong. A further 248 liquid bars had no share bar to compare with. - Points come from our account's usage log. - A separate review recomputed the figures from the saved API replies with its own code, and we applied its corrections. We did not check token trades against chain receipts. We did not compare the last share bar with the closing auction price. ## FAQ ### What is a tokenized stocks API? A tokenized stocks API returns data about stock tokens. A stock token is a blockchain token that an issuer sells to track a listed share. The issuers include xStocks, Ondo, Robinhood, Coinbase, Binance and Backpack. The Bitquery API returns each token's DEX trades, price bars and pool liquidity on Solana, Ethereum, BNB Chain, Base, Arbitrum, Optimism and Robinhood Chain. ### How do I get the price of a tokenized stock? Query the Tokens cube in the Trading root of the Bitquery API with the token's contract address and its chain. The newest 60-second bar holds the last price and the pool liquidity. For Ondo, Robinhood, Coinbase and Binance tokens on EVM chains, divide the price by the token's share multiplier to get a price per share. ### Is there an xStocks API? Yes. The Bitquery API returns DEX prices for xStocks tokens on Solana, Ethereum, BNB Chain, Arbitrum and Optimism. Our feed lists 411 xStocks tokens. On 30 November 2026, 26 of those prices passed every trust check: 24 on Solana and 2 on Ethereum. ### How do I get the price of a Robinhood stock token? Query the Tokens cube of the Bitquery API with the token's address on Robinhood Chain. Then read uiMultiplier() from the token contract with an eth_call, and divide the price by that multiplier. On 30 November 2026, 58 of the 200 Robinhood token prices in our feed passed every trust check. ### Is one stock token always worth one share? No. Each issuer keeps a share multiplier that changes with dividends and stock splits. On 30 November 2026, 139 of the 798 multipliers our feed read were more than 1% away from 1. SanDisk tokens carried a multiplier of 8 after the 8-for-1 split on 20 November 2026. ### How close do tokenized stocks trade to the real share price? Liquid stock tokens traded a median of 0.11% from the share price while the NYSE was open, across 22,506 thirty-minute bars from 31 October to 29 November 2026. Counted per token, the median gap was 0.24%. ### Do tokenized stocks trade when the stock market is closed? Yes. Stock tokens trade on DEXs at any hour. From 31 October to 29 November 2026, the median gap between a liquid token and the last closing share price was 0.93% on weekdays while the NYSE was closed. It was 0.98% on weekends and the Thanksgiving holiday. ### Why does the same stock token show different prices on different chains? Each chain has its own pool, and our feed marked 1,279 of 1,723 prices as thin on 30 November 2026. That day the Apple xStocks token printed $298 on Ethereum and $1,764 on BNB Chain, from pools of about $1,000 and $700. Five trusted Apple tokens printed about $354. Check the pool liquidity before you trust a price. ### How much does a tokenized stocks price feed cost to run on Bitquery? Each Bitquery API call costs 5 points. A full refresh of 1,723 tokens takes 39 calls, or 195 points. The 7-day trial includes 1,000 points. Paid plans start at $49 per month for non-commercial use and $99 per month for commercial use, as read on 30 November 2026. ### Can I get tokenized stock price history? As of 30 November 2026, the Trading root of the Bitquery API keeps about 30 days of price bars. For older data, the Bitquery Data Store sells trade history for Solana tokenized stocks and Robinhood tokenized stocks as Parquet files. ## Related reading - Bitquery crypto price API: the product behind the Trading root - xStocks API on Solana in the docs - Robinhood Chain API - bStocks: the 3 a.m. stock market - Four of seven stock-token issuers can take tokens from any wallet - Tokenized stocks are worth $3.2 billion - Tokenized stock datasets in the Data StoreDEXTrades is the cube of DEX trades. Cubes sit under roots. The Solana and EVM roots hold chain data such as trades and holders. The Trading root holds prices, candles and wallet trade totals across chains for the last 30 days. Every query below goes to https://streaming.bitquery.io/graphql with a bearer token. That endpoint is the v2 API. A few Solana wallet lookups use the older v1 endpoint, https://graphql.bitquery.io, and we flag each one. ## Run your first Bitquery query Create an account at account.bitquery.io and copy your access token. Save the token in an environment variable named BITQUERY_TOKEN. Then send the query as a POST body. This call asks for the newest BONK trade on Solana: bash curl -s https://streaming.bitquery.io/graphql \\ -H "Content-Type: application/json" \\ -H "Authorization: Bearer $BITQUERY_TOKEN" \\ -d '{"query":"{ Solana { DEXTradeByTokens(limit: {count: 1}, orderBy: {descending: Block_Time}, where: {Trade: {Currency: {MintAddress: {is: \\"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263\\"}}}, Transaction: {Result: {Success: true}}}) { Block { Time } Transaction { Signature Signer } Trade { Amount AmountInUSD PriceInUSD Dex { ProtocolName } Market { MarketAddress } Side { Type } } } } }"}' At 15:02 UTC, the call came back in 0.54 seconds with this row: json { "data": { "Solana": { "DEXTradeByTokens": [ { "Block": { "Time": "2026-11-27T15:02:02Z" }, "Transaction": { "Signature": "47AmSaktqY3LuF4ZVDFPqbC6V8thPYikispQzjHJCrXAb9YvGMBx5jxM9kUsdbdisrATgSqnqRbXuSLrDAUmgzA5", "Signer": "9f6tZHnM7VdTktMEzDraixQRjjbvt36FfghDtwtn3toD" }, "Trade": { "Amount": "557524.49225", "AmountInUSD": "1.173868", "PriceInUSD": 0.000002111768380186491, "Dex": { "ProtocolName": "scorch" }, "Market": { "MarketAddress": "5ZWCKP2E8LqTUmo98xhq1YELjcqvxpNsv4xfzVbKGswc" }, "Side": { "Type": "sell" } } } ] } } } Check two things in every response: - Read errors before data. A bad query still returns HTTP 200. We sent a query with a wrong field name and got status 200 with the message in the errors array. - Parse amounts as strings. Amount and AmountInUSD arrive as strings, so a large value keeps its precision. PriceInUSD arrives as a number. To try a query without code, paste it into the Bitquery IDE. ## Trades: 9 of 10 match Trades are the easiest part of a move. Bitquery's DEX API and Solana DEX API cover the same swaps that Birdeye's trade endpoints return. GET /defi/txs/token returns the trades of a token. This Bitquery query returned 5 BONK trades at 14:20 UTC: graphql { Solana { DEXTradeByTokens( limit: {count: 5} orderBy: {descending: Block_Time} where: {Trade: {Currency: {MintAddress: {is: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}}}, Transaction: {Result: {Success: true}}} ) { Block { Time Slot } Transaction { Signature Signer Index } Instruction { Index } Trade { Currency { Symbol MintAddress Decimals } Amount AmountInUSD Price PriceInUSD Account { Owner Address } Dex { ProtocolName ProtocolFamily ProgramAddress } Market { MarketAddress } Side { Type Amount AmountInUSD Currency { Symbol MintAddress } Account { Address } } } } } } Each row names the wallet that signed the swap, the pool, the DEX and both sides in USD. That is enough to build a trade feed, a whale alert or a copy-trading signal. If your parser reads Birdeye's v3 trade rows, rename the fields like this on Solana: | Birdeye field | Bitquery field | |---|---| | tx_hash | Transaction.Signature | | block_unix_time | Block.Time, an ISO 8601 string | | block_number | Block.Slot | | owner | Transaction.Signer | | pool_id | Trade.Market.MarketAddress | | source | Trade.Dex.ProtocolName | | volume_usd | Trade.AmountInUSD | GET /defi/v3/token/txs-by-volume filters trades by size, which is how you catch whale buys. Add a USD range and a DEX filter to the same query: graphql where: {Trade: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}, AmountInUSD: {ge: "10000", le: "50000"}, Dex: {ProtocolFamily: {is: "Raydium"}}}, Transaction: {Result: {Success: true}}} The filter returned WSOL trades between $10,000 and $50,000 on Raydium. Birdeye offers this endpoint on Solana only. On Ethereum, a $1,000 floor ran under the EVM root, with SmartContract in place of MintAddress. | Birdeye endpoint | Status | How it maps | |---|---|---| | GET /defi/txs/pair | Match | DEXTrades filtered by pool address | | GET /defi/txs/pair/seek_by_time | Match | Add a time window | | GET /defi/txs/token | Match | DEXTradeByTokens filtered by token | | GET /defi/txs/token/seek_by_time | Needs changes | Older Solana windows use the archive, which has a different shape | | GET /defi/v3/token/txs | Match | Same query with owner, pool or source filters | | GET /defi/v3/token/txs-by-volume | Match | USD size filter | | GET /defi/v3/token/mint-burn-txs | Match | TokenSupplyUpdates; the sign tells mint from burn | | GET /defi/v3/txs | Match | DEXTrades with a protocol filter | | GET /defi/v3/txs/recent | Match | Same query, newest first | | GET /trader/txs/seek_by_time | Match | DEXTrades filtered by Transaction.Signer | ### What breaks in trades - LP adds and removes are a second query. Birdeye returns them with trades when you ask for all types. On Bitquery, swaps and liquidity events sit in different cubes, and you merge them by time. - Use the signer as the trader. The per-side account fields often hold the pool. On Solana, use Transaction.Signer. On EVM, use Transaction.From. - A query with no token filter returns each swap twice. DEXTradeByTokens has a row per token, so a SOL to BONK swap shows up once for each token. For a wallet-wide or chain-wide list, use DEXTrades. - DEX names differ. Bitquery's amm_v3 is Birdeye's raydium_clamm. Build a DEX name mapping before you compare sources. - Old Solana trades use another shape. DEXTradeByTokens covers about the last 8 hours on Solana. For older trades, query DEXTrades under Solana(dataset: archive) with a Block.Time window. The archive splits each row into a buy side and a sell side. Our archive queries returned Solana trades from January 2025 and Ethereum trades from January 2023. ## Token prices and OHLCV candles: all 17 need changes Prices are where you write the most new code. The Crypto Price API builds a USD price for each token from DEX trades, and every Birdeye price endpoint we tested maps to it. It works as a Solana token price API, and the same query covers EVM chains. No endpoint maps one-to-one, though. GET /defi/price returns a USD price and a 24-hour change. On Bitquery, that is two aliases in a single request, now and ago24h: graphql { Trading { now: Tokens( where: {Token: {Did: {is: ""}, Network: {is: "Solana"}, Address: {is: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}}, Interval: {Time: {Duration: {eq: 1}}}} orderBy: {descending: Block_Time} limit: {count: 1} ) { Block { Time } Price { IsQuotedInUsd Ohlc { Close } } Liquidity { Usd } } ago24h: Tokens( where: {Token: {Did: {is: ""}, Network: {is: "Solana"}, Address: {is: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}}, Interval: {Time: {Duration: {eq: 60}}}, Block: {Time: {till_relative: {hours_ago: 24}}}} orderBy: {descending: Block_Time} limit: {count: 1} ) { Block { Time } Price { Ohlc { Close } } } eth_now: Tokens( where: {Token: {Did: {is: ""}, Network: {is: "Ethereum"}, Address: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, Interval: {Time: {Duration: {eq: 1}}}} orderBy: {descending: Block_Time} limit: {count: 1} ) { Block { Time } Price { Ohlc { Close } } Liquidity { Usd } } } } At 14:23 UTC, this returned BONK at $0.0000021945, the BONK price 24 hours earlier, and WETH on Ethereum at $1,721.07. The third alias is there to show two chains in the same request. GET /defi/ohlcv returns candles for a chart. This query returned six 5-minute BONK candles, each with a market cap: graphql { Trading { Tokens( where: {Token: {Did: {is: ""}, Network: {is: "Solana"}, Address: {is: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}}, Interval: {Time: {Duration: {eq: 300}, Start: {since: "2026-11-27T12:00:00Z", till: "2026-11-27T12:29:59Z"}}}} orderBy: {ascending: Interval_Time_Start} limitBy: {by: Interval_Time_Start, count: 1} limit: {count: 10} ) { Interval { Time { Start Duration } } Price { IsQuotedInUsd Ohlc { Open High Low Close } } Volume { Base Usd } Supply { MarketCap TotalSupply } } } } If you chart with TradingView, the TradingView data feed wraps the same candles. | Birdeye endpoint | Status | How it maps | |---|---|---| | GET /defi/price | Needs changes | Trading.Tokens. The 24-hour change is a second alias. USD only. | | GET /defi/multi_price | Needs changes | A token list across chains in a single call. No 24-hour change in the row. | | POST /defi/multi_price | Needs changes | Same query as the GET form. | | GET /defi/history_price | Needs changes | Candles from 1 second to 1 hour. A quiet period has no candle. 30 days. | | GET /defi/historical_price_unix | Needs changes | 30 days of index price. For older dates, the Solana archive gives a single trade's price. | | GET /defi/ohlcv | Needs changes | USD only. No 3-minute candle and none above 1 hour. Volume counts the base side. | | GET /defi/ohlcv/pair | Needs changes | Trading.Pairs. 30 days. Ethereum pools use a different key field. | | GET /defi/ohlcv/base_quote | Needs changes | A candle per pool. Your code merges the pools. | | GET /defi/v3/ohlcv | Needs changes | 1-second and 30-second candles work. 15-second candles do not. No padding option. | | GET /defi/v3/ohlcv/pair | Needs changes | Same gaps as the token form. | | GET /defi/price_volume/single | Needs changes | Both percent changes are math in your code. Windows snap to whole hours. | | POST /defi/price_volume/multi | Needs changes | Same as the single form with a token list. | | GET /defi/v3/liquidity/history/token | Needs changes | USD liquidity only. No exit or stable liquidity. | | GET /defi/v3/liquidity/history/pair | Needs changes | USD liquidity counts the quote side only. The row includes both reserves. | | POST /defi/v3/liquidity/latest/token | Needs changes | Price and liquidity per token. No exit or stable liquidity. | | GET /defi/v3/liquidity/ohlc/pair | Needs changes | No liquidity candle field. Build high and low from a quantile, with an alias per candle. | | GET /defi/v3/liquidity/ohlc/token | Needs changes | Same as the pair form. | ### What breaks in prices - Candle intervals stop at 1 hour. You get ten intervals. In seconds: 1, 3, 5, 10 and 30. In minutes: 1, 5, 15 and 30. The last is 1 hour. Roll up 4-hour, daily and weekly candles in your code. - A quiet period has no candle. BONK returned 8 one-second candles for a 60-second window. Fill the gaps before you draw the chart. - Prices are in USD. Trading.Tokens has no price in SOL or ETH. - Keep Did: {is: ""} in the filter. The empty Did selects the per-token row. Rows with a did: value are asset-level copies. - Duration is in seconds. A 5-minute candle is Duration: {eq: 300}. - Volume counts the base side. In a 1-hour WSOL test, the token row showed $7.14M. Pairs with WSOL as the quote held $82.8M more. - History is 30 days. Token and pool candles both started on 28 October 2026 in our test. The API has no older candles. - Pool liquidity in USD counts the quote side. An Ethereum WETH/USDC pool showed $7.93M and left out about $51.6M of WETH. Read the reserves and price them yourself. ## Token stats and market data: all 14 need changes All 14 Birdeye token stats endpoints map to Bitquery with changes. Birdeye's GET /defi/token_overview returns the whole snapshot in a single call. On Bitquery, you build the same snapshot from two cubes in a single request. Trading.Tokens gives price, supply, market cap and liquidity. DEXTradeByTokens gives trade counts, buyers, sellers and volume. This query builds a 1-hour BONK snapshot: graphql { Trading { Tokens( where: {Token: {Did: {is: ""}, Network: {is: "Solana"}, Address: {is: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}}, Interval: {Time: {Duration: {eq: 60}}}} orderBy: {descending: Block_Time} limit: {count: 1} ) { Block { Time } Price { Ohlc { Close } } Supply { TotalSupply CirculatingSupply MarketCap FullyDilutedValuationUsd } Liquidity { Usd } } } Solana { DEXTradeByTokens( where: {Trade: {Currency: {MintAddress: {is: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}}, PriceAsymmetry: {lt: 0.1}}, Block: {Time: {since_relative: {hours_ago: 1}}}, Transaction: {Result: {Success: true}}} ) { Trade { Currency { Symbol Name Decimals } } markets_1h: uniq(of: Trade_Market_MarketAddress) trades_1h: count buys_1h: count(if: {Trade: {Side: {Type: {is: buy}}}}) sells_1h: count(if: {Trade: {Side: {Type: {is: sell}}}}) volume_1h_usd: sum(of: Trade_AmountInUSD) wallets_1h: uniq(of: Trade_Account_Owner) } } } At 15:07 UTC, the query returned a BONK market cap of $184.9M and liquidity of $665,484. The last hour had 3,542 trades on 162 pools. Buys were 1,760 and sells were 1,782, from 247 wallets. Volume was $85,252. Bitquery returns these fields: - price, market cap and fully diluted valuation (FDV) - total and circulating supply - liquidity in USD - trade counts, split into buys and sells - volume and unique wallets Bitquery does not return a token logo, a website link or social links. It also has no wallet tags such as smart money or whale. Holder count is a separate query through the Token Holder API, and it works on EVM chains only. Every "multiple" endpoint in this group is its "single" twin with a list of addresses. Change is: to in:. If the query returns rows over time, also add limitBy on the token address. | Birdeye endpoint | Status | How it maps | |---|---|---| | GET /defi/token_overview | Needs changes | Two cubes in a single request. No logo or social links. Holder count is a separate query. | | GET /defi/v3/pair/overview/single | Needs changes | Trading.Pairs plus trades by pool. No creation time. Percent change is math in your code. | | GET /defi/v3/pair/overview/multiple | Needs changes | Same query with a list of pools. | | GET /defi/v3/price/stats/single | Needs changes | 24 hours built from hourly candles, so windows align to the hour. | | POST /defi/v3/price/stats/multiple | Needs changes | A token list across Solana and Ethereum worked in a single call. | | GET /defi/v3/token/exit-liquidity | Needs changes | EVM only. A slippage curve per pool, which your code sums. | | GET /defi/v3/token/exit-liquidity/multiple | Needs changes | Same with a token list. Tested on Base. | | GET /defi/v3/token/market-data | Needs changes | Market cap, FDV and supply. Circulating supply read zero for a test token. | | GET /defi/v3/token/market-data/multiple | Needs changes | Same with a token list. | | GET /defi/v3/token/meta-data/single | Needs changes | Name, symbol and decimals only. | | GET /defi/v3/token/meta-data/multiple | Needs changes | Same with a token list. | | GET /defi/v3/token/trade-data/single | Needs changes | Counts and sums cover every field group. On Solana, limits apply past about 8 hours. | | GET /defi/v3/token/trade-data/multiple | Needs changes | A row per token. Tested on Solana and Base. | | POST /defi/v3/token/money-flow | Needs changes | Works for a wallet list you supply. No smart-money or whale tags. | ### What breaks in token stats - Sum the token's own USD field, and filter bad prices. In a 1-hour WSOL window, the counter-side field, Trade.Side.AmountInUSD, summed to $4.84B. The token's own field, Trade.AmountInUSD, summed to $83.7M with PriceAsymmetry: {lt: 0.1} inside the Trade filter. That matches 1.144M SOL at $73. Use both fixes together. - Percent change is math in your code. Ask for two windows and subtract. - Circulating supply can read zero. A Base token returned zero in our test. Check the value before you show it. ## Wallet, portfolio and PnL: 1 match, 13 need changes, 1 has no equivalent Bitquery returns what a wallet bought and sold per token, and your code works out the PnL. Birdeye returns realized and unrealized PnL ready-made, which is what wallet trackers and copy-trading apps live on. The Top Traders API and the Wallet Portfolio API pages cover the same data. This query returned what a wallet bought and sold in two tokens, plus the current prices: graphql { Trading { pnl: Trades(where:{Trader:{Address:{is:"9f6tZHnM7VdTktMEzDraixQRjjbvt36FfghDtwtn3toD"}}, Pair:{Token:{Address:{in:["DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263","So11111111111111111111111111111111111111112"]}}}}) { Pair { Token { Address Symbol Network } } buys: count(if:{Side:{is:"Buy"}}) sells: count(if:{Side:{is:"Sell"}}) boughtQty: sum(of:Amounts_Base, if:{Side:{is:"Buy"}}) soldQty: sum(of:Amounts_Base, if:{Side:{is:"Sell"}}) investedUsd: sum(of:AmountsInUsd_Base, if:{Side:{is:"Buy"}}) soldUsd: sum(of:AmountsInUsd_Base, if:{Side:{is:"Sell"}}) Block { first: Time(minimum:Block_Time) last: Time(maximum:Block_Time) } } price: Tokens(limit:{count:2}, limitBy:{by:Token_Address, count:1}, orderBy:{descending:Block_Time}, where:{Interval:{Time:{Duration:{eq:60}}}, Token:{Address:{in:["DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263","So11111111111111111111111111111111111111112"]}, Network:{is:"Solana"}}}) { Token { Address Symbol } Block { Time } Price { Ohlc { Close } } } } } For BONK, the test wallet had 889 buys and 902 sells. It put in $1,829.19 and took out $1,671.45. From those totals, your code works out the average cost, the realized PnL and the value of the bag the wallet still holds: text avgCost = investedUsd / boughtQty realized = soldUsd - soldQty * avgCost unrealized = (boughtQty - soldQty) * (price - avgCost) If a wallet sold more than it bought in the window, it held tokens from before the window, and the cost of those tokens is unknown. | Birdeye endpoint | Status | How it maps | |---|---|---| | GET /v1/wallet/list_supported_chain | Match | The network list in the schema. | | GET /v1/wallet/token_list | Needs changes | On v2, Solana balance updates cover about 8 hours, so idle tokens are missing. | | GET /v1/wallet/tx_list | Needs changes | Solana transfers, which your code groups by signature. | | GET /wallet/v2/current-net-worth | Needs changes | Works on EVM. On Solana, v2 sees the 8-hour window only. | | GET /wallet/v2/leaderboard | No equivalent | Sold minus bought across a wallet is not PnL. | | GET /wallet/v2/net-worth | Needs changes | Solana on v1: received minus sent per token, per date. USD value for the last 30 days only. Slow. | | GET /wallet/v2/net-worth-details | Needs changes | Solana on v1: token totals up to a past date. Your code subtracts and prices them. | | POST /wallet/v2/net-worth-summary/multiple | Needs changes | Solana on v1 with a wallet list. Tested with 2 wallets and a single token. | | GET /wallet/v2/pnl | Needs changes | Trade sums plus the current price. Realized and unrealized PnL are math in your code. 30 days. | | GET /wallet/v2/pnl/chart | Needs changes | Daily volume and trade counts. No realized PnL per point. | | POST /wallet/v2/pnl/details | Needs changes | Per-token rows. The summary block is math in your code. | | GET /wallet/v2/pnl/multiple | Needs changes | Same shape, grouped by trader. Tested on Ethereum. | | GET /wallet/v2/pnl/summary | Needs changes | Counts and volume come ready. Win rate and PnL need the per-token rows. | | GET /wallet/v2/funded-by | Needs changes | Solana on v1: the earliest SOL transfer in. 21 seconds. No funder tags. | | POST /wallet/v2/tx/first-funded | Needs changes | Same v1 query. SOL only: a sort across all tokens returned an error. | ### What breaks in wallet data - PnL history is 30 days. Birdeye offers 90 days and all time. - Trading.Trades cannot see tokens that arrived by transfer. An airdrop has no cost and no buy row. - A token traded as the quote side is not a position. PnL for SOL or USDC reads low. The WSOL row in the query above has this limit. - Solana balances and first funder use the v1 API. On v2, Solana transfer data covers about 8 hours. On v1, our first-funder query found the wallet's first SOL deposit, dated 4 July 2022. The query took 21 seconds. - Net worth is math in your code. Subtract what a wallet sent from what it received to get each balance. You can price those balances in USD for the last 30 days. - You cannot build a PnL leaderboard from a single query. Sold minus bought across a whole wallet is not profit. Our test query put a wallet at $2.62B in a day. ## Token holders: 6 need changes, 4 have no equivalent Holders are the largest gap. Most Birdeye holder endpoints serve Solana. Bitquery has no Solana top-holder list and no Solana holder count today. On EVM chains, holder data works. This query returned the holder count and the top 5 holders of USDG on Robinhood Chain: graphql { EVM(network: robinhood, dataset: archive) { total: Holders(date: "2026-11-26", where: {Currency: {SmartContract: {is: "0x5fc5360d0400a0fd4f2af552add042d716f1d168"}}, Balance: {Amount: {gt: "0"}}}) { holders: count(distinct: Holder_Address) held: sum(of: Balance_Amount) } top: Holders(date: "2026-11-26", where: {Currency: {SmartContract: {is: "0x5fc5360d0400a0fd4f2af552add042d716f1d168"}}, Balance: {Amount: {gt: "0"}}}, orderBy: {descendingByField: "Balance_Amount"}, limit: {count: 5}) { Holder { Address } Balance { Amount } Currency { Symbol } } } } The query returned 441,325 USDG holders. On Ethereum, the same cube returned about 66,600 ENS holders. The Holders cube also returns the holder count for a past date. We ran dates in 2024, 2025 and 2026. | Birdeye endpoint | Status | How it maps | |---|---|---| | GET /defi/v3/token/holder | Needs changes | EVM Holders on the archive dataset: top list and exact count. No Solana holders. | | GET /holder/v1/distribution | No equivalent | Birdeye serves Solana only. An EVM version works. | | GET /token/v1/chart/tag-holdings | No equivalent | No per-token wallet tags and no Solana balance history. | | GET /token/v1/first-buyers | Needs changes | Two queries. On Solana, it works only for tokens launched in the last 8 hours. | | GET /token/v1/holder-positions | Needs changes | Per-wallet buy and sell volume from trades. Holdings need a second query. | | GET /token/v1/holder-profile | No equivalent | The endpoint is a breakdown by tag, and Bitquery has no such tags. | | POST /token/v1/holder/batch | Needs changes | Solana on v1: received and sent totals for a wallet list. 26 seconds. Your code subtracts. | | GET /token/v1/holder/chart | No equivalent | Birdeye serves Solana only. On EVM, daily points work. | | GET /token/v1/wallet-tags-tracker | Needs changes | You can build a sniper group from early buyers. Dev and smart-trader tags have no source. | | GET /token/v1/wallet-tags-tracker/details | Needs changes | Same query, grouped by wallet. | ### What breaks in holders - Use the archive dataset. On the default dataset, the holder cube counts only addresses that changed in about the last 9 days. - Bitquery has no per-token wallet tags. Birdeye tags holders as sniper, insider, dev or smart trader, and five of its endpoints use those tags. Bitquery's Address Labels API names entities such as exchange wallets. It does not tag snipers or insiders per token. - Very large tokens can time out. Our archive holder query for USDC on Ethereum did not return in 90 seconds. ## Hyperliquid perps: 8 need changes, 1 has no equivalent Eight of Birdeye's 9 Hyperliquid perps endpoints map to Bitquery with changes, and the liquidation map has no equivalent. Bitquery's Hyperliquid API has a Hyperliquid root with trades, funding payments and liquidations. It also snapshots every account's open positions about every 12 minutes. Reading positions takes two steps. First, ask for the newest snapshot: graphql { Hyperliquid { Snapshots(limit: {count: 1}, orderBy: {descending: Block_Time}) { Block { Number Time } IsComplete } } } Check that IsComplete is true. Then pass that block number to the position query, with a since time a few minutes before the snapshot's Block.Time. With the 14:11 UTC snapshot, this query returned the five largest open BTC positions: graphql { Hyperliquid { SnapshotPositions( limit: {count: 5} orderBy: {descendingByField: "pv"} where: {Block: {Number: {eq: "1236760000"}, Time: {since: "2026-11-27T14:00:00Z"}}, Market: {CoinRaw: {is: "BTC"}}} ) { Trader { Address } IsVault Position { Side Size EntryPrice Leverage IsCross } Margin { MarginUsed MaintenanceMargin } Valuation { MarkPx PositionValue UnrealizedPnl EntryNotional } CumFunding { SinceOpen SinceChange AllTime } Market { MaxLeverage } pv: calculate(expression: "$Valuation_PositionValue") } } } | Birdeye endpoint | Status | How it maps | |---|---|---| | GET /perps/v1/token/list | Needs changes | Market snapshot plus positions grouped by side. No time-frame option. | | GET /perps/v1/token/overview | Needs changes | Price, open interest, position count and liquidations. Liquidations are in coin size. | | GET /perps/v1/token/open_positions | Needs changes | The position snapshot has most fields. No liquidation price or open time. | | GET /perps/v1/token/liquidation_map | No equivalent | No liquidation price field in any cube. | | GET /perps/v1/wallet/list | Needs changes | Equity ranking from snapshots. PnL and volume from trades. 30 days. | | GET /perps/v1/wallet/overview | Needs changes | Account snapshot plus trade and funding sums. 30 days. | | GET /perps/v1/wallet/open_positions | Needs changes | Snapshot with a 12-minute lag. No liquidation price. | | POST /perps/v1/wallet/trade_fills | Needs changes | Every Birdeye field maps. History is 30 days. | | POST /perps/v1/wallet/transfers | Needs changes | Raw signed actions. About 7 days. A 7-day wallet query timed out. | ### What breaks in perps - The API has no liquidation price field. GET /perps/v1/token/liquidation_map has no equivalent. For an account with a single cross position, you can estimate a liquidation price from the margin fields. The estimate is rough because it skips Hyperliquid's exact formula. - History is 30 days. The earliest fill we found is from 28 October 2026. Position snapshots reach back about 7 days. - A snapshot query needs the block number and a time filter. Replace the block number with the newest one from the first query. Without the time filter, an older snapshot returns zero rows. We hit this ourselves: the same query returned 37,727 BTC positions with the filter and none without it. - Always set a time filter on trades. A query with no time filter saw about 24 hours. For a test wallet, it counted 4,814 fills. With a start date, it counted 82,329. - Filter by the raw coin name. Symbol: "BTC" also matches other markets with BTC in the name. Use CoinRaw. ## How to migrate from the Birdeye API to Bitquery Move one group at a time, starting with the closest fit: 1. List your endpoints. Search your code for Birdeye paths and look up each one in the tables above. 2. Move trade feeds first. Nine of 10 trade endpoints map to a single query, so this step is mostly field renames. 3. Move prices and candles. Add a roll-up for candles above 1 hour, and fill the gaps for quiet periods. 4. Move wallet PnL. Write the realized and unrealized PnL math once, and reuse it for every wallet. 5. Keep Birdeye where Bitquery has no equivalent. That covers Solana top holders, holder distribution and holder charts. It also covers sniper and insider tags, the wallet PnL leaderboard and the Hyperliquid liquidation map. 6. Run both APIs side by side. Compare the numbers for a week before you switch off the old calls. ## Birdeye API pricing vs Bitquery pricing Birdeye bills compute units. Bitquery bills API points. The two units do not convert, so run your own workload on each service and compare the bills. | | Birdeye | Bitquery | |---|---|---| | Entry paid plan | Lite, $39 per month, 2.5M compute units | Personal, $49 per month, 100,000 API points | | Middle plan | Starter, $99 per month, 8M compute units | Pro, $99 per month, 1M API points and streams | | Larger plan | Premium, $199 per month, 20M compute units | Scale, $299 per month, 5M API points | | Free tier | Standard, 30,000 compute units | 7-day trial, 1,000 API points | We took the Birdeye prices from Birdeye's pricing docs on 27 November 2026, and the Bitquery prices from the Bitquery pricing page on the same day. We have not run the same workload on both services yet. Part 2 will run one workload on both and compare the bills. ## Limits: chains, history and streams Birdeye covers more chains, and the Bitquery API serves 30 days of history. - Chains. Birdeye lists 17 chains, including Sui, Aptos, Monad, zkSync, Mantle and HyperEVM. Bitquery's self-service plans cover 10 core chains: Solana, Ethereum, Tron, Base, Arbitrum, Optimism, BNB Chain, Polygon, Robinhood Chain and Arc. If you need Sui or Aptos, Birdeye is the better choice. - History. The API serves 30 days of prices, candles and wallet PnL. For years of trades as files, the Bitquery Data Store sells Solana DEX trades as Parquet. - Streams. We tested HTTP request-response queries only. Bitquery also pushes the same data over WebSocket and gRPC streams, which Part 2 maps to Birdeye's WebSocket API. - Scope. This part covers 75 of Birdeye's 113 REST endpoints. Part 2 covers search, token lists, trending tokens, security checks and streams. ## How we tested We picked the six largest groups in Birdeye's docs, 75 endpoints in total. For 69 endpoints, we read Birdeye's reference page. For the other six, all price endpoints, we worked from Birdeye's docs index. In each case, we wrote the Bitquery query that answers the same question. Then we ran it on the production API with a normal customer API key. An endpoint counts as "match" or "needs changes" only if its query came back with data and no errors. We ran the tests on 27 November 2026 with well-known tokens. On Solana, we used BONK and WSOL. On Ethereum, we used WETH, USDC and ENS. We also used USDG on Robinhood Chain and the BTC market on Hyperliquid. A few tests used other tokens: USDC on Solana, a Pump.fun token launched that day, and AERO and VIRTUAL on Base. We did not call the Birdeye API, so we did not compare Birdeye's numbers with ours. We tested most endpoints on Solana and on a single EVM chain. We used AI tools to write and run the test queries, and we checked each result against the production API. ## FAQ ### What is the Birdeye API? The Birdeye API is a REST API for on-chain trading data. Its docs list 113 REST endpoints and 11 WebSocket stream types across 17 chains. It serves token prices, candles, trades, wallet PnL, holders and Hyperliquid perps data. ### Is Bitquery a drop-in replacement for the Birdeye API? No. The Birdeye API is REST and Bitquery is GraphQL, so every call changes. Of the 75 endpoints we tested, 10 map to a single Bitquery query with the same data, 59 need changes and 6 have no equivalent. Trades move with field renames. Solana top holders and per-token wallet tags do not move at all. ### Which Birdeye API endpoints map most cleanly? The Birdeye API trade endpoints map most cleanly. Nine of 10 map to a single Bitquery query, and each row has the wallet, transaction, DEX, pool, amounts and USD value. ### Does Bitquery have a Solana token holder list? Bitquery has no Solana token holder list today. Bitquery holder lists and exact holder counts work on EVM chains, including Ethereum and Robinhood Chain. ### Does Bitquery return wallet PnL? Bitquery returns what a wallet bought and sold per token for the last 30 days. Your code works out realized and unrealized PnL from those totals. ### How far back does Bitquery price history go? Bitquery price history goes back 30 days on the API, with candles from 1 second to 1 hour. ### How does Birdeye API pricing compare with Bitquery pricing? Birdeye's paid plans start at $39 per month for 2.5M compute units. Bitquery's start at $49 per month for 100,000 API points. The units differ, so test your own workload on both. ### How do I start a move from the Birdeye API to Bitquery? Create an account at account.bitquery.io, copy your access token and paste a Solana DEX trade query into the Bitquery IDE. If you build with an AI agent, the Bitquery MCP server exposes the same data as tools. ## Related reading - Bitquery vs Birdeye - Solana DEX API · Crypto Price API - Hyperliquid API · WebSocket and gRPC streams - Blockchain data API pricing: free tiers and monthly costshttps://mcp.bitquery.io, with typed tools for DEX trades, prices, trader analytics, Hyperliquid perpetuals, fund tracing and address labels. 2. Playbooks: 15 guided workflows that tell an agent which tools to call, in what order, for jobs like an AML risk screen or a token dashboard. 3. Quick setup: OAuth sign-in for Claude, ChatGPT, Cursor, VS Code, Codex and Windsurf. No API key to paste and no server to run. The result: you ask in plain English, the agent picks the right tool, and clean, structured rows come back. ## Why AI agents struggle with on-chain data On-chain data is huge, messy and changes every second. An agent without proper tools has three bad options: - Write GraphQL or SQL from memory. It invents field names, gets the schema wrong, and burns tokens on retries. - Scrape explorers and price sites. Slow, rate-limited, and one page layout change away from breaking. - Answer from training data. Confident, fluent and months out of date. MCP, the Model Context Protocol, fixes this. Instead of guessing a query, the agent calls a tool with a clear name and typed inputs, such as token_ohlcv or top_traders_by_token, and the server runs the query against Bitquery's data. No schema to learn. No curl. No guessing. The tools also carry Bitquery's data hygiene with them: wash-traded pools and noisy pairs are deprioritised, look-alike tokens are flagged, and market caps come from prices someone could actually trade at, so the agent doesn't repeat a number that only exists because of one odd swap. ## What the Bitquery MCP server gives an AI agent The server covers two jobs: trading data and crypto investigations. Transfers can be traced on 19 chains, from Ethereum, Solana and Tron to Bitcoin, Cardano and the XRP Ledger. DEX trading data covers Ethereum, Solana, BSC, Base, Arbitrum, Optimism, Polygon, Tron, Robinhood Chain and Arc, with about 30 days of trade history. | Job | What the agent can do | Example tools | | --- | --- | --- | | Market data | Prices, OHLCV candles, supply, market cap and the DEX venues a token trades on | token_price, token_ohlcv, pair_ohlcv, token_dex_venues | | Discovery | Trending tokens, new launches, launch cohorts and early buyers | trending_tokens, new_tokens, launch_cohort, early_buyers | | Trader analytics | Top and most profitable traders, wallet positions, trades and PnL | top_traders_by_token, profitable_traders_by_token, trader_profile, trader_positions | | Fund tracing | Follow money hop by hop, find a wallet's first funder, map flows between addresses. Bitcoin-style chains (Bitcoin, Litecoin, Dogecoin and others) use transaction-flow and related-address tools instead | _address_flow_summary, _trace_next_hop, _first_funder, _flows_between | | Labels and risk | Who owns an address: exchanges, mixers, scams, sanctioned entities | address_labels, labels_for_addresses, addresses_by_label | | Prediction markets | Polymarket odds, trades, top traders and settlements | polymarket_market_odds, polymarket_top_traders | | Perpetuals | Hyperliquid prices, funding, open interest, liquidations and trader PnL | hyperliquid_funding_rates, hyperliquid_liquidations, hyperliquid_trader_summary | The same data sits behind Bitquery's Hyperliquid API, Polymarket API and Address Labels API. The MCP server is the way an agent reaches it without writing a query. ## Playbooks: guided workflows for AI agents Tools give an agent access. Playbooks give it a procedure. The server ships 15 of them, each a step-by-step workflow for a common job. In clients that support MCP prompts you can start one directly, and any agent can fetch one with the prompt_playbook tool and follow its steps: - Investigations: money_flow traces funds across multiple hops and draws a flow diagram; risk_screen runs a compliance and AML screen of an address or transaction; address_report builds a full dossier on one address; entity_report profiles a labelled entity such as an exchange or mixer - Tokens and markets: token_dashboard, token_chart, token_scout, market_movers, compare_assets and arbitrage_scan - Traders: trader_dashboard for one wallet's stats, positions and activity - Prediction markets and perpetuals: prediction_market for Polymarket, plus hyperliquid_trader and hyperliquid_market - Accounting: tax_ledger lists every movement in a period with its USD value, ready for Koinly or CoinTracker A playbook doesn't guarantee the agent takes that path, but it gives it a tested route instead of an improvised one. ## What this looks like in practice: three AI agent demos A note on these demos: they run in Claude Code and go from open to structured. Example 1 is a single open-ended prompt, example 2 runs the same investigation both ways, and example 3 runs entirely on a playbook. They're here to show what the tools can do. Production AI agents run on a strictly defined path, with a detailed set of instructions that fixes which tools to call, in what order, and what to check before answering. ### 1. An AI agent breaks down a Hyperliquid liquidation cascade > "What happened on Hyperliquid in the last 24 hours? Find the markets with the biggest liquidations, tell me whether longs or shorts got wiped out, and for the biggest market check what funding and open interest were doing before and after. Who were the largest liquidated traders, and how much leverage were they running?" Here's Claude Code answering that with the Bitquery MCP on 9 October 2026, covering the 24 hours to about 10:00 UTC. The video is sped up: The agent went straight to the Hyperliquid tools. It ranked markets and traders with hyperliquid_liquidations, read the ETH move with hyperliquid_funding_rates and hyperliquid_candles, ran hourly breakdowns with hyperliquid_raw_sql, then checked the biggest liquidated accounts with hyperliquid_trader_summary and hyperliquid_trader_positions. The event. One cascade did almost all the damage. Liquidations ran at a few million dollars an hour until 15:00 UTC on 8 October, when about $143M was liquidated in a single hour. ETH's 15:00 candle opened at $2,531 and closed at $2,434, a 4% drop on nearly half a billion dollars of volume, and bottomed near $2,408 at 17:00. Across all Hyperliquid markets, about $300M was liquidated in the window. | Market | Liquidated (24h) | Longs, share of liquidated fills | | --- | --- | --- | | ETH | ~$111M | 88% | | BTC | ~$81M | 77% | | SKHX (HIP-3 equity perp) | ~$12M | 91% | | SOL | ~$10M | 80% | | NEAR | ~$9M | 91% | It was a long wipeout: on every major market, 77% to 91% of liquidated positions were longs, and none were passed to the backstop liquidator. ETH funding and open interest, before and after. Before the drop, funding had sat at the hourly cap (about 11% annualised) for almost all of 7 October, and open interest peaked near 597,000 ETH (about $1.53B) with roughly 70.5% of accounts long: a crowded, expensive long side. During the cascade, funding turned negative (about −7% annualised at 16:00) and the long share fell to 66.6%. By 18:00 funding was back at the cap, and long share has rebuilt to 68%. About 6% of ETH open interest was cleared out, and longs are already paying the maximum rate again. | Account | Market | Liquidated | Leverage | Still holding | | --- | --- | --- | --- | --- | | 0x0392…d7d9 | ETH | ~$49.7M | 8x, cross margin | ~$106M ETH long | | 0x77dd…e0e9 | ETH | ~$19.9M | 10x (fills tagged 20x to 25x) | ~$99M ETH long | | 0x1fd4…9081 | BTC | ~$10.2M | 20x | not checked | | 0x053f…a4d3 | SKHX | ~$8.6M | 10x | not checked | | 0xcf70…516c | ETH | ~$8.1M | 25x | not checked | The agent's read on the traders: the two largest accounts were only partly liquidated and each still holds a roughly $100M ETH long, which is why open interest didn't fall further. And the biggest losers were at the low end of the leverage range. The problem was position size against a 4% hourly move, not extreme leverage. That's a desk analyst's morning note on Hyperliquid, from one question, with every number traceable to a tool call. To make it a routine, the hyperliquid_market and hyperliquid_trader playbooks run the same kind of breakdown as a fixed set of steps. ### 2. Tracing stolen funds with an AI agent > "Trace the funds from the Bybit hack exploiter 0x47666fab8bd0ac7003bce3f5c3585383f09486e2 on Ethereum. Where did the ETH come from, how was it split, and where did it end up? Label any exchanges, bridges or mixers." Here's Claude Code working through it with the Bitquery MCP. The run took about 10 minutes; the video is cut and sped up to about 1.5 minutes. The agent planned a money-flow trace (where the ETH came from, how it fanned out, then the dominant paths) and worked hop by hop with eth_address_flow_summary, eth_trace_next_hop, eth_trace_dominant_path and labels_for_addresses, labelling around 90 wallets along the way. What it reconstructed: 1. The source. 401,347 ETH arrived in one transfer from an address Bitquery labels as Bybit Cold Wallet 1. 2. The first split. Between 15:48 and 15:54 UTC on 21 February 2025, exactly 400,000 ETH left as 40 transfers of 10,000 ETH to 40 fresh, unlabelled wallets. 3. Staking tokens swapped first. About 90,000 stETH and 8,000 mETH went through Paraswap and the Uniswap Universal Router into ETH, then into the same 10,000 ETH fan-out. 4. The peel chain. From 22 February to 3 March, the 10,000 ETH wallets sliced their balances into transfers of 250 to 700 ETH. The same intermediate wallets showed up under several branches: one person, running a script. 5. The exit. Every branch it followed ended at the THORChain router. About 20 relay wallets, live only from 27 February to 3 March, each cycled 15,000 to 48,000 ETH through it, consistent with the publicly reported conversion of the funds into Bitcoin. It also knew where to stop. Past the THORChain router, the trail runs into Binance hot wallets, but the agent recognised that as THORChain paying out to its other users, not the hacker, and didn't follow it. It closed with its own caveats: it followed the largest flows rather than every one of several hundred wallets, so its figures are lower bounds. #### The same trace, with the money_flow playbook > "Use the money_flow playbook from the Bitquery MCP on 0x47666fab8bd0ac7003bce3f5c3585383f09486e2 (Ethereum), following ETH. Where did the ETH come from, how was it split, and where did it end up? Label any exchanges, bridges or mixers." Same address, same questions, same model and the same effort setting. The only difference is that the prompt names a playbook, so the agent follows money_flow's fixed steps instead of choosing its own route. The open run took about 10 minutes. This one finished in 4 minutes: It reached the same conclusion: 401,346.77 ETH from Bybit Cold Wallet 1, split into 40 × 10,000 ETH on 21 February 2025, with every branch it expanded ending at the THORChain router. What changed is the shape of the answer. Instead of a narrative built up as the agent went, the playbook produced a report: - The headline figures in a table: the inflow, the 40-way split, a second residual split of about 1,613 ETH across 14 wallets on 3 March, and how many sampled branches reached THORChain (6 of 6). - Where it came from: the source wallet and its labels, plus a detail the open run didn't surface. The ETH arrived as an internal transfer, moved by contract code rather than a plain send, which matches the known takeover of Bybit's multisig wallet. - A flow diagram from the Bybit cold wallet through the exploiter and the relay layers to THORChain. - A hop-by-hop table listing each wallet, the next address, the amount, the asset and the date. - Branch verdicts: no exchange or mixer label on any relay, the end point of every branch, and the look-alike token transfers set aside as address poisoning. - Caveats: only 6 of the 40 first-layer branches were expanded, a missing label isn't proof a wallet isn't a service, and the result is on-chain analysis, not a legal conclusion. That's the trade-off. An open prompt suits an investigator digging into something new: it went wider and mapped about 20 relay wallets. A playbook takes less than half the time and returns the same report layout every time, which is what a compliance team can file or hand to an analyst. For a step-by-step walkthrough of a single wallet, see how to investigate an Ethereum address with AI, and for the fully managed version, Bitquery AI Investigations. ### 3. Trader analytics: two dashboards from one playbook > "Use the trader_dashboard playbook from the Bitquery MCP on these two Solana wallets over the last 30 days, one dashboard per wallet: 6jz6evaLNRDJkXUypB6coiTZoFHtVTck4cJBpQ78kXnq and GuRfuByNZoFb2TJKj3x6SZEwaZzt8rn2MG1PAgEzWizm. Then compare them: who made money, and why?" This time the whole job runs on a playbook. trader_dashboard tells the agent exactly what to pull for each wallet: its profile with trader_profile, its positions and profit per token with trader_positions, a daily timeline with trader_activity, and its swaps with trader_trades. In about 3.5 minutes it built and published a live dashboard for each wallet, then answered the question: Each dashboard opens with a one-line read of the wallet, then stat cards (realized PnL, win rate, volume, net cash flow, median hold), its recent swaps and a day-by-day activity table, with a note on how PnL is calculated. The comparison: | | 6jz6…kXnq | GuRf…Wizm | | --- | --- | --- | | Realized PnL | +$88,967 | −$226,757 | | Win rate (by token) | 75% (3 of 4) | 16% (3 of 19) | | Swaps | 72 | 1,297 | | Volume | $3.0M | $23.0M | | Tokens traded | 6 | 20 | | Median hold | about 9 days | about 6 hours | And the why: - One good trade. Almost all of 6jz6's profit came from a single PUMP position: bought on 2 October at about $0.0054, sold on 5 October at about $0.0064, an 18.5% return worth $82k. It took few positions, sized them large and held for days. - Too many trades. GuRf also traded that PUMP move and made $35.7k on it, but losses elsewhere swamped it. CARDS alone cost $121k: it bought at an average of $0.279, sold at $0.238, then bought back near $0.28. The agent ended up with two shareable pages and a clear answer, and the next run on two other wallets will produce the same layout. That's a playbook working as a repeatable routine. Want to run these prompts yourself? Connect the Bitquery MCP server to your agent using the steps below. ## Connect the MCP server to your AI agent in 60 seconds The server is hosted, so there's nothing to install or run. Add the URL to your client, and sign in with your Bitquery account the first time a tool runs. New accounts get a free 7-day trial, no card needed. Claude Code bash claude mcp add --transport http bitquery https://mcp.bitquery.io Then run /mcp and finish the browser login. Codex bash codex mcp add bitquery --url https://mcp.bitquery.io Claude.ai, Claude Desktop and ChatGPT Open Settings, then Connectors, add a custom connector named Bitquery with the URL https://mcp.bitquery.io, and sign in when prompted. Cursor Open Settings, then MCP, then Add new MCP server, and enter the URL https://mcp.bitquery.io. Or add this to .cursor/mcp.json in your project: json { "mcpServers": { "bitquery": { "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.bitquery.io/mcp"] } } } Restart Cursor, then sign in when the first tool runs. VS Code Add a new MCP server with the URL https://mcp.bitquery.io. Windsurf Open Settings, then MCP, add a custom server with the URL https://mcp.bitquery.io, and reload. If Windsurf asks for a JSON config, use the same mcp-remote block as Cursor. Sign-in uses OAuth 2.1, so no API key ends up in a prompt or a config file. Tokens are cached for about 30 days. Step-by-step guides for each client are in the MCP docs. ## Pricing and limits You can try it free: new accounts get a 7-day trial with 100 credits, no card required. After that there are two MCP plans (full details on the pricing page): - Trading MCP: $19 a month for 25k credits, covering the 32 trading tools. - AI Investigation MCP: $149 a month for 200k credits, covering all 314 tools, including fund tracing and address labels. Yearly billing takes 30% or more off, and quotas and billing are shared with your regular Bitquery plan. Trading history goes back about 30 days, and the server is read-only: it can't sign or send transactions, and it never holds keys. ## Start building Bitquery gives agents the on-chain data layer they need, for trading research and investigations alike, across 19 chains plus Hyperliquid and Polymarket. Teams building their own agents can see how the MCP server and the APIs fit together on the on-chain data for AI agents page. - Connect your agent: https://mcp.bitquery.io, or start from the Bitquery MCP server page - Read the docs: docs.bitquery.io/docs/mcp/mcp-server - See the plans: Bitquery pricing - Talk to us: sales@bitquery.io or Telegram support Built something with it? Tell us. We'd love to feature it. ## FAQ ### What is the Bitquery MCP server? A hosted Model Context Protocol server at https://mcp.bitquery.io. It gives AI agents typed tools for Bitquery's on-chain data: DEX trades, prices and candles, trader analytics, fund tracing, address labels, Polymarket and Hyperliquid. The agent picks the tool; you ask in plain English. ### Is there a free trial? Yes. New Bitquery accounts get a 7-day trial with 100 credits, and no card is needed. After that, plans start at $19 a month. See the pricing page. ### Which AI clients and agents does it work with? Claude.ai, Claude Desktop, Claude Code, ChatGPT (with custom connectors), Cursor, VS Code, OpenAI Codex and Windsurf, plus custom agents built on the Anthropic or OpenAI SDKs. Clients that only support local (stdio) servers can connect through the mcp-remote bridge. ### Which blockchains does it cover? Transfer tracing covers 19 chains, including Ethereum, Solana, Tron, Bitcoin, Cardano and the XRP Ledger. DEX trading data covers Ethereum, Solana, BSC, Base, Arbitrum, Optimism, Polygon, Tron, Robinhood Chain and Arc. Polymarket and Hyperliquid have their own toolsets. ### Can an AI agent analyse Hyperliquid data? Yes. The server has a dedicated set of Hyperliquid tools for perpetual and spot markets: prices and candles, funding rates, open interest, liquidations, order flow, and trader positions, fills and PnL. The hyperliquid_market and hyperliquid_trader playbooks package them into a market report or a trader report. The tools are read-only and can't place orders. ### Can I use it for crypto investigations and AML checks? Yes. The investigation tools trace funds hop by hop, find first funders and label exchanges, mixers and sanctioned entities. Playbooks such as money_flow, risk_screen, address_report and entity_report turn those into repeatable reports. These tools are part of the AI Investigation MCP plan. ### How is it different from the Bitquery GraphQL API? It's the same data. With GraphQL you write each query yourself, which suits apps and streaming. With MCP the agent chooses typed tools and chains several lookups in one answer, with no schema to learn. Both run on the same Bitquery account. ### Can the agent trade or move funds? No. The server is read-only. It can't sign or send transactions, place orders, or hold keys. ### How fresh is the data? Near real time: data is updated as new blocks are processed. Trading history goes back about 30 days.