Announcement

Collapse
No announcement yet.

listClearedOrders

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • listClearedOrders

    Hi,

    I'm using listClearedOrders to calculate the accurate P&L result of orders placed on a horse racing event by my bot.
    I have started testing this today and noticed that there is always a delay between the market closing and when the orders appear on the ClearedOrders returned list. This seems to vary from 2 minutes up to more than 10 minutes. Bets placed by my bot on the next race can be affected by the result of the bets on the previous race, so it is important that I know the accurate result as soon as a race is closed. I would expect that when a market is closed then that implies that all orders have been settled and therefore they should appear on the cleared orders list? I don't understand the behaviour I am observing with listClearedOrders.

    I could use the last known situation from the last MarketBook returned but this might not always be accurate if the last MarketBook is not the most up to date.

    Will the delay in listClearedOrders always be present or is this something that is expected to be resolved?

    Thanks
    Kevin

  • #2
    I also would like to see this question answered. Its really annoying this delay since you can see those bets as settled already using the Betfair site but you have no way of getting that information using the API!

    Comment


    • #3
      I've never actually used it so I don't know if it will work, but in the return for listMarketBook each runner has a status field which can be ACTIVE, REMOVED, WINNER, LOSER, etc. Presumably this will be adjusted when the market closes and before any settled bet shows up in cleared orders, and you will be able to act accordingly. Worth a try until cleared orders is sorted out!

      Alternatively, once you know that a market is closed you could check your balance to see if you have been paid out as a winner or not - the exposure field will tell you the difference between a lost bet or one that is just not settled yet.
      Last edited by Trickie13; 09-06-2014, 08:23 PM.

      Comment


      • #4
        Will the delay in listClearedOrders always be present or is this something that is expected to be resolved
        We have made a couple of improvement to the performance of listClearedOrders during May. However, we are aware that there is still some latency when a large number of markets are settled at once.

        Further work will be carried out to listClearedOrders as soon as possible after the World Cup at which point the current reporting delays should no longer exist.

        Thanks

        Neil

        Comment


        • #5
          Why not focus on fixing it as soon as possible? bubble shooter

          Comment

          Working...
          X