# CastleBet Namibia — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 football betting odds and match data from CastleBet Namibia to track available markets, compare odds across competitions, and stay updated on upcoming matches. Access detailed betting information organized by competition to make informed decisions on football wagers.

**Category:** Sports | **Website:** [castlebet.com.na/](https://castlebet.com.na/) | **Docs:** [parse.bot/marketplace/7cb95397-aa3f-403e-83b5-8e55e88435b5/castlebet-com-na-api](https://parse.bot/marketplace/7cb95397-aa3f-403e-83b5-8e55e88435b5/castlebet-com-na-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/castlebet-namibia/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get football matches

Retrieve all football matches with their primary betting odds for a given day. Each match includes basic markets (Match Betting 1X2, Double Chance, Total Goals, BTTS) with selections and decimal odds. Results are returned as a single page ordered by kick-off time.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day` | string | No | Day offset from today. Accepted values: '0' (today), '1' (tomorrow), '2' (day after tomorrow). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/castlebet-namibia/get-football-matches \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"day":"<string>"}'
```

### Get match odds

Retrieve all available betting markets and odds for a specific football match. Returns comprehensive markets including Match Betting, Double Chance, Draw No Bet, Total Goals (multiple lines), Both Teams To Score, Odd/Even, and more depending on the match. Each market contains named selections with decimal odds.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `event_id` | string | Yes | Numeric event identifier from get_football_matches results (e.g. '2533538'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/castlebet-namibia/get-match-odds \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"event_id":"<string>"}'
```

### List competitions

List all football competitions currently available for betting. Returns competition identifiers (group_id, competition_id), country, and name. These identifiers can be used to understand the league/tournament structure.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/castlebet-namibia/list-competitions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.