FlowscopeDocs

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

Text
GET /v1/markets
HEAD /v1/markets

No parameters. A query string is ignored.

Response

HeaderValue
Content-Typetext/plain; charset=utf-8
Cache-Controlno-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>:

PartValues
VenueBinanceSpot, BinanceUsdm, Bybit, Okx, Hyperliquid
SYMBOLThe 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

StatusWhen
200Always, even with an empty list
405A method other than GET or HEAD

Example

Terminal
curl http://127.0.0.1:8787/v1/markets
Text
BinanceSpot_BTCUSDT
BinanceUsdm_BTCUSDT
Bybit_BTCUSDT
Hyperliquid_BTC
Okx_BTC-USDT-SWAP

Loop over every market and list its days:

Terminal
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"
done
  • /v1/segments/<key>/ lists the days of one market.
  • /v1/hl/coins lists the Hyperliquid coins whose positions are recorded. Those are separate from the Hyperliquid_<COIN> markets here, which hold footprints and context like any other market.