I have this result:
{'orderId': 1234567, 'price': '20.5', 'qty': '125', 'status': 'open'}
{'orderId': 7654321, 'price': '15.5', 'qty': '15', 'status': 'open'}
{'orderId': 9876543, 'price': '32.0', 'qty': '102', 'status': 'open'}
I want to assign each orderID to individual variable, so I can do something to each of them.
Above result is gained thru filtering code as follow:
orders = product.get_open_orders(product='sample')
keys = ['orderId', 'price', 'qty', 'status']
res = [{k: d[k] for k in keys} for d in orders]
for status in res:
if status['status'] == 'open':
print(status)