Skip to content

feat: real-time /history endpoint and the current WS markets - #17

Merged
deios0 merged 2 commits into
mainfrom
feat/realtime-eu-streams
Aug 26, 2026
Merged

deios0 merged 2 commits into
mainfrom
feat/realtime-eu-streams

Conversation

@alexpipipi

Copy link
Copy Markdown
Member

Adds GET /history as a path with its own servers entry — it is served by ws.eodhistoricaldata.com, not the main REST host, and per-operation servers is the mechanism OpenAPI 3.1 gives for that. New Real-Time Data tag. README note now lists the actual markets.

Also refreshes the Postman config: the real-time folder went from four channels to ten, gained two /history requests, and its US trade example no longer shows "c":12 — that was the previous vendor's numeric condition scheme.

redocly lint + check-conventions pass. Generator: 110 requests, 0 errors.

Known gap, not fixed here: the Postman generator ignores per-operation servers, so /history had to be declared as a manual_items entry with an absolute URL. Teaching the generator to honour it is the better fix.

Contract: eodhdocs/docs/plans/2026-08-26-realtime-eu-streams-change-spec.md — one updatelibs run across 8 targets, all on branch feat/realtime-eu-streams.

The real-time service serves ten markets; every library knew four. Added the European equity streams (eu, eu-quote) and the derived ones (us-candles, eu-candles, us-status, eu-status), plus the one request/response endpoint, GET /history.

Behaviour the change spec pins down, live-verified: c is always an empty array on the Cboe equity feed and dp always false; authentication failures use the key status while every other frame uses status_code, and 422 appears under both with opposite meanings; 64 concurrent connections per token shared across markets; hyphenated EU tickers accept an un-hyphenated alias but every message answers with the canonical hyphenated ticker in s.

… markets

The real-time service gained six streams since this spec last mentioned it — eu,
eu-quote, us-candles, eu-candles, us-status, eu-status — and one genuine
request/response endpoint, GET /history, which returns the recent closed
one-minute bars for a single symbol and is the answer to "how do I fill the gap
after a dropped socket".

/history is served by ws.eodhistoricaldata.com, not by the main REST host, so the
operation carries its own servers entry rather than resolving under
https://eodhd.com/api. That introduces the per-operation servers pattern to this
spec; it is the mechanism OpenAPI 3.1 provides for exactly this case.

Documented on the operation because clients trip over them: only minutes in which
the symbol actually traded produce a bar, so the array is sparse; an unknown
market, an unknown symbol and the markets that keep no bars all return an empty
array rather than an error; c is the close price here while on the trade streams
it is the conditions array; and the auth failures use the key status rather than
status_code like every other frame of that service.

Streaming stays out of the spec — it is not expressible in REST — but the README
note now lists the actual markets instead of implying there is one.

Contract: eodhdocs docs/plans/2026-08-26-realtime-eu-streams-change-spec.md
…story request

The folder described four channels and four URLs; the service serves ten. Added
the European streams and the derived ones, plus the operational facts a Postman
user hits first: the symbol formats per market, the un-hyphenated alias for
European dual-class tickers and the fact that replies always carry the canonical
hyphenated form, the 64-connection-per-token cap alongside the 50-symbol one, and
the two error shapes — authentication failures use the key status and arrive over
the socket after a successful handshake, everything else uses status_code.

Two GET requests added for /history, the recent closed one-minute bars. They are
manual_items with an absolute URL rather than an entry under endpoints:, because
the endpoint is served by ws.eodhistoricaldata.com and the generator resolves
paths against {{api_url}} — declaring it the normal way produced a request
pointing at the wrong host. Teaching the generator to honour per-operation
`servers` is the better fix and is not in this change.

Also corrected the US trade example, which showed "c":12 with a "condition"
label. That was the previous vendor's numeric scheme; on this feed c is an array
and it is always empty, and dp is always false.

110 requests, 0 errors.

Contract: eodhdocs docs/plans/2026-08-26-realtime-eu-streams-change-spec.md
@deios0
deios0 merged commit 6eea0a7 into main Aug 26, 2026
1 check passed
@deios0
deios0 deleted the feat/realtime-eu-streams branch August 26, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants