中文

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.

ExchangeSpot market (price and order book)Also used for
CoinbaseBTC-USD—
KrakenBTC/USDUSDT/USD exchange rate
OKXBTC-USDTPerpetual swap liquidations
BybitBTCUSDTPerpetual liquidations
BitstampBTC/USD—
BinanceBTCUSDT, where reachablePerpetual liquidations
DeribitNoneBTC 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:

  1. Take every spot exchange whose latest trade is at most 120 seconds old.
  2. Convert its last trade price to USD (see USD and USDT).
  3. 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.
  4. Find the median of those prices and drop any exchange more than 0.5% away from it.
  5. 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

EventSourceThreshold
Large buy or sellSpot 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 printAt least $25,000 after merging
LiquidationOKX, Bybit and Binance perpetual liquidation feedsAt least $2,000
Large option tradeDeribit BTC optionsAt 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

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.

Open the live battlefield