# SportyBet — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Get real-time betting odds and live scores for football, basketball, and other sports from SportyBet. Browse upcoming events with full market odds, monitor live matches as they happen, and view sport listings with event counts across multiple markets.

**Category:** Sports | **Website:** [www.sportybet.com/ng/](https://www.sportybet.com/ng/) | **Docs:** [parse.bot/marketplace/2757946b-3e82-4c02-89a2-802caa23029f/sportybet-com-api](https://parse.bot/marketplace/2757946b-3e82-4c02-89a2-802caa23029f/sportybet-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-sportybet-com-api-2757946b/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### book_bet

Book a bet with one or more selections and receive a booking code. Each selection specifies an event, market, and outcome. The booking code can be shared or used at a SportyBet Tanzania shop to place the actual bet. Selections use event IDs from get_upcoming_events or get_live_events, market IDs and outcome IDs from get_event_odds. No authentication required.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `selections` | string | Yes | JSON array of selection objects. Each object must contain: eventId (e.g. 'sr:match:53452525'), marketId (e.g. '1' for 1X2, '18' for Over/Under), outcomeId (e.g. '1' for Home, '2' for Draw, '3' for Away). Optional specifier field for markets like Over/Under (e.g. 'total=2.5'). Accepts both camelCase and snake_case keys. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportybet-com-api-2757946b/book_bet \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"selections":"<string>"}'
```

### get_booking

Retrieve full details of a booked bet slip by its booking code. Returns selections with teams, odds, markets, share URL, deadline, bet type, and winning status. Booking codes are obtained from book_bet results or shared bet slips.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `booking_code` | string | Yes | Booking code from book_bet or a shared bet slip (e.g. '5CKNWH', '56QHTJ'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportybet-com-api-2757946b/get_booking \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"booking_code":"<string>"}'
```

### get_event_odds

Get all markets and odds for a specific event. Returns the full list of available betting markets for a single match, including 1X2, Over/Under at multiple lines, Double Chance, Both Teams to Score, Correct Score, Handicap, and more. Use event IDs from get_upcoming_events or get_live_events.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `event_id` | string | Yes | Event ID in the format 'sr:match:<number>', obtained from get_upcoming_events or get_live_events results |
| `product_id` | string | No | Product ID: '3' for prematch events, '1' for live events |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportybet-com-api-2757946b/get_event_odds \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event_id":"<string>","product_id":"<string>"}'
```

### get_live_events

Get currently live events with real-time scores and betting odds for a sport. Returns live matches grouped by tournament, including current score, match period, played time, and available markets with odds. Returns an empty tournaments array if no matches are currently live.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `sport` | string | No | Sport name ('football', 'basketball') or a raw sport ID (e.g. 'sr:sport:1', 'sr:sport:2') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportybet-com-api-2757946b/get_live_events \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sport":"<string>"}'
```

### get_sport_list

Get list of all available sports with their event counts. Useful for discovering which sports are available and their raw sport IDs for use with other endpoints.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product` | string | No | Product type: 'live' for currently live events, 'prematch' for upcoming events |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportybet-com-api-2757946b/get_sport_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product":"<string>"}'
```

### get_upcoming_events

Get upcoming and today's events with full betting odds for a sport. Returns tournaments with events, each containing multiple markets (1X2, Over/Under, Handicap, etc.) with odds for each outcome. Paginated by page number; each page returns up to page_size events grouped by tournament. Use tournament_id to filter results to a specific tournament.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `market_ids` | string | No | Comma-separated market IDs to include in results |
| `page` | integer | No | Page number for pagination |
| `page_size` | integer | No | Number of events per page (max 100) |
| `sport` | string | No | Sport name ('football', 'basketball') or a raw sport ID (e.g. 'sr:sport:1', 'sr:sport:2') |
| `today_only` | boolean | No | If true, only return today's games |
| `tournament_id` | string | No | Tournament ID to filter by (e.g. 'sr:tournament:16' for World Cup). Obtain tournament IDs from the tournament_id field in get_upcoming_events results. When omitted, returns events from all tournaments. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportybet-com-api-2757946b/get_upcoming_events \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"market_ids":"<string>","page":"<integer>","page_size":"<integer>","sport":"<string>","today_only":"<boolean>","tournament_id":"<string>"}'
```

### get_virtual_football

Get upcoming fixtures of virtual football with betting odds. Returns simulated football matches grouped by league (England, World Cup, etc.) with 1X2, Over/Under, and other market odds. Virtual football events run continuously with new fixtures generated every few minutes. Results are paginated; use the league filter to narrow results to a specific virtual league.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league` | string | No | Filter by virtual league name (e.g. 'England', 'World Cup'). When omitted, returns fixtures from all virtual leagues. |
| `market_ids` | string | No | Comma-separated market IDs to include in results (e.g. '1' for 1X2, '18' for Over/Under) |
| `page` | integer | No | Page number for pagination |
| `page_size` | integer | No | Number of events per page (max 100) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportybet-com-api-2757946b/get_virtual_football \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"league":"<string>","market_ids":"<string>","page":"<integer>","page_size":"<integer>"}'
```
