Stuck with passing parameters other than MarketFilter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NickB
    Junior Member
    • Mar 2013
    • 17

    #1

    Stuck with passing parameters other than MarketFilter

    Hi

    I have implemented Python code to successfully call most of the API functions and return data. I have all these working when supplying a MarketFilter parameter but I am stuck on other parameters.

    Here's a working example:

    response = requests.post(url='https://beta-api.betfair.com/rest/v1.0/listEventTypes/', data='{"filter":{ }}', headers='snipped because private')

    I have similar code working for most of the API functions but the first one I tried which has a mandatory parameter fails:

    response = requests.post(url='https://beta-api.betfair.com/rest/v1.0/listTimeRanges/', data='{"filter":{ }, "timeGranularity":["HOURS"]}', headers='snipped because private')

    Which returns this error.
    {"detail":{},"faultcode":"Client","faultstring":"D SC-0018"}

    I am guessing a simple syntax error in the way I specified timeGranularity.

    Thanks for any help.
    NickB
  • NickB
    Junior Member
    • Mar 2013
    • 17

    #2
    And the answer is obvious once I've reread the documentation a few times.

    I should use "granularity" not "timeGranularity".

    Comment

    Working...
    X