Exit all open orders in one request

krokhale
krokhale edited July 2019 in API clients
- The API at the moment supports exiting one order at a time.
- This limits the exits per second down to the requests limit in the API.
- Suppose one has 100 orders open, it would take almost a minute to exit all the orders. Which is an opportunity lost. Though i usually don't have over 300 open orders at any moment, there might be people here who do. So cancelling 300-500 orders would take 3-5 minutes! It would be faster to do it on the dashboard!
- Rather than pass in a single order id, it would be great to pass in an array of order id's.
- Is this already supported and not documented? Or am i missing something?

  • krokhale
    For anyone interested, to get around this, the fastest way i found is to sort the orders with the maximum quantity to be exited the first.
    That offers the most effective exit based on the current API, feel free to suggest something cleverer!
  • sujith
    @krokhale,
    We don't have a bulk order placement API. You need to loop through the list and place order.
  • krokhale
    krokhale edited July 2019
    @sujith i guess you mean loop and cancel order. Thanks though!
Sign In or Register to comment.