# SX Bet Betting Exchange Markets API

> Sports, leagues and active betting markets on the SX Bet exchange, with teams, lines and start times

- Vendor: `sxbetbettingexchangemarketsapi` · version 1.0 · category Sports · tags sx bet api, betting exchange api, sports betting markets api, crypto sportsbook api, betting lines api, sports odds api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/sxbetbettingexchangemarketsapi
- This document: https://apiclay.com/docs/sxbetbettingexchangemarketsapi.md
- OpenAPI 3.1: https://apiclay.com/api/sxbetbettingexchangemarketsapi/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `sxbetbettingexchangemarketsapi`
- Updated: 2026-11-18

## About

## SX Bet Betting Exchange Markets API

Market data from SX Bet, the on-chain sports betting exchange: the sports it covers, the active leagues with event counts by bet type, the active markets of a league (moneyline, spread, totals and period lines) with teams, outcome names, line, start time and market hash, and lookup of markets by hash.

Data comes from **sx.bet** (https://sx.bet). Every route calls the source's own public API and returns it unchanged.

Typical flow: `/leagues` for a `leagueId` (1 is the NBA), then `/markets?leagueId=1`, then `/markets-by-hash` for one.

### Routes

#### GET `/sports` - Sports
No parameters.

Returns: `data[]` with `sportId` and `label`.

#### GET `/leagues` - Active leagues
No parameters.

Returns: `data[]` with `leagueId`, `label`, `sportId`, `popularity`, `eventsByType`.

#### GET `/markets` - Active markets
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| leagueId | query | number | no | League from `/leagues`. |
| onlyMainLine | query | string | no | `true` for main lines only. |
| pageSize | query | number | no | Markets per page. |
| paginationKey | query | string | no | `nextKey` from the previous page. |

Returns: `data.markets[]` (`marketHash`, `type`, `teamOneName`, `teamTwoName`, `outcomeOneName`, `outcomeTwoName`, `line`, `gameTime`, `sportLabel`, `leagueLabel`, `liveEnabled`, `status`) and `data.nextKey`.

#### GET `/markets-by-hash` - Markets by hash
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| marketHashes | query | string | yes | One or more market hashes, comma-separated. |

Returns: `data[]` with the same market fields.

### Caveats

- Market listings only; order books and trading need an SX account. Betting data: check local rules and SX Bet's terms before commercial use.
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by sx.bet.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /sports — Sports
- Gateway: `GET https://api.apiclay.com/v1/api/sxbetbettingexchangemarketsapi/sports`
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /leagues — Active leagues
- Gateway: `GET https://api.apiclay.com/v1/api/sxbetbettingexchangemarketsapi/leagues`
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /markets — Active markets
- Gateway: `GET https://api.apiclay.com/v1/api/sxbetbettingexchangemarketsapi/markets`
- Public query params: `leagueId` (number), `onlyMainLine` (string), `pageSize` (number), `paginationKey` (string)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /markets-by-hash — Markets by hash
- Gateway: `GET https://api.apiclay.com/v1/api/sxbetbettingexchangemarketsapi/markets-by-hash`
- Public query params: `marketHashes` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/sxbetbettingexchangemarketsapi/sports" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
