Questions about the orders api query

I want to get an order after 2019-05-02T00:00:00 08:00, but only created_at_max is effective, created_at_min is a failure, it gets the latest 50 orders, but at 2019-05-02T00: 00:00 After 08:00, the order is far more than 50, which proves that the created_at_min parameter does not take effect, or my parameters are wrong, ask for guidance.

I have had a similar issue with updated_at_min.

It seems to be related to how the default sort works. For example setting since_id=0 seems to return the expected results.

1 Like

You are forgetting that when you ask for orders, there is a little bit of setup for you to do. created_art_min works fine as a starting point for getting records, giving you as many as you want from then, till now.

First off, there can be one or more records. You should ask for a count first. So you know what to do with the number available. If there are more than 50 records, you know you must ask for more than 50 if you want to see all of them. So you can ask for up to 250 with one call. If the count you asked for is more than 250, you have to ask for page 2. In other words, you can page through your records, and get them all. If your count was 1000 records created_at_min since the start of may, you’d have 4 pages of 250 records to process.

Paging through records, or using cursors in the GraphQL option, is pretty basic and standard stuff. So you have to use those parameters if you expect success and to download all your orders of interest based on the criteria you are using.

The since_id parameter will get all orders after the id. Maybe my problem is not described clearly, because my program can’t support large data processing for a while, so I want to use the created_at_min batch to synchronize the command to my system. For example, I need to get 1-100 data, get 1 first. -50 times to get 50 times of created_time, and use created_at_min to get the next 50-100 pieces of data

The since_id parameter will get all orders after the id. Maybe my problem is not described clearly, because my program can’t support large data processing for a while, so I want to use the created_at_min batch to synchronize the command to my system. For example, I need to get 1-100 data, get 1 first. -50 times to get 50 times of created_time, and use created_at_min to get the next 50-100 pieces of data

Thank you RehashWayne, your advice is very good, I am sorry to say my own statement without first trying to practice your suggestion. Please forgive my ignorance