# Bet Placement

* Create a player database. Every player should have UUID **at least** 18 characters matching this regex `^[0-9A-Za-z#_-]*` and **not** more than 36 characters in length.
* On bet placement, it is required to specify the following parameters:
  * **`id` -** Unique identifier of bet
  * **`playerId`** - unique Id of player. Should be the same for all currencies the player uses. Generated on your side.
  * **`deviceId`** - user agent of player
  * **`ip`** - user IPv4 or IPv6 address
  * **`languageId`** - ISO 639-1 language code
  * **`segmentId`** - unique Id of a segment assigned to you where to send bets
  * **`amount`** - includes information about stake amount and currency
    * **`currency`** - code of currency
    * **`value`** - stake amount. Integer value
    * **`precision`** - precision of used currency
  * **`items`** - list of selections made, where each selection holds the following fields:
    * **`eventId`** - event player made selection from
    * **`marketId`** - ID of market from above mentioned event
    * **`selectionId`** - ID of selection from above mentioned market
    * **`racingSelection`** - Only for fixed exotics
    * **`price`** - odds of selection
* Check if it is possible to send bet placement requests
* After the player presses the button that initiates the bet placement process, stake amount is subtracted from the players’ balance or balance is locked to prevent changes and potential simultaneous access, which can lead to unneeded cancellation cases because of insufficient funds in players wallet.
* On bet placement response performs a check that compares returned values with those in your DB. In case data is different, cancel requests should be sent. **Price can be different**, if the priceChange option was sent and should be updated in DB to one in response.
* Currency data is returned from CurrencyExchange endpoints. All currencies have precision, which shows how many digits correspond to decimal positions. Placing **101000** bet in **USD** with precision **4** means stake amount 101000 / 10^4 = 10 Dollars and 10 cents

{% content-ref url="/pages/2l7cTFxJAk5U4UAqv2Er" %}
[Bets API](/odds88-client-api/odds88-api-endpoints/bets-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/tAABok4kCnqCthSR0G3S" %}
[Currency Exchange API](/odds88-client-api/odds88-api-endpoints/currency-exchange-api.md)
{% endcontent-ref %}

#### **SP market**

SP (Starting Price) market is a market which has no price on time of bet placement. Such bets can be placed during the prematch phase of the event only.

{% content-ref url="/pages/WxCA3MuMh7J8iF7aZiSe" %}
[Starting Price Integration](/integration-process/recommended-integration-flow/optional-features/starting-price-integration.md)
{% endcontent-ref %}

#### Free bets

We also support 'free bets' in our bet placement requests. The value "FreeBetType" can have values 0 (standard bet) or 1 (free bet). This indicates whether the bet has a real value or not. All incoming bets that do not have this value specified are considered as 'real' bets.&#x20;

#### **Bet placement flow**

1. After the bet placement process is initiated by the player, bet placement is requested. Stake amount is subtracted from players balance or locked until bet is placed or rejected.
2. Bet is processed by Odds88 through an internal processor which checks if markets and events are available.\ <i class="fa-arrow-right-long">:arrow-right-long:</i>  If not, then the bet gets rejected and you receive a rejection reason.
3. Price and odds values get returned and are aligned with your database.\ <i class="fa-arrow-right-long">:arrow-right-long:</i>  If values do not align, then a cancellation request is sent and the bet placement process is finished.

{% hint style="warning" %}
Price may be different in response, if **priceChange** is set to 1 or 2.
{% endhint %}

4. Bet is processed within acceptable delay depending on pre-match or live bet. For pre-match bet acceptable delay is up to maximum 5 seconds and for live bet acceptable delay is corresponding LTD (Live time delay) for event (maximum LTD 14 seconds) + 20 seconds.\ <i class="fa-arrow-right-long">:arrow-right-long:</i>  If the bet does not get processed within the corresponding delay, then the bet gets rejected.
5. The bet is accepted by you and the bet placement process is finished. If the bet is not accepted by you, then a cancellation request is sent. If you receive a cancellation response with the code 200, then the bet placement process is finished and the respective bet is cancelled.

## Bet placement flow graph

<figure><picture><source srcset="/files/MJintmgEeCLkZnLDQApR" media="(prefers-color-scheme: dark)"><img src="/files/kK9tlaOHEGmJqqk6lV58" alt=""></picture><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.odds88.io/integration-process/recommended-integration-flow/bet-placement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
