Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5384f9e
Fix Phase 1 docs correctness: localhost links, chain counts, deprecat…
Jul 23, 2026
6083c5a
Fix Phase 2 SEO/UX: dedupe EVM docs, sitemap, Copy MD, Start meta
Jul 23, 2026
5129593
Fix typo routes, font loading, and heavy GIF demos
Jul 23, 2026
cf1ab75
Convert remaining demo GIFs and fix Optimism hub links
Jul 23, 2026
97755bb
Add SEO descriptions for IDE, GraphQL, and subscription docs
Jul 23, 2026
57bd628
Self-host fonts, respect OS theme, and backfill SEO descriptions
Jul 23, 2026
5f895e9
Complete description frontmatter on all non-reference docs
Jul 23, 2026
f5b8985
Rename authorisation routes, add latin-ext fonts, compress PNGs
Jul 23, 2026
6c41b97
Remove duplicate Arbitrum Overview and polish auth wording
Jul 23, 2026
ab4604e
Block graphql-reference in robots.txt and fix Kafka typos
Jul 23, 2026
2551469
Fix stale examples links and recompress demo videos
Jul 23, 2026
713b666
Fix Pumpfun deep links and preload primary fonts
Jul 23, 2026
176cde8
Add cache headers for fonts, assets, and images
Jul 23, 2026
1b00ea3
Fix broken sidebar id, .md links, and gate Chatbase to production
Jul 23, 2026
2670154
Normalize remaining relative .md doc links
Jul 23, 2026
1ea6bea
Fix dead internal links to missing docs and category pages
Jul 23, 2026
726ac49
Fix more dead cross-chain and Solana DEX doc links
Jul 23, 2026
4c87688
Fix Solana/Polymarket/Price API folder links and category slugs
Jul 23, 2026
0d8fa48
Fix spelling issues and convert hub pages to relative doc links
Jul 23, 2026
e908e56
Close remaining audit gaps: relative links, OG heads, descriptions, C…
Jul 23, 2026
088edee
Rewrite page titles and meta descriptions for Google SEO
Jul 23, 2026
a64f722
Fix Docusaurus build: invalid redirects and broken links
Jul 23, 2026
1f1aab3
Fix Pumpfun casing, broken anchors, and slug/redirect collisions
Jul 23, 2026
d3e2d88
Fix invalid Solana/Ethereum category doc ids
Jul 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bitquery Data Platform Documentation

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.

### Installation

Expand Down Expand Up @@ -54,4 +54,4 @@ npx docusaurus-prince-pdf -u http://localhost:3000/docs/intro

### Contributing to Docs

Read contribution guidlines [here](https://docs.bitquery.io/docs/contribution_guidelines)
Read contribution guidlines [here](https://docs.bitquery.io/docs/contribution-guidelines)
17 changes: 0 additions & 17 deletions blog/2024-02-17-schema-changes copy.md

This file was deleted.

13 changes: 7 additions & 6 deletions docs/API-Blog/migrate-v1-v2.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
sidebar_position: 3
title: "Migrate from Bitquery API v1 to v2"
description: "Migrate Bitquery GraphQL apps from API v1 to v2 covering schema changes, streaming datasets, authentication updates, and code examples."
---

# Migrating from API v1 to v2

## Overview
Expand All @@ -13,7 +14,7 @@ Below, you'll find key changes and instructions on how to adapt your existing v1

One of the major differences between v1 and v2 is the way API is authenticated. In v1, you use a API-KEY to authenticate your requests to `graphql.bitquery.io`.

And in v2, you use OAuth token mentioned as `Bearer ory_...yourtoken` and authenticate your requests to `streaming.bitquery.io/graphql`. Read more on how to generate token [here](https://docs.bitquery.io/docs/authorisation/how-to-generate/).
And in v2, you use OAuth token mentioned as `Bearer ory_...yourtoken` and authenticate your requests to `streaming.bitquery.io/graphql`. Read more on how to generate token [here](/docs/authorization/how-to-generate/).

## Changes in Network Specification

Expand Down Expand Up @@ -51,9 +52,9 @@ The v2 API maintains a similar schema structure but integrates new data cubes su

If you're new to v2, check more examples on:

[TokenHolder APIs](https://docs.bitquery.io/docs/examples/token-holders/token-holder-api/)
[balanceUpdates](https://docs.bitquery.io/docs/examples/balances/balance-api/)
[DexTradeByTokens](https://docs.bitquery.io/docs/examples/dextrades/token-trades-apis/)
[TokenHolder APIs](/docs/blockchain/Ethereum/token-holders/token-holder-api/)
[balanceUpdates](/docs/blockchain/Ethereum/balances/balance-api/)
[DexTradeByTokens](/docs/blockchain/Ethereum/dextrades/token-trades-apis/)

## Smart Contract Interactions

Expand Down Expand Up @@ -253,4 +254,4 @@ To find your Bitquery API v1 key, log in to your [Bitquery account](https://acco

## V1 vs V2 : Data Points

![](/img/v1v2.png)
![](/img/v1v2.png)
58 changes: 28 additions & 30 deletions docs/API-Blog/polymarket-api-vs-bitquery-polymarket-api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: "Polymarket API vs Bitquery Polymarket API: Which One Should You Use?"
description:
"A side-by-side comparison of Polymarket's official APIs (CLOB, Gamma, Data, Real-Time Data Socket) and Bitquery's on-chain Polymarket API (GraphQL queries, subscriptions, and Kafka streams on Polygon)."
title: "Polymarket API Vs Bitquery Polymarket"
description: "Polymarket API Vs Bitquery Polymarket: Bitquery documentation with GraphQL examples, real-time streams, and integration guidance."
keywords:
- Polymarket API
- Bitquery Polymarket API
Expand All @@ -13,7 +12,6 @@ keywords:
- Polymarket websocket
- on-chain prediction markets
---

# Polymarket API vs Bitquery Polymarket API

If you are building on Polymarket—whether a dashboard, a trading bot, a research tool, or a wallet leaderboard—you have two very different data stacks to choose from. Polymarket publishes a set of **official REST and WebSocket APIs** that serve the [polymarket.com](https://polymarket.com) application itself. Bitquery offers an **on-chain-derived GraphQL API** for the same Polymarket markets on Polygon, plus subscriptions and Kafka streams.
Expand Down Expand Up @@ -48,20 +46,20 @@ Bitquery takes a different approach. It indexes the Polymarket contracts on Poly

The pages under **`docs/examples/polymarket-api/`** in this repo correspond to these guides:

- [Polymarket API overview](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-api/): the entry point, covering the core PredictionTrades query, live subscriptions, whale trades, and top buyers and sellers.
- [Polymarket Markets API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-markets-api/): filter markets by market_slug, condition_id, or token_id through PredictionManagements.
- [Polymarket Wallet & User Activity API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-api/): recent trade counts, collateral totals, and distinct-market counts for any wallet, plus guidance on which fields belong to Polymarket's Profile, Gamma, or Bridge APIs.
- [Polymarket Advanced Analytics API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-advanced-analytics-api/): USDC TVL in core contracts, daily volume, maker/taker splits, order flow by market, whale subscriptions, settlement flows, and top markets by volume.
- [Polymarket Sports API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-sports-api/): cricket, sports, and esports markets filtered by ResolutionSource, description, or outcome label.
- [Polymarket Commodity API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-commodity-api/): oil, gold, and commodity-linked prediction markets.
- [Bitcoin Up or Down Polymarket API](https://docs.bitquery.io/docs/examples/polymarket-api/bitcoin-polymarket-api/): BTC direction markets, live odds, and top winners from settlements.
- [Polymarket Wallet Realized PnL](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-realized-pnl/): PnL derived from on-chain fills.
- [Polymarket API overview](/docs/examples/polymarket-api/polymarket-api/): the entry point, covering the core PredictionTrades query, live subscriptions, whale trades, and top buyers and sellers.
- [Polymarket Markets API](/docs/examples/polymarket-api/polymarket-markets-api/): filter markets by market_slug, condition_id, or token_id through PredictionManagements.
- [Polymarket Wallet & User Activity API](/docs/examples/polymarket-api/polymarket-wallet-api/): recent trade counts, collateral totals, and distinct-market counts for any wallet, plus guidance on which fields belong to Polymarket's Profile, Gamma, or Bridge APIs.
- [Polymarket Advanced Analytics API](/docs/examples/polymarket-api/polymarket-advanced-analytics-api/): USDC TVL in core contracts, daily volume, maker/taker splits, order flow by market, whale subscriptions, settlement flows, and top markets by volume.
- [Polymarket Sports API](/docs/examples/polymarket-api/polymarket-sports-api/): cricket, sports, and esports markets filtered by ResolutionSource, description, or outcome label.
- [Polymarket Commodity API](/docs/examples/polymarket-api/polymarket-commodity-api/): oil, gold, and commodity-linked prediction markets.
- [Bitcoin Up or Down Polymarket API](/docs/examples/polymarket-api/bitcoin-polymarket-api/): BTC direction markets, live odds, and top winners from settlements.
- [Polymarket Wallet Realized PnL](/docs/examples/polymarket-api/polymarket-wallet-realized-pnl/): PnL derived from on-chain fills.

Underneath, Bitquery's primary operations are PredictionTrades (buys and sells with buyer, seller, amount, price, USD-denominated collateral, and full market metadata), PredictionManagements (creation, resolution, and other lifecycle events), and PredictionSettlements (splits, merges, redemptions). Each can be run as a query for history or as a subscription for live streaming; swapping the single keyword is the only change required. For low-latency pipelines, Bitquery also publishes Kafka topics matic.predictions.proto and matic.broadcasted.predictions.proto (mempool), which require separate credentials.

Because everything is GraphQL, aggregations, limitBy, orderBy: descendingByField, and computed expressions (e.g. `calculate(expression: "$buyUSD + $sellUSD")`) are first-class. That is what makes queries like "top 100 Polymarket markets by volume over a window" or "all whale trades above $10k across Polymarket in real time" one query instead of a client-side batch job over the CLOB.

The one caveat is retention on the live endpoint: dataset: realtime holds roughly the **last 7 days**. For longer windows, a **full historical dataset is available via [Bitquery Cloud](https://docs.bitquery.io/docs/cloud/) on request**, with no need to self-persist the stream.
The one caveat is retention on the live endpoint: dataset: realtime holds roughly the **last 7 days**. For longer windows, a **full historical dataset is available via [Bitquery Cloud](/docs/cloud/) on request**, with no need to self-persist the stream.

## Side-by-side comparison

Expand All @@ -70,17 +68,17 @@ The one caveat is retention on the live endpoint: dataset: realtime holds roughl
| **Place orders** | Yes, via CLOB /order with signed requests | No (read-only) |
| **Live order book (bids/asks/depth)** | Yes, via CLOB REST + WS market channel | No; trades and settlements, not the L2 book |
| **Event, market, tag, series metadata** | Yes, via Gamma API, canonical | Partial: market ID, question, outcomes, condition ID, resolution source (on-chain derived) |
| **User positions / PnL** | Yes, via Data API /positions | Derivable from trades + settlements; [realized PnL example](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-realized-pnl/) |
| **User activity feed** | Yes, via Data API /activity | Yes, via [Wallet API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-api/) |
| **User positions / PnL** | Yes, via Data API /positions | Derivable from trades + settlements; [realized PnL example](/docs/examples/polymarket-api/polymarket-wallet-realized-pnl/) |
| **User activity feed** | Yes, via Data API /activity | Yes, via [Wallet API](/docs/examples/polymarket-api/polymarket-wallet-api/) |
| **Price history per token** | Yes, via CLOB /prices-history | Yes, via PredictionTrades with time filter |
| **On-chain fields** (tx hash, block time, log signatures, condition ID events) | Limited | Yes, native on every row |
| **Aggregations** (top N markets by volume, top wallets, maker/taker split) | Client-side | Native GraphQL: sum, count(distinct:), limitBy, orderBy: descendingByField |
| **Whale trade filtering across all markets** | Manual | One subscription; see the [whale trades example](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-api/) |
| **Whale trade filtering across all markets** | Manual | One subscription; see the [whale trades example](/docs/examples/polymarket-api/polymarket-api/) |
| **Real-time streaming** | WebSocket (ws-subscriptions-clob, ws-live-data), cannot unsubscribe, some filter gaps | GraphQL subscriptions plus Kafka matic.predictions.proto |
| **Settlement (split / merge / redeem) analytics** | Indirect | Native; see [Advanced Analytics](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-advanced-analytics-api/) |
| **Cross-market vertical APIs** (sports, commodity, BTC up/down) | Filter manually on Gamma | Purpose-built: [Sports](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-sports-api/), [Commodity](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-commodity-api/), [Bitcoin Up or Down](https://docs.bitquery.io/docs/examples/polymarket-api/bitcoin-polymarket-api/) |
| **Settlement (split / merge / redeem) analytics** | Indirect | Native; see [Advanced Analytics](/docs/examples/polymarket-api/polymarket-advanced-analytics-api/) |
| **Cross-market vertical APIs** (sports, commodity, BTC up/down) | Filter manually on Gamma | Purpose-built: [Sports](/docs/examples/polymarket-api/polymarket-sports-api/), [Commodity](/docs/examples/polymarket-api/polymarket-commodity-api/), [Bitcoin Up or Down](/docs/examples/polymarket-api/bitcoin-polymarket-api/) |
| **TVL / USDC custody balances** | Not exposed | Yes, via TransactionBalances on Conditional Tokens + neg-risk collateral |
| **Historical depth** | Full CLOB history | realtime dataset ~last 7 days; full historical dataset available via [Bitquery Cloud](https://docs.bitquery.io/docs/cloud/) on request |
| **Historical depth** | Full CLOB history | realtime dataset ~last 7 days; full historical dataset available via [Bitquery Cloud](/docs/cloud/) on request |
| **Auth** | API-key + HMAC-SHA256 (CLOB); none (Gamma) | Bitquery API token; Kafka requires separate creds |
| **Rate limits** | 4,000/10s (Gamma), ~10 orders/sec (CLOB) | No data or rate limits on streams; Kafka for enterprise streaming and scaling to 1,000+ simultaneous users |

Expand Down Expand Up @@ -125,10 +123,10 @@ A reasonable production architecture looks like this:

If you are new to Bitquery's Polymarket coverage, four queries exercise most of the surface area:

1. The basic recent-trades query from the [Polymarket API overview](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-api/), which confirms your API token and shows the shape of a PredictionTrade.
1. The basic recent-trades query from the [Polymarket API overview](/docs/examples/polymarket-api/polymarket-api/), which confirms your API token and shows the shape of a PredictionTrade.
2. The volume-ranking query from the same doc, which demonstrates limitBy, orderBy: descendingByField, and the computed sumBuyAndSell expression.
3. A live whale-trade subscription: swap the query keyword for subscription and filter on `CollateralAmountInUSD: { gt: "10000" }` to push events as they happen.
4. The daily volume and maker/taker split from the [Advanced Analytics page](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-advanced-analytics-api/), which shows how far GraphQL takes you before any client-side aggregation is required.
4. The daily volume and maker/taker split from the [Advanced Analytics page](/docs/examples/polymarket-api/polymarket-advanced-analytics-api/), which shows how far GraphQL takes you before any client-side aggregation is required.

All of these are runnable from the Bitquery IDE (linked inline from each docs page) before you ever issue an API token.

Expand All @@ -144,19 +142,19 @@ The two APIs are not rivals; they answer different questions. The official Polym

Canonical Bitquery Polymarket references:

- [Polymarket API, Trade, Prices & Market Data](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-api/)
- [Polymarket Markets API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-markets-api/) for CTF Exchange, condition_id, and token_id lookups
- [Polymarket Wallet & User Activity API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-api/)
- [Polymarket Advanced Analytics API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-advanced-analytics-api/)
- [Polymarket API, Trade, Prices & Market Data](/docs/examples/polymarket-api/polymarket-api/)
- [Polymarket Markets API](/docs/examples/polymarket-api/polymarket-markets-api/) for CTF Exchange, condition_id, and token_id lookups
- [Polymarket Wallet & User Activity API](/docs/examples/polymarket-api/polymarket-wallet-api/)
- [Polymarket Advanced Analytics API](/docs/examples/polymarket-api/polymarket-advanced-analytics-api/)

Vertical guides:

- [Polymarket Sports API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-sports-api/)
- [Polymarket Commodity API](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-commodity-api/)
- [Bitcoin Up or Down Polymarket API](https://docs.bitquery.io/docs/examples/polymarket-api/bitcoin-polymarket-api/)
- [Polymarket Wallet Realized PnL](https://docs.bitquery.io/docs/examples/polymarket-api/polymarket-wallet-realized-pnl/)
- [Polymarket Sports API](/docs/examples/polymarket-api/polymarket-sports-api/)
- [Polymarket Commodity API](/docs/examples/polymarket-api/polymarket-commodity-api/)
- [Bitcoin Up or Down Polymarket API](/docs/examples/polymarket-api/bitcoin-polymarket-api/)
- [Polymarket Wallet Realized PnL](/docs/examples/polymarket-api/polymarket-wallet-realized-pnl/)

Infrastructure and live reference:

- [Kafka Streaming Concepts](https://docs.bitquery.io/docs/streams/kafka-streaming-concepts/)
- [Kafka Streaming Concepts](/docs/streams/kafka-streaming-concepts/)
- [DexRabbit Polymarket Predictions dashboard](https://dexrabbit.bitquery.io/polymarket-predictions)
9 changes: 4 additions & 5 deletions docs/API-Blog/slippage-faq-using-dexpool-stream.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Slippage FAQ: Calculating Necessary Slippage for DEX Swaps Using Bitquery DEXPool Stream"
description: "FAQ answering developer questions about calculating necessary slippage before executing DEX swaps from smart contracts. Learn how to use Bitquery DEXPool stream data to programmatically determine slippage tolerance instead of guessing or trial-and-error."
title: "Slippage Faq Using Dexpool Stream"
description: "Slippage Faq Using Dexpool Stream: Bitquery documentation with GraphQL examples, real-time streams, and integration guidance."
keywords:
- slippage calculation
- DEX slippage
Expand All @@ -13,7 +13,6 @@ keywords:
- swapExactTokensForTokens
- removeLiquidity
---

# Slippage FAQ: Calculating Necessary Slippage for DEX Swaps Using Bitquery DEXPool Stream

This FAQ addresses common developer questions about calculating necessary slippage before executing swaps or withdrawing liquidity on DEXs from smart contracts. Instead of guessing or using trial-and-error, you can use Bitquery's DEXPool stream data to programmatically determine the appropriate slippage tolerance.
Expand Down Expand Up @@ -544,7 +543,7 @@ Subscribe to DEXPool stream updates for your target pool. When you see `Liquidit

## Additional Resources

- [DEXPools Cube Documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/) - Complete guide to DEXPool data structure and concepts
- [DEXPools Cube Documentation](/docs/cubes/evm-dexpool/) - Complete guide to DEXPool data structure and concepts
- [Bitquery IDE](https://ide.bitquery.io/) - Query DEXPool data in real-time
- [Kafka Data Samples](https://github.com/bitquery/kafka-data-sample/blob/main/evm/eth_dexpools.json) - Sample DEXPool stream data structure
- [EVM DEXPool Stream Documentation](https://docs.bitquery.io/docs/cubes/evm-dexpool/) - Understanding when DEXPool records are emitted
- [EVM DEXPool Stream Documentation](/docs/cubes/evm-dexpool/) - Understanding when DEXPool records are emitted
Loading
Loading