FlowscopeDocs

API

The recorder's read-only HTTP API: base URL, conventions, status codes and examples.

A recorder serves what it records over plain HTTP. The API is read-only, has no authentication and allows requests from any origin. Flowscope clients load the same paths from the data hub, which runs a recorder; you can use it from curl, scripts or your own tools.

Base URL

The recorder listens on 127.0.0.1:8787 by default. Change it with --listen or FLOWSCOPE_RECORD_LISTEN.

Text
http://127.0.0.1:8787

Every path below is relative to that base. Behind a reverse proxy the base is the proxy’s URL, for example https://data.example.com.

Endpoints

MethodPathAnswerType
GET/healthokText
GET/v1/marketsMarket keys recorded, one per lineText
GET/v1/segments/<key>/Days held for a market, one per lineText
GET/v1/segments/<key>/<YYYY-MM-DD>.fsdOne day segmentBinary
GET/v1/hl/coinsHyperliquid coins recorded, one per lineText
GET/v1/hl/statusAccounts, requests and coverage per coinText
GET/v1/hl/levels/<COIN>?from=<ms>&to=<ms>TP, SL and liquidation runsBinary
GET/v1/hl/footprint/<COIN>?from=<ms>&to=<ms>OI, net-long and net-short footprint minutesBinary
GET/v1/options/<COIN>[?at=<ms>]A coin’s Deribit option chain, the newest or the newest at atBinary

Conventions

TopicRule
MethodsGET and HEAD. Anything else answers 405.
Text answerstext/plain; charset=utf-8, one item per line, each line ending in \n. An empty list is an empty body.
Binary answersapplication/octet-stream, little-endian. See Segment format, Positions codec and option snapshots.
Market keys<Venue>_<SYMBOL>, for example BinanceUsdm_BTCUSDT. Only ASCII letters, digits, _ and -, shorter than 128 characters.
DaysYYYY-MM-DD, UTC.
TimesMilliseconds since the Unix epoch, UTC, as integers.
Query stringsRead only by /v1/hl/levels, /v1/hl/footprint (from, to) and /v1/options (at); ignored elsewhere.
PathsMatched literally. Percent-encoding is not decoded.
ConnectionsOne request per connection. Every answer carries Connection: close.

Response headers

Every answer, including errors, carries the same set of headers:

Text
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: 3
Cache-Control: no-store
Access-Control-Allow-Origin: *
Connection: close

Cache-Control depends on the endpoint. Past days are cacheable forever; see Caching and CORS.

HEAD answers with exactly the headers a GET would send, including Content-Length, and no body. Use it to check whether a day exists, or how large it is, without downloading it.

Terminal
curl -I http://127.0.0.1:8787/v1/segments/BinanceUsdm_BTCUSDT/2026-10-03.fsd
Text
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 214392
Cache-Control: public, max-age=31536000, immutable
Access-Control-Allow-Origin: *
Connection: close

Status codes

StatusReasonWhenBody
200OKSuccessThe answer
400Bad RequestInvalid market key, invalid day, or an invalid Hyperliquid rangebad market key, bad day or bad range
404Not FoundUnknown path, a day or coin not recorded, Hyperliquid or option recording turned off, or no option snapshot yetnot found, not recorded, coin not recorded, hyperliquid positions not recorded, options of <COIN> are not recorded, option chains not recorded or no snapshot yet
405Method Not AllowedA method other than GET or HEADread-only
431Request Header Fields Too LargeThe request head is larger than 8 KiBrequest head too large
503Service UnavailableA recorded Hyperliquid coin has no sample yetno sample yet

Error bodies are short plain-text lines meant for people. Use the status code in programs.

A client that does not finish sending its request head within 10 seconds is disconnected without an answer.

CORS

Every answer carries Access-Control-Allow-Origin: *, so a web page on any origin can read the API with a simple GET. Preflight requests (OPTIONS) are not supported and answer 405; plain fetch(url) calls do not trigger one. See Caching and CORS.

Quick tour

Terminal
BASE=http://127.0.0.1:8787

curl $BASE/health
curl $BASE/v1/markets
curl $BASE/v1/segments/BinanceUsdm_BTCUSDT/
curl -o 2026-10-03.fsd $BASE/v1/segments/BinanceUsdm_BTCUSDT/2026-10-03.fsd

curl $BASE/v1/hl/coins
curl $BASE/v1/hl/status

FROM=$(( ($(date +%s) - 3600) * 1000 ))
TO=$(( $(date +%s) * 1000 ))
curl -o btc.levels "$BASE/v1/hl/levels/BTC?from=$FROM&to=$TO"
curl -o btc.fp "$BASE/v1/hl/footprint/BTC?from=$FROM&to=$TO"

curl -o btc.opt $BASE/v1/options/BTC

Versioning

Paths carry the API version (/v1/). Binary payloads carry their own format version in their header: day segments are at version 3 (versions 2 and 1 still decode), Hyperliquid payloads at version 1, option snapshots at FSO2 (the version is in the magic; FSO1 still decodes).