Bitcoin War data methodology
How Bitcoin War calculates its aggregated BTC price, combines order books and selects market events: the exact rules, the data sources and the limits.
Open the live battlefieldLast updated:
Data sources
All data comes from public WebSocket feeds that need no API key. Your browser opens them directly.
| Exchange | Spot market (price and order book) | Also used for |
|---|---|---|
| Coinbase | BTC-USD | — |
| Kraken | BTC/USD | USDT/USD exchange rate |
| OKX | BTC-USDT | Perpetual swap liquidations |
| Bybit | BTCUSDT | Perpetual liquidations |
| Bitstamp | BTC/USD | — |
| Binance | BTCUSDT, where reachable | Perpetual liquidations |
| Deribit | None | BTC option trades |
Official feed documentation: Coinbase, Kraken, OKX, Bybit, Bitstamp, Binance, Deribit.
How the aggregated price is calculated
The price is recalculated every 250 ms:
- Take every spot exchange whose latest trade is at most 120 seconds old.
- Convert its last trade price to USD (see USD and USDT).
- Give it a weight: its 24-hour traded value in USD. An exchange with no 24-hour figure, which is always the case for Bitstamp, uses its traded value over the last 10 minutes, or since its first trade if that is sooner, scaled up to a day.
- Find the median of those prices and drop any exchange more than 0.5% away from it.
- The aggregated price is the weighted average of the exchanges that remain.
price = Σ(priceUsd × weight) / Σ(weight)It uses last trade prices, not the middle of the order book. On wide screens the panel at the top right of the battlefield shows each exchange’s current weight and its distance from the aggregate in basis points. The 24-hour change applies the same weights to the 24-hour opening prices of the exchanges that report one.
USD and USDT
Coinbase, Kraken and Bitstamp quote BTC in US dollars. OKX, Bybit and Binance quote it in USDT. USDT prices, volumes and depth are multiplied by the USDT/USD rate from Kraken’s ticker before they are combined. A rate outside 0.9 to 1.1 is ignored, and until a rate arrives USDT counts as 1 USD.
Spot price versus derivatives events
Only spot trades set the price, and only spot order books form the armies. Liquidations come from perpetual futures and option trades from Deribit. Both are shown as events on the field and in the market feed, but they never enter the price, the weights or the depth.
Order book depth
The order books of the six spot exchanges are converted to USD and added up per price level. A book that has not updated for 30 seconds is left out. On wide screens the liquidity figures beside the field show the totals within ±1% of the aggregated price. The depth chart and these figures can also show a single exchange.
Market events
| Event | Source | Threshold |
|---|---|---|
| Large buy or sell | Spot trades. Prints on one exchange with the same taker side, at most 100 ms apart, count as one aggressive order. It is settled at the next 250 ms update once 150 ms have passed without a new print | At least $25,000 after merging |
| Liquidation | OKX, Bybit and Binance perpetual liquidation feeds | At least $2,000 |
| Large option trade | Deribit BTC options | At least $1,000 premium |
When an exchange or the network drops out
Each connection reconnects by itself, waiting about 1 second at first and about 60 seconds at most as failures repeat, with up to 25% random spread either way. A connection that stays silent for 45 seconds is restarted; quiet channels such as liquidations are allowed longer. An exchange blocked on the visitor’s network, as Binance is in some regions, simply stays out of the calculation.
If no spot trade arrives for 20 seconds, or within 12 seconds of loading, the page asks you to check your network. It says so at once when the browser reports it is offline. The last known price stays on screen until data returns.
Limits
- Not a benchmark. The aggregated price is unaudited, is not a settlement price and should not be used to value or trade anything.
- Visitors can see different numbers. Each browser calculates its own price from the exchanges it can reach, and rounds are counted per page, so the win lines, round number and score depend on when the page was opened.
- Order books show only what exchanges publish, and most feeds only the nearest levels: 20 per side on Binance, 100 on Bitstamp, up to 500 on Kraken. Orders can be cancelled at any moment, and hidden orders are not visible. This demo also does not verify book checksums.
- Public liquidation feeds may be incomplete, and only three exchanges are covered. The long or short side comes from each exchange’s documentation and has not yet been checked against a live BTC liquidation.
- A large option trade is drawn on the side of its taker, whether the option is a call or a put, so a flare does not mean the trade is bullish or bearish.
- The rounds and their fixed ±0.25% win lines are a way to frame price moves on screen. They are not a forecast, a signal or investment advice.
Check it yourself
The rules above come straight from the public source code: the price and event logic, the exchange connections, the round rules, the army layout and the page’s start-up settings, which set the $25,000 threshold and the soldier scale.