Open
Description
Hi,
I am able to place order what would be the best way to extract the order id from the response?
Currently the response has the structure
orderId = {'Success': {'NSE': {'message': 'Your AMO has been Placed: 12220207081042.', 'orderId': 12220207081042, 'price': 525, 'quantity': 1, 'tag': 'ALGO1'}}}
I am new to python so I am currently doing
order_Id= orderId ['Success']['NSE']['orderId']
which works but I suppose its not the best way to do...
A better way would have been if placer order sent a response of order_status type
where one could do
if order_status.status == 'Success'
print("Order ID: " order_status.status )
Any suggestions/comments?
TIA
Ashwin
Metadata
Metadata
Assignees
Labels
No labels