# SX Bet Odds & Trades API: Crypto Betting Exchange Data (`yakk000/sx-bet-odds-api`) Actor

SX Bet data in clean rows: active markets and recent public trades with no credentials, or best odds and depth with your own API key. Includes Pinnacle's no-vig fair price and EV where the game is covered.

- **URL**: https://apify.com/yakk000/sx-bet-odds-api.md
- **Developed by:** [Víctor Carrión](https://apify.com/yakk000) (community)
- **Categories:** Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 one data rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SX Bet Odds & Trades API: Crypto Betting Exchange Data

**SX Bet's peer-to-peer betting exchange in clean rows.** See what is being traded right now and at what price, with Pinnacle's no-vig fair price and EV where the game is covered.

### Modes

- **`trades` (default, no key):** recent public trades, with `selection`, `decimal_odds`, `stake_usdc` and `traded_at`. Parlays are left out, and so are usernames and wallet addresses.
- **`markets` (no key):** active markets with their outcomes, `line`, `market_hash` and `start`.
- **`odds` (your own key):** best available odds and depth for each outcome (`decimal_odds`, `available_stake_usdc`). SX Bet requires an API key for its order book. You create it in your SX Bet account, and it is sent only to `api.sx.bet`.

### Value vs Pinnacle

For winner markets and over/under 2.5 in covered leagues (main European football, NBA, EuroLeague, ATP, WTA), rows include `pinnacle_odds`, `pinnacle_fair_prob` and `ev` (`+0.03` means 3% above the fair price, before any fees on SX Bet). Other rows leave those fields empty.

### Example (trades)

```json
{"league": "NBA", "start": "2026-11-07T00:00:00+00:00", "team_one": "Boston Celtics", "team_two": "Charlotte Hornets",
 "selection": "Boston Celtics", "decimal_odds": 1.35, "stake_usdc": 120.5, "traded_at": "2026-11-06T18:02:11.000Z",
 "pinnacle_odds": 1.36, "pinnacle_fair_prob": 0.7102, "ev": -0.0412}
```

### Pricing

**$1 per 1,000 rows.** A default run returns at most 200 rows ($0.20), and an empty run costs nothing.

### Good to know

- Data comes from SX Bet's documented API at the moment of the run. Pinnacle's reference is refreshed about every 10 minutes.
- Check that your use complies with SX Bet's terms, and that it is available where you are.
- Independent tool, not affiliated with SX Bet or Pinnacle. Market data, not betting advice. 18+.

### Related

- [Betfair Exchange Spain: back, lay and liquidity](https://apify.com/Yakk000/betfair-exchange-spain-odds)
- [Spanish Bookmakers Odds API: 14 bookmakers vs Pinnacle](https://apify.com/Yakk000/spain-odds-pinnacle-value)
- [Polymarket Sports Odds vs Pinnacle](https://apify.com/Yakk000/polymarket-sports-odds-pinnacle)

# Actor input Schema

## `mode` (type: `string`):

'trades' and 'markets' need no credentials. 'odds' needs your own SX Bet API key.

## `sxApiKey` (type: `string`):

Only for mode 'odds'. Create it in your SX Bet account page. Stored encrypted by Apify and sent only to api.sx.bet.

## `sports` (type: `array`):

Names such as Soccer, Basketball, Football, Tennis, Hockey, Baseball, Mixed Martial Arts, E Sports. Empty = all.

## `leagues` (type: `array`):

Keep leagues whose name contains any of these, e.g. NBA, La Liga, Premier League.

## `mainLinesOnly` (type: `boolean`):

Markets and odds modes: only the main line of each market type.

## `maxResults` (type: `integer`):

Hard cap on rows returned and charged.

## Actor input object example

```json
{
  "mode": "trades",
  "mainLinesOnly": true,
  "maxResults": 200
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsJson` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("yakk000/sx-bet-odds-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("yakk000/sx-bet-odds-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call yakk000/sx-bet-odds-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yakk000/sx-bet-odds-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pKYyFDquuRjlwNESr/builds/ZH7skZrsc24QxiNtL/openapi.json
