Market list
const url = 'https://example.com/api/markets/markets/list';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/markets/markets/listThe newest markets and the name of every series, as the stream’s snapshot holds them. version grows with every change to the list. The answer is gzip when the client accepts it, carries an ETag of the version, and may be cached for 2 seconds. A matching If-None-Match answers 304. 503 with Retry-After while the list is loading.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”Successful Response
object
Grows with every change to the list. Pass it as after to /markets/stream to hear only what changed since.
Every series, including one with no windows listed.
The newest markets, newest window first.
object
Window length, e.g. ‘5m’.
The line of windows this one belongs to, e.g. ‘btc-updown-5m’: the slug without its time.
Window start, epoch ms.
Window end, epoch ms.
‘open’, then ‘live’ once the window has started and has a strike. ‘halted’ instead of either while trading is halted: orders and changes are refused and cancels taken. ‘closed’ when trading ends: at expiry, or earlier if an operator closes it. ‘settled’ once its outcome is recorded.
The taker’s rate on the fee curve, in basis points. Fixed when the market is listed.
The maker’s rate on the fee curve, in basis points. Fixed when the market is listed.
The part of each fill’s taker fee that the maker gets back, in basis points of that fee. Fixed when the market is listed.
Example
{ "markets": [ { "winning_outcome": "up" } ]}If-None-Match is the current version.
Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}