0

On the Coinbase Pro Docs for how to delete all open orders it says you can simply make a DELETE request to the /orders endpoint (obviously taking into account the signatures necessary to access the private endpoints). However, when I do this it only deletes 20 open orders at a time. If I wish to delete more than 20 orders I need to make repeated calls to the endpoint checking each time to see if anything was deleted.

Is there a way to delete ALL open orders? And if the order deletion is going to the paginated, why is it defaulting to pages of 20 when the pagination section of the docs says that default is 100 entries per request?

Nick Chapman
  • 4,402
  • 1
  • 27
  • 41
  • From the docs: `Coinbase Pro uses cursor pagination for all REST requests which return arrays. ` It looks like you can either delete in a loop, as you have described, or do a get /orders followed by a delete. However, I see no reason to do the latter. Honestly, the API is bad and should feel bad. – AnilRedshift Jul 10 '18 at 03:27
  • @AnilRedshift I know that it uses pagination, my question is why is it using a size of 20 when the docs explicitly say that the default page size is 100? – Nick Chapman Jul 10 '18 at 03:30
  • /shrug You can try passing in a `limit` field as a POST parameter and seeing what happens. `curl -d "limit=1000&" -X DELETE http://blahblah...` – AnilRedshift Jul 10 '18 at 03:32

0 Answers0