← Back to Docs

Data Sources

Where all data comes from, how it's collected, and why each source matters.

Overview

Five independent data feeds supply the BTC Regime scoring model. All data is stored in PostgreSQL and refreshed on a fixed cron schedule. Crypto market data comes from Coinglass and DefiLlama/CoinGecko, while macro indicators come from FMP and FRED.

SourceAPIPillar fedFrequency
Bitcoin Spot ETF FlowsCoinglassLiquidityDaily
Stablecoin SupplyDefiLlama + CoinGeckoLiquidityDaily
Exchange NetflowsCoinglassLiquidityEvery 2 hours
Derivatives (Funding, OI, Liquidations)CoinglassDerivatives + VolatilityEvery 4 hours
Macro Indicators (DXY, US10Y, SPX, VIX)FMP + FREDMacro Context overlayDaily

1. Bitcoin Spot ETF Flows

Source

Coinglass ETF API for daily net flows and AUM history. Aggregated across all major ETFs.

Data collected
FieldDescriptionUnit
dateTrading dateYYYY-MM-DD
total_netTotal net flow across all ETFs for the dayMillions USD
aum_usdTotal AUM across all ETFsUSD

How it's used: The model sums the last 3 trading days of total_net (absolute USD millions) as the etf3dSum input. Thresholds are fixed dollar amounts: >$1B strongly bullish (+10), <−$500M strongly bearish (−10). Feeds Component A of the Liquidity pillar (45% weight within pillar).

Update schedule

Every 2 hours via /api/sync/daily. ETF data reflects the previous trading day's close.

2. Stablecoin Supply

Sources
  • Market cap history: DefiLlama. Free, no key required.
  • Total crypto market cap (for dominance): CoinGecko. Free, no key required.
Data collected
FieldDescriptionUnit
market_cap_billionsTotal stablecoin market cap (all major coins)Billions USD
supply_change_percent7-day % change in total supplyPercentage
dominance_percentStablecoin mcap / total crypto mcap x 100Percentage

Why it matters: Stablecoin supply is a proxy for capital available within the crypto ecosystem. Rising supply indicates new capital entering. Contraction indicates capital leaving. The supply_change_percent (7-day change) feeds Component C of the Liquidity pillar (20% weight within pillar).

Update schedule

Every 2 hours via /api/sync/daily.

3. Exchange Netflows

Source

Coinglass on-chain data for historical exchange balance and per-exchange breakdown. Results cached for 3 hours (1.5x the sync interval) to survive one failed sync.

Data collected
FieldDescriptionUnit
exchange_netflowNet BTC value on exchanges (positive = inflow/distribution, negative = outflow/accumulation)Millions USD

Why it matters: Large outflows from exchanges have historically been associated with holding behavior; large inflows have historically been associated with distribution pressure. Feeds Component D of the Liquidity pillar (20% weight within pillar).

Update schedule

Every 2 hours via /api/sync/exchange-flows.

4. Derivatives: Funding Rate, Open Interest & Liquidations

Source

Coinglass, which aggregates derivatives data from Binance, OKX, Bybit, and other major exchanges. Three feeds are collected: perpetual funding rates, aggregate open interest, and liquidation history.

Data collected
FieldDescriptionUnit
funding_rate_percentCurrent 8h perpetual funding rate (Binance BTCUSDT)% per 8h
open_interest_usdTotal notional open interest across all exchangesUSD
oi_change_24h_pct24-hour % change in OI (computed from stored history)Percentage
liquidations_24hTotal liquidations in last 24 hours (Binance + OKX + Bybit)Millions USD
avg_liquidations_7d7-day average daily liquidationsMillions USD

Why it matters: Funding rate is contrarian: high positive funding means longs are overpaying, signaling overcrowded positioning and reversal risk. The Derivatives pillar uses two components: Funding Rate Z-Score (50%, gated by trend direction) and OI × Price Interaction (50%). OI data also feeds the Volatility pillar (15%) via realized volatility calculations.

Update schedule

Every 4 hours via /api/sync/derivatives.

5. Macro Indicators

Sources

SPX, VIX, forex pairs: Financial Modeling Prep (FMP). Free tier: 250 req/day.

US 10-Year yield: FRED (Federal Reserve), series DGS10.

DXY: Synthesized from 5 FMP forex pairs + 1 FRED series using the ICE DXY formula (see below).

Data collected
FieldDescriptionSource
dxyUS Dollar Index (synthesized from forex rates)FMP + FRED (computed)
us10y10-year Treasury yield. Forward-filled on non-trading days.FRED DGS10
spxS&P 500 daily closeFMP ^GSPC
vixCBOE Volatility Index. Forward-filled on non-trading days.FMP ^VIX
DXY approximation (ICE basket weights)
50.14348112 × EURUSD^−0.576 × USDJPY^0.136
              × GBPUSD^−0.119 × USDCAD^0.091
              × USDSEK^0.042 × USDCHF^0.036

This is a synthesized approximation using published ICE basket weights applied to FMP and FRED data. It is not sourced from ICE directly and may differ from the official DXY index. 400 calendar days of history fetched to support the 200-day moving average.

Important: Macro data feeds the Macro Context overlay only, not the BTC regime score. It provides an independent macro alignment signal without changing the regime direction. See Macro Context for details.

Update schedule

Every 2 hours via /api/sync/daily. Macro data from FMP and FRED updates after US market close; earlier runs will re-fetch the same values until new data is published.

Scoring-Related Sync Schedule

ScheduleEndpointData synced
Every 2 hours/api/sync/dailyETF flows, stablecoins (DefiLlama + CoinGecko), macro (FMP + FRED)
Every 2 hours/api/sync/exchange-flowsExchange netflows (Coinglass on-chain)
Every 4 hours/api/sync/derivativesFunding rate, OI, liquidations (Coinglass)