Empty result on get_account_activity(order_id) after cancel order_id

Sometimes account_activity doesn’t returns any information after cancel an order.
Rigth now I need put "time.spleep(0.15) to get account activity after an order canceled.
Why do not return the information of account activity(oder_id) when I cancel an order, in cancel command?


The account activity information comes from a different system that we use for bookkeeping rather than holding live data, therefore it can take a while to propagate. You can get the balance on the accounts endpoint just after calling cancel, if that’s what you’re looking for.

Thanks, João

Hi Joao,
All these steps is for update a bet. For example, I place some bet at 2.5 odds with 10 pounds. Then I need to update it, for 2.6, the remain money, the one that was not matched. I only know the remain value after the cancellation.
So, this strategy is the “update”, that I found, for smarkets.
All other houses have this method.

Well, it’s working, but I need to put some sleep in the middle.
All the best

Interesting. Well, you can also try using immediate_or_cancel orders with a low minimum accepted quantity. This means we wait for the order to be matched in order to send you the response, which will contain total_executed_quantity which will have the executed quantity you are looking for