# biquote — Real-Time Market Data API > Live tick data (bid, ask, mid, spread) for forex pairs, metals, energy, > cryptocurrencies, index CFDs and equity CFDs, over REST and WebSocket > (SignalR). Sourced from a MetaTrader 5 broker feed. No API key, no signup, > no authentication of any kind. CORS is open to every origin (no credentials), > so browser code may call it directly. Embeddable widgets: > https://widgets.biquote.io/ Base URL: https://biquote.io OpenAPI: https://biquote.io/swagger/v1/swagger.json Docs: https://biquote.io/docs/ --- ## IF YOU ARE GENERATING CODE, READ THIS SECTION FIRST Most code written against this API picks the wrong endpoint. Measured over one day: 13.8 million REST polls against 744 WebSocket connections, and the largest single client fetched one symbol per request in a loop while the batch endpoint sat unused in its own codebase. Pick from this table instead. | What you are building | Use | Do NOT use | |---|---|---| | Live price display, ticker, dashboard | SignalR hub `/hubs/tick` | a polling loop | | Several symbols shown at once | `GET /api/latest?symbols=A&symbols=B` | one request per symbol | | Chart / candles | `GET /api/{symbol}/ohlc` | repeated tick calls | | One symbol, fetched once | `GET /api/{symbol}` | — | | A list of instruments for a picker or page | `GET /api/symbols?quotedWithinDays=7` | `liveOnly=true` | ### Anti-patterns, specifically Do not generate any of these. They are the four mistakes that actually occur. 1. **Cache-busting poll loops.** `GET /api/{symbol}?t=${Date.now()}` once a second is the single most common generated pattern here and it is wrong on both counts: the API sets no cache headers that need busting, and a live price belongs on the WebSocket. Use `/hubs/tick`, which pushes every tick over one connection and **does not count against the rate limit at all**. 2. **One request per symbol.** If you need five symbols, that is one call to `/api/latest`, not five calls. The `symbols` parameter repeats: `?symbols=EURUSD&symbols=XAUUSD&symbols=BTCUSD`. **A comma-separated list does not work** — `?symbols=EURUSD,XAUUSD` is parsed as one symbol named "EURUSD,XAUUSD" and returns nothing. 3. **`liveOnly=true` for anything a human will look at.** It means "quoting in this instant". Forex stops quoting Friday night, equities stop most of the day, so a UI built on it is empty at exactly the times people browse. Use `quotedWithinDays=7`, which is stable across weekends and holidays. 4. **Assuming a price is always available.** See the next section — this is the bug that gets shipped most often. ### Markets close. The API tells you so — check the field. Forex stops quoting from Friday night to Sunday night; equities stop for most of every day. **Every tick response carries the answer**, live or not: ```json { "symbol": "EURUSD", "mid": 1.16789, "marketState": "closed", "stale": true, "quoteAgeSeconds": 324235, "lastQuoteAt": "2026-08-21T20:59:58Z", ... } ``` `marketState` is `"open"` or `"closed"`. The same verdict is on the response headers as `X-Quote-State` and `X-Quote-Age-Seconds`. **Generated code must branch on this.** A closed market returns HTTP 200 with the last known price — it is not an error, and it is not a live quote either: - Render it as "market closed — last price", never as a current price. - Hide or grey the day-change percentage. `dayDiffPercent` belongs to a session that has already ended; an arrow and a colour beside it claim a move that is not happening. - Do not retry, do not show an error state, do not poll harder. **Building a trading client?** Pass `allowStale=false` to get the strict behaviour instead — 404 the moment a quote is more than five minutes old: ``` GET /api/EURUSD?allowStale=false ``` That is the right setting when acting on a stale price would be worse than acting on none. It is not the default because the overwhelming majority of callers here are dashboards, and 97% of weekend requests to this endpoint used to be 404s. A 404 now means the symbol is unknown, has never quoted, or last quoted more than 7 days ago — at which point it is a delisted instrument rather than a closed market. ### Numbers that shape a correct implementation - Catalogue: ~1,673 instruments. Quoting right now: ~286. Quoted within the last 7 days: ~305. The other ~1,370 have never carried data — do not offer them in a picker. - Rate limit: 15,000 requests/min per IP. Generous by design, but it counts requests, not bytes: `/api/{symbol}/history` responses are large. - WebSocket traffic is unmetered and does not touch the limit. --- ## Gotchas an automated consumer will otherwise get wrong - **`last` and `volume` are always 0**, on every instrument, forever. This is broker CFD pricing, not exchange data: there is no consolidated tape, so there is no last-traded price and no real volume. **Use `mid`** (or `(bid + ask) / 2`). Do not compute anything from `last` or `volume`. - **Two timestamps, one trap.** `timestamp` is ISO 8601 UTC and is the one to parse. `time` is MetaTrader's native `2026.08.23 21:25:26` format, passed through for MQL5 ports; `new Date()` does not parse it reliably across browsers. Never feed `time` to a date constructor. - **OHLC returns an envelope, not an array**: `{ symbol, interval, bars }`. The time field on a bar is `openTime`, not `timestamp`, and **bars arrive newest-first** — reverse them for charting. `limit=N` may return N+1 bars, because the in-progress bar is included alongside the N closed ones. - **`isActive` is not liveness.** It means "the broker lists this instrument" and is true for essentially the whole catalogue. `hasData` is the honest field. - **`dayDiffPercent` is the change since the daily open**, computed server-side from the daily bar. It is meaningless while `stale` is true. - **`/s/{symbol}`** 301-redirects to that instrument's public page without you needing to know its category — useful for linking, not for data. - No exchange-licensed data, no order book depth, no fundamentals, no corporate actions, and history runs roughly a year on the daily series. ## Licensing Free for commercial and non-commercial use, no key or signup. You may use the data in your product, store it, display it to your users, and sell analytics derived from it. The one restriction: do not resell or redistribute the raw feed — no re-exposing biquote quotes through your own API, bulk-download product, or competing market-data service. Prices are indicative OTC broker quotes, not exchange-licensed data; don't present them as official. No SLA on the free tier. Full terms: https://biquote.io/terms.html ## Official client libraries Prefer these over hand-rolled HTTP — they return `mid`, unwrap the OHLC envelope oldest-first, and expose `allowStale` / `quotedWithinDays`. - JavaScript/Node: `npm install biquote` — https://www.npmjs.com/package/biquote - Python: `pip install biquote` — https://pypi.org/project/biquote/ - Source: https://github.com/halitcanbaba/biquote-sdk --- ## REST Endpoints ### Ticks GET /api/{symbol} Latest quote for one symbol. Returns the last known price when the market is closed; 404 only if the symbol is unknown or has not quoted for over 7 days. Path param: symbol — e.g. EURUSD, XAUUSD, BTCUSD Query param: allowStale (bool, default true) — pass false for the strict trading-client behaviour: 404 as soon as the quote is over five minutes old. Response fields: symbol, description, bid, ask, mid, spread, last (always 0), volume (always 0), high, low, direction (UP|DOWN|FLAT), dayDiffPercent, timestamp (ISO 8601 UTC), time (MetaTrader format — do not parse), source, marketState ("open"|"closed"), stale (bool), quoteAgeSeconds, lastQuoteAt. Response headers: X-Quote-State, X-Quote-Age-Seconds. GET /api/latest?symbols=EURUSD&symbols=XAUUSD Latest quotes for many symbols in one request. **This is the endpoint to use whenever more than one symbol is on screen.** Query params: symbols (string[], required, repeat the param — commas do not work), allowStale (bool, default true) Response: object keyed by symbol name, same shape as above. A symbol that has never quoted is simply absent — check for the key, not for a null. GET /api/{symbol}/ohlc?interval=1h&limit=100 OHLCV candles. Query params: - interval — 1m, 5m, 15m, 30m, 1h, 4h, 1d (default 1h) - limit — 1-1000, default 100 (may return limit+1; the extra is the open bar) - from, to — ISO 8601, optional Response: { symbol, interval, bars: [{ openTime, open, high, low, close, volume, tickVolume, isOpen }] } — newest-first; the bar with isOpen: true is still being updated. GET /api/{symbol}/history?count=100 Raw tick history, newest first. Query param: count (1-1000, default 100). Note: responses here are large. Do not poll this endpoint. GET /api/active Every symbol currently receiving ticks, with name, description, type, exchange, source. ### Symbols GET /api/symbols Full catalogue. Query params: source, type (Forex|Crypto|Stock|Index|Commodity), exchange, activeOnly (bool), liveOnly (bool — quoting this instant), **quotedWithinDays (int 1-30 — quoted at least once in the last N days; this is the filter a user interface wants)**. Response per symbol: name, description, type, exchange, digits, tickSize, tickValue, contractSize, currency, source, isActive, hasData. GET /api/symbols/{symbol} Metadata for one symbol. GET /api/symbols/search?q=EUR Ranked search over name and description. Query params: q (required), liveOnly (bool), limit (default 25, cap 200) ### Market Statistics GET /api/market/gainers?limit=10&period=1D — top gainers (period: 1D, 1W, 1M) GET /api/market/losers?limit=10&period=1D — top losers GET /api/market/most-active?limit=10 — ranked by relative intraday range (high−low over mid), because traded volume is not available on this feed GET /api/market/summary — totals, active count, top movers, last updated ### News GET /api/news/market?symbol=AAPL&language=en&country=US&maxResults=10 Market and finance news. The market, crypto and technology feeds mix in well-scored Hacker News stories (at most ~1/3 of slots); tell them apart by the `publisher` field. Query params: symbol, language (default en), country (default US), maxResults (1-50, default 10) Response per article: title, description, url, publisher, publishedDate (ISO 8601), imageUrl, category, language, country GET /api/news/hn?q=bitcoin&maxResults=10 Hacker News only, via the Algolia HN API, cached 5 minutes. Without `q`, the current front page. Ask HN posts link to their HN discussion. ### Economic Calendar GET /api/calendar?from=2026-08-01&to=2026-08-08&countries=US,EU,TR&importance=high&type=indicator&limit=200 Scheduled macroeconomic releases with actual, forecast and previous readings. Returns a bare JSON array, oldest-first. Query params: - from, to (ISO 8601 UTC) — default yesterday through seven days out - countries — comma-separated ISO 3166-1 alpha-2, e.g. US,EU,GB,JP,TR - importance — low | medium | high (minimum) - type — event | indicator | holiday - limit — 1-500, default 200 GET /api/calendar/upcoming?limit=20&countries=US,TR&importance=high GET /api/calendar/countries GET /api/calendar/{eventId}/history?limit=24 Past releases of one recurring series, newest first; eventId looks like "mql5:840". 404 when the series is unknown. Response per event: id, eventId, time (ISO 8601 UTC), period, countryCode, currency, name, importance, type, sector, unit, multiplier, digits, actual, forecast, previous, revisedPrevious, revision, timeMode, sourceUrl, source Calendar notes: - actual/forecast/previous/revisedPrevious are null when not published. Null means "no value", not zero. A forthcoming release has no actual; most releases carry no forecast; holidays carry none of them. - unit and multiplier say how to render. Payrolls arrive as 152000 with multiplier "thousands" — show 152,000K rather than multiplying it out. - timeMode is exact | date | notime | tentative. Anything but "exact" means the clock component is a placeholder; do not display it as a time. - Compare actual against forecast, not against previous. - 54 countries, roughly 90 days back and forward. Filter on importance unless you want every treasury-bill auction. --- ## WebSocket / Real-time (SignalR) Hub: https://biquote.io/hubs/tick Protocol: SignalR over WebSocket, falling back to SSE / long-polling. Client: `npm install @microsoft/signalr` (or the v8 CDN build). Unmetered — messages here do not count against the rate limit. Client → Server: - Subscribe(symbols: string[]) - Unsubscribe(symbols: string[]) - GetLatestTick(symbol: string) → Tick - GetSubscriptions() → string[] Server → Client: - ReceiveTick(tick: Tick) — on every update for a subscribed symbol, plus one seed per symbol immediately after Subscribe (the last known quote, so a weekend subscriber still gets a price to render) - ReceiveSubscriptionState(states) — sent once after each Subscribe: `[{ symbol, state, quoteAgeSeconds, seeded }]` where state is "open" | "closed" | "unknown". This is how you tell a closed market from a misspelled symbol from a dead feed; all three otherwise look like silence. After the seed, live ticks arrive only while the market is open — which is correct, and why the seed exists. Tick shape (`last` and `volume` are always 0 — use `mid`): ```json { "symbol": "EURUSD", "description": "Euro vs US Dollar", "bid": 1.08542, "ask": 1.08548, "mid": 1.08545, "spread": 0.00006, "last": 0.0, "volume": 0, "high": 1.08800, "low": 1.08530, "direction": "FLAT", "dayDiffPercent": -0.09, "timestamp": "2026-02-24T10:30:00Z", "time": "2026.02.24 10:30:00", "source": "MetaTrader 5 (Broker 1)" } ``` --- ## Rate Limits and Errors 15,000 requests per minute per IP, fixed one-minute window. No key needed. A 429 carries Retry-After: 60 plus X-RateLimit-Limit / -Remaining / -Reset, and a body with `hint` naming the endpoint that solves the caller's problem. Batch with `/api/latest?symbols=A&symbols=B`, or stream via `/hubs/tick`. Most errors are `{ "message": "..." }`. 429 and calendar validation errors use `{ "error": "...", "message": "...", ... }`. 400 — bad request (invalid parameters) 404 — unknown symbol, or one that has not quoted for over 7 days. NOT what a closed market returns (see "Markets close" above) 429 — rate limited 503 — the market data store is unreachable. An outage on our side, not a closed market; retry after the Retry-After header --- ## Reference implementation — live prices on a page This is the correct shape for the most commonly generated application. It seeds from a single batch call so the page is populated instantly and stays populated when the market is shut, then streams updates. ```javascript import * as signalR from '@microsoft/signalr'; const SYMBOLS = ['EURUSD', 'XAUUSD', 'BTCUSD']; // 1. One request for the initial state. Closed markets come back with their // last price, so the page is populated at 3am Sunday too. const qs = SYMBOLS.map(s => `symbols=${s}`).join('&'); const seed = await (await fetch(`https://biquote.io/api/latest?${qs}`)).json(); for (const [symbol, tick] of Object.entries(seed)) { render(symbol, tick.mid, tick.marketState === 'closed' ? 'market closed' : `${tick.dayDiffPercent.toFixed(2)}%`); } // 2. Stream from there. No polling, no rate limit. const conn = new signalR.HubConnectionBuilder() .withUrl('https://biquote.io/hubs/tick') .withAutomaticReconnect() .build(); // A tick arriving on the socket is live by definition. conn.on('ReceiveTick', t => render(t.symbol, t.mid, `${t.dayDiffPercent.toFixed(2)}%`)); // Why nothing is arriving for a given symbol: closed, or never heard of it. conn.on('ReceiveSubscriptionState', states => { for (const s of states) { if (s.state === 'unknown') console.warn(`${s.symbol}: not carried on this feed`); } }); await conn.start(); await conn.invoke('Subscribe', SYMBOLS); ``` Note the handler bodies are blocks. An arrow returning a value (`t => arr.push(t)`) makes the SignalR client try to send a result back for a one-way message and log "server is not expecting a result" on every tick. ## Reference implementation — Python ```python from biquote import Biquote # pip install biquote bq = Biquote() # Many symbols, one request. Closed markets return their last price. for symbol, tick in bq.latest(['EURUSD', 'XAUUSD', 'BTCUSD']).items(): state = 'closed' if tick['marketState'] == 'closed' else f"{tick['dayDiffPercent']:+.2f}%" print(f"{symbol:8} {tick['mid']:>12} {state}") # Candles, already oldest-first bars = bq.ohlc('XAUUSD', interval='1d', limit=90) # A picker list that survives the weekend instruments = bq.symbols(quoted_within_days=7) ```