Order stream API does not reflect recent unmatched orders

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • misiek
    Junior Member
    • Oct 2018
    • 20

    #1

    Order stream API does not reflect recent unmatched orders

    Hi, here is what I am trying to do.

    1. Start streaming client and subscribe to order stream without any specific filters.
    2. Get a list of eligible markets/selections/handicaps.
    3. For each check if I have order for particular market/selection/handicap combination.
    4. If order is there, ignore such combination.
    5. If order is not there, place order.
    6. If any orders placed, resubscribe order stream.
    6. Go back to step 2.

    Now, what happened is that I am not getting all orders in the order cache, so those not reflected are placed again and again. Interesting that when I restart application, these orders will reflect correctly. I am planning to implement workaround to add new orders to a collection and verify against it before I place order in consequent loops, but I would appreciate some tips, cause it should work in order stream functionality. BTW - I noticed it does not matter if order was matched or not.

    I am using Betfair.ESAClient in C#.
  • bfexplorer
    Senior Member
    • Sep 2018
    • 212

    #2
    ESAClient is wrapper for rest api not streaming one. Have a look at my screenshot showing how streaming api looks like.
    You do not have permission to view this gallery.
    This gallery has 1 photos.

    Comment

    • brittney05
      Junior Member
      • Mar 2025
      • 1

      #3
      It sounds like there might be a caching issue with the order stream. When you restart your app, it refreshes the cache, which is why you see the orders correctly. You might want to implement a mechanism to periodically refresh the order cache or check for updates in real-time. This way, you can ensure that your application has the most recent order data and can prevent duplicate orders.
      2 player games

      Comment

      Working...
      X