betfair/API-NG-sample-code

Empty Result

mcmartins opened this issue · 2 comments

I'm having problems using the betfair api. Inspired by the JSONRPC Python examples, I always get empty results. Are those examples still valid?

Requesting a login using the documentation guides:

  • Calling login, result:
    {u'status': u'SUCCESS', u'token': u'', u'product': u'<app_key>', u'error': u''}

Using the retrieved token from the successful login, within the header:

  • Calling listEventTypes, result:
    {u'jsonrpc': u'2.0', u'result': [], u'id': 1}

Problem is the URL in the curl request is out of date. It should be updated to: https://api.betfair.com/exchange/betting/json-rpc/v1

There are updated versions of the code available here:
https://api.developer.betfair.com/services/webapps/docs/display/1smk3cen4v3lu3yomq5qye0ni/PHP

Hey @joyser, thank you for your help. The problem was related to my account, due to country gambling legislation that took place in Portugal. Nonetheless, the API should have returned a FAIL* status and a proper error message.