# Windy Network Multi-Asset Market Data API Version: 1.0.0 Comprehensive market data API supporting cryptocurrency, stock, forex, and options data with real-time streaming capabilities. Authentication This API uses OAuth 2.0 for authentication. Supported grant types: - **Client Credentials**: For server-to-server communication - **Authorization Code**: For web applications - **Refresh Token**: To obtain new access tokens - **Password Grant**: Legacy support (discouraged) Alternatively, you can use API Keys for simpler authentication. Rate Limiting Rate limits are applied per OAuth client or API key: - **Free Tier**: 100 requests/minute - **Basic Tier**: 1,000 requests/minute - **Pro Tier**: 10,000 requests/minute Scopes OAuth 2.0 scopes control access to resources: - `crypto:read`, `stock:read`, `forex:read`, `option:read`, `dex:read` - Read market data - `crypto:write`, `stock:write` - Manage alerts and watchlists - `rate:read`, `ticker:read`, `ohlc:read`, `indicators:read` - Access specific data types - `stream:read` - Access WebSocket streams - `watchlist:read`, `watchlist:write` - Manage watchlists - `alerts:read`, `alerts:write` - Manage price alerts - `portfolio:read`, `portfolio:write` - Manage portfolio ## Servers - `https://api.windy.network` — CoreAPI - Production (authenticated) - `https://ws.windy.network` — CoreAPI - WebSocket/SSE (authenticated) - `https://openserver.windy.network` — OpenServer - Public (no authentication) - `https://staging-api.windy.network` — Staging server - `http://localhost` — Local development server ## Authentication - **BearerAuth**: `Authorization: Bearer ` - OAuth 2.0 Bearer token (JWT) - **ApiKeyAuth**: `header` `X-API-Key` - API Key for simple authentication ## API Keys API key management for simple authentication ### GET /apikeys — List API Keys Get all API keys for the authenticated user **Response** (200): object - `keys` (ApiKey[]) ### POST /apikeys — Create API Key Generate a new API key **Request body** (application/json): object - `name` (string) (required) — Descriptive name for the API key - `scopes` (string[]) — OAuth scopes for this API key - `expiresIn` (integer) — Expiration time in seconds (0 = no expiration) **Response** (200): object ### GET /apikeys/{keyId} — Get API Key Details Retrieve API key information (without the secret) **Parameters** - `keyId` (path, string) (required) — API key ID **Response** (200): object - `id` (string) - `name` (string) - `prefix` (string) — First few characters of the key for identification - `scopes` (string[]) - `createdAt` (string) - `expiresAt` (string) - `lastUsedAt` (string) ### DELETE /apikeys/{keyId} — Revoke API Key Delete an API key **Parameters** - `keyId` (path, string) (required) ### GET /apikeys/{keyId}/usage — Get API Key Usage Statistics Retrieve usage metrics for an API key **Parameters** - `keyId` (path, string) (required) - `period` (query, enum(1h | 24h | 7d | 30d)) — Time period for statistics **Response** (200): object - `keyId` (string) - `period` (string) - `totalRequests` (integer) - `requestsByEndpoint` (object) - `requestsByDay` (object[]) ## Crypto - Derivatives ### GET /v2/crypto/exchanges/funding/{base}-{term} — Aggregate Funding Rate (Cross-Exchange) Latest funding rate for the pair across every perps-supporting exchange we track. Returns the per-exchange list ranked highest to lowest, plus a summary (average, positive/negative count, highest/lowest venue, spread). Each row carries the funding rate (raw and × 100), implied APR (rate × 3 × 365 × 100, assuming 8h funding intervals), next funding rate, mark price, and index price. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `exchangeCount` (integer) - `summary` (object) - `exchanges` (object[]) ### GET /v2/crypto/exchanges/open-interest/{base}-{term} — Aggregate Open Interest (Cross-Exchange) Latest open interest for the pair summed across every perps-supporting exchange. Returns the total amount and total notional value, plus a per-exchange breakdown. The summary highlights the largest venue and its share of total OI — a quick read on concentration risk. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `exchangeCount` (integer) - `totalOpenInterestAmount` (number) - `totalOpenInterestValue` (number) - `summary` (object) - `exchanges` (object[]) ### GET /v2/crypto/exchanges/liquidation/{base}-{term} — Aggregate Liquidations (Cross-Exchange) Recent liquidation events merged across every perps-supporting exchange, sorted newest-first. Long liquidations (`side=sell`) and short liquidations (`side=buy`) are summarised at the top — counts, total notional value, share, and the dominant side. Use it as the cross-exchange replacement for the per-exchange liquidation endpoint when you want a single feed rather than 13 separate ones. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `limit` (query, integer) **Response** (200): object - `symbol` (string) - `exchangeCount` (integer) - `totalEvents` (integer) - `returned` (integer) - `summary` (object) - `events` (object[]) ## Crypto - Indices ### GET /v2/crypto/indices/live/rwa — RWA / Tokenized-Asset Sector Index Equal-weighted and volume-weighted 24h percent change across a curated basket of Real-World Asset (RWA) tokens — ONDO, OM, POLYX, MKR, RWA, CFG, GFI, PENDLE, USDM, USDY, TRU, MPL, MAPLE. Returns the per-constituent 24h change plus a composite "sector return" and sentiment label. Use it as a daily snapshot for the RWA narrative. **Response** (200): object - `sector` (string) - `sectorName` (string) - `constituentCount` (integer) - `constituentsRequested` (integer) - `index` (object) - `constituents` (object[]) ### GET /v2/crypto/indices/live/ai — AI / Crypto-AI Sector Index Equal-weighted and volume-weighted 24h percent change across a curated basket of AI / crypto-AI tokens — TAO, FET, RENDER/RNDR, AGIX, OCEAN, GRT, AKT, NEAR, ARKM, WLD, PAAL, AIOZ. Returns the per-constituent 24h change plus a composite "sector return" and sentiment label. **Response** (200): object - `sector` (string) - `sectorName` (string) - `constituentCount` (integer) - `constituentsRequested` (integer) - `index` (object) - `constituents` (object[]) ### GET /v2/crypto/indices/live/risk-on-score — Risk-On / Risk-Off Composite Score Single 0-100 score representing whether the crypto market is positioned risk-on or risk-off right now. Composed today from BTC, ETH, and SOL 24h direction with confluence weighting. Labels: `strong_risk_on` (≥75), `risk_on` (≥60), `neutral` (40-60), `risk_off` (≥25), `strong_risk_off` (<25). **MVP note:** crypto-internal inputs only. Forex DXY/JPY and calendar overlay land in a follow-up. **Response** (200): object - `score` (number) - `label` (enum(strong_risk_on | risk_on | neutral | risk_off | strong_risk_off)) - `components` (object[]) - `note` (string) ### GET /v2/crypto/indices/live/macro/{base} — Macro Dashboard (per asset) Per-asset macro snapshot pairing the cross-exchange aggregated mid and 24h change with cross-asset context (BTC and ETH 24h direction, ratio vs BTC, ratio vs ETH). **MVP note:** crypto-internal context only today. Forex DXY/JPY/EUR side and calendar event overlays (FOMC, CPI) will be wired in next. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) **Response** (200): object - `base` (string) - `quote` (string) - `snapshot` (object) - `crossAsset` (object) - `note` (string) ## Crypto - Rates ### GET /v2/crypto/rates/audit/midrate/{base}-{term} — Audit-Trail Midrate (Single Timestamp) Verified historical aggregated midrate at a specific timestamp, suitable for fund NAV calculation, audit verification, and tax cost-basis. Returns the row from the ClickHouse archive closest to the requested `ts` (looking backward if no exact match), plus a methodology block disclosing how the midrate was derived. `ts` accepts ISO 8601, Unix seconds, or `now-Nd` style relative times. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `ts` (query, string) (required) — Timestamp to look up (ISO 8601, Unix seconds, or 'now-Nd') **Response** (200): object - `symbol` (string) - `requestedTs` (string) - `archivedTimestamp` (string) — Timestamp of the archived row used (may differ from requested if backfilled) - `rate` (number) - `bid` (number) - `ask` (number) - `volume` (number) - `dataPoints` (integer) — Number of constituent exchange data points contributing to the aggregate - `methodology` (object) ## Crypto - Stablecoin ### GET /v2/crypto/stablecoin/live/peg/all — Stablecoin Peg Monitor (All) Snapshot of every monitored stablecoin's deviation from its peg target, sorted by stress score (worst first). Each entry includes the volume-weighted cross-exchange aggregated mid, deviation in basis points, cross-venue spread, and a 0-100 stress score with a label (`healthy`, `watch`, `elevated`, `critical`). Use this as the "is anything going on with stablecoins right now?" feed — suitable as a circuit-breaker input for DeFi protocols and a counterparty-risk signal for treasury managers. **Response** (200): object - `count` (integer) - `worstStressSymbol` (string) - `worstStressScore` (number) - `stablecoins` (StablecoinPegRow[]) ### GET /v2/crypto/stablecoin/live/peg/{symbol} — Stablecoin Peg Monitor (Single) Real-time peg deviation for a single stablecoin across every exchange that trades it. Returns the volume-weighted aggregated mid, per-exchange breakdown, cross-venue spread, and a stress score 0-100. Stablecoins are anchored to their declared peg (USD or EUR). **Parameters** - `symbol` (path, string) (required) — Stablecoin symbol (e.g. USDT, USDC, DAI, FDUSD, USDe, EURC) **Response** (200): object - `symbol` (string) - `peg` (string) - `target` (number) - `aggregatedMid` (number) - `deviationBps` (number) - `deviationPercent` (number) - `crossVenueSpreadBps` (number) - `weighting` (enum(volume-weighted | equal-weighted)) - `stressScore` (number) — 0 (healthy) to 100 (critical) - `stressLabel` (enum(healthy | watch | elevated | critical)) - `exchangeCount` (integer) - `exchanges` (object[]) ### GET /v2/crypto/stablecoin/live/dominance — Stablecoin Volume Dominance Volume share of each stablecoin across our trade-pair universe. Volume is summed from `BASE/{stablecoin}` ticker `quoteVolume` for a curated list of liquid bases (BTC, ETH, SOL, BNB, XRP, DOGE, ADA, TRX) — that gives a fair cross-stable comparison without weighting toward any single asset. Use it to track regime shifts (e.g. USDT share falling, USDC rising) and regional preferences when combined with venue-level data. **Response** (200): object - `sampledBases` (string[]) - `totalVolumeUsd` (number) - `leader` (string) - `stablecoins` (object[]) ### GET /v2/crypto/stablecoin/live/rating — Stablecoin Risk Rating (AAA → C) Letter-grade rating per stablecoin, refreshed continuously, derived from observable market data — peg stress, cross-venue divergence, and trade-volume share. Higher score (AAA) means tight peg, low cross-venue divergence, and meaningful share of stablecoin trade volume. Suitable for collateral-acceptance policies, DeFi protocol LTV tiers, and listing-committee scoring. This is faster and more reactive than annualised agency ratings (S&P, Bluechip). **Response** (200): object - `count` (integer) - `methodology` (string) - `ratings` (object[]) ### GET /v2/crypto/stablecoin/live/flow — Stablecoin Flow Index Snapshot of where stablecoin trade volume is concentrated and which symbols show stress vs healthy peg. Each row is tagged `inflow_destination`, `outflow_pressure`, or `neutral` based on a simple heuristic combining peg stress and current share. **MVP note:** this returns a current-state snapshot. Proper time-series rotation tracking ("USDe lost X% share over 4h, flowed to USDC") will land once historical stablecoin volume is archived in ClickHouse. **Response** (200): object - `note` (string) - `totalVolumeUsd` (number) - `stablecoins` (object[]) ## Crypto Aggregated Rates Cryptocurrency rate endpoints (stablecoin, basecoin, altcoin) ### GET /v2/crypto/rates/live/session/{base}-{term} — Session & Day-of-Week Analytics Behavioural breakdown of an asset by **trading session** and **weekday**, computed from the aggregated weighted midrate over a configurable lookback window. Use this endpoint to answer questions like: - **"When does this asset move the most?"** — compare volatility across Asia, Europe, and US sessions to find the most/least active windows. - **"When is the cheapest time to execute a large order?"** — pick the session with the lowest realised volatility and most stable returns. - **"Are weekends quieter than weekdays?"** — day-of-week bucketing surfaces consistent calendar effects. - **"Has the Asian session been bullish recently?"** — `avgReturnBps` per session reveals systematic drift. Sessions (UTC) | Session | Window | Typical activity | |----------|-------------------|--------------------------------------| | `asia` | 00:00 – 08:00 UTC | Tokyo, Hong Kong, Singapore, Korea | | `europe` | 08:00 – 16:00 UTC | London, Frankfurt, Zurich | | `us` | 16:00 – 24:00 UTC | New York, Chicago | Each session bucket includes the recurring window as `startUtc` / `endUtc` (ISO 8601, anchored to today's UTC date for a concrete reference instance). Metrics Each bucket reports: - **`count`** — number of observations contributing - **`avgReturnBps`** — mean return in basis points (1 bp = 0.01%) - **`volatilityBps`** — sample standard deviation of returns, also in bps Session buckets count **hourly** observations within the lookback window. Day-of-week buckets count **daily** observations (one per UTC date). Lookback Default **30 days**. Pass `?lookback=NNd` (1–90 days) or `?lookback=NNh` (1–2160 hours). Longer windows produce more statistically stable estimates; shorter windows reflect the most recent regime. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `lookback` (query, string) — Lookback window. Format `NNd` (1-90 days) or `NNh` (1-2160 hours). Default `30d`. **Response** (200): object - `symbol` (string) - `timeframe` (string) — Granularity used for the session breakdown - `lookback` (object) — The window the statistics were computed over - `barsAnalyzed` (integer) — Number of hourly observations included in the session breakdown - `sessions` (object) — Return statistics for each UTC trading session, each tagged with its recurring daily window - `dayOfWeek` (object) — Daily return statistics grouped by UTC weekday ### GET /v2/crypto/rates/live/midrate/{base}-{term} — Aggregated Weighted Midrate Real-time consensus mid-price for a crypto pair, computed as a volume-weighted average across every exchange we monitor. Outliers are filtered so a single misbehaving venue cannot move the published price. Use this as your single source of truth for "the price of BTC-USD right now" across portfolio valuation, NAV calculation, fee-quoting, charts, and downstream analytics. **HTTP GET** returns the most recent midrate. **WebSocket** (`wss://api.windy.network/v2/crypto/rates/live/midrate/{base}-{term}`) pushes every update. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency **Response** (200): object - `token` (string) - `term` (string) - `rate` (number) - `timestamp` (integer) - `sources` (string[]) - `dataPoints` (integer) — Number of data points used in calculation ### GET /v2/crypto/rates/historic/midrate/{base}-{term} — Get Historical Rates Long-history time series of the aggregated weighted midrate. Returns rate, bid, ask, volume, and the number of contributing exchanges at each timestamp. Use this for charts, backtests, P&L reconstruction, NAV history, and any analysis that needs more than the live snapshot. Pass `from`/`to` to scope the window, `limit` to cap the response size. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `type` (string) - `pair` (string) - `base` (string) - `term` (string) - `count` (integer) - `rates` (object[]) ### GET /v2/crypto/rates/export/midrate/{base}-{term} — Bulk-export Historical Rates (CSV / Parquet) **Streaming bulk download** of the aggregated weighted midrate time series, up to **1,000,000 rows per request**. Output is delivered as a streamed `attachment` — the browser saves it directly to disk and never loads the full payload into memory. Choose `format=csv` (default, gzipped on the wire — extension `.csv.gz`) for spreadsheet / pandas / DuckDB use, or `format=parquet` for columnar / typed analysis (`pyarrow`, Spark, DuckDB, ClickHouse-local). The server applies hard ceilings: `max_execution_time=180s`, `max_memory_usage=2GiB`, `max_result_rows=1,000,000`. Requests that would exceed any of these are aborted before any bytes leave ClickHouse — the response is JSON `502` rather than a truncated file. Memory profile: the entire pipeline (ClickHouse → clickhouse-proxy → nginx → client) streams in ~8 KiB chunks. A 50 MB gzipped export and a 5 GB one use the same server-side memory. **Rate-limited** at `6r/m` per IP (one export every 10 s). **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum rows to return. Server cap is 1,000,000. Default: 1,000,000 (i.e., "give me everything within the window"). - `format` (query, enum(csv | parquet)) — Output format: - `csv` — `CSVWithNames`, gzipped (`Content-Encoding: gzip`), filename `___...csv.gz`. Browsers auto-decompress; with curl use `--compressed` or `-o name.csv.gz`. - `parquet` — `Apache Parquet` binary, no extra compression (Parquet is self-compressing), filename `___...parquet`. **Response** (200): Streamed file download. `Content-Disposition: attachment; filename="..."` is always set. The body is the raw export bytes (gzipped CSV or Parquet); ordering is ascending by timestamp. ## Crypto Analytics Analytics ### GET /v2/crypto/analytics/live/liquidity/{base}-{term} — Real-Time Liquidity Score A single 0–100 score that answers "**how liquid is this asset right now?**" — the higher the score, the easier it is to trade meaningful size without moving the price. The score blends two things: how much resting depth sits within 10bps of the mid-price (most of the weight) and how tight the bid-ask spread is. Beneath the score you also get a depth breakdown at 1 / 5 / 10 / 50 bps thresholds so you can see exactly where the liquidity sits. **Ratings:** 80–100 Excellent · 60–79 Good · 40–59 Moderate · 20–39 Thin · 0–19 Very Thin. Use it for position sizing limits, listing committee reviews, collateral haircut policies, or risk dashboards. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `score` (integer) — Liquidity score (0-100): depth at 10bps (0-80pts log-scaled) + spread tightness (0-20pts) - `rating` (enum(Excellent | Good | Moderate | Thin | Very Thin)) — 80-100 Excellent, 60-79 Good, 40-59 Moderate, 20-39 Thin, 0-19 Very Thin - `depth` (object) — USD depth at each bps threshold - `spread` (object) - `exchangeCount` (integer) - `midPrice` (number) - `timestamp` (integer) ### GET /v2/crypto/analytics/live/spread/{base}-{term} — Real-Time Bid-Ask Spread Across Exchanges Returns the current bid-ask spread per exchange for a trading pair, ranked from tightest to widest. Spread is reported as both absolute price units and basis points (`(ask - bid) / mid × 10000`). Includes summary stats (tightest/widest exchange, average and median bps) and the per-exchange breakdown with bid, ask, mid, and timestamp. Use cases: choosing execution venue, Transaction Cost Analysis (TCA), monitoring spread regime changes, comparing exchange liquidity quality. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `count` (integer) — Number of exchanges with valid bid/ask data - `summary` (object) - `exchanges` (SpreadExchangeRow[]) — Per-exchange bid/ask snapshot, ranked tightest first ### GET /v2/crypto/analytics/live/premium/{base}-{term} — Cross-Exchange Premium / Discount Per-exchange premium or discount versus the cross-exchange consensus mid-price. The consensus is the **volume-weighted mean** of every exchange's mid (or equal-weighted as a fallback if no volume is reported), and each exchange's premium is reported in both basis points and percent. Use it to spot regional premiums (e.g. the Korean "Kimchi premium" on Upbit/ Bithumb), to flag exchanges that have drifted from consensus, or to feed an arbitrage scanner. Sorted from highest premium to lowest. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `count` (integer) - `globalMid` (number) - `weighting` (enum(volume-weighted | equal-weighted)) - `summary` (object) - `exchanges` (object[]) — Per-exchange premium rows, sorted highest premium first ### GET /v2/crypto/analytics/live/cex-dex-premium/{base}-{term} — CEX vs DEX Premium Compares the aggregated CEX midrate (across all 27+ centralised exchanges) with the on-chain DEX midrate (Uniswap, Curve, Balancer, etc.) for the same token, and returns the premium delta — both as an absolute price difference and in basis points. Use cases: - Spotting arbitrage opportunities when the gap is persistent - Detecting regulatory friction (a token blocked on certain CEXes) - Research signal — "where the trustworthy price is" for a given asset `higherSide` reports `cex`, `dex`, or `neutral`. A 404 is returned only when neither side has any data; if only one side is available the response includes that side's snapshot and `premium` is `null` with a `warning`. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `cex` (object) — Aggregated CEX side snapshot. Null if no CEX data. - `dex` (object) — Aggregated on-chain DEX snapshot. Null if no DEX data. - `premium` (object) — Delta DEX vs CEX. Null when one side is missing. - `warning` (string) — Set when one side is missing — e.g. "dex midrate missing". ### GET /v2/crypto/analytics/live/liquidation-heatmap/{base}-{term} — Liquidation Heatmap (Bucketed by Price) Recent liquidation events bucketed by price level (configurable basis-point bucket width, default 25bps). Each bucket reports long-liquidation notional, short-liquidation notional, and event count. Useful for visualising "liquidation walls" relative to mid-price. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `bucket_bps` (query, integer) — Bucket width in basis points relative to derived mid-price **Response** (200): object - `symbol` (string) - `midPrice` (number) - `bucketBps` (integer) - `bucketSize` (number) - `sampleEvents` (integer) - `buckets` (object[]) ### GET /v2/crypto/analytics/live/derivatives-sentiment/{base} — Derivatives Sentiment Composite Single -100 to +100 score representing positioning in the derivatives market for an asset. Today's components: average funding rate (across exchanges, for {BASE}/USDT) and recent liquidation imbalance (long vs short). Labels: `extreme_bullish` (≥60), `bullish` (≥25), `neutral`, `bearish` (≤-25), `extreme_bearish` (≤-60). Higher absolute value can flag contrarian extremes. **MVP note:** rolling baselines (funding vs 30d avg, OI vs 30d avg, basis vs historical) require ClickHouse archival and will be wired in next. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) **Response** (200): object - `base` (string) - `score` (number) - `label` (enum(extreme_bullish | bullish | neutral | bearish | extreme_bearish)) - `components` (object[]) - `inputs` (object) - `note` (string) ### GET /v2/crypto/analytics/live/funding-arb/{base}-{term} — Funding-Rate Arbitrage Scanner Finds the highest and lowest funding rate for a perps pair across exchanges and reports the implied annualised carry pickup from shorting the high-funding venue and longing the low-funding venue. APR ignores fees, borrow costs, and exchange-specific liquidation rules — use it as a discovery feed rather than a P&L estimate. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `exchangeCount` (integer) - `best` (object) - `rates` (object[]) - `note` (string) ### GET /v2/crypto/analytics/live/aggressive/{base}-{term} — Aggressive Buy/Sell Ratio Real-time taker-buy vs taker-sell volume split across all exchanges over a configurable window. Answers "is the market being aggressively bought or aggressively sold right now?". For each trade in the window, the side flag (`buy` / `sell`) attributes the notional (`cost`) to the buy or sell bucket. We sum per-exchange and globally, then return the ratio, percentages, and a `mood` label (`bullish`, `mildly_bullish`, `neutral`, `mildly_bearish`, `bearish`). Use it as a short-window order-flow indicator. CoinGlass and Velo sell the equivalent under various names ("Long/Short Buy", "Aggressive Order Flow"). **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `window` (query, enum(1m | 5m | 15m | 30m | 1h | 4h)) — Lookback window for trade aggregation **Response** (200): object - `symbol` (string) - `window` (string) - `windowMs` (integer) - `scannedExchanges` (integer) - `contributingExchanges` (integer) — Exchanges that had at least one trade in the window - `summary` (object) - `exchanges` (object[]) ### GET /v2/crypto/analytics/live/whale/{base}-{term} — Whale Trade Scanner Scans recent trades across every exchange that trades the pair and returns only those whose notional (`cost = price × amount`) exceeds the `min` threshold. Each trade is tagged with its venue, side, taker flag, and timestamp; results are returned newest-first. The summary block reports buy/sell counts, total buy/sell notional, and the signed net notional — a quick read on whether whales are net buying or selling right now. Useful as a real-time large-order feed (Telegram bot, dashboard ticker) or as an input to a whale-flow indicator. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `min` (query, number) — Minimum trade notional (in quote currency, typically USD/USDT) to qualify as whale - `limit` (query, integer) — Maximum number of matched trades to return **Response** (200): object - `symbol` (string) - `minNotional` (number) - `scannedExchanges` (integer) - `totalMatches` (integer) - `returned` (integer) - `summary` (object) - `trades` (object[]) ### GET /v2/crypto/analytics/live/arbitrage/{base}-{term} — Cross-Exchange Arbitrage Scanner Finds the venue with the lowest **ask** and the venue with the highest **bid** for a pair across all exchanges, and reports the raw spread between them in basis points. A positive spread (bid > ask on different venues) indicates a crossed market — a candidate arbitrage opportunity, before fees and transfer costs. Also returns up to ten ranked cross-exchange `(buy, sell)` pair opportunities, always with different `buyExchange` and `sellExchange`. **Important:** the response shows raw price spread only. Real profitability requires subtracting taker fees on both sides, withdrawal fees, gas, and the risk of price drift during transfer. Treat this as a discovery feed, not an execution plan. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `exchangeCount` (integer) - `best` (object) - `opportunities` (object[]) — Up to 10 cross-exchange (buy, sell) pairs ranked by spreadBps - `note` (string) ### GET /v2/crypto/analytics/live/dex-share/{base} — DEX Share of Trading Volume Reports the share of trading volume for a base asset that happens **on-chain via DEXes** versus on **centralised exchanges**. Both sides are anchored on USD-equivalent 24h volume so the comparison is apples-to-apples. The CEX side aggregates volume across `BASE/USD`, `BASE/USDT`, and `BASE/USDC` for every centralised exchange we cover, preferring `quoteVolume` (already USD-denominated) and falling back to `baseVolume × last` when needed. The DEX side uses our aggregated on-chain DEX feed for `BASE/USD`. Use it as a research / policy signal — secular shift of liquidity onto DEXes is one of the cleanest decentralisation indicators. Examples: BTC ≈ 99% CEX, ETH ≈ 87% CEX, UNI ≈ 41% CEX, PEPE ≈ 11% CEX. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) **Response** (200): object - `base` (string) - `cexVolumeUsd` (number) — Combined USD-denominated 24h volume across CEXes for BASE/USD,USDT,USDC - `dexVolumeUsd` (number) — 24h on-chain DEX volume in USD for BASE - `combinedVolumeUsd` (number) - `cexSharePercent` (number) - `dexSharePercent` (number) - `cexExchangeCount` (integer) - `breakdown` (object) ### POST /v2/crypto/analytics/slippage/{base}-{term} — Slippage Estimator [NEW] Pre-trade simulation: "if I market-buy $X of this asset right now, what average price will I get and how many bps of slippage will I pay?" The endpoint walks the real order book to estimate two scenarios: - **Smart-routed** across every exchange we track (best-case) - **Best single exchange** (apples-to-apples comparison) It then quantifies the USD savings from smart routing and shows a per-exchange fill breakdown so you can see exactly where the liquidity comes from. Use it before executing institutional-size orders, to size up trades against available depth, or to feed a best-execution engine. Send `side` (`buy` / `sell`) and `amount` (USD notional, 1–10,000,000). **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Request body** (application/json): object - `side` (enum(buy | sell)) (required) — Order side (buy walks asks, sell walks bids) - `amount` (number) (required) — USD notional amount to simulate - `exchanges` (string[]) — Exchange filter (default all available) **Response** (200): object - `symbol` (string) - `side` (enum(buy | sell)) - `requestedAmount` (number) - `smartRoute` (object) — Simulated execution across all exchanges (optimal routing) - `bestSingleExchange` (object) — Simulated execution on the single best exchange (for comparison) - `savings` (object) — Savings from smart routing vs best single exchange - `exchanges` (object[]) — Per-exchange fill breakdown (sorted by contribution) - `timestamp` (integer) ## Crypto Assets Cryptocurrency asset discovery and metadata ### GET /v1/crypto/assets — List Cryptocurrency Assets Symbols we track, grouped by category. Backed by Redis registry sets — `crypto:registry:basecoin`, `:altcoin`, `:stablecoin`, `:ohlc`, `:refrate`. **Default response** returns all five categories at once with per-category sorted symbol lists, per-category counts, and the total unique symbol count across all categories. **Filter to one category** with `?type=basecoin|altcoin|stablecoin|ohlc|refrate` for a single sorted list, paginated via `?limit` / `?offset`. **Search** with `?search=BTC` to filter symbols by case-insensitive substring match (applies in either response shape). Use it to populate selectors, validate user input, or discover what's available before subscribing to other endpoints. **Parameters** - `type` (query, enum(basecoin | altcoin | stablecoin | ohlc | refrate)) — Filter to a single category. When omitted, all categories are returned. - `search` (query, string) — Case-insensitive substring filter on symbol - `limit` (query, integer) — Page size. With `?type=` it caps the returned page; without `?type=` it caps each category independently. - `offset` (query, integer) — Pagination offset (only meaningful with `?type=`) **Response** (200): object ### GET /v1/crypto/assets/{symbol} — Get Asset Details Full metadata for a single asset by symbol — name, classification, and other descriptive fields. Use it to render asset detail pages or enrich a row in your UI without separate look-ups. **Parameters** - `symbol` (path, string) (required) **Response** (200): (ref: #/components/schemas/CryptoAsset) ### GET /v1/crypto/pairs — List Trading Pairs Every base/term pair we have data for, optionally filtered by `?base=`, `?term=`, or `?exchange=`. Use it to populate pair selectors, pre-validate a pair before issuing other requests, or check coverage on a specific exchange. **Parameters** - `base` (query, string) - `term` (query, string) - `exchange` (query, string) - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `pairs` (TradingPair[]) ## Crypto Exchanges Exchange information, real-time tickers, and trade data ### GET /v2/crypto/exchanges/{exchange}/live/ticker/{base}-{term} — Get Exchange Ticker Real-time ticker for a single exchange — bid, ask, last trade, 24h high/low, 24h volume, and price change. Use this when you need to know what one specific exchange is showing (e.g., to display a Coinbase price next to your "consensus" midrate, or to feed an exchange-specific trading bot). **HTTP GET** returns the latest snapshot. **WebSocket** (`wss://api.windy.network/v2/crypto/exchange/{exchange}/ticker/{symbol}`) pushes every update from that exchange. **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `exchange` (string) - `timestamp` (integer) - `datetime` (string) - `high` (number) - `low` (number) - `bid` (number) - `bidVolume` (number) - `ask` (number) - `askVolume` (number) - `vwap` (number) - `open` (number) - `close` (number) - `last` (number) - `previousClose` (number) - `change` (number) - `percentage` (number) - `baseVolume` (number) - `quoteVolume` (number) ### GET /v2/crypto/exchanges/ticker/{base}-{term} — Get Aggregated Ticker Ticker data combined across every exchange that trades the pair — the global highest bid, lowest ask, average price, and total 24h volume, plus a per-exchange breakdown. Use it when you want one canonical "what's this asset doing" view without picking a specific venue. **Parameters** - `base` (path, string) (required) - `term` (path, string) (required) **Response** (200): object - `symbol` (string) - `exchanges` (object) - `summary` (object) ### GET /v2/crypto/exchanges/tickers — List Tickers [SOON] Bulk fetch ticker data for many pairs in one call, with optional `exchange`, `base`, and `term` filters. Use it instead of looping over single-pair calls when you need a wide snapshot — e.g., a heatmap or a portfolio view. **Parameters** - `exchange` (query, string) - `term` (query, string) - `base` (query, string) - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `tickers` (TickerResponse[]) ### GET /v2/crypto/exchanges/tickers/{exchange} — Get All Tickers for Exchange [SOON] Every ticker we receive from a single exchange in one response. Useful to scan an entire venue's market in one round-trip — e.g., to compute exchange- wide statistics or render a complete venue dashboard. **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) **Response** (200): object - `exchange` (string) - `tickers` (TickerResponse[]) ### GET /v2/crypto/exchanges/{exchange}/live/trade/{base}-{term} — Get Latest Trade The most recent executed trade on a specific exchange — price, size, side (buy/sell), and timestamp. Useful for "last trade" tickers, trade tape previews, and any UI that wants to show live activity from a single venue. **HTTP GET** returns the latest trade. **WebSocket** (`wss://api.windy.network/v2/crypto/exchange/{exchange}/trade/{base}-{term}`) pushes every new trade as it happens. **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `id` (string) - `symbol` (string) - `timestamp` (integer) - `datetime` (string) - `side` (enum(buy | sell)) - `price` (number) - `amount` (number) - `cost` (number) — price * amount - `fee` (object) - `fees` (object) - `info` (object) — Raw exchange-specific trade data ### GET /v2/crypto/exchanges/{exchange}/live/trades/{base}-{term} — Get Recent Trades List The most recent N trades on a single exchange, newest first. Each entry has price, size, side, and timestamp. Use it to render a trade tape, compute very-short-term VWAP / volume, or sanity-check what just happened on a specific venue. Default 25, max 50. **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `limit` (query, integer) — Number of trades to return (default 25, max 50) **Response** (200): object - `symbol` (string) - `exchange` (string) - `count` (integer) - `trades` (Trade[]) ### GET /v2/crypto/exchanges/trades/{base}-{term} — Get Aggregated Trades [SOON] Recent trades for a pair merged from every exchange we track, newest first. Each entry includes which exchange it came from, so you can see who's actually trading right now. Use it for a unified "global tape" view, cross-venue volume comparison, or to spot single-exchange surges. Default 25, max 50. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `limit` (query, integer) — Number of trades to return (default 25, max 50) **Response** (200): object - `symbol` (string) - `count` (integer) - `trades` (object[]) ### GET /v2/crypto/exchanges/{exchange}/live/funding/{base}-{term} — Get Latest Funding Rate [NEW] The current funding rate for a perpetual futures contract on a specific exchange. Funding is the periodic payment between longs and shorts that keeps a perp's price tethered to spot — a positive rate means longs pay shorts, negative means shorts pay longs. Use it to monitor leverage cost, build carry strategies (long spot + short perp to harvest funding), or measure how bullish/bearish positioning is right now. The response also includes mark price, index price, and the next funding timestamp. Updated every 10 minutes. **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `id` (string) — Unique entry identifier (format `-`). Useful for pagination and de-duplication. - `timestamp` (integer) — Sample timestamp (Unix ms) - `symbol` (string) - `fundingRate` (number) — Current funding rate (decimal, not percent) - `nextFundingRate` (number) — Predicted next funding rate (may be null) - `fundingTimestamp` (integer) — Timestamp of the current funding period (Unix ms) - `nextFundingTimestamp` (integer) — Timestamp of the next funding period (Unix ms) - `previousFundingRate` (number) — Previous funding rate (looked up from stream history) - `previousFundingTimestamp` (integer) — Timestamp of the previous funding period (Unix ms) - `markPrice` (number) - `indexPrice` (number) - `interestRate` (number) - `exchange` (string) - `dataset` (string) - `info` (object) — Raw exchange-specific funding payload ### GET /v2/crypto/exchanges/{exchange}/historic/funding/{base}-{term} — Get Historic Funding Rates [NEW] Recent history of funding rates for a perpetual contract. Use it to chart funding over time, compute the average funding cost over a holding period, or compare current funding against a recent baseline. - Without `from`/`to` → returns the most recent N samples (newest first) - With `from`/`to` → returns samples in that window (oldest first) We retain up to 7 days of recent samples (the 5,000 most recent). **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `exchange` (string) - `dataset` (string) - `symbol` (string) - `count` (integer) - `entries` (FundingRate[]) ### GET /v2/crypto/exchanges/{exchange}/live/open-interest/{base}-{term} — Get Latest Open Interest [NEW] Total notional value of all open positions in a perpetual contract on a specific exchange — i.e., how much money is currently committed to that market. Rising open interest with rising price = new longs entering (strong trend). Falling open interest with rising price = shorts covering (weaker rally). Use it to gauge conviction behind a price move, monitor leverage build-up, or compare positioning across exchanges. Updated every 10 minutes. **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `id` (string) - `timestamp` (integer) - `symbol` (string) - `openInterestAmount` (number) — Open interest in base asset units - `openInterestValue` (number) — Open interest notional value in quote asset - `baseVolume` (number) — 24h base asset volume - `quoteVolume` (number) — 24h quote asset volume (enriched from ticker hash) - `exchange` (string) - `dataset` (string) - `info` (object) — Raw exchange-specific OI payload ### GET /v2/crypto/exchanges/{exchange}/historic/open-interest/{base}-{term} — Get Historic Open Interest [NEW] Recent history of open interest for a perpetual contract. Use it to chart how positioning evolves over time, spot OI spikes that often precede volatility, or correlate OI changes with price moves. - Without `from`/`to` → returns the most recent N samples (newest first) - With `from`/`to` → returns samples in that window (oldest first) We retain up to 7 days of recent samples (the 5,000 most recent). **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `exchange` (string) - `dataset` (string) - `symbol` (string) - `count` (integer) - `entries` (OpenInterest[]) ### GET /v2/crypto/exchanges/{exchange}/live/liquidation/{base}-{term} — Get Latest Liquidation [NEW] The most recent forced position closure ("liquidation") on a specific exchange for a perpetual contract. A liquidation happens when a leveraged trader runs out of margin and the exchange force-closes their position at market. Each event includes the side (was a long or short liquidated), the price it cleared at, and the size. Use liquidations to spot capitulation, identify cascade events, or feed live "rekt" feeds. Liquidations are event-driven, so quiet pairs may have no recent events. **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `id` (string) - `timestamp` (integer) - `symbol` (string) - `side` (enum(buy | sell)) — Side of the liquidated position. `buy` = a short position was liquidated (forced buy). `sell` = a long position was liquidated (forced sell). - `price` (number) - `baseValue` (number) — Liquidated amount in base asset - `quoteValue` (number) — Liquidated notional in quote asset - `contracts` (number) - `contractSize` (number) - `exchange` (string) - `dataset` (string) - `info` (object) — Raw exchange-specific liquidation payload ### GET /v2/crypto/exchanges/{exchange}/historic/liquidation/{base}-{term} — Get Historic Liquidations [NEW] Recent liquidation events on a single exchange for a perpetual contract. Useful for visualising liquidation clusters around key price levels, measuring market stress, or building "liquidation feed" widgets. - Without `from`/`to` → returns the most recent N events (newest first) - With `from`/`to` → returns events in that window (oldest first) We retain the 100 most recent events from the last day. **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `exchange` (string) - `dataset` (string) - `symbol` (string) - `count` (integer) - `entries` (Liquidation[]) ### GET /v2/crypto/exchanges/{exchange}/live/orderbook/{base}-{term} — Get Order Book Live order book snapshot for a single exchange — the resting bids and asks at each price level, plus the best bid/ask and exchange-supplied update sequence. Bids come back highest-price first, asks lowest-price first. Use it for depth-of-market widgets, single-venue execution analysis, or to feed a market microstructure model. Tune `?depth=N` (1–1000) for how many levels per side you want. **Parameters** - `exchange` (path, string) (required) — Exchange identifier (e.g., binance, coinbase, kraken) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `depth` (query, integer) — Maximum number of price levels to return per side (bids and asks) **Response** (200): object - `exchange` (string) - `symbol` (string) - `base` (string) - `term` (string) - `timestamp` (integer) — Last update timestamp from the exchange (Unix ms) - `nonce` (integer) — Exchange-supplied update sequence (when available) - `best_bid` (number) - `best_ask` (number) - `best_bid_amount` (number) - `best_ask_amount` (number) - `depth` (integer) — Total levels available in the underlying sorted set (may exceed `?depth` cap) - `bids` (OrderBookLevel[]) — Bid levels ordered highest price first - `asks` (OrderBookLevel[]) — Ask levels ordered lowest price first ### GET /v2/crypto/exchanges/comparison/{base} — Per-Exchange Comparison Dashboard Per-exchange snapshot for a base asset across `BASE/USD`, `BASE/USDT`, `BASE/USDC`, `BASE/EUR` ticker hashes. Each row carries last price, mid, spread (bps), 24h percent change, USD-equivalent volume, age of last update, and a `fresh` flag (true if < 60s old). Sorted by volume descending. Use it to choose execution venue, monitor data-feed health, or build a marketplace comparison page. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) **Response** (200): object - `base` (string) - `rowCount` (integer) - `freshCount` (integer) — Rows with last update under 60 seconds old - `totalVolumeUsd` (number) - `sampledQuotes` (string[]) - `rows` (object[]) ### GET /v1/crypto/exchanges — List Supported Exchanges Every cryptocurrency exchange we ingest data from, returned as a sorted list of identifiers. Use it to build exchange filters, validate the `exchange` path parameter on per-exchange endpoints, or display venue coverage on a status page. **Response** (200): array of string ### GET /v1/crypto/exchanges/{exchange} — Get Exchange Detail Detailed status and inventory for a single exchange — every trading pair we receive from it, plus health stats (uptime, ticker / trade counts, error counts). Use it to render an exchange detail page, audit coverage, or build an internal monitoring dashboard. **Parameters** - `exchange` (path, string) (required) — Exchange name (lowercase) **Response** (200): object - `exchange` (string) - `token_count` (integer) — Total distinct trading pairs - `tokens` (string[]) — Sorted list of all trading pairs - `total_ticker_count` (integer) — Aggregated ticker updates across all pods - `total_trade_count` (integer) — Aggregated trade updates across all pods - `total_error_count` (integer) - `pods` (object[]) — Per-pod status and stats ## Crypto Indicators Technical indicators for cryptocurrency pairs (SMA, EMA, RSI, MACD, Bollinger Bands) ### GET /v1/crypto/indicator/live/sma/{timeframe}/{window}/{base}-{term} — Simple Moving Average (SMA) Simple Moving Average — the unweighted average of the closing price over the last `window` candles. Smooths short-term noise and reveals the underlying trend. Common windows: 20 (short term), 50 (medium term), 200 (long term). Use it to confirm trend direction (price above the 200-SMA = long-term uptrend), identify support/resistance, or build crossover signals (e.g., 50 crosses 200). Pass `expand_underlying=true` to also receive the raw candles used. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) — Moving average window/period size - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(sma | ema)) (required) — Indicator type - `window` (integer) (required) — Window/period size used for calculation - `type` (enum(crypto | fiat247)) (required) — Data type (crypto or fiat247) - `pair` (string) (required) — Trading pair - `base` (string) (required) — Base currency symbol - `term` (string) (required) — Quote currency symbol - `timeframe` (enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `count` (integer) (required) — Number of indicator values returned - `values` (object[]) (required) — Indicator values (newest first) - `underlying` (object) — Raw OHLC candles (only included when expand_underlying=true) ### GET /v1/crypto/indicator/live/ema/{timeframe}/{window}/{base}-{term} — Exponential Moving Average (EMA) Exponential Moving Average — like SMA, but weighted so recent prices count more than older ones. Reacts faster to price changes, which makes it the usual choice for short-term trend signals. Use it the same way as SMA but when responsiveness matters more than smoothness. Pass `expand_underlying=true` to also receive the raw candles used. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) — Moving average window/period size - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(sma | ema)) (required) — Indicator type - `window` (integer) (required) — Window/period size used for calculation - `type` (enum(crypto | fiat247)) (required) — Data type (crypto or fiat247) - `pair` (string) (required) — Trading pair - `base` (string) (required) — Base currency symbol - `term` (string) (required) — Quote currency symbol - `timeframe` (enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `count` (integer) (required) — Number of indicator values returned - `values` (object[]) (required) — Indicator values (newest first) - `underlying` (object) — Raw OHLC candles (only included when expand_underlying=true) ### GET /v1/crypto/indicator/live/rsi/{timeframe}/{window}/{base}-{term} — Relative Strength Index (RSI) RSI is a 0–100 momentum indicator that compares the size of recent gains to recent losses. It tells you whether an asset is overbought or oversold relative to its own recent behaviour — independent of price level. **Reading the value:** - **> 70** — overbought, may be due for a pullback - **< 30** — oversold, may be due for a bounce - **50** — neutral momentum Common window: **14**. Computed using Wilder's smoothing (the standard). Use it for entry timing, divergence detection (price makes new high but RSI doesn't = trend weakening), or as a filter inside a larger strategy. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) — Moving average window/period size - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(rsi)) (required) - `window` (integer) (required) — RSI period - `type` (enum(crypto | fiat247)) (required) - `pair` (string) (required) - `base` (string) (required) - `term` (string) (required) - `timeframe` (string) (required) - `count` (integer) (required) - `values` (object[]) (required) — RSI values (0-100, newest first) - `underlying` (object) — Raw OHLC candles (only if expand_underlying=true) ### GET /v1/crypto/indicator/live/macd/{timeframe}/{base}-{term} — Moving Average Convergence Divergence (MACD) MACD measures the difference between a fast and a slow EMA, then smooths that difference to produce a "signal" line. The gap between them (the histogram) flags shifts in momentum. **How traders read it:** - **MACD crosses above signal** → bullish momentum starting - **MACD crosses below signal** → bearish momentum starting - **Histogram growing** → trend strengthening; **shrinking** → trend weakening - **Divergence** (price makes new high but MACD doesn't) → trend may be ending Defaults are the classic **12 / 26 / 9** parameters; tune `fast`, `slow`, and `signal` for shorter or longer-term sensitivity. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `fast` (query, integer) — Fast EMA period (2-100) - `slow` (query, integer) — Slow EMA period (2-200, must be > fast) - `signal` (query, integer) — Signal line EMA period (2-50) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(macd)) (required) - `parameters` (object) (required) - `type` (enum(crypto | fiat247)) (required) - `pair` (string) (required) - `base` (string) (required) - `term` (string) (required) - `timeframe` (string) (required) - `count` (integer) (required) - `values` (object[]) (required) — MACD values (newest first) - `underlying` (object) — Raw OHLC candles (only if expand_underlying=true) ### GET /v1/crypto/indicator/live/bbands/{timeframe}/{window}/{base}-{term} — Bollinger Bands Bollinger Bands wrap a moving average with an upper and lower band drawn at a configurable number of standard deviations from the middle. The bands widen when volatility rises and tighten when it falls. **How traders read them:** - **Price near upper band** → potentially overbought - **Price near lower band** → potentially oversold - **Bands tightening** ("squeeze") → low volatility, often precedes a breakout - **`percentB`** locates price within the bands (0 = at lower, 1 = at upper) - **`bandwidth`** quantifies how wide the bands are right now Defaults: **20-period SMA, 2 standard deviations** (the standard Bollinger setup). **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) — Moving average window/period size - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `stddev` (query, number) — Standard deviation multiplier (0.5-5) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(bbands)) (required) - `window` (integer) (required) — SMA period for middle band - `stddev` (number) (required) — Standard deviation multiplier - `type` (enum(crypto | fiat247)) (required) - `pair` (string) (required) - `base` (string) (required) - `term` (string) (required) - `timeframe` (string) (required) - `count` (integer) (required) - `values` (object[]) (required) — Bollinger Bands values (newest first) - `underlying` (object) — Raw OHLC candles (only if expand_underlying=true) ## Crypto Market Cryptocurrency market statistics and summaries ### GET /v1/crypto/market/summary — Get Market Summary High-level snapshot of the entire crypto market — total tracked assets, aggregate volume, rough breadth indicators. Use it to render a "market at a glance" widget on a homepage or dashboard. **Response** (200): (ref: #/components/schemas/MarketSummary) ### GET /v1/crypto/market/gainers — Get Top Gainers The best-performing crypto assets by percentage price change over the chosen timeframe. Use it to drive "top movers" lists, leaderboards, or alerts that surface what's running today. **Parameters** - `timeframe` (query, enum(1h | 24h | 7d | 30d)) - `limit` (query, integer) — Maximum number of results to return **Response** (200): (ref: #/components/schemas/MarketMoversResponse) ### GET /v1/crypto/market/losers — Get Top Losers The worst-performing crypto assets by percentage price change over the chosen timeframe. Mirror of the gainers endpoint — useful for surfacing capitulation, risk dashboards, or contrarian-entry watchlists. **Parameters** - `timeframe` (query, enum(1h | 24h | 7d | 30d)) - `limit` (query, integer) — Maximum number of results to return **Response** (200): (ref: #/components/schemas/MarketMoversResponse) ### GET /v1/crypto/market/volume — Get Highest Volume Assets Crypto assets ranked by trading volume over the chosen timeframe. Use it to identify what the market is actually trading right now (volume = real attention), surface "trending" lists, or pre-filter universes for analytics. **Parameters** - `timeframe` (query, enum(1h | 24h | 7d)) - `limit` (query, integer) — Maximum number of results to return **Response** (200): (ref: #/components/schemas/VolumeRankingResponse) ## Crypto OHLC Cryptocurrency OHLC/candlestick data ### GET /v2/crypto/rates/ohlc/{timeframe}/{base}-{term} — Get OHLC/Candlestick Data (v2) Candlestick data — open, high, low, close — for a crypto pair, computed from our aggregated weighted midrate. The candles reflect the cross-exchange consensus, not a single venue, so they're robust against single-exchange outliers. Use it for charts, technical analysis, building strategies, or any time-series view. Pick the right `timeframe` for your need: `m1`–`m30` for intraday, `h1`–`h4` for short-term swings, `d1`–`mo1` for longer-term analysis. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Candlestick timeframe - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `limit` (query, integer) — Maximum number of results to return - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. **Response** (200): object - `pair` (string) (required) - `base` (string) (required) — Base asset symbol - `term` (string) (required) — Quote asset symbol - `type` (string) (required) — Asset type (crypto, stock, forex) - `timeframe` (string) (required) - `count` (integer) (required) — Number of candles returned - `candles` (object[]) (required) ### GET /v2/crypto/rates/historic/ohlc/{timeframe}/{base}-{term} — Get Historical OHLC Candles Long-history candlestick data for a crypto pair. Same OHLC shape as the live endpoint, but with deeper history — useful for backtests, year-over-year charts, and any analysis that needs more than the recent rolling window. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `pair` (string) (required) - `base` (string) (required) — Base asset symbol - `term` (string) (required) — Quote asset symbol - `type` (string) (required) — Asset type (crypto, stock, forex) - `timeframe` (string) (required) - `count` (integer) (required) — Number of candles returned - `candles` (object[]) (required) ## Crypto Order Books Order book and market depth data ### GET /v2/crypto/exchanges/orderbook/{base}-{term} — Get Aggregated Order Book A single unified order book for a pair, merged across every exchange that trades it. Liquidity at the same price from different venues is summed, and each level lists which exchanges contribute to it. Use it to see the **true** depth available at any price level, identify the dominant liquidity providers, and run pre-trade analysis that accounts for all venues at once. `best_bid` and `best_ask` are global (the highest bid and lowest ask anywhere), so `spread` can be **negative** when markets are crossed — that's a real cross-exchange arbitrage signal, not an error. Tune `?depth=N` for levels per side. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `depth` (query, integer) — Maximum number of price levels to return per side after aggregation **Response** (200): object - `symbol` (string) - `base` (string) - `term` (string) - `best_bid` (number) — Highest bid across all exchanges - `best_ask` (number) — Lowest ask across all exchanges - `spread` (number) — `best_ask - best_bid` in term currency. **Can be negative** if markets are crossed (cross-exchange arbitrage opportunity). - `spread_bps` (number) — Spread in basis points (negative = crossed market) - `exchangeCount` (integer) — Number of exchanges contributing data - `exchanges` (string[]) — Exchanges contributing to this aggregated book (sorted alphabetically) - `timestamp` (integer) — Newest meta timestamp across exchanges (Unix ms) - `bids` (AggregatedOrderBookLevel[]) — Aggregated bid levels — highest price first - `asks` (AggregatedOrderBookLevel[]) — Aggregated ask levels — lowest price first ### GET /v2/crypto/orderbook/live/depth/{base}-{term} — Cross-Exchange Aggregated Depth Total USD liquidity sitting within 1, 5, 10, 25, 50, and 100 basis points of the mid-price — bids and asks separately — pooled across every exchange that trades the pair. Plus a per-exchange breakdown so you can see who provides the depth. Use it to answer "how much can I buy/sell within X bps of mid before I move the market?", to set order-size policy, or to understand venue concentration risk. Mid is the global best bid / best ask. **Spread can be negative** when markets are crossed across exchanges — that's a real arbitrage signal, not an error. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `midPrice` (number) — Mid-price computed from global best bid and best ask across all exchanges - `spread` (object) - `bids` (object) — Cumulative bid-side depth at each bps threshold from mid-price - `asks` (object) — Cumulative ask-side depth at each bps threshold from mid-price - `exchanges` (object[]) — Per-exchange depth contribution (sorted by total depth) - `exchangeCount` (integer) - `timestamp` (integer) ## Crypto RefRate Reference rates (fix, tcut, twap) — institutional-grade crypto benchmarks ### GET /v2/crypto/rates/refrate/symbols — List Available RefRate Symbols Sorted list of every symbol that currently has an active reference rate fixing. Use it before calling the per-symbol RefRate endpoints to confirm coverage, or to populate a UI selector. **Response** (200): array of string ### GET /v2/crypto/rates/refrate/{product}/{base}-{term}/latest — Get Latest RefRate Fixing The most recent **reference rate** fixing for a pair — an institutional-grade benchmark price derived using a documented, auditable methodology (volume- weighted, with outliers excluded). Three product flavours: - **`fix`** — discrete fixing at scheduled times (1h or end-of-day) - **`twap`** — Time-Weighted Average Price over a rolling window - **`tcut`** — trimmed-cut benchmark (extreme samples removed) Use a reference rate (rather than the live midrate) when you need a stable, defensible price for NAV calculation, derivatives settlement, regulatory reporting, accounting, or any process that requires a tamper-resistant mark. **Parameters** - `product` (path, enum(fix | tcut | twap)) (required) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `product` (enum(fix | tcut | twap)) - `symbol` (string) - `rate` (number) — Reference rate (USD) - `bid` (number) - `ask` (number) - `timestamp` (integer) — Fixing timestamp (ms) - `fixingTime` (string) — Scheduled fixing time (ISO 8601) - `interval` (enum(1h | eod)) - `method` (string) — Calculation method (fix only) - `exchanges` (integer) — Exchanges included (fix only) - `excluded` (integer) — Exchanges excluded as outliers (fix only) - `samples` (integer) — Stream samples in TWAP window (twap only) - `twapWindowMs` (integer) — TWAP window duration in ms (twap only) ### GET /v2/crypto/rates/refrate/{product}/{base}-{term}/historic — Get RefRate History Historical reference rate fixings for a pair. Use it to audit what the benchmark was at any past timestamp, build a long-running history of institutional marks, or compare prior settlements. Pass `from` / `to` for a window, `limit` to cap the response. The `?t=` query param does an exact-time single-item lookup (kept for backward compatibility). **Parameters** - `product` (path, enum(fix | tcut | twap)) (required) - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `t` (query, string) — Exact fixing time for single-item lookup (legacy, ISO 8601) **Response** (200): object - `product` (string) - `symbol` (string) - `count` (integer) - `fixings` (RefRateFixing[]) ### GET /v2/crypto/rates/refrate/constituent/{base}-{term} — Get RefRate Constituent Data Full audit trail for the latest reference rate fixing — every exchange that contributed (or was considered and excluded), with its bid, ask, volume, weight in the fixing, and a reason if it was excluded. Use it to demonstrate the methodology to an auditor, debug why a fixing came out the way it did, or build a transparency view inside your application. **Parameters** - `base` (path, string) (required) — Base currency symbol (crypto) - `term` (path, string) (required) — Term currency (pricing currency, also known as quote currency) **Response** (200): object - `symbol` (string) - `count` (integer) - `constituents` (object[]) ## Crypto Streaming Real-time WebSocket and SSE streams for crypto ### POST /v1/crypto/stream/subscribe — Subscribe to Real-Time Stream [NEW] Subscribe to real-time cryptocurrency data streams via WebSocket or Server-Sent Events (SSE). **WebSocket URL**: `wss://api.windy.network/v1/crypto/stream/ws` **SSE URL**: `https://api.windy.network/v1/crypto/stream/sse` **Request body** (application/json): object - `channels` (string[]) (required) - `exchanges` (string[]) **Response** (200): object - `subscriptionId` (string) - `channels` (string[]) - `wsUrl` (string) - `sseUrl` (string) ## DEX Midrate ### GET /v2/dex/rates/live/midrate/{base}-{term} — DEX Aggregated Weighted Midrate Aggregated weighted mid-price for a token derived from on-chain decentralised exchanges (Uniswap, Curve, Balancer, etc.). Pools are weighted across fee tiers by liquidity and smoothed to filter noise from thinly-traded pairs. Use it for tokens that don't trade meaningfully on centralised exchanges, to cross-check CEX prices against on-chain liquidity, or to feed DeFi-native applications. **HTTP GET** returns the latest midrate. **WebSocket** (`wss://api.windy.network/v2/dex/rates/live/midrate/{base}-{term}`) pushes every update. **Parameters** - `base` (path, string) (required) — Base token symbol (e.g., ETH, BTC, LINK) - `term` (path, string) (required) — Term currency (currently only USD) **Response** (200): object - `mid` (number) — Aggregate midrate in USD (weighted median across DEX pools, adaptive EMA smoothed) - `avgBuy` (number) — Mid + half of weighted average fee spread across all contributing pools (market quality indicator) - `avgSell` (number) — Mid - half of weighted average fee spread (aggregate market sell price) - `bestBuy` (number) — Mid + half of tightest pool fee (best execution via smart routing) - `bestSell` (number) — Mid - half of tightest pool fee (best achievable sell price) - `symbol` (string) — Token pair symbol - `ts` (integer) — Unix timestamp in milliseconds - `vol` (number) — Aggregate 24h trading volume in USD across all DEX pools contributing to this midrate. Updated every 15 minutes from GeckoTerminal. ## Fiat247 Indicators Technical indicators for fiat currency pairs (SMA, EMA, RSI, MACD, Bollinger Bands) ### GET /v1/fiat247/indicator/sma/{timeframe}/{window}/{base}-{term} — Simple Moving Average (SMA) for Fiat Simple Moving Average for a 24/7 fiat pair. Smooths noise to reveal trend direction. Common windows: 20 / 50 / 200. Use for trend confirmation, support and resistance, or moving-average crossover strategies. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) — Moving average window/period size - `base` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) - `term` (path, string) (required) — Term currency (pricing currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(sma | ema)) (required) — Indicator type - `window` (integer) (required) — Window/period size used for calculation - `type` (enum(crypto | fiat247)) (required) — Data type (crypto or fiat247) - `pair` (string) (required) — Trading pair - `base` (string) (required) — Base currency symbol - `term` (string) (required) — Quote currency symbol - `timeframe` (enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `count` (integer) (required) — Number of indicator values returned - `values` (object[]) (required) — Indicator values (newest first) - `underlying` (object) — Raw OHLC candles (only included when expand_underlying=true) ### GET /v1/fiat247/indicator/ema/{timeframe}/{window}/{base}-{term} — Exponential Moving Average (EMA) for Fiat Exponential Moving Average for a 24/7 fiat pair. Weights recent prices more heavily so it reacts faster than SMA — preferred for short-term trend signals. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) — Moving average window/period size - `base` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) - `term` (path, string) (required) — Term currency (pricing currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(sma | ema)) (required) — Indicator type - `window` (integer) (required) — Window/period size used for calculation - `type` (enum(crypto | fiat247)) (required) — Data type (crypto or fiat247) - `pair` (string) (required) — Trading pair - `base` (string) (required) — Base currency symbol - `term` (string) (required) — Quote currency symbol - `timeframe` (enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `count` (integer) (required) — Number of indicator values returned - `values` (object[]) (required) — Indicator values (newest first) - `underlying` (object) — Raw OHLC candles (only included when expand_underlying=true) ### GET /v1/fiat247/indicator/rsi/{timeframe}/{window}/{base}-{term} — Relative Strength Index (RSI) for Fiat RSI (0–100) for a 24/7 fiat pair. Reads above 70 are overbought, below 30 are oversold, around 50 is neutral. Common window: 14. Useful for entry timing and divergence detection. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) — Moving average window/period size - `base` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) - `term` (path, string) (required) — Term currency (pricing currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(rsi)) (required) - `window` (integer) (required) — RSI period - `type` (enum(crypto | fiat247)) (required) - `pair` (string) (required) - `base` (string) (required) - `term` (string) (required) - `timeframe` (string) (required) - `count` (integer) (required) - `values` (object[]) (required) — RSI values (0-100, newest first) - `underlying` (object) — Raw OHLC candles (only if expand_underlying=true) ### GET /v1/fiat247/indicator/macd/{timeframe}/{base}-{term} — Moving Average Convergence Divergence (MACD) for Fiat MACD for a 24/7 fiat pair. Tracks momentum shifts via the gap between a fast and slow EMA. Crossovers between MACD and signal flag changes in trend. Defaults: 12 / 26 / 9. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `base` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) - `term` (path, string) (required) — Term currency (pricing currency) - `fast` (query, integer) - `slow` (query, integer) - `signal` (query, integer) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(macd)) (required) - `parameters` (object) (required) - `type` (enum(crypto | fiat247)) (required) - `pair` (string) (required) - `base` (string) (required) - `term` (string) (required) - `timeframe` (string) (required) - `count` (integer) (required) - `values` (object[]) (required) — MACD values (newest first) - `underlying` (object) — Raw OHLC candles (only if expand_underlying=true) ### GET /v1/fiat247/indicator/bbands/{timeframe}/{window}/{base}-{term} — Bollinger Bands for Fiat Bollinger Bands for a 24/7 fiat pair. The bands widen on high volatility and tighten on low volatility — a tight band ("squeeze") often precedes a breakout. Defaults: 20-period SMA, 2 standard deviations. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) — Moving average window/period size - `base` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) - `term` (path, string) (required) — Term currency (pricing currency) - `stddev` (query, number) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return - `expand_underlying` (query, boolean) — Include raw OHLC candles used for indicator calculation - `timestamp_format` (query, enum(unix | iso)) — Timestamp format in response: - `unix` (default): Millisecond timestamps (e.g., 1705312200000) - `iso`: ISO 8601 format (e.g., "2024-01-15T09:30:00Z") **Response** (200): object - `indicator` (enum(bbands)) (required) - `window` (integer) (required) — SMA period for middle band - `stddev` (number) (required) — Standard deviation multiplier - `type` (enum(crypto | fiat247)) (required) - `pair` (string) (required) - `base` (string) (required) - `term` (string) (required) - `timeframe` (string) (required) - `count` (integer) (required) - `values` (object[]) (required) — Bollinger Bands values (newest first) - `underlying` (object) — Raw OHLC candles (only if expand_underlying=true) ## Fiat247 OHLC ### GET /v2/fiat247/rates/historic/ohlc/{timeframe}/{base}-{term} — Get Fiat247 Historical OHLC Candles Long-history candlestick data for a 24/7 fiat pair. Use for charts and backtests that need more than the recent rolling window. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `base` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) - `term` (path, string) (required) — Term currency (pricing currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `pair` (string) (required) - `base` (string) (required) — Base asset symbol - `term` (string) (required) — Quote asset symbol - `type` (string) (required) — Asset type (crypto, stock, forex) - `timeframe` (string) (required) - `count` (integer) (required) — Number of candles returned - `candles` (object[]) (required) ### GET /v1/fiat247/ohlc/{timeframe}/{base}-{term} — Get Fiat247 OHLC Candles Candlestick data for a 24/7 fiat pair — open, high, low, and close at the timeframe of your choice (1-minute through monthly). Use it to chart fiat rates with no weekend gaps, run technical analysis, or feed visualisations. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `base` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) - `term` (path, string) (required) — Term currency (pricing currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `pair` (string) (required) - `base` (string) (required) — Base asset symbol - `term` (string) (required) — Quote asset symbol - `type` (string) (required) — Asset type (crypto, stock, forex) - `timeframe` (string) (required) - `count` (integer) (required) — Number of candles returned - `candles` (object[]) (required) ## Fiat247 Rates 24/7 FIAT/USD derived rates from crypto markets ### GET /v2/fiat247/rates/historic/midrate/{base}-{term} — Get Fiat247 Historical Rates Long-history time series of the 24/7 fiat rate for a currency pair (e.g., GBP-USD, EUR-USD). Same crypto-derived rate as the live endpoint, but with full historical depth for charts, P&L history, and back-dated valuations. **Parameters** - `base` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) - `term` (path, string) (required) — Term currency (pricing currency) - `from` (query, string) — Start timestamp. Supports multiple formats: - Relative: `now`, `now-1d`, `now-7d`, `now-30d` - Unix timestamp (seconds or milliseconds): `1705312200`, `1705312200000` - ISO 8601: `2024-01-15T09:30:00Z` - Date only: `2024-01-15` - `to` (query, string) — End timestamp. Supports same formats as `from` parameter. Defaults to current time if not specified. - `limit` (query, integer) — Maximum number of results to return **Response** (200): object - `type` (string) - `pair` (string) - `base` (string) - `term` (string) - `count` (integer) - `rates` (object[]) ### GET /v2/fiat247/rates/live/{base}-{term} — Get Fiat247 Rate Real-time fiat-to-fiat rate (GBP-USD, EUR-USD, JPY-USD, …) that **never closes**. Standard forex rates pause overnight and on weekends, which leaves a 60+ hour gap every weekend. We synthesize a continuous rate by triangulating crypto markets that trade 24/7 (e.g., USDT-GBP × USDT-USD ≈ GBP-USD), giving you a usable price at every second of every day. Use this for international fintech, weekend transfers, crypto-to-fiat conversion, and any product that needs a fiat rate when the official market is closed. **Parameters** - `base` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) - `term` (path, string) (required) — Term currency (pricing currency) **Response** (200): object - `symbol` (string) (required) — Currency pair symbol - `rate` (number) (required) - `bid` (number) - `ask` (number) - `vol` (number) — Volume - `ts` (integer) — Timestamp in milliseconds - `ts_iso` (string) — ISO 8601 timestamp (optional, may not always be available) ### GET /v2/fiat247/rates/live/base/{base}-{fiat} — Get Crypto/Fiat Base Rate Real-time price of a cryptocurrency expressed directly in a non-USD fiat currency — e.g., BTC-GBP, ETH-EUR, SOL-JPY. Internally we triangulate the crypto-USD price with the corresponding fiat rate, so the value updates continuously even when traditional forex markets are closed. Use it to display crypto prices natively in your user's local currency without a separate conversion step. **Parameters** - `base` (path, string) (required) — Crypto asset symbol (e.g., BTC, ETH) - `fiat` (path, string) (required) — Fiat currency symbol (e.g., GBP, EUR, JPY) **Response** (200): object - `symbol` (string) (required) — Currency pair symbol - `rate` (number) (required) - `bid` (number) - `ask` (number) - `vol` (number) — Volume - `ts` (integer) — Timestamp in milliseconds - `ts_iso` (string) — ISO 8601 timestamp (optional, may not always be available) ### GET /v1/fiat247/assets — List Fiat247 Assets Symbols available in the 24/7 fiat universe (e.g., GBP, EUR, JPY, CHF). Backed by the `fiat247:registry:symbol` Redis set. Returns a sorted symbol list with optional `?search=` substring filter and `?limit` / `?offset` pagination. Use it to populate fiat selectors and validate input before calling rate endpoints. **Parameters** - `search` (query, string) — Case-insensitive substring filter on symbol - `limit` (query, integer) - `offset` (query, integer) **Response** (200): object - `total` (integer) - `count` (integer) - `offset` (integer) - `limit` (integer) - `symbols` (string[]) ## Forex Indicators Technical indicators for forex pairs ### GET /v1/forex/indicator/sma/{timeframe}/{window}/{pair} — Forex SMA Simple Moving Average for a forex pair — unweighted average of the close over the last `window` candles. Smooths short-term noise and reveals the underlying trend. Common windows: 20 / 50 / 200. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) - `pair` (path, string) (required) - `from` (query, string) - `to` (query, string) - `limit` (query, integer) **Response** (200): object - `indicator` (enum(sma | ema)) (required) — Indicator type - `window` (integer) (required) — Window/period size used for calculation - `type` (enum(crypto | fiat247)) (required) — Data type (crypto or fiat247) - `pair` (string) (required) — Trading pair - `base` (string) (required) — Base currency symbol - `term` (string) (required) — Quote currency symbol - `timeframe` (enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `count` (integer) (required) — Number of indicator values returned - `values` (object[]) (required) — Indicator values (newest first) - `underlying` (object) — Raw OHLC candles (only included when expand_underlying=true) ### GET /v1/forex/indicator/ema/{timeframe}/{window}/{pair} — Forex EMA Exponential Moving Average for a forex pair — like SMA but weights recent prices more heavily, so it reacts faster to changes. Preferred for short-term trend signals. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) - `pair` (path, string) (required) - `from` (query, string) - `to` (query, string) - `limit` (query, integer) **Response** (200): object - `indicator` (enum(sma | ema)) (required) — Indicator type - `window` (integer) (required) — Window/period size used for calculation - `type` (enum(crypto | fiat247)) (required) — Data type (crypto or fiat247) - `pair` (string) (required) — Trading pair - `base` (string) (required) — Base currency symbol - `term` (string) (required) — Quote currency symbol - `timeframe` (enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `count` (integer) (required) — Number of indicator values returned - `values` (object[]) (required) — Indicator values (newest first) - `underlying` (object) — Raw OHLC candles (only included when expand_underlying=true) ### GET /v1/forex/indicator/rsi/{timeframe}/{window}/{pair} — Forex RSI RSI (0–100 momentum oscillator) for a forex pair. Above 70 = overbought, below 30 = oversold. Common window: 14. Useful for entry timing and divergence detection. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) - `pair` (path, string) (required) - `from` (query, string) - `to` (query, string) - `limit` (query, integer) **Response** (200): object - `indicator` (enum(sma | ema)) (required) — Indicator type - `window` (integer) (required) — Window/period size used for calculation - `type` (enum(crypto | fiat247)) (required) — Data type (crypto or fiat247) - `pair` (string) (required) — Trading pair - `base` (string) (required) — Base currency symbol - `term` (string) (required) — Quote currency symbol - `timeframe` (enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Timeframe for data aggregation - `count` (integer) (required) — Number of indicator values returned - `values` (object[]) (required) — Indicator values (newest first) - `underlying` (object) — Raw OHLC candles (only included when expand_underlying=true) ### GET /v1/forex/indicator/macd/{timeframe}/{pair} — Forex MACD MACD for a forex pair — measures momentum via the gap between a fast and slow EMA. Crossovers between MACD and signal flag changes in trend direction. Defaults: 12 / 26 / 9. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) - `pair` (path, string) (required) - `fast` (query, integer) - `slow` (query, integer) - `signal` (query, integer) - `from` (query, string) - `to` (query, string) - `limit` (query, integer) **Response** (200): object - `indicator` (enum(macd)) (required) - `parameters` (object) (required) - `type` (enum(crypto | fiat247)) (required) - `pair` (string) (required) - `base` (string) (required) - `term` (string) (required) - `timeframe` (string) (required) - `count` (integer) (required) - `values` (object[]) (required) — MACD values (newest first) - `underlying` (object) — Raw OHLC candles (only if expand_underlying=true) ### GET /v1/forex/indicator/bbands/{timeframe}/{window}/{pair} — Forex Bollinger Bands Bollinger Bands for a forex pair. The bands wrap a moving average at a configurable standard-deviation distance, widening on high volatility and tightening on low volatility. A "squeeze" often precedes a breakout. Defaults: 20-period SMA, 2 standard deviations. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) - `window` (path, enum(5 | 7 | 9 | 10 | 12 | 14 | 20 | 21 | 25 | 26 | 50 | 100 | 200)) (required) - `pair` (path, string) (required) - `stddev` (query, number) - `from` (query, string) - `to` (query, string) - `limit` (query, integer) **Response** (200): (ref: #/components/schemas/BBandsResponse) ## Forex OHLC Forex OHLC/candlestick data ### GET /v1/forex/ohlc/{timeframe}/{pair} — Get Forex OHLC Candles Candlestick data (open, high, low, close) for a forex pair at the timeframe of your choice. Pair format is the 6-letter symbol (e.g., `GBPUSD`). Use for charts and technical analysis. **Parameters** - `timeframe` (path, enum(m1 | m5 | m15 | m30 | h1 | h4 | d1 | w1 | mo1)) (required) — Candle timeframe - `pair` (path, string) (required) — Forex pair symbol - `from` (query, string) — Start timestamp (ISO 8601, relative, or Unix) - `to` (query, string) — End timestamp - `limit` (query, integer) — Maximum candles to return **Response** (200): object - `type` (string) - `pair` (string) - `symbol` (string) - `timeframe` (string) - `count` (integer) - `candles` (OHLCCandle[]) ## Forex Rates Foreign exchange rates ### GET /v1/forex/rate/{pair} — Get Forex Real-time Rate Live exchange rate for a forex pair. Pair format is the standard 6-letter symbol (e.g., `GBPUSD`, `EURUSD`, `USDJPY`). **HTTP GET** returns the current rate. **WebSocket / SSE / long-poll** at the same URL pushes every update for clients that need a live stream. **Parameters** - `pair` (path, string) (required) — Forex pair symbol (e.g., GBPUSD, EURUSD, USDJPY) **Response** (200): object - `symbol` (string) - `rate` (number) - `bid` (number) - `ask` (number) - `spread` (number) - `ts` (integer) — Unix timestamp in milliseconds ### GET /v1/forex/rates — Get Multiple Forex Rates Bulk fetch rates for many forex pairs in one call. Pick a `base` currency and one or more `quotes` — the response gives you the rate of `base` against each. Use it to render a multi-currency price grid in a single round-trip. **Parameters** - `base` (query, string) (required) — Base currency - `quotes` (query, string) — Comma-separated term currencies **Response** (200): object - `base` (string) - `rates` (object) ## Market Calendar Market hours, forex sessions, stock exchange schedules, and bank holidays with DST support ### GET /v1/calendar/status — Get Full Market Calendar Status Get real-time status of all forex sessions and stock exchanges. Includes DST-aware times, active sessions, and next session changes. **Response** (200): object - `timestamp` (string) - `forex` (object) - `exchanges` (StockExchangeStatus[]) ### GET /v1/calendar/forex/sessions — Get All Forex Sessions Status Get status of all forex trading sessions (Sydney, Tokyo, London, New York) **Response** (200): object - `timestamp` (string) - `sessions` (ForexSessionStatus[]) - `activeSessions` (enum(sydney | tokyo | london | new_york)[]) ### GET /v1/calendar/forex/sessions/{session} — Get Forex Session Status Get detailed status for a specific forex session **Parameters** - `session` (path, enum(sydney | tokyo | london | new_york)) (required) — Forex session name **Response** (200): object - `session` (enum(sydney | tokyo | london | new_york)) - `displayName` (string) - `isOpen` (boolean) - `currentTimeUtc` (string) - `localTime` (string) - `timezone` (string) - `opensAt` (string) - `closesAt` (string) - `timeUntilOpenMs` (integer) - `timeUntilCloseMs` (integer) - `overlappingSessions` (enum(sydney | tokyo | london | new_york)[]) - `dstInfo` (DstInfo) ### GET /v1/calendar/forex/sessions/{session}/schedule — Get Forex Session Schedule Get weekly schedule with DST information for a forex session **Parameters** - `session` (path, enum(sydney | tokyo | london | new_york)) (required) **Response** (200): object - `session` (enum(sydney | tokyo | london | new_york)) - `displayName` (string) - `timezone` (string) - `weeklySchedule` (object[]) - `dstInfo` (DstInfo) ### GET /v1/calendar/exchanges — Get All Exchange Statuses Get status of all supported stock exchanges **Response** (200): object - `timestamp` (string) - `exchanges` (StockExchangeStatus[]) - `openExchanges` (string[]) ### GET /v1/calendar/exchanges/{exchange} — Get Exchange Status Get detailed status for a specific stock exchange **Parameters** - `exchange` (path, enum(NYSE | NASDAQ | LSE | TSE | ASX | HKEX | SSE | SZSE | BSE | NSE | EURONEXT | XETRA | SGX | KRX | TWSE)) (required) — Stock exchange code **Response** (200): object - `exchange` (string) - `name` (string) - `country` (string) - `isOpen` (boolean) - `phase` (enum(pre_market | regular | lunch_break | after_hours | closed)) - `currentTimeUtc` (string) - `localTime` (string) - `timezone` (string) - `regularHours` (TradingHours) - `opensAt` (string) - `closesAt` (string) - `nextTradingDay` (string) - `isHoliday` (boolean) - `holidayName` (string) - `dstInfo` (DstInfo) ### GET /v1/calendar/exchanges/{exchange}/schedule — Get Exchange Schedule Get trading schedule including upcoming trading days and holidays **Parameters** - `exchange` (path, string) (required) - `days` (query, integer) — Number of days to include in schedule **Response** (200): object - `exchange` (string) - `name` (string) - `timezone` (string) - `regularHours` (TradingHours) - `preMarket` (TradingHours) - `afterHours` (TradingHours) - `lunchBreak` (TradingHours) - `tradingDays` (string[]) - `upcomingDays` (UpcomingTradingDay[]) - `dstInfo` (DstInfo) ### GET /v1/calendar/holidays/{countryCode} — Get Country Holidays Get bank holidays for a country (199+ countries supported). Uses ISO 3166-1 alpha-2 country codes. **Parameters** - `countryCode` (path, string) (required) — ISO 3166-1 alpha-2 country code - `year` (query, integer) — Year for holidays (default current year) - `type` (query, enum(all | public | bank)) — Filter by holiday type **Response** (200): object - `countryCode` (string) - `countryName` (string) - `year` (integer) - `timezone` (string) - `holidays` (Holiday[]) ### GET /v1/calendar/holidays/markets — Get Market Holidays Get holidays affecting specific markets/exchanges in a date range **Parameters** - `exchanges` (query, string) — Comma-separated exchange codes - `from` (query, string) (required) — Start date (YYYY-MM-DD) - `to` (query, string) (required) — End date (YYYY-MM-DD) **Response** (200): object - `holidays` (MarketHoliday[]) ## OAuth 2.0 OAuth 2.0 authentication and authorization endpoints ### POST /oauth/token — OAuth 2.0 Token Endpoint Obtain access tokens using various OAuth 2.0 grant types. **Supported Grant Types:** - `client_credentials` - Machine-to-machine authentication - `authorization_code` - Exchange authorization code for tokens - `refresh_token` - Refresh an expired access token - `password` - Username/password authentication (legacy, discouraged) **Response** (200): object - `access_token` (string) (required) — JWT access token - `token_type` (string) (required) - `expires_in` (integer) (required) — Token lifetime in seconds - `refresh_token` (string) — Refresh token (optional) - `scope` (string) — Granted scopes ### GET /oauth/authorize — OAuth 2.0 Authorization Endpoint Initiates the OAuth 2.0 authorization code flow. User will be redirected to login page. **Parameters** - `response_type` (query, enum(code)) (required) - `client_id` (query, string) (required) - `redirect_uri` (query, string) (required) - `scope` (query, string) - `state` (query, string) (required) — Random string to prevent CSRF attacks ### POST /oauth/revoke — Revoke OAuth 2.0 Token Revoke an access token or refresh token (RFC 7009) **Response** (200): Token successfully revoked ### POST /oauth/introspect — Token Introspection Check if a token is valid and get token metadata (RFC 7662) **Response** (200): object - `active` (boolean) (required) — Whether the token is active - `scope` (string) - `client_id` (string) - `username` (string) - `token_type` (string) - `exp` (integer) — Expiration timestamp - `iat` (integer) — Issued at timestamp - `sub` (string) — Subject (user ID) ### GET /oauth/userinfo — Get User Information Returns user information for the authenticated user (OpenID Connect) **Response** (200): object - `sub` (string) — User ID - `email` (string) - `email_verified` (boolean) - `name` (string) - `given_name` (string) - `family_name` (string) - `picture` (string) ### GET /.well-known/oauth-authorization-server — OAuth 2.0 Authorization Server Metadata Returns OAuth 2.0 server metadata (RFC 8414) **Response** (200): object - `issuer` (string) - `authorization_endpoint` (string) - `token_endpoint` (string) - `revocation_endpoint` (string) - `introspection_endpoint` (string) - `userinfo_endpoint` (string) - `jwks_uri` (string) - `grant_types_supported` (string[]) - `response_types_supported` (string[]) - `scopes_supported` (string[]) ### GET /.well-known/openid-configuration — OpenID Connect Discovery Returns OpenID Connect configuration **Response** (200): object ### GET /.well-known/jwks.json — JSON Web Key Set Returns public keys for verifying JWT signatures **Response** (200): object - `keys` (object[]) ### POST /oauth/clients — Register OAuth Client Dynamically register a new OAuth 2.0 client (RFC 7591) **Request body** (application/json): object - `client_name` (string) (required) - `redirect_uris` (string[]) (required) - `grant_types` (string[]) - `response_types` (string[]) - `scope` (string) - `token_endpoint_auth_method` (enum(client_secret_basic | client_secret_post | none)) **Response** (200): object ### GET /oauth/clients/{clientId} — Get OAuth Client Details Retrieve OAuth client configuration **Parameters** - `clientId` (path, string) (required) — OAuth client ID **Response** (200): object ### PUT /oauth/clients/{clientId} — Update OAuth Client Update OAuth client configuration **Parameters** - `clientId` (path, string) (required) — OAuth client ID **Request body** (application/json): object - `client_name` (string) (required) - `redirect_uris` (string[]) (required) - `grant_types` (string[]) - `response_types` (string[]) - `scope` (string) - `token_endpoint_auth_method` (enum(client_secret_basic | client_secret_post | none)) **Response** (200): object ### DELETE /oauth/clients/{clientId} — Delete OAuth Client Remove an OAuth client **Parameters** - `clientId` (path, string) (required) — OAuth client ID ## OpenServer Public unauthenticated endpoints (openserver.windy.network) ### GET /v1/crypto/stream/ws — WebSocket Stream (Public) Connect to public WebSocket stream for real-time crypto rate updates. No authentication required. **Server**: `wss://openserver.windy.network` **Channel Format**: - `stablecoin:{SYMBOL}` - e.g., `stablecoin:USDT` - `basecoin:{SYMBOL}` - e.g., `basecoin:BTC` **Example**: `wss://openserver.windy.network/v1/crypto/stream/ws?channels=stablecoin:USDT,basecoin:BTC` **Parameters** - `channels` (query, string) (required) — Comma-separated list of channels to subscribe ### GET /v1/crypto/stream/sse — SSE Stream (Public) Connect to public Server-Sent Events stream for real-time crypto rate updates. No authentication required. **Server**: `https://openserver.windy.network` **Channel Format**: - `stablecoin:{SYMBOL}` - e.g., `stablecoin:USDT` - `basecoin:{SYMBOL}` - e.g., `basecoin:BTC` **Example**: `https://openserver.windy.network/v1/crypto/stream/sse?channels=stablecoin:USDT,basecoin:BTC` **Parameters** - `channels` (query, string) (required) — Comma-separated list of channels to subscribe **Response** (200): SSE stream connected ### GET /v1/crypto/stream/poll — Long-Polling (Public) HTTP long-polling endpoint for crypto rate updates. No authentication required. Updates every 10 seconds. **Server**: `https://openserver.windy.network` **Parameters** - `channels` (query, string) (required) — Comma-separated list of channels **Response** (200): object - `token` (string) - `term` (string) - `rate` (number) - `timestamp` (integer) - `sources` (string[]) - `dataPoints` (integer) — Number of data points used in calculation ## Option Rates Options contract pricing ### GET /v1/option/chain/{underlying} — Get Option Chain Option chain for an underlying asset — every strike and expiry available, with bid, ask, last, volume, and open interest. Filter by `?expiration=` to focus on a single expiry. Use it to render option grids, build strategy builders, or screen for unusual activity. **Parameters** - `underlying` (path, string) (required) - `expiration` (query, string) **Response** (200): (ref: #/components/schemas/OptionChain) ## Stock Rates Stock price endpoints ### GET /v1/stock/quote/{symbol} — Get Stock Quote Latest quote for a single stock — last price, bid, ask, change, and volume. Use for "current price" displays in trading apps, dashboards, or watchlists. **Parameters** - `symbol` (path, string) (required) — Stock ticker symbol **Response** (200): (ref: #/components/schemas/StockQuote) ### GET /v1/stock/quotes — Get Multiple Stock Quotes Bulk fetch quotes for many stocks in one call. Pass a comma-separated list of symbols (`?symbols=AAPL,GOOGL,MSFT`). Use it instead of looping over single-symbol calls when rendering watchlists or portfolio snapshots. **Parameters** - `symbols` (query, string) (required) — Comma-separated list of stock symbols **Response** (200): object - `quotes` (StockQuote[]) ## System Health check and status endpoints for monitoring API availability. Use these to verify connectivity and check service status in your monitoring infrastructure. ### GET /v1/health — Health Check Basic health check endpoint **Response** (200): object - `status` (string) - `timestamp` (integer) ### GET /v1/status — System Status Detailed system status and component health **Response** (200): object - `status` (enum(healthy | degraded | down)) - `uptime` (integer) — Uptime in seconds - `connections` (object) - `stats` (object) ### GET /v1/stats — API Statistics API usage statistics and metrics **Response** (200): object - `totalRequests` (integer) - `requestsByEndpoint` (object) - `requestsByStatus` (object) - `averageResponseTime` (number) — Average response time in milliseconds - `period` (string) ### GET /v1/ping — Ping Simple ping endpoint for connectivity testing **Response** (200): object - `message` (string) ### GET /v1/time — Server Time Get current server time **Response** (200): object - `timestamp` (integer) - `iso` (string) ### GET /v1/version — API Version Get API version information **Response** (200): object - `version` (string) - `apiVersion` (string) - `buildDate` (string) ## User Alerts Price alert management ### GET /v1/user/alerts — List Price Alerts Every price alert configured for the authenticated user — the symbol it watches, the trigger condition, and whether it's active. Use it to populate the user's "my alerts" screen. **Response** (200): object - `alerts` (PriceAlert[]) ### POST /v1/user/alerts — Create Price Alert Create a price alert for the authenticated user. The alert fires when the configured condition is met — e.g., BTC-USD crosses above $100,000. **Request body** (application/json): (ref: #/components/schemas/CreateAlertRequest) **Response** (200): (ref: #/components/schemas/PriceAlert) ### GET /v1/user/alerts/{alertId} — Get Alert Details Get details of a specific price alert **Parameters** - `alertId` (path, string) (required) **Response** (200): (ref: #/components/schemas/PriceAlert) ### DELETE /v1/user/alerts/{alertId} — Delete Price Alert Delete a price alert **Parameters** - `alertId` (path, string) (required) ## User Portfolio Portfolio tracking and management ### GET /v1/user/portfolio — Get Portfolio The authenticated user's portfolio — every holding, valued at current market prices, with totals and high-level performance. Use it to render the portfolio overview screen. **Response** (200): (ref: #/components/schemas/Portfolio) ### GET /v1/user/portfolio/holdings — List Holdings Get all holdings in the portfolio **Response** (200): object - `holdings` (Holding[]) ### POST /v1/user/portfolio/holdings — Add Holding Add a new holding to the portfolio **Request body** (application/json): (ref: #/components/schemas/AddHoldingRequest) **Response** (200): (ref: #/components/schemas/Holding) ### PUT /v1/user/portfolio/holdings/{holdingId} — Update Holding Update a portfolio holding **Parameters** - `holdingId` (path, string) (required) **Request body** (application/json): object - `quantity` (number) - `averagePrice` (number) **Response** (200): (ref: #/components/schemas/Holding) ### DELETE /v1/user/portfolio/holdings/{holdingId} — Remove Holding Remove a holding from the portfolio **Parameters** - `holdingId` (path, string) (required) ### GET /v1/user/portfolio/performance — Get Portfolio Performance Performance metrics for the user's portfolio over a chosen period — total return, P&L, drawdowns, and per-asset contribution. Use it to power performance dashboards and statements. **Parameters** - `period` (query, enum(1d | 1w | 1m | 3m | 1y | all)) **Response** (200): (ref: #/components/schemas/PortfolioPerformance) ## User Watchlist Watchlist management ### GET /v1/user/watchlists — List Watchlists Every watchlist owned by the authenticated user. Use it to render the user's list of saved asset collections. **Response** (200): object - `watchlists` (Watchlist[]) ### POST /v1/user/watchlists — Create Watchlist Create a new watchlist **Request body** (application/json): object - `name` (string) (required) - `description` (string) **Response** (200): (ref: #/components/schemas/Watchlist) ### GET /v1/user/watchlists/{watchlistId} — Get Watchlist Get details of a specific watchlist **Parameters** - `watchlistId` (path, string) (required) **Response** (200): (ref: #/components/schemas/Watchlist) ### PUT /v1/user/watchlists/{watchlistId} — Update Watchlist Update watchlist name or description **Parameters** - `watchlistId` (path, string) (required) **Request body** (application/json): object - `name` (string) - `description` (string) **Response** (200): (ref: #/components/schemas/Watchlist) ### DELETE /v1/user/watchlists/{watchlistId} — Delete Watchlist Delete a watchlist **Parameters** - `watchlistId` (path, string) (required) ### POST /v1/user/watchlists/{watchlistId}/items — Add Item to Watchlist Add an asset to a watchlist **Parameters** - `watchlistId` (path, string) (required) **Request body** (application/json): object - `symbol` (string) (required) - `assetType` (enum(crypto | stock | forex | option)) (required) **Response** (200): (ref: #/components/schemas/Watchlist) ### DELETE /v1/user/watchlists/{watchlistId}/items/{symbol} — Remove Item from Watchlist Remove an asset from a watchlist **Parameters** - `watchlistId` (path, string) (required) - `symbol` (path, string) (required) --- Generated from `openapi.yaml` by `scripts/build-llms.js`. Canonical spec: https://docs.windy.network/openapi.yaml