# Weather Ticker Format

<Callout type="info" title="Market Maker Reference">
  This specification defines the ticker format for weather prediction markets. Use this as the authoritative reference for ticker generation and parsing.
</Callout>

## Overview

Weather prediction market tickers follow a standard Gemini format for temperature threshold contracts:

```
GEMI-{Event}-{Contract}
```

## Ticker Structure

| Component | Description | Example |
|-----------|-------------|---------|
| `GEMI` | Gemini prediction market prefix | `GEMI` |
| `Event` | Event type + location + expiry datetime | `WXHIGH-MIA-2603260359` |
| `Contract` | Temperature threshold condition | `LO76` |

**Full Ticker Example:**
- `GEMI-WXHIGH-MIA-2603260359-LO76`

## Event Format

The event identifies the weather event type, location, and expiry datetime.

### Structure

```
{TYPE}-{LOCATION}-{YYMMDDHHmm}
```

### Components

| Component | Format | Description |
|-----------|--------|-------------|
| `TYPE` | `WXHIGH` | Weather event type |
| `LOCATION` | `[A-Z]{3}` | Location code for the weather station |
| `YYMMDDHHmm` | `[0-9]{10}` | Expiry datetime in UTC (2-digit year, month, day, hour, minute) |

### Expiry Datetime Format

```
YYMMDDHHmm
```

| Position | Part | Description |
|----------|------|-------------|
| 1-2 | `YY` | Year (e.g., `26` for 2026) |
| 3-4 | `MM` | Month (01-12) |
| 5-6 | `DD` | Day (01-31) |
| 7-8 | `HH` | Hour in UTC (00-23) |
| 9-10 | `mm` | Minute in UTC (00-59) |

**Examples:**
- `2603260359` = March 26, 2026 at 03:59 UTC
- `2601010359` = January 1, 2026 at 03:59 UTC
- `2507150359` = July 15, 2025 at 03:59 UTC

## Supported Event Types

| Event Type | Code | Description |
|------------|------|-------------|
| Highest Temperature | `WXHIGH` | Highest recorded temperature for the day at the specified location |
| Lowest Temperature | `WXLOW` | Lowest recorded temperature for the day at the specified location |

<Callout type="note" title="Event Type Availability">
  Additional weather event types may be added. Check [List Events](/rest-api/prediction-markets/events/list-events) for the current list of available markets.
</Callout>

## Supported Locations

Weather contracts use Gemini-specific location codes to identify weather stations. These location codes are different from airport codes or NWS Weather Forecast Office (WFO) codes, although resolution data is sourced from the National Weather Service (NWS).

| Location Code | Weather Station | City | State |
|---------------|-----------------|------|-------|
| `NYC` | Central Park | New York City | NY |
| `MDW` | Chicago Midway | Chicago | IL |
| `MIA` | Miami International Airport | Miami | FL |
| `LAX` | Los Angeles International Airport | Los Angeles | CA |
| `BOS` | Boston (Logan Airport) | Boston | MA |

<Callout type="note" title="Location Availability">
  Additional locations may be added. Check [List Events](/rest-api/prediction-markets/events/list-events) for the current list of available locations.
</Callout>

## Contract Format

Weather contracts support three threshold types based on temperature in degrees Fahrenheit. All boundaries are inclusive.

### Contract Types

| Type | Format | Description | Example |
|------|--------|-------------|---------|
| Less than or equal to | `LO{TEMP}` | Temperature will be ≤ the specified value | `LO76` |
| Range | `{TEMP1}TO{TEMP2}` | Temperature will be between the two values (inclusive) | `44TO45` |
| Greater than or equal to | `HI{TEMP}` | Temperature will be ≥ the specified value | `HI55` |

### Components

| Component | Description |
|-----------|-------------|
| `LO` | Less than or equal to (≤) indicator |
| `HI` | Greater than or equal to (≥) indicator |
| `TO` | Range delimiter (inclusive on both ends) |
| `TEMP` | Temperature in whole degrees Fahrenheit |

### Temperature Encoding

Temperatures are encoded as whole integers representing degrees Fahrenheit.

| Temperature | Encoded |
|-------------|---------|
| 76°F or below | `LO76` |
| Between 44°F and 45°F | `44TO45` |
| 55°F or above | `HI55` |
| 90°F or above | `HI90` |
| 32°F or below | `LO32` |

## Complete Examples

### Miami – High Temperature ≤ 76°F

**Highest temperature at Miami 76°F or below, expiring March 26, 2025 at 03:59 UTC**

| Component | Value |
|-----------|-------|
| Prefix | `GEMI` |
| Event Type | `WXHIGH` |
| Location | `MIA` |
| Expiry Datetime | `2503260359` |
| Contract | `LO76` |
| **Full Ticker** | `GEMI-WXHIGH-MIA-2503260359-LO76` |

### New York City – High Temperature Range

**Highest temperature at New York City between 44°F and 45°F, expiring March 26, 2025 at 03:59 UTC**

| Component | Value |
|-----------|-------|
| Prefix | `GEMI` |
| Event Type | `WXHIGH` |
| Location | `NYC` |
| Expiry Datetime | `2503260359` |
| Contract | `44TO45` |
| **Full Ticker** | `GEMI-WXHIGH-NYC-2503260359-44TO45` |

### Chicago – High Temperature ≥ 55°F

**Highest temperature at Chicago 55°F or above, expiring April 10, 2025 at 03:59 UTC**

| Component | Value |
|-----------|-------|
| Prefix | `GEMI` |
| Event Type | `WXHIGH` |
| Location | `MDW` |
| Expiry Datetime | `2504100359` |
| Contract | `HI55` |
| **Full Ticker** | `GEMI-WXHIGH-MDW-2504100359-HI55` |

### Los Angeles – High Temperature ≥ 90°F

**Highest temperature at Los Angeles 90°F or above, expiring July 15, 2025 at 03:59 UTC**

| Component | Value |
|-----------|-------|
| Prefix | `GEMI` |
| Event Type | `WXHIGH` |
| Location | `LAX` |
| Expiry Datetime | `2507150359` |
| Contract | `HI90` |
| **Full Ticker** | `GEMI-WXHIGH-LAX-2507150359-HI90` |

### Boston – High Temperature ≤ 32°F

**Highest temperature at Boston 32°F or below, expiring January 15, 2026 at 03:59 UTC**

| Component | Value |
|-----------|-------|
| Prefix | `GEMI` |
| Event Type | `WXHIGH` |
| Location | `BOS` |
| Expiry Datetime | `2601150359` |
| Contract | `LO32` |
| **Full Ticker** | `GEMI-WXHIGH-BOS-2601150359-LO32` |

## Regex Patterns

### Full Ticker

```regex
^GEMI-(WX[A-Z]+)-([A-Z]{3})-(\d{10})-(LO\d+|\d+TO\d+|HI\d+)$
```

**Capture Groups:**
1. Event type (e.g., `WXHIGH`)
2. Location code (e.g., `MIA`)
3. Expiry datetime (YYMMDDHHmm)
4. Contract (e.g., `LO76`, `44TO45`, `HI55`)

### Event Only

```regex
^(WX[A-Z]+)-([A-Z]{3})-(\d{10})$
```

**Capture Groups:**
1. Event type
2. Location code
3. Expiry datetime (YYMMDDHHmm)

### Contract Only

```regex
^(LO\d+|\d+TO\d+|HI\d+)$
```

## Validation Rules

1. Ticker must start with `GEMI-`
2. Event type must be a supported weather event type
3. Location must be a supported location code
4. Expiry datetime must be a valid UTC datetime in `YYMMDDHHmm` format
5. Contract must be one of: `LO{TEMP}`, `{TEMP1}TO{TEMP2}`, or `HI{TEMP}`
6. Temperatures must be whole integers

## Changelog

| Version | Effective Date | Changes |
|---------|----------------|---------|
| 1.0 | 2026-03-27 | Initial specification |
