TOO_MANY_REQUESTS: clarification of limits

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Simon McKenzie
    Junior Member
    • Nov 2012
    • 2

    #1

    TOO_MANY_REQUESTS: clarification of limits

    Hi,

    If I run three parallel listMarketBook requests, and also execute listCurrentOrders at the same time, I sometimes experience a TOO_MANY_REQUESTS error. If I don't do the listCurrentOrders request at the same time, I don't get this error, so I can safely assume that I'm not hitting the request limit during my normal parallel executions of listMarketBook.

    Reading the "Betting Exceptions" page, the description for TOO_MANY_REQUESTS is this:

    There are too many pending requests e.g. a listMarketBook with Order/Match projections is limited to 3 concurrent requests. The error also applies to listCurrentOrders, listMarketProfitAndLoss and listClearedOrders if you have 3 or more requests currently in execution.

    I understand this to mean that I should be able to execute up to three of each of these requests at the same time, but it seems that I can only execute three of any of these requests. Can someone please clarify whether this is correct?

    Cheers,

    Simon
  • BetfairDeveloperProgram
    Administrator
    • Oct 2008
    • 680

    #2
    Hi Simon,

    The below advice will hopefully help you to avoid this issue going forward and explains the service behaviour in more detail:
    • The rate limiting applies to a logged in account ID, not a session.
    • Your account will only get rate limited for its listMarketBook calls if you ask for an OrderProjection or a MatchProjection.
    • That conditional listMarketBook rate limiting applies alongside two other operations: listCurrentOrders and listMarketProfitAndLoss, with all 3 operations contending with each other in the worst case.
    • listClearedOrders has a separate rate limiting mechanism and won’t contend with any other operation
    The service checks for 3 queued requests that are ready for processing; you would only expect requests to be queued when the system is experiencing high load. Also if your request is being processed, it does not count against the rate limiting 3 queued requests.

    Kind Regards

    Neil

    Comment

    Working...
    X