| Endpoint | Auth Required | Description |
|---|---|---|
/pub/v2/odds/fixtures |
No (API key) | Get fixtures and odds |
/pub/v2/odds/competitions |
No | List competitions/leagues |
/pub/v2/odds/sports |
No | List available sports |
/v3/bets |
Yes (JWT) | Place bets |
/v3/account/balance |
Yes | Check account balance |
Base URL: https://sports-api.cloudbet.com
Docs: docs.cloudbet.com
For reading odds, you need an API key (free with account):
curl -X GET "https://sports-api.cloudbet.com/pub/v2/odds/fixtures?sport=esports" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Accept: application/json"
For placing bets, you need JWT authentication:
# 1. Get JWT token (login)
curl -X POST "https://sports-api.cloudbet.com/pub/v1/account/login" \
-H "Content-Type: application/json" \
-d '{"email": "your@email.com", "password": "yourpassword"}'
# Response
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"expiresAt": "2026-02-25T12:00:00Z"
}
# 2. Use token in requests
curl -X POST "https://sports-api.cloudbet.com/v3/bets" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{...}'
curl -X GET "https://sports-api.cloudbet.com/pub/v2/odds/fixtures?sport=esports" \
-H "X-API-Key: YOUR_API_KEY"
{
"fixtures": [
{
"id": "evt-12345",
"key": "esports/csgo/esl-pro-league/team-liquid-vs-g2",
"sport": {
"key": "esports",
"name": "Esports"
},
"competition": {
"key": "esl-pro-league",
"name": "ESL Pro League Season 21"
},
"name": "Team Liquid vs G2 Esports",
"home": {
"key": "team-liquid",
"name": "Team Liquid"
},
"away": {
"key": "g2-esports",
"name": "G2 Esports"
},
"cutoffTime": "2026-03-15T18:00:00Z",
"markets": {
"winner": {
"submarkets": {
"period=ft": {
"selections": [
{
"outcome": "home",
"price": "1.85",
"probability": "0.54"
},
{
"outcome": "away",
"price": "2.05",
"probability": "0.49"
}
]
}
}
},
"handicap": {
"submarkets": {
"period=ft&handicap=-1.5": {
"selections": [
{
"outcome": "home",
"price": "2.40",
"line": "-1.5"
},
{
"outcome": "away",
"price": "1.55",
"line": "+1.5"
}
]
}
}
}
}
}
]
}
# CS2 specific
curl "https://sports-api.cloudbet.com/pub/v2/odds/fixtures?sport=esports&competition=csgo/esl-pro-league"
# Dota 2
curl "https://sports-api.cloudbet.com/pub/v2/odds/fixtures?sport=esports&competition=dota2/the-international"
# League of Legends
curl "https://sports-api.cloudbet.com/pub/v2/odds/fixtures?sport=esports&competition=lol/worlds"
curl -X POST "https://sports-api.cloudbet.com/v3/bets" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"currency": "USDT",
"stake": "10.00",
"acceptPriceChange": "better",
"selections": [
{
"eventId": "evt-12345",
"marketKey": "winner",
"submarketKey": "period=ft",
"outcome": "home",
"price": "1.85"
}
]
}'
{
"referenceId": "bet-67890",
"status": "accepted",
"stake": "10.00",
"currency": "USDT",
"potentialPayout": "18.50",
"selections": [...]
}
import requests
from typing import Optional
import os
class CloudbetAgent:
BASE_URL = "https://sports-api.cloudbet.com"
def __init__(self, api_key: str, jwt_token: Optional[str] = None):
self.api_key = api_key
self.jwt_token = jwt_token
def get_esports_fixtures(self, competition: Optional[str] = None):
"""Fetch esports fixtures and odds"""
params = {"sport": "esports"}
if competition:
params["competition"] = competition
response = requests.get(
f"{self.BASE_URL}/pub/v2/odds/fixtures",
headers={"X-API-Key": self.api_key},
params=params
)
return response.json()
def find_value_bets(self, min_edge: float = 0.05):
"""Find bets where implied probability differs from our estimate"""
fixtures = self.get_esports_fixtures()
value_bets = []
for fixture in fixtures.get("fixtures", []):
markets = fixture.get("markets", {})
winner = markets.get("winner", {})
for submarket_key, submarket in winner.get("submarkets", {}).items():
selections = submarket.get("selections", [])
for selection in selections:
price = float(selection.get("price", 0))
implied_prob = 1 / price if price > 0 else 0
# Your model's probability estimate would go here
# This is just a placeholder
estimated_prob = implied_prob * 1.1 # Example
edge = estimated_prob - implied_prob
if edge > min_edge:
value_bets.append({
"fixture": fixture["name"],
"selection": selection["outcome"],
"price": price,
"edge": edge
})
return value_bets
def place_bet(self, event_id: str, market_key: str,
submarket_key: str, outcome: str,
price: str, stake: float, currency: str = "USDT"):
"""Place a bet (requires JWT auth)"""
if not self.jwt_token:
raise ValueError("JWT token required for betting")
response = requests.post(
f"{self.BASE_URL}/v3/bets",
headers={
"Authorization": f"Bearer {self.jwt_token}",
"Content-Type": "application/json"
},
json={
"currency": currency,
"stake": str(stake),
"acceptPriceChange": "better",
"selections": [{
"eventId": event_id,
"marketKey": market_key,
"submarketKey": submarket_key,
"outcome": outcome,
"price": price
}]
}
)
return response.json()
# Usage
agent = CloudbetAgent(
api_key=os.environ["CLOUDBET_API_KEY"],
jwt_token=os.environ.get("CLOUDBET_JWT") # Optional for betting
)
# Get CS2 fixtures
fixtures = agent.get_esports_fixtures("csgo/esl-pro-league")
print(f"Found {len(fixtures.get('fixtures', []))} CS2 matches")
# Find value
value_bets = agent.find_value_bets(min_edge=0.03)
for bet in value_bets:
print(f"Value: {bet['fixture']} - {bet['selection']} @ {bet['price']} (edge: {bet['edge']:.1%})")
| Game | Competition Key | Markets |
|---|---|---|
| Counter-Strike 2 | csgo/* |
Winner, Handicap, Totals, Map Winner |
| Dota 2 | dota2/* |
Winner, Handicap, First Blood, Totals |
| League of Legends | lol/* |
Winner, Handicap, First Tower, Totals |
| Valorant | valorant/* |
Winner, Handicap, Totals |
| Overwatch 2 | overwatch/* |
Winner, Handicap |
| Starcraft 2 | starcraft2/* |
Winner, Handicap, Totals |