margin requirement to place basket order

I tried to place a basket order for iron fly, order failed due to margin shortfall. Though, this order was for testing purpose, I am curious to know, at what stage the margin benefit of hedging provided, during order placement or after trade is executed? shouldn't it be given during order placement phase for basket orders?

order response:

{'code': 200, 'message': '', 'data': [{'statusCode': 200, 'body': {'code': 1101, 'message': 'Successfully placed order', 's': 'ok', 'id': '23091500351890'}, 'statusDescription': 'OK'}, {'statusCode': 200, 'body': {'code': 1101, 'message': 'Successfully placed order', 's': 'ok', 'id': '23091500351893'}, 'statusDescription': 'OK'}, {'statusCode': 200, 'body': {'code': -99, 'message': 'RED:Margin Shortfall:INR 1,36,595.02 Available:INR 54,060.96 for C-[FYERS_RISK_CUG]', 's': 'error', 'id': '23091500351892'}, 'statusDescription': 'OK'}, {'statusCode': 200, 'body': {'code': -99, 'message': 'RED:Margin Shortfall:INR 1,50,093.34 Available:INR 54,060.96 for C- [FYERS_RISK_CUG]', 's': 'error', 'id': '23091500351891'}, 'statusDescription': 'OK'}], 's': 'ok'}

1 reply