Skip to content

API reference

Mostly Right 3.0 groups public data by weather, markets, economy, and finance. Start with the domain methods below. They return descriptive fields, units, timestamps, and source identity.

import mostlyright as mr
Namespace Stable starting points Returns
mr.weather observations(), daily_summaries(), forecasts(), satellite(), live.latest() Archived reports, official daily reports, forecasts, satellite pixels, and current METAR
mr.economy series(), snapshot(), releases() Indicator history, cutoff-aware vintages, and release events
mr.markets.kalshi series(), events(), markets(), market(), candles(), trades(), orderbook() Kalshi listings, prices, fills, and the current book
mr.markets.polymarket events(), markets(), market(), candles(), trades(), orderbook() Polymarket listings, prices, fills, and the current book
mr.finance.transcripts resolve(), derive() Earnings transcripts and earnings-mention resolution
mr.discover() Offline catalog search; live=True opts in to live market search Stations, schemas, sources, and market matches

Install mostlyrightmd for all domains or one of the per-domain distributions listed under Packages & versioning.

import { weather } from "mostlyright";
import { series, snapshot } from "@mostlyrightmd/economy";
import {
kalshiCandles,
polymarketCandles,
} from "@mostlyrightmd/markets/market-data";

TypeScript uses camelCase function names and snake_case row keys. Domain calls are async and normally return a DataResult with rows and provenance.

Package or subpath Stable starting points
mostlyright weather.observations(), weather.latest()
@mostlyrightmd/weather/daily-summaries dailySummaries()
@mostlyrightmd/weather/forecasts Station forecast reads
@mostlyrightmd/weather/hosted satelliteHosted()
@mostlyrightmd/economy series(), snapshot(), releases()
@mostlyrightmd/markets/market-data Kalshi and Polymarket listing, candle, trade, and order-book verbs
@mostlyrightmd/finance Completed and live transcript methods

Use observations() for archived per-report rows and the live namespace for the newest report:

from mostlyright import weather
reports = weather.observations("KNYC", "2026-01-01", "2026-01-03")
daily = weather.daily_summaries("KNYC", "2026-01-01", "2026-01-03")
latest = await weather.live.latest("KNYC")
import { weather } from "mostlyright";
import { dailySummaries } from "@mostlyrightmd/weather/daily-summaries";
const reports = await weather.observations("KNYC", "2026-01-01", "2026-01-03");
const daily = await dailySummaries("KNYC", "2026-01-01", "2026-01-03");
const latest = await weather.latest("KNYC");

weather.climate() and the TypeScript /climate subpath were removed in 3.0.

from datetime import UTC, datetime
from mostlyright.markets import kalshi
prices = kalshi.candles(
"KXHIGHNY-26MAY29-T85",
interval="1h",
from_time=datetime(2026, 5, 20, tzinfo=UTC),
to_time=datetime(2026, 5, 30, tzinfo=UTC),
)

The same normalized schemas cover both venues. Prices are probabilities from 0 to 1, native values remain in *_native fields, and volume columns state their unit.

Catch MostlyrightError, ContractError, NoDataError, or LeakageError for broad application control flow. Market-data interval errors use UnsupportedResolutionError; requesting a venue concept that does not exist uses VenueCapabilityError.

See Errors & exceptions for recovery guidance.