Hi,
I am developing in Python and get the following error when trying to place a bet: Oops no service available at https://api.betfair.com/exchange/betting/json-rpc/v1
Thats the code
def placeBet(marketId, selectionId):
if( marketId is not None and selectionId is not None):
print 'Calling placeOrder for marketId :' + marketId + ' with selection id :' + str(selectionId)
place_order_Req = '{"marketId":"' + marketId + '","instructions":'\
'[{"selectionId":"' + str(
selectionId) + '","handicap":"0","side":"BACK","orderType":"LIMIT ","limitOrder":{"size":"3","price":"2.18","persist enceType":"LAPSE"}}],"customerRef":"test12121212121"},"id":1'
#endPoint = 'https://api.betfair.com/exchange/betting/rest/v1.0/placeOrders/'
"""
print place_order_Req
"""
place_order_Response(place_order_Req)
#place_order_Response = callAping2(endPoint,place_order_Req)
place_order_load = json.loads(place_order_Response)
print 'Place order status is ' + place_order_load['status']
"""
print 'Place order error status is ' + place_order_load['errorCode']
"""
In my main there is print '## make bet ##'placeBet(soccerMarketID, soccerSID1) where soccerMarketID is my marketid and soccerSID1 is my selection id. Would be great if you can help out
I am developing in Python and get the following error when trying to place a bet: Oops no service available at https://api.betfair.com/exchange/betting/json-rpc/v1
Thats the code
def placeBet(marketId, selectionId):
if( marketId is not None and selectionId is not None):
print 'Calling placeOrder for marketId :' + marketId + ' with selection id :' + str(selectionId)
place_order_Req = '{"marketId":"' + marketId + '","instructions":'\
'[{"selectionId":"' + str(
selectionId) + '","handicap":"0","side":"BACK","orderType":"LIMIT ","limitOrder":{"size":"3","price":"2.18","persist enceType":"LAPSE"}}],"customerRef":"test12121212121"},"id":1'
#endPoint = 'https://api.betfair.com/exchange/betting/rest/v1.0/placeOrders/'
"""
print place_order_Req
"""
place_order_Response(place_order_Req)
#place_order_Response = callAping2(endPoint,place_order_Req)
place_order_load = json.loads(place_order_Response)
print 'Place order status is ' + place_order_load['status']
"""
print 'Place order error status is ' + place_order_load['errorCode']
"""
In my main there is print '## make bet ##'placeBet(soccerMarketID, soccerSID1) where soccerMarketID is my marketid and soccerSID1 is my selection id. Would be great if you can help out


Comment