Unexpected delay for multiple placeOrders

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • heja
    Junior Member
    • Nov 2012
    • 20

    #1

    Unexpected delay for multiple placeOrders

    I am playing a cross-market betting strategy for which I often need to place bets on 3-4 markets simultaneously. I noticed that when I place bets on more than 2 markets, the third (and fourth) orders are processed only after 8 sec delay in addition to the normal 8 sec in-play delay. For instance, if I send 4 in-play placeOrder requests at 17:00:00 within 400 ms, the first 2 are accepted at 17:00:08 (placedDate: 17:00:00), but the next 2 are accepted at 17:00:16 (placedDate: 17:00:08).

    Is this the intentional behaviour of the API or did I implement something incorrectly?

    By the way, is there a chance for the introduction of a multi-market placeOrder request, so we can place bets on multiple markets in a single call?
  • jptrader
    Junior Member
    • Nov 2009
    • 82

    #2
    Are you using .NET? If so, the connections to the server are limited to 2 concurrent http connections, the rest are queued. If this is the case, you should add something like the code below to your config to increase the number of simultaneous connections.

    <connectionManagement>
    <add address="*" maxconnection="20"/>
    </connectionManagement>

    I give my vote to your request of a multi-market placeOrder, that would be useful.

    Comment

    • Contrarian2
      Junior Member
      • Jun 2012
      • 9

      #3
      Yes, I've had exactly the same issue too. Spent ages thinking I must have done something wrong with the my threading.

      jptrader,

      Sorry for my ignorance, but where exactly do I put this:
      <connectionManagement>
      <add address="*" maxconnection="20"/>
      </connectionManagement>

      (I'm using .Net)

      Thanks.

      Comment

      • Contrarian2
        Junior Member
        • Jun 2012
        • 9

        #4
        Ah, actually, I think I've got it.

        Can use the ServicePointManager class to set the number of concurrent connections.

        Comment

        • heja
          Junior Member
          • Nov 2012
          • 20

          #5
          jptrader,

          thank you for the solution, that was exactly the problem.

          Comment

          • heja
            Junior Member
            • Nov 2012
            • 20

            #6
            You can set the number of concurrent connection through the ServicePointManager class or add the following to your app.config file:

            <system.net>
            <connectionManagement>
            <add address = "*" maxconnection = "30" />
            </connectionManagement>
            </system.net>

            Comment

            Working...
            X