This is the multi-page printable view of this section. Click here to print.
Sports
- 1: Structure and Sports Terminology
- 2: Odds Conversion
- 3: Betting Outcomes and Probability Computations
- 4: Understanding Cashouts
- 5: The Significance of the Closing Line
- 6: Reduction Factors in Horse Racing
- 7: Cloudbet API
- 7.1: Markets
- 7.2: Examples
- 7.3: Handicap Odds
- 7.4: Margin Adjustments in Sports Betting
- 7.5: Simulated Betting with Test Funds
1 - Structure and Sports Terminology
This document provides an overview of the structure and terminology used in the Cloudbet sportsbook, assisting users in navigating the platform effectively.
Sport
To begin placing a bet, first select the sport. For example, choose Soccer.
Category
Categories on Cloudbet typically represent countries but can also include special tournaments. For instance, the “International Clubs” category in Soccer covers competitions like the UEFA Europa League or the AFC Champions League. Unique categorizations exist for some sports like tennis or virtual sports:
- International Clubs in Soccer: Competitions such as the UEFA Europa League or the AFC Champions League.
- Tennis: Categories include international tournaments like ATP, Challenger, ITF Men/Women.
- Virtual: Virtual sports have their own categories.
Competition
Within a category, choose a specific competition. Other bookmakers may call this a tournament. For example, in the Germany category, you might select the German Bundesliga.
Events, Matches, and Outrights, Futures
Within a competition, you will find a list of matches, typically divided into three subcategories:
- Event: An individual game, e.g., Bayer Leverkusen vs. FC Augsburg.
- Outright: Bets on the overall outcome of a league, tournament, or competition. This includes bets on the top scorer, championship winner, or political outcomes.
- Multi-runner Event: Events with multiple participants, such as horse races, golf tournaments, or esports. Bets can be placed on winners, top finishers, head-to-head outcomes, or specific order of finish.
Markets, Lines, and Selections
After selecting a competition and event, choose from various markets to place your bet.
Market
Markets describe different types of bets available for an event. Examples include:
- Full Time Result
- Asian Handicap
- Total Goals
- Both Teams To Score
- Alternative Lines for Asian Handicap and Total Goals
Lines
Lines refer to specific conditions set by the bookmaker for a given market, such as the odds for different outcomes in a “Full Time Result” market or total goals in a match.
Selection
Selections are specific outcomes within a market. For instance, in a Full Time Result market for a game between Germany and Scotland, selections might be:
- Germany - 1.27
- Draw - 5.90
- Scotland - 11.1
The odds indicate the potential return if the bet wins. For example, a $100 bet on Scotland at 11.1 odds would return $1110 if Scotland wins, including the original stake.
Markets Examples
Asian Handicap
Asian Handicap betting levels the playing field by giving the underdog a head start or the favorite a deficit, eliminating the possibility of a draw and offering only two outcomes.
- Whole Number Handicaps: Team A -1 means Team A must win by more than 1 goal to win the bet. If they win by exactly 1 goal, the bet is a push (stake refunded).
- Quarter Number Handicaps: Splits the bet into two separate bets, such as Team A -0.25, acting as two bets on 0 and -0.5. The combined outcomes determine the overall result.
Double Chance
Double Chance markets allow bettors to cover two of the three possible outcomes in a match, reducing risk but generally offering lower odds:
- Team A or Draw (1X)
- Team A or Team B (12)
- Draw or Team B (X2)
Outright, Futures Bets
Outrights are wagers placed on overall outcomes, such as the winner of a league or tournament. These bets are often made early in the competition and settled at its conclusion.
Multi-Runner Events
These events involve multiple participants, such as horse races or golf tournaments. Bet types include:
- Win Bets: Betting on the event winner.
- Place Bets: Betting on a competitor to finish in a top position.
- Head-to-head Bets: Betting on which of two competitors will finish higher.
- Forecast/Tricast Bets: Betting on the exact order of finish for the top two/three places.
2 - Odds Conversion
There are different ways in which odds can be displayed for sports betting markets. Aside from the three primary types — American Odds, Decimal Odds, and Fractional Odds — Cloudbet also supports Hong Kong and Malaysian odds. The Cloudbet API is offered in Decimal Odds format, but you can convert these to other formats using the formulas below.
Converting US Odds to Decimal Odds
US Odds can be converted to Decimal Odds using the following formulas based on whether the US Odds are positive or negative:
For positive US Odds:
For negative US Odds:
Example:
- For US Odds of -110: \( \text{Decimal Odds} = 1 + \frac{100}{110} \approx 1.909 \)
- For US Odds of +150: \( \text{Decimal Odds} = 1 + \frac{150}{100} = 2.5 \)
Converting Decimal Odds to US Odds
Decimal Odds can be converted to US Odds using the following formula:
If \(\text{DecimalOdds} \geq 2.0\):
If \(\text{DecimalOdds} < 2.0\):
Example:
- For Decimal Odds of 1.909: \( \text{US Odds} = -\frac{100}{1.909 - 1} \approx -110 \)
- For Decimal Odds of 2.5: \( \text{US Odds} = (2.5 - 1) \times 100 = 150 \)
Converting Fractional Odds to Decimal Odds
Fractional Odds are commonly used in the UK and Ireland and represent the potential profit received on a bet relative to the stake. Here’s how to convert between Fractional Odds and other formats:
To convert Fractional Odds to Decimal Odds, add 1 to the result of dividing the numerator by the denominator:
Example:
- For Fractional Odds of 3/2: \( \text{Decimal Odds} = 1 + \frac{3}{2} = 2.5 \)
Exchange Odds to Standard Bookmaker Odds
Betting exchanges offer odds in a decimal format similar to standard bookmakers but include a commission on winnings. This section explains how to adjust exchange odds to reflect the equivalent odds offered by a standard bookmaker, accounting for the commission taken by the exchange.
For US Exchange Odds:
For Decimal Exchange Odds:
Example (with 1% Commission):
- For US Odds of -110: \( \text{Adjusted US Odds} = -110 \times (1 - 0.01) \approx -111.10 \)
- For Decimal Odds of 1.909: \( \text{Adjusted Decimal Odds} = 1.909 \times (1 - 0.01) \approx 1.88991 \)
3 - Betting Outcomes and Probability Computations
This page provides technical details for understanding and utilizing betting odds and probabilities that are foundational for developing sophisticated betting strategies.
- True Odds: The actual probabilities of outcomes without any bookmaker margin. True odds are rarely offered in sports betting as they do not provide any profit margin for the sportsbook.
- Implied Odds: These odds are derived from the betting odds offered by Cloudbet, indicating the implied chances of a particular outcome to be. Implied odds include the overround or vig, which is their built-in profit margin.
- Fair Odds: Also known as zero-vig or no-vig odds, these are calculated by removing Cloudbet’s overround from the implied odds. Fair odds show what the betting odds would be if Cloudbet did not apply a profit margin, providing a “fair” assessment of probability. Calculating fair odds is useful for bettors in assessing the value of the odds offered compared to the true likelihood of the event.
Conversion from US Odds to Probability
US odds represent the amount won on a 100 unit bet when positive, and the stake needed to win 100 units when negative. The probability implied by US odds is calculated as follows:
When odds are positive:
When odds are negative:
Conversion from Decimal Odds to Probability
Decimal odds represent the total payout (stake + win) for each unit bet. The probability implied by decimal odds is simpler to calculate:
Calculating Edge from Probability and Odds
The edge represents the expected value of a bet as a percentage of the bet amount. It indicates a player’s advantage (or disadvantage) against the odds offered by the bookmaker.
Using decimal odds:
Example: Calculating Edge from Probability and Odds
Let’s say you are considering a bet on a tennis player to win a match. The bookmaker offers decimal odds of 1.8 for this player to win. You estimate that the probability of the player winning is 60% (or 0.60). Plug in your values:
\( \text{Edge} = (0.60 \times 1.8) - 1 = 1.08 - 1 = 0.08 \)
This result, 0.08 or 8%, represents your edge. It indicates that you have an 8% advantage against the odds offered by the bookmaker. This is a positive edge, suggesting that the bet has a positive expected value, making it a potentially profitable bet if your probability estimation is accurate.
From Edge to Probability
Conversely, calculating the probability required to justify a bet at given odds can help bettors decide whether the bet has positive expected value.
Using decimal odds:
Example: Calculating Required Probability
Suppose a bookmaker offers odds of 2.5 for a particular team to win a game. You want to calculate the probability that justifies these odds, assuming you have determined an edge of 0.04 (or 4%). Plug in the values:
\( \text{Probability} = \frac{1.04}{2.5} \approx 0.416 \)
This result, 0.416 or 41.6%, is the minimum probability at which the expected value of the bet becomes neutral or positive, given the edge of 4%. It shows that if you estimate the true probability of the team winning is greater than 41.6%, the bet has a positive expected value, making it a potentially good bet.
Decision Making
If your analysis or model suggests that the actual probability of the team winning is higher than 41.6%, say 45%, then the bet is favorable because your estimated probability exceeds the break-even probability calculated. This suggests an expected value that is positive, making it a rational bet under these assumptions.
If your estimate is lower, say 40%, the bet does not justify the odds, indicating a negative expected value, and it would be advisable to avoid placing the bet.
4 - Understanding Cashouts
Cloudbet allow bettors to settle bets early, securing a return before the event concludes with cashouts. This feature improves control over betting strategies, providing an opportunity to lock in profits or minimize losses based on real-time developments in the event.
Cashout Calculation
The cashout amount depends on the potential return of the original bet and the odds available for the opposite outcomes at the time of cashout. The formula used is:
- The formula subtracts the sum of the potential returns from opposing odds from the exhausted potential return amount to determine the cashout amount.
- This ensures that the cashout amount reflects current market conditions and the likely return if the bet were settled at that moment.
Note: The cashout amount must always be greater than zero.
Full Cashout Example
Consider a bet placed on a 3-way market. The initial bet was EUR 10 at odds of 1.4 (Home win), with a total potential return of EUR 14.
Suppose current odds are:
Side | Odds |
---|---|
Home | 1.38 |
Draw | 4.68 |
Away | 8.81 |
Calculating the full cashout:
After this cashout, the potential return is zero, and the bet is fully settled.
Partial Cashout Example
For a partial cashout, consider the same initial conditions but with different subsequent odds:
In this example, we assume the odds have shifted:
Side | Odds |
---|---|
Home | 1.20 |
Draw | 6.02 |
Away | 18.1 |
To cash out EUR 8 of the potential return:
The remaining stake (calculated based on the proportion of the potential return not cashed out):
This remaining stake will continue under the normal settlement process. Later, if the bettor decides to cash out the rest:
We further assume the current odds:
Side | Odds |
---|---|
Home | 1.82 |
Draw | 3.51 |
Away | 4.23 |
Final cashout for the remaining EUR 6 potential return:
After this transaction, there is no remaining potential return, and the original bet is fully settled.
Cashouts provide a strategic tool for bettors to manage risk and secure returns under changing conditions.
5 - The Significance of the Closing Line
This page examines the significance of the closing line in sports betting, explaining its relevance and how bettors can use it to refine their strategies for long-term success.
What is the Closing Line?
The closing line refers to the final odds offered by bookmakers just before an event begins. These odds are often considered the most accurate reflection of true probabilities due to the accumulation of all available information and market activity.
- Opening Line: The initial odds set by the bookmaker.
- Closing Line: The final odds available before the event starts.
Market Efficiency and the Closing Line
Betting markets are efficient as they incorporate a wide range of information and predictions from both casual bettors and sophisticated models. The closing line is shaped by this collective input, making it a reliable indicator of true probabilities.
Comparing Opening and Closing Lines
Line Movements
Lines move from their opening positions for several reasons, including:
- Injury reports
- Weather conditions
- Betting volume
- Sharp money: Bets placed by knowledgeable and influential bettors that can move the market.
- Public money: Bets placed by the general betting public.
These factors contribute to a more accurate line as the event approaches, with the closing line representing the culmination of all these adjustments.
The Predictive Power of the Closing Line
Research shows that the closing line tends to be the most accurate predictor of an event’s outcome. This is because it reflects the most current and comprehensive information.
Example
Consider a football game where the opening line for Team A is 1.80, and it moves to 1.70 by kickoff. The closing line at 1.70 incorporates all the latest information and betting activity, making it a more precise estimate of Team A’s chances.
Using the Closing Line in Betting Strategies
Tracking Closing Line Value (CLV)
Bettors should track the value of their bets relative to the closing line, known as Closing Line Value (CLV). Positive CLV indicates that you secured a better price than the closing line, suggesting a potential edge.
Calculating CLV
- Determine the odds at which the bet was placed (Bet_Odds).
- Determine the closing odds (Closing_Odds).
To calculate CLV, compare the odds you bet with the closing odds. The formula to calculate the closing line value as a percentage is:
where Closing Odds is the implied probability at close and Bet Odds is the implied probability of your wager.
Example: Positive CLV
If you bet on a team at 1.80 and it closes at 1.70, you have positive CLV, implying a bet with potential long-term profitability.
Achieving positive CLV consistently is a strong indicator of a profitable betting strategy. It reflects an edge over the market, as your bets are at more favorable prices than the final market consensus.
Example: Calculating CLV
We can plug the above example into the formula:
The closing line value in this example is 5.88%. This indicates that the bet was placed at better odds compared to the closing odds by 5.88%. This positive CLV indicates a bet with an edge.
How to Beat the Closing Line
Early Market Entry
Betting early can often yield better odds before the market has fully adjusted to all information. This strategy allows you to potentially secure positive CLV as the line moves closer to its final position.
Line Shopping
Having accounts with multiple sportsbooks enables you to compare and select the best available odds, increasing your chances of achieving positive CLV.
Steam Chasing
Steam chasing involves following the line movements driven by sharp money and placing bets quickly to benefit from the expected value. Such strategies can even be automated using the Cloudbet API, to track and react to sharp movements in real-time. Automated steam chasing is a common practice among professional bettors, as it allows for rapid and efficient response to market shifts.
Avoiding Public Bias
Betting against the public, or fading the public, can sometimes lead to better value as lines often shift due to heavy public betting, creating opportunities for sharp bettors to find value.
Practical Tips
- Track your bets: Keep a record of the opening and closing odds to analyze your performance. You can utilize APIs to automate the recording and analysis of your performance over time.
- Use tools and calculators: Utilize online tools to remove the vig and calculate true probabilities.
- Stay informed: Keep up with the latest news and data to make informed betting decisions.
6 - Reduction Factors in Horse Racing
Reduction factors adjust the betting odds in horse racing when horses withdraw after bets have been placed. The odds offered for each remaining horse are reduced.
Settlement & Refunds
When a horse is declared a non-runner in a race, any bets placed on that horse are usually voided, and the stake is refunded to the bettor. However, the presence of a non-runner also impacts bets already placed on other horses in the race. This is where reduction factors come into play.
Without adjusting the odds, the payouts would disproportionately favor bettors in light of the new, higher probability of winning.
For the most current rules and settlement guidelines, please consult the Cloudbet Sportsbook Rules.
Computing Reduction Factors
Reduction factors are calculated based on the odds of the non-runners. The factor reflects the impact of the withdrawn horse on the race:
Where DecimalOdds are the odds of the non-runner.
Application Threshold
It’s worth noting that if the reduction factor for the withdrawn horse is less than 2.5% it is not applied. This policy is in place to avoid minor adjustments that have negligible impact on the odds and payouts.
Applying Reduction Factors to Adjust Odds
The adjusted odds for remaining horses after a withdrawal can be computed using the formula:
Example: Assume a non-runner had odds of 5.0, generating a reduction factor of:
\( \text{ReductionFactor} = \frac{1}{5.0} = 0.20 \)
If another horse in the race originally had odds of 8.0, the adjusted odds would be:
\( \text{AdjustedOdds} = (8.0 - 1) \times (1 - 0.20) + 1 = 6.6 \)
These adjusted odds now reflect the new potential payout considering the changed race conditions.
7 - Cloudbet API
Swagger/OpenAPI documentation can be found at https://www.cloudbet.com/api/
The docs are split into the following sections:
- Account: Account management functions
- Feed: Real-time sportsbook data
- Trading: Trading API
- Trading B2B: Trading B2B API enabling you to set your own odds based on the data we supply
Cloudbet API Keys
Trading API Key
The Trading API (aka Betting API) is meant for developers who want to place bets and allows you to perform sports betting programatically.
You should deposit the equivalent of 10 EUR in a currency of your choice and can navigate to the API key section in your account menu. You can generate and revoke keys here in case you leak it, but be careful as there is a penalty for rotating keys too often.
Affiliate API Key
The Affiliate API is primarily meant if you want to consume Cloudbet odds without needing to place bets programatically. You can obtain the Cloudbet Affiliate API Key by logging into your Cloudbet Affiliate account and then visiting the Affiliate API Token page. Please note that there are 2 tokens on this page. Make sure to generate the token in the API Key section.
Using this Cloudbet Affiliate API Key you can then go back to https://www.cloudbet.com/api/ to test the Feed API endpoints.
If you authenticate with the Cloudbet Affiliate API Key, then the Feed API responses may be cached and up to 1 minute behind the latest updates. This is in contrast to using the Cloudbet Trading API Key, which gives you real-time updates.
7.1 - Markets
Terminology
Market Key
The
market_key
is the unique identifier for a market and optionally time period with its own settlement rules.The
submarket_key
is a logical period grouping of the market selections and is primarily useful as an indicator of when the market is settled. It is not required for the definition of aline
as explained below.
Market and Submarket Key Example
"markets": {
"soccer.asian_handicap": {
"submarkets": {
"period=ft": {
"sequence": "4441",
"selections": [
{
...
Outcomes, Grouping Parameters and Lines
The
outcome
identifies a unique selection on the market, e.g.0:0
orhome
.grouping_parameters
include grouping information such as handicap and totals values.If no
grouping_parameters
are present (empty string), omit the query string and format as<market_key>/<outcome>
A
line
is determined by themarket_key
and thegrouping_parameters
, all selections on a line sum up to 100% true probability, e.g.soccer.asian_handicap?handicap=-0.5
includes the home and away outcome.
Outcomes, Grouping Parameters and Lines Example
"selections": [
{
"outcome": "home",
"params": "handicap=-0.75",
"price": 1.98,
"minStake": 0.1,
"maxStake": 13386.98032,
"probability": 0.488,
"status": "SELECTION_ENABLED",
"side": "BACK"
}
...
Market URL
The market url
can be compiled from the feed and takes the form of <market_key>/<outcome>?<grouping_parameters>
. This can be sent in the payload of the /v3/bets/place
endpoint when placing a bet.
Market URL Example
"marketUrl": soccer.total_goals/over?total=3
Split and Variables
This is static information available in our market list below, while it is not provided dynamically on the Cloudbet API. This information is primarily meant for market settlement, but can also be used by you to visually separate markets by using the Cloudbet Feed API, if you use our API to display markets on your website.
Split
: List of periods and teams which affect market settlement.Variables
: List of variables which affect settlement of a specific market. These can also be used to visually separate lines, e.g. the handicap values on an Asian Handicap market.
Split and Variables Example
"soccer.asian_handicap_period_extratime": {
"Name": "Asian Handicap - Extra Time",
"Variables": [
"handicap"
],
"Split": "period=et",
"Outcomes": {
"away": "{{away}} {{-handicap}}",
"home": "{{home}} {{handicap}}"
}
},
A list of markets is available on Github and is also made available below.
If you would like to request addition of new markets, then please create a discussion thread in the Cloudbet Docs Discussions section.
Full List of available markets on the Cloudbet API
7.2 - Examples
There are several steps to fetching odds from the Cloudbet Feed API and using these to place bets afterwards with the Cloudbet Trading API. Here, we will show you how to fetch these odds after creating a Cloudbet Trading or Affiliate API Key.
In general you would follow these steps to get the latest odds:
Get details about upcoming events for your desired sports. The Events or Fixtures endpoint can be used to get a list of upcoming events and competitions for a specific sport on a specific date.
Obtain odds for all events of an upcoming competition that you found from the fixtures endpoint by accessing the competitions endpoint. This allows you to batch ingest odds for multiple events if desired. There is also an event endpoint if you want to get odds for a specific event.
Sports Fixtures
Information about listed events is what we refer to as “fixtures”. We break these down into sports, competitions and events that can be queried from the feed API.
Please substitute X-API-Key
with your actual Cloudbet API key.
List of sports
Get a list of sports. Sports are ordered by alphabetical order.
curl -X "GET" "https://sports-api.cloudbet.com/pub/v2/odds/sports" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>"
-H "Content-Type: application/json"
Sample response:
{
"sports": [
{
"name": "American Football",
"key": "american-football",
"competitionCount": 2,
"eventCount": 92
},
{
"name": "Archery",
"key": "archery",
"competitionCount": 0,
"eventCount": 0
},
.
.
.
{
"name": "Soccer",
"key": "soccer",
"competitionCount": 142,
"eventCount": 1239
}
]
}
Competitions for a given sport
Get active competitions for a sport. Competitions are grouped by categories.
curl -X "GET" "https://sports-api.cloudbet.com/pub/v2/odds/sports" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>"
-H "Content-Type: application/json"
Sample response:
{
"name": "Soccer",
"key": "soccer",
"competitionCount": 141,
"eventCount": 1240,
"categories": [
{
"name": "England",
"key": "england",
"competitions": [
{
"name": "Premier League",
"key": "soccer-england-premier-league",
"eventCount": 29
},
{
"name": "FA Cup",
"key": "soccer-england-fa-cup",
"eventCount": 3
},
.
.
.
]
},
{
"name": "International",
"key": "international",
"competitions": [
{
"name": "UEFA Euro 2024",
"key": "soccer-international-euro-cup",
"eventCount": 146
},
{
"name": "World Cup",
"key": "soccer-international-world-cup",
"eventCount": 1
},
.
.
.
]
]
}
Fixtures for a given competition
- Fetch Match Odds, Asian Handicap and Total Goals markets for EPL
curl -X "GET" "https://sports-api.cloudbet.com/pub/v2/odds/competitions/soccer-england-premier-league?markets=soccer.matchOdds&markets=soccer.asianHandicap&markets=soccer.totalGoals" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>"
-H "Content-Type: application/json"
- Fetch Moneyline, Totals and Run Line markets for MLB:
curl -X "GET" "https://sports-api.cloudbet.com/pub/v2/odds/competitions/baseball-usa-mlb?markets=baseball.moneyline&markets=baseball.totals&markets=baseball.runLine" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>"
-H "Content-Type: application/json"
Sample response for NBA with Moneyline and Handicap markets:
{
"name": "NBA",
"key": "basketball-usa-nba",
"sport": {
"name": "Basketball",
"key": "basketball"
},
"events": [
{
"sequence": "97",
"id": 6473660,
"home": {
"name": "Miami Heat",
"key": "c672-miami-heat",
"abbreviation": "MIA"
},
"away": {
"name": "Los Angeles Lakers",
"key": "c655-los-angeles-lakers",
"abbreviation": "LAL"
},
"players": {
"c4a879-jared-dudley": {
"name": "Jared Dudley",
"team": "AWAY",
"position": {
"name": "F",
"key": "f"
}
},
"c4b25d-andre-drummond": {
"name": "Andre Drummond",
"team": "AWAY",
"position": {
"name": "C",
"key": "c"
}
},
.
.
.
},
"status": "TRADING_LIVE",
"markets": {
"basketball.handicap": {
"submarkets": {
"period=ot&period=ft": {
"sequence": "97",
"selections": [
{
"outcome": "home",
"params": "handicap=-8",
"price": 1.915,
"minStake": 0.0001,
"probability": 0.505,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "away",
"params": "handicap=-8",
"price": 1.95,
"minStake": 0.0001,
"probability": 0.495,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "home",
"params": "handicap=-10",
"price": 2.248,
"minStake": 0.0001,
"probability": 0.427,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "away",
"params": "handicap=-10",
"price": 1.672,
"minStake": 0.0001,
"probability": 0.573,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
.
.
.
]
}
},
"liability": 1262.505
},
"basketball.moneyline": {
"submarkets": {
"period=ot&period=ft": {
"sequence": "97",
"selections": [
{
"outcome": "home",
"params": "",
"price": 1.264,
"minStake": 0.0001,
"probability": 0.76,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "away",
"params": "",
"price": 4.001,
"minStake": 0.0001,
"probability": 0.24,
"status": "SELECTION_ENABLED",
"side": "BACK"
}
]
}
},
"liability": 631.2525
},
},
"name": "Miami Heat V Los Angeles Lakers",
"key": "c672-miami-heat-v-c655-los-angeles-lakers",
"cutoffTime": "2021-04-08T23:30:00Z",
"metadata": {
"opinion": []
},
"startTime": "2021-04-08T23:30:00Z"
},
{
"sequence": "1873",
"id": 5030846,
"home": null,
"away": null,
"players": {
.
.
.
},
"status": "TRADING",
"markets": {
.
.
.
},
"name": "NBA - Awards - Coach Of The Year (reg. season)",
"key": "nba-awards-coach-of-the-year-reg-season",
"cutoffTime": "2021-04-08T23:30:00Z",
"metadata": {
"opinion": []
},
"startTime": "2021-04-08T23:30:00Z"
}
]
}
Query a single event
For a single event, the API provides you all available markets. To delve into details about how our markets are structured, please look at the Cloudbet markets page.
curl -X 'GET' "https://sports-api.cloudbet.com/pub/v2/odds/events/6473660" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>" \
-H "Content-Type: application/json"
Sample response for a single event
{
"sequence": "97",
"id": 6473660,
"sport": {
"name": "Basketball",
"key": "basketball"
},
"competition": {
"name": "NBA",
"key": "basketball-usa-nba",
"category": {
"name": "USA",
"key": "usa"
}
},
"home": {
"name": "Miami Heat",
"key": "c672-miami-heat",
"abbreviation": "MIA"
},
"away": {
"name": "Los Angeles Lakers",
"key": "c655-los-angeles-lakers",
"abbreviation": "LAL"
},
"players": {
"c4a879-jared-dudley": {
"name": "Jared Dudley",
"team": "AWAY",
"position": {
"name": "F",
"key": "f"
}
},
"c4b25d-andre-drummond": {
"name": "Andre Drummond",
"team": "AWAY",
"position": {
"name": "C",
"key": "c"
}
},
"c4b269-kentavious-caldwell-pope": {
"name": "Kentavious Caldwell-Pope",
"team": "AWAY",
"position": {
"name": "G",
"key": "g"
}
},
"c4b58e-ben-mclemore": {
"name": "Ben McLemore",
"team": "AWAY",
"position": {
"name": "G",
"key": "g"
}
},
.
.
.
},
"status": "TRADING",
"markets": {
"basketball.handicap": {
"submarkets": {
"period=ot&period=ft": {
"sequence": "97",
"selections": [
{
"outcome": "home",
"params": "handicap=-8",
"price": 1.915,
"minStake": 0.0001,
"probability": 0.505,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "away",
"params": "handicap=-8",
"price": 1.95,
"minStake": 0.0001,
"probability": 0.495,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "home",
"params": "handicap=-10",
"price": 2.248,
"minStake": 0.0001,
"probability": 0.427,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "away",
"params": "handicap=-10",
"price": 1.672,
"minStake": 0.0001,
"probability": 0.573,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
.
.
.
]
}
},
"liability": 1262.505
},
"basketball.moneyline": {
"submarkets": {
"period=ot&period=ft": {
"sequence": "97",
"selections": [
{
"outcome": "home",
"params": "",
"price": 1.264,
"minStake": 0.0001,
"probability": 0.76,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "away",
"params": "",
"price": 4.001,
"minStake": 0.0001,
"probability": 0.24,
"status": "SELECTION_ENABLED",
"side": "BACK"
}
]
}
},
"liability": 631.2525
},
"basketball.totals": {
"submarkets": {
"period=ot&period=ft": {
"sequence": "97",
"selections": [
{
"outcome": "over",
"params": "total=204.5",
"price": 1.924,
"minStake": 0.0001,
"probability": 0.502,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "under",
"params": "total=204.5",
"price": 1.942,
"minStake": 0.0001,
"probability": 0.498,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "over",
"params": "total=202",
"price": 1.682,
"minStake": 0.0001,
"probability": 0.57,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
{
"outcome": "under",
"params": "total=202",
"price": 2.228,
"minStake": 0.0001,
"probability": 0.43,
"status": "SELECTION_ENABLED",
"side": "BACK"
},
.
.
.
.
]
}
},
"liability": 420.83500000000004
}
},
"name": "Miami Heat V Los Angeles Lakers",
"key": "c672-miami-heat-v-c655-los-angeles-lakers",
"cutoffTime": "2021-04-08T23:30:00Z",
"metadata": {
"opinion": []
},
"startTime": "2021-04-08T23:30:00Z"
}
Account API for Balance Tracking
Query list of available currencies
The first thing for automated betting is knowing about our funds available. Using the endpoint below, you can find out the list of currencies available.
curl -X 'GET' "https://sports-api.cloudbet.com/pub/v1/account/currencies" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>" \
-H "Content-Type: application/json"
Sample response:
{
"currencies": ["BONUS_EUR", "BTC", "ETH", "PLAY_EUR"]
}
Query balance for a currency
This allows you to query your balance in a specific currency. Here we query PLAY_EUR
, our test funds currency that currently can be enabled on your account upon request.
curl -X 'GET' "https://sports-api.cloudbet.com/pub/v1/account/currencies/PLAY_EUR/balance" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>" \
-H "Content-Type: application/json"
Sample response:
{
"amount": "984.69"
}
Trading API to place bets
Once you know which currency you want to place bets in, as well as the markets you want to place your bet on, you can call the place bet endpoint.
Place Bet Request
This is a POST
endpoint where the request body contains details about your desired market and currency. Use a unique, randomly generated uuid in the referenceId
field of your request.
Sample Place Bet request on an Asian Handicap market for a Soccer event:
curl -X 'POST' "https://sports-api.cloudbet.com/pub/v3/bets/place" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>" \
-H "Content-Type: application/json"
-d '{"acceptPriceChange":"BETTER","currency":"PLAY_EUR","eventId":"7190563","marketUrl":"soccer.asian_handicap/home?handicap=0.5","price":"1.65","referenceId":"1891d3a0-0af8-11ec-b536-11ca86b8c5a4","stake":"1.1"}'
Sample success response:
{
"referenceId": "1891d3a0-0af8-11ec-b536-11ca86b8c5a4",
"price": "1.652",
"eventId": "7190563",
"marketUrl": "soccer.asian_handicap/home?handicap=0.5",
"side": "BACK",
"currency": "PLAY_EUR",
"stake": "1.1",
"status": "ACCEPTED",
"error": ""
}
NOTE: Quite often, your bet will not be immediately accepted while we process your betting request. Thus you will receive a PENDING_ACCEPTANCE
response instead:
{
"referenceId": "1891d3a0-0af8-11ec-b536-11ca86b8c5a4",
"price": "1.652",
"eventId": "7190563",
"marketUrl": "soccer.asian_handicap/home?handicap=0.5",
"side": "BACK",
"currency": "PLAY_EUR",
"stake": "1.1",
"status": "PENDING_ACCEPTANCE",
"error": ""
}
Bet Status Request
If you receive a PENDING_ACCEPTANCE
response, you can then check the status of the bet with the referenceId
field from your place bet request to confirm if it got accepted or rejected. This bet status request can also be used generally to query the status of your bets.
curl -X 'POST' "https://sports-api.cloudbet.com/pub/v3/bets/1891d3a0-0af8-11ec-b536-11ca86b8c5a4/status
" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>" \
-H "Content-Type: application/json"
-d '{"acceptPriceChange":"BETTER","currency":"PLAY_EUR","eventId":"7190563","marketUrl":"soccer.asian_handicap/home?handicap=0.5","price":"1.65","referenceId":"1891d3a0-0af8-11ec-b536-11ca86b8c5a4","stake":"1.1"}'
The response for the above bet status request will have a similar format to the bet placement request above.
NOTE: Your bet might get rejected for different reasons, with recommended new stake and price on the rejection payload. Please update your payload with a new referenceId
and try again with updated fields if this happens.
Bet History for settlements
You can obtain a full history of your API bets, in addition to being able to view your settled bets in the Bet History section of the Cloudbet Website.
curl -X 'POST' "https://sports-api.cloudbet.com/pub/v3/bets/history?limit=5&offset=0
" \
-H "accept: application/json" \
-H "X-API-Key: <API Key>" \
-H "Content-Type: application/json"
-d '{"acceptPriceChange":"BETTER","currency":"PLAY_EUR","eventId":"7190563","marketUrl":"soccer.asian_handicap/home?handicap=0.5","price":"1.65","referenceId":"1891d3a0-0af8-11ec-b536-11ca86b8c5a4","stake":"1.1"}'
Sample response:
{
"bets": [
{
"referenceId": "1891d3a0-0af8-11ec-b536-11ca86b8c5a4",
"price": "1.652",
"eventId": "7190563",
"marketUrl": "soccer.asian_handicap/home?handicap=0.5",
"side": "BACK",
"currency": "PLAY_EUR",
"stake": "1.1",
"createTime": "2024-05-29T03:53:02Z",
"status": "ACCEPTED",
"returnAmount": "0.0",
"eventName": "Manchester City v Manchester United",
"sportsKey": "soccer",
"competitionId": "18",
"categoryKey": "usa",
"customerReference": "5b1eb89f-5c87-4bd2-b8e9-82197fd6b986",
"error": ""
}
],
"totalBets": "1"
}
7.3 - Handicap Odds
Special care should be taken when working with all handicap markets.
In the Cloudbet API, the handicap value refers to the home team value and is inverted on the away side.
Example:
market_key: “soccer.asian_handicap”
outcome: "away",
params: "handicap=0.5",
price: 3.3
7.4 - Margin Adjustments in Sports Betting
You can integrate the Cloudbet B2B API and set your own odds based on the data supplied, enabling you to carve out a profitable margin for each transaction. Alongside margins, you can also take control of and share liability from the individual bets that players or customers place through your platform.
Basic Implied Probability Calculation
The implied probability of an outcome is initially calculated from the given odds and the overround. For a specific betting market:
This calculation gives a base probability adjusted for the bookmaker’s initial margin embedded within the odds.
Adjusting the Overround
To reflect changes in market conditions, event specifics, or risk assessments, the overround is adjusted by adding a margin percentage:
This formula ensures that the total market margin is adaptive and adjusts with the origin.
Recalculating Odds with Adjusted Overround
After adjusting the overround, new odds are recalculated as follows:
This method of recalculating the odds maintains the relative value between different outcomes while adjusting the overall margin.
Example Calculation
If the initial odds for a team winning are 2.0 with an overround of 1.05, the implied probability is:
If the margin percentage is adjusted to 1.10, the new odds would be:
These recalculated odds reflect the adjusted margin and provide a new market price for the outcome.
7.5 - Simulated Betting with Test Funds
First, ensure your account balance meets the minimum requirement of 10 EUR equivalent. This can be in any supported currency such as BTC, ETH, USDC, USDT, etc.
Once an API key is generated, a new currency option, PLAY_EUR
, can be found in the account menu. A request button to credit the account with Play EUR 100 will be available. This process is self-serve, allowing users to request more funds when needed.
If you require larger amounts or wish to test the API before funding your account, please contact customer support. This ensures you can fully explore Cloudbet’s offerings and refine your strategies without risk.