> For the complete documentation index, see [llms.txt](https://docs.odds88.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.odds88.io/integration-process/recommended-integration-flow/optional-features/betbuilder-integration/price-calculation.md).

# Price Calculation

In order to calculate and display the resulting odds of selections made by the player, you need to call the BetBuilder price API endpoint with the specified parameters. You will be required to call this endpoint each time a player makes changes to their BetBuilder selections, you can find the endpoint in the Bets API section.

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

* `requestId` - unique key for request
* `eventId` - ID of selected event
* `bets` - List of markets and selections the player made

```javascript
{
  "requestId": "string",
  "segmentId": 1,
  "eventId": 1,
  "bets": [
    {
      "marketId": 0,
      "selectionId": 0
    },
    {
      "marketId": 1,
      "selectionId": 1
    }
  ]
}
```

In response, you will receive an answer with `requestId` and `price`:

```javascript
{
  "requestId": "string",
  "price": 0,
  "timeStamp": "2024-05-28T10:57:37.8963945+00:00",
  "rejectInfo": null
}
```

In case of request rejection, `rejectInfo` property will contain rejection information. Possible rejection reasons can be checked via the corresponding dictionary endpoint.

{% content-ref url="/pages/0BwLugNGCPLWrFx90Siq" %}
[Dictionary API](/odds88-client-api/odds88-api-endpoints/dictionary-api.md)
{% endcontent-ref %}
