Bet Acceptance
UnionRule the swarm applies when the terms of a bet move between the moment the player builds the betslip and the moment the bet reaches the server. It appears as acceptTypeId on createBets and as mode on borrowBet, and decides whether such a bet is placed anyway or handed back to the player to confirm. The SDK maps each name to the numeric code the swarm expects, so pass the string and let the SDK translate it.
Possible values
Every literal this type accepts.
| Value | Description |
|---|---|
'alwaysAsk' | Never accept a changed bet on the player's behalf. Any movement sends the bet back for the player to confirm before it is placed. |
'acceptAnyAmount' | Place the bet whichever way it moved, better or worse, without asking the player again. |
'acceptHigherAmount' | Place the bet automatically only when the change is in the player's favour. A change against them is sent back for confirmation. |
'counterOffer' | Rather than dropping the bet, the swarm answers with the terms it can honour so the player can take them or walk away. |
Notes
The wire format is a numberThe swarm transports acceptance rules as numeric codes, and the SDK converts between the name and the code for you in both directions — pass the string and you never have to touch a number. You will still see the codes in raw swarm payloads and in logs, so here is the full list: alwaysAsk 0, acceptAnyAmount 1, acceptHigherAmount 2 and counterOffer 3. Like odd types these run in sequence with no gaps and follow the order of the table above.
Cashout accepts only three of theseThe mode field on cashout looks the same but is a narrower set: it takes alwaysAsk, acceptAnyAmount and acceptHigherAmount only, and those three carry the same codes 0, 1 and 2 there. Passing counterOffer to cashout fails validation in the SDK before the request is sent, so do not treat the two fields as interchangeable.
Was this page helpful?