How to get the number of sales sold in a day

So based on this, it doesn’t look like you’re filtering by a particular status, so this is touching on my earlier point: with this query, you’ll get all orders regardless of status (OPEN, CANCELED, COMPLETED). OPEN and especially CANCELED may not have payments associated with them, so you wouldn’t want to consider those in gross sales, since you didn’t actually sell anything.

You probably want to look for:

  1. COMPLETED orders are for sure paid for, so go ahead and add them up
  2. OPEN orders may be paid for (depending on if you have fulfillments and how you’re updating them). So, you probably want to check for tenders within the order object and see if there’s a payment.
  3. CANCELED should be ignored since no payment occurred.
  4. You would also (in the future) want to check for if it’s a refund, and handle that accordingly

Let me know if that still doesn’t help though