{"openapi":"3.1.0","info":{"title":"Crypto-to-Macro Correlation API","version":"1.0.0","description":"Whether crypto is trading as a risk asset or a hedge, measured by how closely a coin moves with the stock market, gold and the dollar — computed live from Binance and Yahoo Finance, no key, nothing stored. The single most-asked macro question about crypto is whether it is \"digital gold\" or just high-beta tech; this answers it with numbers. The correlation endpoint returns, for a coin (BTC or ETH), its return correlation to the S&P 500, the Nasdaq 100, gold and the US dollar index over a chosen window, each with a plain-language read (risk-on if it tracks stocks, a hedge if it tracks gold or moves against the dollar) and an overall verdict. The beta endpoint returns the coin's beta to the S&P 500 — how much it amplifies equity moves — with the correlation and R-squared. This is the cross-asset / crypto-versus-traditional-markets correlation cut — distinct from the crypto-to-crypto correlation API (coins against each other), the realised-volatility and the price APIs in the catalogue. Correlations use daily log returns aligned on common trading days; coin is BTC or ETH, window 20-365 days.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/cryptomacro-api","description":"oanor gateway"}],"tags":[{"name":"Macro"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/beta":{"get":{"operationId":"get_v1_beta","tags":["Macro"],"summary":"Beta to the S&P 500","description":"","parameters":[{"name":"coin","in":"query","required":true,"description":"BTC or ETH","schema":{"type":"string"},"example":"BTC"},{"name":"window","in":"query","required":false,"description":"Lookback in days (20-365, default 90)","schema":{"type":"string"},"example":"90"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"beta":1.063,"coin":"BTC","note":"beta = cov(coin, S&P 500) / var(S&P 500) on daily log returns. beta > 1 means the coin amplifies equity moves; beta near 0 means it moves independently of stocks.","source":"Binance + Yahoo Finance","benchmark":"S&P 500","r_squared":0.221,"correlation":0.47,"window_days":90,"observations":65},"meta":{"timestamp":"2026-06-12T10:35:30.290Z","request_id":"9ff4127a-f924-4885-abd5-4ff4ecca11a7"},"status":"ok","message":"Beta retrieved successfully","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/correlation":{"get":{"operationId":"get_v1_correlation","tags":["Macro"],"summary":"Correlation to stocks, gold & the dollar","description":"","parameters":[{"name":"coin","in":"query","required":true,"description":"BTC or ETH","schema":{"type":"string"},"example":"BTC"},{"name":"window","in":"query","required":false,"description":"Lookback in days (20-365, default 90)","schema":{"type":"string"},"example":"90"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"coin":"BTC","note":"Pearson correlation of daily log returns over window_days, aligned on common trading days. High S&P correlation = crypto trades risk-on; high gold correlation / negative dollar correlation = more hedge-like.","source":"Binance + Yahoo Finance","verdict":"trading as a risk asset (more stock- than gold-like)","window_days":90,"correlations":[{"read":"moderately risk-on","asset":"sp500","label":"S&P 500","correlation":0.47,"observations":65},{"read":"moderately risk-on","asset":"nasdaq","label":"Nasdaq 100","correlation":0.479,"observations":65},{"read":"little gold link","asset":"gold","label":"Gold","correlation":0.247,"observations":66},{"read":"mild dollar sensitivity","asset":"dxy","label":"US Dollar Index","correlation":-0.289,"observations":66}]},"meta":{"timestamp":"2026-06-12T10:35:30.787Z","request_id":"ee139f03-d531-43b8-9fae-a6d9838660d3"},"status":"ok","message":"Correlation retrieved successfully","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"coin is BTC or ETH. window is 20-365 days (default 90). Correlations use daily log returns aligned on common trading days (stocks trade weekdays; crypto 24/7). Read fresh per call, nothing cached.","coins":["BTC","ETH"],"source":"Binance daily candles + Yahoo Finance chart (S&P 500, Nasdaq 100, gold, US dollar index), live","service":"cryptomacro-api","endpoints":{"GET /v1/beta":"Beta to the S&P 500 with correlation and R-squared (coin=BTC, window=90).","GET /v1/meta":"This document.","GET /v1/correlation":"Correlation to S&P 500, Nasdaq, gold and the dollar, with a risk-asset/hedge verdict (coin=BTC, window=90)."},"benchmarks":["sp500","nasdaq","gold","dxy"],"description":"Crypto-to-macro correlation — whether crypto trades as a risk asset or a hedge, by how closely a coin moves with stocks, gold and the dollar (no key, nothing stored). correlation returns a coin's return correlation to the S&P 500, Nasdaq 100, gold and the US dollar index over a window, each with a plain read and an overall verdict. beta returns the coin's beta to the S&P 500. The cross-asset / crypto-versus-traditional-markets cut — distinct from the crypto-to-crypto correlation API, the realised-volatility and price APIs.","upstream_status":"ok","btc_sp500_correlation":0.47},"meta":{"timestamp":"2026-06-12T10:35:31.159Z","request_id":"a77ac887-2683-4df0-9f25-51a27e093ca6"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":400,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1216,"monthly_call_quota":11000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3666,"monthly_call_quota":67000,"rps_limit":16,"hard_limit":true},{"slug":"business","name":"Business","price_cents_month":8480,"monthly_call_quota":340000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/cryptomacro-api"}