Skip to content

mostlyright.markets.catalog.kalshi_nhigh

Kalshi NHIGH contract spec (daily HIGH temperature settlement).

NHIGH markets resolve against the NWS CLI max_temp_f value for a specific station on a specific date. resolve(contract_id, date) is the deterministic mapping from a Kalshi market identifier to the (settlement_source, settlement_station) tuple downstream code uses to pull the right settlement row from the CLI catalog.

resolve(contract_id, settlement_date)Resolve a Kalshi NHIGH contract to its settlement source + station.
NHighResolution(settlement_source, …)The (source, station) tuple a Kalshi NHIGH contract resolves to.

class mostlyright.markets.catalog.kalshi_nhigh.NHighResolution(settlement_source, settlement_station, city_ticker, contract_date)

Section titled “class mostlyright.markets.catalog.kalshi_nhigh.NHighResolution(settlement_source, settlement_station, city_ticker, contract_date)”

Bases: object

The (source, station) tuple a Kalshi NHIGH contract resolves to.

  • Parameters:
    • settlement_source (str)
    • settlement_station (str)
    • city_ticker (str)
    • contract_date (date)

mostlyright.markets.catalog.kalshi_nhigh.resolve(contract_id, settlement_date)

Section titled “mostlyright.markets.catalog.kalshi_nhigh.resolve(contract_id, settlement_date)”

Resolve a Kalshi NHIGH contract to its settlement source + station.

The contract_id is the Kalshi market identifier — for v0.1.0 the expected format is KHIGH<CITY> (e.g. KHIGHNY, KHIGHCHI). The city ticker is the suffix; we look it up in the whitelist.

  • Parameters:
    • contract_id (str) – Kalshi market identifier. Case-insensitive.
    • settlement_date (date) – The local calendar date the market settles for.
  • Return type: NHighResolution
  • Returns: NHighResolution with settlement_source = "cli.archive" and settlement_station from the whitelist.
  • Raises: ValueErrorcontract_id doesn’t follow the KHIGH<CITY> format or the city ticker is not in KALSHI_SETTLEMENT_STATIONS.