GET /v1/markets
The keys of every market the recorder holds history for, one per line.
Lists the markets the recorder holds day segments for. Each line is a market key you can use with /v1/segments/.
Request
GET /v1/markets
HEAD /v1/marketsNo parameters. A query string is ignored.
Response
| Header | Value |
|---|---|
Content-Type | text/plain; charset=utf-8 |
Cache-Control | no-cache |
The body has one market key per line, sorted, each line ending in a newline. With no markets yet the body is empty.
A market key is <Venue>_<SYMBOL>:
| Part | Values |
|---|---|
Venue | BinanceSpot, BinanceUsdm, Bybit, Okx, Hyperliquid |
SYMBOL | The venue’s own symbol, with any character other than ASCII letters, digits and - replaced by _ |
How the list is built
The list is every directory in the data directory whose name is a valid market key, except the Hyperliquid directory hl. A market appears once its first day segment has been saved, usually within one save interval (60 s by default) of the recorder starting.
Markets that are no longer recorded stay in the list as long as their directory exists, so you can still read their history.
Status codes
| Status | When |
|---|---|
200 | Always, even with an empty list |
405 | A method other than GET or HEAD |
Example
curl http://127.0.0.1:8787/v1/marketsBinanceSpot_BTCUSDT
BinanceUsdm_BTCUSDT
Bybit_BTCUSDT
Hyperliquid_BTC
Okx_BTC-USDT-SWAPLoop over every market and list its days:
BASE=http://127.0.0.1:8787
for key in $(curl -fsS $BASE/v1/markets); do
echo "$key: $(curl -fsS $BASE/v1/segments/$key/ | wc -l) days"
doneRelated
/v1/segments/<key>/lists the days of one market./v1/hl/coinslists the Hyperliquid coins whose positions are recorded. Those are separate from theHyperliquid_<COIN>markets here, which hold footprints and context like any other market.