Skip to main content

Module lse

Module lse 

Source
Expand description

London Strategic Edge market data (behind the lse feature) — ⚠️ the retrieved data is not redistributable.

A free, no-account market-data provider covering FX, equities, ETFs, crypto, commodities, indices, futures and options, plus reference and macroeconomic series.

§⚠️ Licensing — the data is NOT redistributable

This integration’s code is MIT-licensed like the rest of this repository. The data it retrieves is not. London Strategic Edge permits use for your own research, trading and model training — including commercially — but prohibits redistributing, reselling, or otherwise making the data available to third parties, in bulk or through any competing feed, download service or interface. Their own client library being MIT-licensed covers that client only and confers no rights in the data; the same split applies here.

In practice: do not commit retrieved data to a public repository, do not publish it as fixtures or example datasets, and do not re-serve it. Terms: https://londonstrategicedge.com/terms

§Data characteristics

Properties that will silently mislead if assumed away:

  • FX candles are BID candles — not mid, and not last. Reconciling a day of EUR/USD one-minute bars against the tick tape for the same day, open/high/low/close matched the bid series on 1421 of 1421 minutes and matched the mid or the ask on none. So a backtest that fills at the candle close is filling at the bid — systematically favourable by a full spread on every buy, in the provider’s deepest dataset. This cannot be corrected here without inventing a spread. Equity candles, by contrast, track the trade tape; the asymmetry is real and per-dataset.
  • Candle volume is not a dependable figure. For FX the vault omits the field entirely, which is modelled as None rather than a zero — a zero would aggregate into a legitimate-looking total at every derived resolution. (The provider’s other host reports a volume for the same bar; this integration uses the vault, which does not.) Where the field is published it is still unreliable: a majority of sampled one-minute equity bars reported 0 in minutes the tick tape shows real trades, and one daily series carried a contiguous band roughly 2,000× too large. A literal 0 is passed through as Some(0); rewriting it to None would be this library inventing a fact, and None is reserved for a column the provider does not publish. Validate before trading on it.
  • ⚠️ Candle volume has additionally been reported wrong by three to four orders of magnitude since 2026-04-27, in opposite directions on ETFs and on equities. Unlike the rest of this list, which is measured here, this is a third-party report on the provider’s public issue tracker — repeated across symbols and dates, and unanswered. ETFs over-report: a QQQ one-minute bar was published at 189,272,655,373 against a consolidated daily figure of 33,118,600 for the same session — roughly 5,700× the whole day inside one minute — on QQQ, SPY, IWM, SMH, XLE, XLF, TLT, every trading day sampled over two months. Equities under-report: AAPL, MSFT and NVDA daily totals ran at 24–45% of the consolidated tape, against 65–80% before the same date, which is the ordinary primary-venue-versus-consolidated gap. Splits and liquidity stress were both ruled out by the reporter. This integration decodes those figures faithfully, and a shape check passes on them: the bars are structurally valid and semantically wrong, so nothing in band distinguishes them from correct ones. Reconcile volume against a second source before sizing anything on it, and treat a volume-derived signal — VWAP, a liquidity filter, a participation-rate model — as unusable on this feed until you have.
  • ⚠️ History depth varies per dataset and is far shallower than the headline suggests on some of them. QQQ in the etf dataset was reported carrying a first tick of 2026-04-27 and 0.2 years of coverage — roughly three months of spot — while options on the same ticker reach back to 2014 and equities are stated to reach 2004. Depth is a per-symbol, per-dataset property, discoverable from the first_tick and years fields the provider’s catalog publishes for each entry. That catalog is on the discovery host and is not wrapped by this integration, so nothing here can check a requested range against it: a backtest asking for years that a symbol does not have receives the bars that exist and no indication that the rest were never published. Check depth per symbol before choosing a range.
  • Non-trading days are emitted as FLAT bars, not omitted — daily series are not sparse. Every sampled Saturday and the US Independence Day observance returned a bar with open == high == low == close; Sundays are absent. A backtest therefore sees a tradeable price on a closed market, and the only signal is the flat OHLC. Intraday bars are sparse (no-trade minutes are absent rather than zero-filled), so the two resolutions differ.
  • These are CFD and aggregated-spot series, not exchange instruments. XAU/USD is spot gold rather than a COMEX contract, SPX500/USD is a CFD rather than an index or its future, and ES.F is a continuous front-month proxy with no contract chain, expiry or roll. There is no venue attribution anywhere in the feed.
  • Crypto is an aggregated tape: no funding rates, no liquidations, no venue. It is not a substitute for a native exchange connector.
  • The live tick is a QUOTE, not a print. Its price equals its bid on every sample taken — 3,966 of 3,966 ticks across every dataset family. Both PublicTrades and OrderBooksL1 are served from it, but a trade decoded this way is a bid-side quote wearing a trade’s shape and is not evidence that a transaction occurred. See trade for the mapping and its reasoning.
  • Live tick volume is real on two venues and FABRICATED on two others, with no in-band signal separating them. LseCrypto and LseEquities carry a genuine per-tick size, which reconciles exactly against the provider’s own one-minute candles (ratio 1.000). LseFx and LseCfd carry a hard-coded 1.0 on every tick of every symbol sampled — a placeholder that will aggregate into a legitimate-looking total at any resolution, so volume-weighted prices and size filters on those two venues are meaningless rather than merely imprecise. Note this differs from the REST vault, which omits FX volume entirely; the WebSocket invents a value instead.
  • Identical consecutive live ticks are genuine and are never de-duplicated. Barely a third of a sampled run was unique on (ts, price, bid, ask, volume), yet removing the repeats destroyed 3–10% of volume that otherwise reconciles exactly. Do not add a de-duplication filter; a test pins that both are emitted.
  • London (.L) listings are quoted in PENCE, and the catalog reports no unit. They are quoted in GBX, an asset distinct from GBP; see market::quote_asset.
  • Option greeks are print-triggered, not continuous: they arrive only with a trade, so a contract’s greeks are as stale as its last print and an unheld, untraded contract is never marked. See options.
  • Dataset slugs are not instrument identities and do not uniquely identify a series; see market::slug.

Modules§

backtest
Replay historical candles for N instruments as one time-ordered market stream.
bond_yield
Sovereign bond yields from the London Strategic Edge data API (GET /bond-yields).
calendar
Economic calendar events from the London Strategic Edge data API (GET /economic-calendar).
channel
The WebSocket channel a subscription maps to.
connection
One WebSocket per API key, shared by every stream a subscriber and its clones open.
data_api
Authenticated REST transport for the London Strategic Edge data API.
error
Errors produced by the London Strategic Edge integration.
export
Bulk export jobs against the vault: submit, poll, download.
historical
Paged historical candles from the London Strategic Edge vault.
live
Live WebSocket subscription: authentication, the pre-subscribe guards, and the subscribe flow.
mapper
The SubscriptionId a London Strategic Edge tick is filed under, and the mapper that files each subscription under it.
market
London Strategic Edge symbology: datasets, underlying assets, quote currencies and slugs.
options
US equity and ETF option prints and one-minute option candles from the London Strategic Edge vault.
parquet
Decode a downloaded bulk-export artifact into MarketEvents.
quota
The shared streaming + export allowance, as the provider reports it.
quote
Decode a London Strategic Edge tick as an OrderBookL1.
reference
London Strategic Edge catalog records (GET /vault/catalog).
resume
Gap-free resumption of a London Strategic Edge subscription across a reconnect.
stream
The London Strategic Edge market stream.
subscription
What the provider answers a subscribe with.
tick
The London Strategic Edge WebSocket tick frame, and the three timestamp spellings it arrives in.
trade
Decode a London Strategic Edge tick as a PublicTrade.
transformer
The London Strategic Edge stream transformer.
vault
Authenticated REST transport for the London Strategic Edge vault.

Structs§

Lse
The London Strategic Edge live market data connector.
LseServerCfd
CFD server — indices, commodities, interest rates, currency indices and volatility.
LseServerCrypto
Aggregated spot crypto server.
LseServerEquities
Equities and ETFs server.
LseServerFutures
Continuous futures-proxy server.
LseServerFx
Spot FX server.
LseServerOptions
Option contract server.

Constants§

WEBSOCKET_URL
The WebSocket endpoint.

Type Aliases§

LseCfd
Indices, commodities, interest rates, currency indices and volatility, all as CFDs: SPX500/USD, XAU/USD, USB10Y/USD, DXY/USD, VIX/USD.
LseCrypto
Aggregated spot crypto: BTC/USD, ETH/USD, …
LseEquities
Equities and ETFs: AAPL, SPY, BP.L, …
LseFutures
Continuous front-month futures proxies: ES.F, FDAX, …
LseFx
Spot FX: EUR/USD, GBP/USD, …
LseOptions
US equity and ETF option contracts, one Subscription per contract: SPY260930C00700000.