Expand description
Authenticated REST transport for the London Strategic Edge data API.
The data API (data-api.londonstrategicedge.com) is the provider’s second host, distinct
from the vault in path, payload shape and symbol key. It serves the reference
families the vault has no candle path for: GET /bond-yields and /bond-yields/stats are
wrapped in bond_yield.
The HTTP plumbing both hosts share — auth header, agent, timeouts, redirect policy, request
rationing and error mapping — lives in an internal transport that this client wraps, exactly as
LseVaultClient does; the module here holds what is specific to
the data API.
§Authentication
One API key authenticates both hosts, read from the same LSE_API_KEY variable and sent as
the same x-api-key header. Supply it explicitly via LseDataApiClient::new or from the
environment via LseDataApiClient::from_env. Keys are free and require no account.
§⚠️ The two hosts disagree, and neither errors on the other’s spelling
They are not interchangeable views of one dataset:
- Country codes differ. The vault catalog spells the United Kingdom
GB; this host spells itUK, andGBhere returns200with zero rows rather than an error. SeeLseBondYieldStats::normalise_country. - Dates differ. The vault stamps to the microsecond
(
2024-01-02 09:09:00.000000); the bond-yield rows here carry a bareYYYY-MM-DD. - Volume differs. The vault omits
volumefor FX entirely, while this host reports one for the same bar.
Anything crossing between them must normalise deliberately. Nothing here does it implicitly.
§⚠️ Rationing is per client, not per key
This client and an LseVaultClient built separately hold
independent gates, so a consumer driving both issues up to the sum of their two rates. That
is the right default for two hosts whose limits are enforced separately, but it is not a claim
that the provider’s allowance is per-host — the vault reports a single
calls_per_minute, and whether this host draws
on the same pool has not been measured. Budget as though it were shared.
§⚠️ Licensing
Data retrieved through this client is not redistributable. See the module documentation and https://londonstrategicedge.com/terms.
Structs§
- LseData
ApiClient - Authenticated client for the London Strategic Edge data API.