Hello. Can anyone explain what's wrong with the bet size of €4.3? I always get INVALID_BET_SIZE error when trying to place such bet. Thanks
Invalid_bet_size €4.3
Collapse
X
-
Here's the output example.
Code:Array ( [status] => FAILURE [errorCode] => BET_ACTION_ERROR [marketId] => 1.168523860 [instructionReports] => Array ( [0] => Array ( [status] => FAILURE [errorCode] => INVALID_BET_SIZE [instruction] => Array ( [selectionId] => 47973 [limitOrder] => Array ( [size] => 4.3 [price] => 2 [persistenceType] => PERSIST ) [orderType] => LIMIT [side] => BACK ) ) ) )
-
In the documentation it says "bet size is invalid for your currency or your regulator". I gather there are some restrictions based on where people are.
A tip on IDs for you - I would enclose all IDs and similar in quotation marks. There may be a danger that if a market id (for instance) has a value of
1.168523860 and is stored on the Betfair system as a number, the final zero might be lost. I recall someone having such a problem several years ago.
Comment
-
I am from Australia and we have the same issue. I have a function which I call which rounds my bet price to the closest valid betfair price to avoid this error.
Public Function ReturnValidBetFairPrice(dInput As Decimal) As Decimal
Select Case dInput
Case 1.0 To 2.0
Return RoundToValue(dInput, 0.01)
Case 2.0 To 3.0
Return RoundToValue(dInput, 0.02)
Case 3.0 To 4.0
Return RoundToValue(dInput, 0.05)
Case 4.0 To 6.0
Return RoundToValue(dInput, 0.1)
Case 6.0 To 10
Return RoundToValue(dInput, 0.2)
Case 10 To 20
Return RoundToValue(dInput, 0.5)
Case 20 To 30
Return RoundToValue(dInput, 1)
Case 30 To 50
Return RoundToValue(dInput, 2)
Case 50 To 100
Return RoundToValue(dInput, 5)
Case 100 To 1000
Return RoundToValue(dInput, 10)
Case Else
Return -1
End Select
End Function
Comment


Comment