SPB Git

spb/findata

Public
2.3 KB · 27 lines markdown
1# FinData OS — API quick start23Base URL: `https://findata.spboucher.ai/api/v1` · OpenAPI: `/api/v1/openapi.json` · Swagger UI: `/api/docs`4Auth: `Authorization: Bearer fd_<prefix>.<secret>` (create keys in the console → API keys). Browser sessions use the cookie + `X-CSRF-Token`.5Conventions: UTC ISO-8601 (`Z`), bars stamped at **bar open**, cursor pagination (`next_cursor`), structured errors `{"error":{"code","message","request_id"}}`, response headers `X-Request-ID`, `X-Dataset-Id`, `X-Dataset-Version`.67```bash8K=fd_xxx.yyy9curl -s -H "Authorization: Bearer $K" https://findata.spboucher.ai/api/v1/catalog/datasets | jq '.data[] | {id,status,license_class}'10curl -s -H "Authorization: Bearer $K" "https://findata.spboucher.ai/api/v1/market/bars?symbol=AAPL&interval=1m&start=2026-10-30&end=2026-10-30&limit=5" | jq .11curl -s -H "Authorization: Bearer $K" "https://findata.spboucher.ai/api/v1/fundamentals/AAPL?as_of=2025-01-01T00:00:00Z&metrics=rev,net_inc" | jq '.data[0], .meta'12curl -s -H "Authorization: Bearer $K" -H 'Content-Type: application/json' -d '{"sql":"SELECT symbol_as_reported, count(*) FROM market_bars_stock_1m_raw GROUP BY 1 ORDER BY 2 DESC LIMIT 5"}' https://findata.spboucher.ai/api/v1/query | jq .rows13curl -s -H "Authorization: Bearer $K" -H 'Content-Type: application/json' -d '{"dataset_id":"market_bars.stock.1m.raw","symbols":["AAPL","MSFT"],"start":"2026-10-01","end":"2026-10-30"}' https://findata.spboucher.ai/api/v1/exports   # 202 → poll /exports/{id} → /download14```1516Python SDK (`packages/python-sdk`, `pip install -e packages/python-sdk`):17```python18from findata_sdk import FinData19fd = FinData("https://findata.spboucher.ai", api_key="fd_xxx.yyy")20bars = fd.bars("AAPL", "1m", "2026-10-26", "2026-10-30")        # pyarrow.Table (Arrow IPC pages)21df = bars.to_pandas()22path = fd.export(["AAPL", "MSFT"], "2024-01-01", "2026-10-30")     # async Parquet export → local file23facts = fd.fundamentals("AAPL", as_of="2025-01-01T00:00:00Z", metrics=["rev", "eps_d"])24```2526Limits: 1m bars ≤ 31 days per call (5m ≤ 186 d, 1d ≤ 10 y), ≤ 10 000 rows per page → use exports for larger ranges. Query playground: one read-only statement, 30 s, ≤ 100 000 rows. Rate limit 600 req/min per key (configurable per key). License: FirstRate Data private use — do not redistribute raw data.27
Files · 8c99c930ed142b6d6f4fe778e25de33dcf6862e4
Menu

Theme