Skip to content

feat(server): add FLATFILES routes to the REST/WS server #432

@userFRM

Description

@userFRM

Problem

tools/server/src/router.rs exposes /v3/system/mdds/status and /v3/system/fpss/status but no FLATFILES routes. The startup banner only describes "MDDS gRPC for historical data" and "FPSS TCP for real-time streaming." The third surface is invisible over HTTP.

Proposed solution

Add routes under /v3/flatfiles/:

  • GET /v3/system/flatfiles/status — handshake against nj-{a,b}.thetadata.us:12000, return tier/auth status.
  • POST /v3/flatfiles/request — body {sec_type, req_type, date, format}. Default response: stream the decoded CSV/JSONL back to the caller (Content-Type: text/csv / application/x-ndjson). Optional ?save=path writes server-side.
  • POST /v3/flatfiles/request_raw — same args, returns the raw INDEX+DATA blob with Content-Type: application/octet-stream.
  • Per-sec-type/req-type convenience routes under /v3/flatfiles/option/{open_interest,trade_quote,trade,quote,eod}/{date} and /v3/flatfiles/stock/{trade_quote,trade,quote,eod}/{date}.

Add a --no-flatfiles startup flag mirroring --no-fpss so the surface can be skipped on instances without the entitlement.

Impact

HTTP / WS consumers (browser, ops scripts) gain access to the third surface. Lets the docs-site list three surfaces consistently across all bindings.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions