Get Order details
-
Hi, can anyone post the code to get order details in python?
Thanks in advance -
@James-Bond Thanks a lot for sharing, have a great day :)
-
@kiran1808
Also, following methods will help youObj.position Obj.tradebook
fetches order details. Depending on your use, you can choose any of them.
-
@kiran1808
Following fragment of code fetches details about particular order.OrderBook = Obj.orderBook()['data'] for i in OrderBook: if i['orderid'] == 'your_order_id': print(i['averageprice'], i['updatetime'])
If you want to fetch complete order book, just remove if condition.
-
@kiran1808
You mean complete order book or talking about details of particular order ? -
when you send orders it will give you an order id. You can fetch order book and match the order id. Have a look here