Operating the FinData client
- Key:
FINDATA_API_KEY(value) orFINDATA_API_KEY_FILE(path). The owner's Claude Code key file is~/Desktop/Cluster/secrets/findata/api-key-claude-code.txt; a least-privilege key (read:market, export) is preferable for benchmarks. The client keeps the key in memory only; logs redactBearer …; manifests record a 12-hexkey_fingerprint(SHA-256 prefix), never the key. - Base URL:
FINDATA_URL(defaulthttps://findata.spboucher.ai/api/v1); from M3U96a usehttp://127.0.0.1:8600. - Cache:
RAID_CACHE_DIR(defaultdatasets/cache, git-ignored). Bars pages are stored as CSV +.meta.json(sha256, dataset version, request ids, fetched_at); exports as Parquet +.meta.json. A cache hit is only used when the file's SHA-256 matches its manifest. Cache keys include the dataset version when pinned (version=); otherwise "latest" at fetch time is recorded in the manifest — experiments must pin the version they report. - Limits honoured: 600 req/min (token bucket 5 req/s, burst 10,
RAID_FINDATA_RPSto lower it), 1m ≤ 31 days per call (chunked), 5m ≤ 186 d, 1d ≤ 10 y, pages ≤ 10 000 rows viaX-Next-Cursor, exports ≤ 12 y per request (caller chunks), query ≤ 100 000 rows / 30 s. Retries: 429/502/503/504/network with exponential backoff (1→30 s), honouringRetry-After, 5 retries. - Offline / CI:
RAID_OFFLINE=1refuses any network call (cache only); CI uses synthetic fixtures. Live tests are opt-in:RAID_LIVE=1 FINDATA_API_KEY_FILE=… ./raid_tests "[live]". - Conventions verified live (2026-11-02, AAPL 2024-11-25…29): pages == export rows;
expected_bars== RAID calendar (391 / 211); RAID extended-policy 1m→5m aggregation == FinData derived 5m on the regular window (280/280 bars, OHLCV exact); RAID regular-policy closing bin = the 16:00 print only (FinData's derived 16:00 bin adds 16:01–16:04 post-close minutes: volume and close differ in that single bin per session). - License: FirstRate private use — cache directories must not be shared or committed; only aggregates are published.
- CLI:
raid data catalog | health | sessions SYM --start --end | coverage [--min-sessions N] | bars SYM --start --end [--interval] [--adjustment] [--out csv] | export SYMS --start --end [--dataset] [--out parquet] | fund ENTITY --as-of ISO | query "SQL".