Can the on_order_update callback return the margin blocked by the order? Will help keep tab on overall margin situation, and also to compute order specific ROI.
If this order/position to margin mapping is available elsewhere also please advise.
On_order update has the same structure as postbacks. https://kite.trade/docs/connect/v3/postbacks/. For margin mapping, after you take or exit a position,call margins(). And check the utilised span and exposure key. Do necessary calculations and put the position and margin blocked in a dictionary. Check the margins structure here: https://kite.trade/docs/connect/v3/user/
https://kite.trade/docs/connect/v3/user/