> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bayse.markets/llms.txt
> Use this file to discover all available pages before exploring further.

# v0.1.14 — May 29, 2026

> Soccer sports markets linked via sportGameSlug

## New feature

### Soccer sports markets — H2H + Goal Spread + Total Goals

Three individual but interconnected event types for soccer matches, linked through a common `sportGameSlug`:

#### 1. Head-to-Head (H2H) 3-Way — `TEAM_H2H_3WAY`

The primary match winner event with three mutually exclusive markets:

* Home team win
* Away team win
* Draw

#### 2. Goal Spread — `GOAL_SPREAD`

Grouped event with independent markets for each team winning by a specific goal margin (e.g., 1.5, 2.5, 3.5 goals).

**New fields:**

* `propLine` (number) — The goal threshold
* `propDirection` (string) — `"OVER"` (indicates the team must win by more than the threshold)
* `propTeam` (object) — Team details (id, name, slug, league, sport)

#### 3. Total Goals — `TOTAL_GOALS`

Grouped event for total goals scored in the match (e.g., Over/Under 2.5, 3.5 goals).

**New fields:**

* `propLine` (number) — The goal threshold
* `propDirection` (string) — `"OVER" (indicates total goals must be over the threshold)`
* `propTeam` — `null` (applies to entire match)

***

## New Endpoints

### List sports teams — `GET /v1/pm/sports/teams`

Fetch soccer teams. Supports filtering by league and pagination.

```bash theme={null}
GET /v1/pm/sports/teams?league=epl&page=1&size=20
```

### List sports games — `GET /v1/pm/sports/games`

Fetch upcoming and live matches with details like teams, league, and scheduled start time. Supports filtering by team, league, and pagination.

```bash theme={null}
GET /v1/pm/sports/games?league=epl&page=1&size=20
```

### List sports leagues — `GET /v1/pm/sports/leagues`

Fetch soccer leagues to use for filtering teams and games.

```bash theme={null}
GET /v1/pm/sports/leagues
```

***

## New query parameter

### Get Events endpoint — `GET /v1/pm/events`

Filter sports events by:

* **`sportGameSlug`** (string) — Fetch all three event types for a match
  ```bash theme={null}
  GET /v1/pm/events?sportGameSlug=bm-game-20260524-mci-avl
  # Returns H2H, Goal Spread, and Total Goals events
  ```

### Get Trades endpoint — `GET /v1/pm/trades`

New optional filters for trade history:

* **`orderId`** (string) — Trades where the order is on either the taker or maker side
* **`outcomeId`** (string) — Trades on either the taker or maker side
* **`userId`** (string) — Trades where the user was either the taker or the maker
* **`fromDate`** (string) — Trades created at or after this RFC3339 timestamp
* **`toDate`** (string) — Trades created at or before this RFC3339 timestamp
  ```bash theme={null}
  GET /v1/pm/trades?userId=9f8c1b2a-3d4e-5f60-7180-90abcdef1234&fromDate=2026-05-01T00:00:00Z&toDate=2026-05-29T23:59:59Z
  # Returns a user's trades within the date range
  ```

<Warning>
  **Breaking change.** `GET /v1/pm/trades` is now paginated. The `limit` and
  `cursor` parameters are replaced by **`page`** (default `1`) and **`size`**
  (default `50`, max `100`), and the response is wrapped in `{ data, pagination }`
  instead of a bare array.

  ```bash theme={null}
  GET /v1/pm/trades?marketId=b2c3d4e5-f6a7-8901-bcde-f12345678901&page=1&size=20
  ```
</Warning>

***

## Response schema changes

### Market response

New fields for prop markets:

| Field           | Type           | Present on                                                     |
| --------------- | -------------- | -------------------------------------------------------------- |
| `propLine`      | number \| null | Goal Spread markets, Total Goals markets                       |
| `propDirection` | string \| null | Goal Spread markets (`"OVER"`), Total Goals markets (`"OVER"`) |
| `propTeam`      | object \| null | Goal Spread markets (team details), Total Goals markets (null) |

### Event response

New fields:

| Field             | Type   | Present on        | Notes                                             |
| ----------------- | ------ | ----------------- | ------------------------------------------------- |
| `sportGameSlug`   | string | All sports events | Use for fetching related events                   |
| `sportMarketType` | string | All sports events | `TEAM_H2H_3WAY` \| `GOAL_SPREAD` \| `TOTAL_GOALS` |

***

## Documentation

See [Sports markets](/concepts/sports-markets) for:

* Complete market structure examples
* Discovery flow for linked events
* Terminology and data reference

***

## Technical notes

* H2H events also include `propTeam` for home/away markets (enables team-specific UI differentiation)
* Database: new `propLine`, `propDirection`, and `propTeamId` columns on `markets` table; new `sportGameSlug` and `sportMarketType` column on `events` table
