Skip to content

Stream markets

GET
/api/markets/markets/stream
curl --request GET \
--url https://example.com/api/markets/markets/stream

snapshot first, with recent markets and the name of every series: {"version": int, "series": [string], "markets": [Market]}. Then changed, with only the markets that moved: {"version": int, "markets": [Market]}. Given after, there is no snapshot: the stream sends the changed events after that version. If the version is older than the stream keeps, or newer than the service has reached, it sends snapshot_stale, {"version": int}, and closes: fetch /markets/list again.

after
Any of:
integer
<= 9223372036854776000

A version from /markets/list or an event.

Server-sent events.

Media typetext/event-stream
string

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}