Bet placement process

DESCRIPTION OF THE BET PLACEMENT PROCESS


1.Placement process

Processing a bet begins from the moment the player forms a request to accept a bet. After that:

  • 1. The system checks the request format

  • 2. The system creates a new “bet” entity

  • 3. The system checks the availability of bet elements for trading (event/market/outcome exists, betting is allowed, etc.)

  • 4. The system checks the rate against risk management criteria

  • 5. If a bet delay was used for the bet - the system re-checks the availability of elements for trading, compliance with the risk management criteria after the delay has passed

  • 6. The system sends a request to withdraw funds from the player's account

  • 7. If during the check of the rate an error occurred in the check of the rate - the system sends a message about the reasons for rejecting the rate


2. Bet types

We support 3 main bet types:

  • Single bet

  • Multiply bet

    • Max outcomes count - 100

    • Max odd can be adjusted individually. Default value - 2000

  • Combo bet

    • All types of combination between 2 from 3 and 11 from 12


3. Bet process errors

Error name

Description

None / Unknown

Unknown error

Success

Success bet

ExceedingLimit

An error occurs when bet sum > max bet sum (after risk management calculations)

NotExpress


InvalidStatus

An error occurs when one of the conditions is met:

  1. Overask for InPlay bet;

  2. LineItem for some reason didn't have valid game status.

VerificationError

Error during bet verification

SameEventOrOutright

An error occurs when a bet has depended outcomes from one or different events

PlaceBetFailed

An error occurs if invalid data is received from the wallet or if there is no response from the wallet.

RollbackFailed

An error occurs when the result response for Rollback is not sent to Kafka

NoRate

The error occurs when there is no data on exchange rates

CoefficientChanged

An error occurs if during validation coefficient has been changed and player did not agree with the policy for changing the coefficient

MaximumAmountExceeded

The error occurs when a user who has disabled acceptance of Overask bets places a bet greater than the maximum allowed

ExpressOutcomesLowerLimit

An error occurs when a user places an multiply bet, in which the number of outcomes is less than the minimum allowed for the line

OrdinarBetsOnly

The error occurs when a user places a Multiply/Combo bet on a selection for which only Single bets are allowed

BetPlacementStopped

The error occurs when the event is removed from trading 

TooManyBetsForEvent

The error occurs when the user has reached the limit on the number of bets per event

TechnicalTimeOut

An error occurs if the system does not respond for 2 minutes after requesting the bet placement

SelectionExpired

An error occurs when outcome is not available for trading (closed or expired)

ExpressOutcomesUpperBound

An error occurs when placing a Multiply bet, in which the number of outcomes more than 100

InvalidBetItem

An error occurs when in a bid request:

  • betItem.Selection is empty;

  • betItem.Selection is not parsed;

  • LineItemId empty;

  • EventId empty;

  • odds < 1;

InvalidOrdinarBetItemCount

An error occurs when there is more than 1 outcome in the single bet type

InvalidSystemItemCount

An error occurs when placing a bet of the Combo bet type, when the minimum number of elements in the bet is less than 3, and the maximum is more than 12

NoBetExternalKeys

Error occurs when ExternalKeys is null or empty in a request

LineItemDublicated

Error occurs when several elements in the rate have the same LineItem

InvalidBetSum

The error occurs when the user places a bet and specifies three decimal places

TooLongBetProcessing

An error occurs if for more than 2 minutes service has not confirmed the acceptance of the bet (the bet was not accepted)

TradingFeedUnAvailable

An error occurs if the Player places a bet on a line for which there is no updated information

LineItemsDependent

The error occurs when the user adds related outcomes to the bet. Outcomes from one or different events can be interconnected

TooManyMaxBetsPerEvent

The error occurs when the user has reached the limit on the number of bets for the maximum amount

BetSumOverOverask

An error occurs when a user places a bet on an amount that is more than the maximum allowed and more than the minimum Overask amount (100 USD)

BetSumLessOverask

An error occurs when a user places a bet for an amount that is less than the minimum Overask amount (100 USD), but more than the maximum allowed

DiffBetweenMaxBetBetSumLessOveraskSum

An error occurs when a user places a bet on an amount that is greater than the maximum allowed and the difference between BetSum and maxBetAmount is less than the minimum amount for Overask (100 USD)

OveraskDisallowedByTime

An error occurs if the Player places an Overask bet on the outcome of a Prematch event, before the start time (StartTime) of which is 5 minutes or less

OveraskDisallowedByPlayer

An error occurs if an Overask bet is placed by a user who does not have the right to place an Overask bet

OveraskDisallowedByEvent

An error occurs when a user places an Overask bet on an event for which Overask betting is prohibited

BetWasAlreadySettled

Ошибка возникает в том случае когда пользователь  редактирует ставку(Openbet) которая уже рассчитана.

LimitIsExceededDuringTheAddingItems

An error occurs when the user adds selections to the bet that do not pass the bet limits

TooManyFreeBetsPerEvent

The maximum number of freebets on this event has been exceeded

InvalidFreeBetEventStage

An error occurs when a user places a bet on a stage (In play or Prematch), which is prohibited by the terms of the freebet

InvalidFreeBetBetType

An error occurs when a user places a bet, but the bet type does not match the freebet conditions

InvalidFreeBetSportType

An error occurs when a user places a bet on a sport that does not meet the conditions of the freebet

BetPlacementStoppedByAntiFraud

The error occurs when the bet is rejected by the antifraud operator

BetAlreadyProcessed

The error occurs when there has already been a bet with the same transactionId for the last 2 minutes

InvalidLineItem

An error occurs when the outcome has a non-actual status (all statuses except Open and Resulted)

MarketParameterChanged

An error occurs when the market parameter has changed, but the user has not agreed to changes in the market parameter

OverallBetPlacementStopped

An error occurs in case of stop accepting bets for all users


4. Allocation of the bet amount to bet items

Bet type

Allocation rule

Single bet

Item amount = bet amount

Multiply bet

  1. For all items count “Odd - 1” value

  2. Count WeightSum = Sum of all “Odd - 1” for this bet

  3. Item amount = ItemOdd-1/WeightSum * BetSum

Combo bet

  1. Count betAmount for each multiply bet from which it consists combobet

  2. Count betAmount for all items in all multiply bets

  3. Item amounti for combobet = Sum of all ItemAmounti in multiply bet from which it consists combobet