Error in Get Order endpoint response

The get order endpoint sometimes returns a response with the correct order_id, but instead of returning the correct values it returns 0.0 for price, size, fees, value, etc. I’ve had to add a retry condition to my code to get around this:

for i in range(10):
    data = get_order(order_id)
    price = float(data['order']['average_filled_price'])
    if price > 0:

Just letting you know.

Hi @Mike1 Thank you for sharing this with us. If possible can you please share a screenshot of the response that is being returned. We will look into it and reach out to you with an update as soon as possible. Please keep in touch.

Thanks for responding @Loop_11. While recreating an order to get a screen shot I realized that I’m mistaken, it’s not an error. The response I’m getting with 0.0 values are “status”: “OPEN”. They just haven’t been entirely filled yet. My fault, sorry, thanks.

1 Like

Hey @Mike1! No worries, keep sharing your feedback!

For reference:

for i in range(n):
    data = get_order( order_id)
    status = data['order']['status']
    settled = data['order']['settled']
    if status == 'FILLED' and settled == True:

Wait until the order is settled.