I have a dataframe:
selectionId size Indicator
21734643 32.75 BACK
21339485 14.65 BACK
22453168 40.00 BACK
23682824 81.55 BACK
21416382 71.71 BACK
23682827 67.07 BACK
23682829 45.91 LAY
23682831 35.53 LAY
23682825 44.95 LAY
23682830 43.31 LAY
23682828 43.14 LAY
22568854 42.09 LAY
23682826 13.33 LAY
I pass the column in the dataframe to place bets at BSP price as follows:
size = df['size'].astype(str)
selectionId = df['selectionId'].astype(str)
BACKLAY = df['Indicator'].astype(str)
for i, j, z in zip(size, selectionId, BACKLAY):
ref = ''.join(random.choice('0123456789ABCDEF') for i in range(6))
string = '{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/placeOrders", "params": {"marketId":"' + marketId + '","instructions":[{"selectionId":"' + j + '","handicap":"0","side":"'+ z + '","orderType":"MARKET_ON_CLOSE","limitOrder":{ "si ze":"' + i + '","price":"1.1","persistenceType":"LAPSE"}}],"customerRef":"' + ref + '"},"id": 1}' test_list.append(string) for request in test_list: place_order_Response = callAping(request) place_order_load = json.loads(place_order_Response) print(place_order_load)
I get the following error:
{'jsonrpc': '2.0', 'result': {'customerRef': 'E04F14', 'status': 'FAILURE', 'errorCode': 'BET_ACTION_ERROR', 'marketId': '1.157315536', 'instructionReports': [{'status': 'FAILURE', 'errorCode': 'INVALID_BET_SIZE', 'instruction': {'selectionId': 21734643, 'handicap': 0.0, 'marketOnCloseOrder': {}, 'orderType': 'MARKET_ON_CLOSE', 'side': 'BACK'}}]}, 'id': 1}
My bet size is greater than 2 so I am not sure why I get this error. I have been able to place back bets with "orderType":"LIMIT" and "side":"BACK" successful. So I am not sure why my lay bet at BSP price is not working.
selectionId size Indicator
21734643 32.75 BACK
21339485 14.65 BACK
22453168 40.00 BACK
23682824 81.55 BACK
21416382 71.71 BACK
23682827 67.07 BACK
23682829 45.91 LAY
23682831 35.53 LAY
23682825 44.95 LAY
23682830 43.31 LAY
23682828 43.14 LAY
22568854 42.09 LAY
23682826 13.33 LAY
I pass the column in the dataframe to place bets at BSP price as follows:
size = df['size'].astype(str)
selectionId = df['selectionId'].astype(str)
BACKLAY = df['Indicator'].astype(str)
for i, j, z in zip(size, selectionId, BACKLAY):
ref = ''.join(random.choice('0123456789ABCDEF') for i in range(6))
string = '{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/placeOrders", "params": {"marketId":"' + marketId + '","instructions":[{"selectionId":"' + j + '","handicap":"0","side":"'+ z + '","orderType":"MARKET_ON_CLOSE","limitOrder":{ "si ze":"' + i + '","price":"1.1","persistenceType":"LAPSE"}}],"customerRef":"' + ref + '"},"id": 1}' test_list.append(string) for request in test_list: place_order_Response = callAping(request) place_order_load = json.loads(place_order_Response) print(place_order_load)
I get the following error:
{'jsonrpc': '2.0', 'result': {'customerRef': 'E04F14', 'status': 'FAILURE', 'errorCode': 'BET_ACTION_ERROR', 'marketId': '1.157315536', 'instructionReports': [{'status': 'FAILURE', 'errorCode': 'INVALID_BET_SIZE', 'instruction': {'selectionId': 21734643, 'handicap': 0.0, 'marketOnCloseOrder': {}, 'orderType': 'MARKET_ON_CLOSE', 'side': 'BACK'}}]}, 'id': 1}
My bet size is greater than 2 so I am not sure why I get this error. I have been able to place back bets with "orderType":"LIMIT" and "side":"BACK" successful. So I am not sure why my lay bet at BSP price is not working.


Comment