Skip to content

SDK

mostlyrightmd is a local-first SDK for quants researching prediction-market weather contracts (Kalshi NHIGH/NLOW, daily temperature high/low). It calls public APIs (AWC, IEM, GHCNh, NWS CLI) directly and writes a parquet cache to ~/.mostlyright/cache/. There is no hosted backend, no API key, and no rate-limited proxy.

The Python and TypeScript SDKs share the same surface: research(station, from_date, to_date) returns one row per settlement date in the requested window, joining observations with the climate record that decides the contract.

  • Temporal safetyKnowledgeView and LeakageDetector. Train-time data is filtered to what was knowable at the as-of cutoff, and a separate audit path raises on leakage.
  • Source identity — Mode 1 (fused multi-source) vs Mode 2 (single-source pin), plus SourceMismatchError for the case where training data and inference data come from different feeds.
  • Cache directory~/.tradewinds/ to ~/.mostlyright/ and the TRADEWINDS_CACHE_DIR to MOSTLYRIGHT_CACHE_DIR rename.
  • Legacy mostlyright (v0.14.1) — the old hosted-API client on PyPI is mostlyright. The new local-first SDK is mostlyrightmd. How to swap.

The auto-generated reference lands under python/ and typescript/ once a non-rc tag fires the SDK’s docs-publish workflow. Until then these subtrees are empty placeholders.

  • python/ — Sphinx + autodoc, regenerated on every v* Python tag.
  • typescript/ — TypeDoc, regenerated on every vts-* TS tag.