# 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.&#x20;

{% 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 %}


---

# 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/optional-features/betbuilder-integration/price-calculation.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.
