Discovery and markets API
How does Bitcoin move against money supply and other assets?
Bitcoin's rolling correlation with gold, stocks and Treasuries (daily), and bitcoin beside US M2 (monthly) and global M2 (weekly) money supply and their growth. One series per call.
/api/external/discovery/bitcoin-macro-correlationWhat it returns
One series per call, bitcoin's USD price beside every point (priceUsd, the day's open), over the last 30, 90, 365 or 1825 days or the whole history (days=all). The figures are in values, named in valueNames; cadence says how often a point falls:
assets(daily, from 2010):gldCorrelation,iwmCorrelation,qqqCorrelation,spyCorrelation,tltCorrelation— the rolling correlation, -1 to 1, between bitcoin and the gold, US small-cap, Nasdaq-100, S&P 500 and long-Treasury funds of those tickers. It is a short-window correlation of daily prices (about a month), not of returns.nullbefore a fund's history starts (the Nasdaq-100 one until 2011-03-22).us-m2(monthly, from 2010-08, dated the 1st):usM2SupplyUsdandusM2MonthlyChangePct, the percent change from the month before (signed). It lags: the newest month is usually two to three months old.global-m2(weekly, Mondays, from 2013-05):globalM2SupplyUsdandglobalM2YearlyChangePct, the percent change from 52 weeks before (signed), as reported; from 2022-07 to 2024-07 it departs from the supply's own 52-week change by up to 2.2 points.
A figure the source has no value for is null, never 0.
Chains
This endpoint is not tied to a chain: it takes no chain in its request.
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/discovery/bitcoin-macro-correlation?series=assets"
| Parameter | Description |
|---|---|
seriesquery · string · required | The series.assetsus-m2global-m2 |
daysquery · string · optional | Trailing window in days back from the newest point, or all. Defaults to 365.30903651825all |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
series | string | The series answered. |
days | string | The window answered. |
cadence | string | How often the series has a point. |
valueNames | string[] | The keys of every point's values, in order. |
points | object[] | Oldest first; the last is the newest the series has. |
points[].timestamp | integer | Unix seconds, 00:00 UTC of the day. |
points[].priceUsd | number | Bitcoin's USD price at the open of that day. |
points[].values | object | The figures that day, keyed by valueNames; null where there is none. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key