# Sportstoto — 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.

> Access Sports Toto Malaysia lottery jackpots, draw results, and past results calendars. Retrieve winning numbers, prize amounts, and comprehensive 4D frequency statistics for historical analysis.

**Category:** Entertainment | **Website:** [sportstoto.com.my/](https://sportstoto.com.my/) | **Docs:** [parse.bot/marketplace/65e88d64-5dd4-4fd6-9e57-26cb0019a275/sportstoto-com-my-api](https://parse.bot/marketplace/65e88d64-5dd4-4fd6-9e57-26cb0019a275/sportstoto-com-my-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-sportstoto-com-my-api-65e88d64/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_draw_results

Retrieve full detailed lottery results for a specific draw by draw number. Returns results for Toto 4D (top three prizes, special and consolation), Toto 4D Jackpot amounts, Supreme Toto 6/58, Power Toto 6/55, Toto 5D, and Toto 6D. Each game section is present but may be empty if not drawn that day.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `draw_no` | string | Yes | Draw number in format NNNN/NN (e.g. '6130/26'). Obtain draw numbers from get_latest_jackpots or get_past_results_calendar. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportstoto-com-my-api-65e88d64/get_draw_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"draw_no":"<string>"}'
```

### get_latest_jackpots

Retrieve the current estimated jackpot amounts for all game types (Supreme Toto 6/58, Power Toto 6/55, Star Toto 6/50, 4D Jackpot) and the current draw number from the homepage. Jackpots update after each draw; amounts are formatted Malaysian Ringgit strings.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportstoto-com-my-api-65e88d64/get_latest_jackpots \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_past_results_calendar

Retrieve a calendar of past draw dates and draw numbers for a given month and year. Useful for discovering valid draw numbers to pass to get_draw_results. Returns all draws that occurred in the specified month.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `month` | integer | Yes | Month number, 1 through 12 |
| `year` | integer | Yes | Year (e.g. 2026) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportstoto-com-my-api-65e88d64/get_past_results_calendar \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"month":"<integer>","year":"<integer>"}'
```

### get_statistics_4d

Retrieve 4D number frequency statistics showing the top most frequently hit numbers and their hit counts across all draws. Returns the top 20 numbers ranked by frequency.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sportstoto-com-my-api-65e88d64/get_statistics_4d \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
