'Get Futures order status, qty, side Binance

I'm trying to get the status of order, quantity, and side; however, I get following error:

list indices must be integers or slices, not str

Data:

[{'orderId': 123xxx, 'symbol': 'BTCUSDT', 'status': 'NEW', 'clientOrderId': 'xxx', 'price': '32000', 'avgPrice': '0', 'origQty': '0.001', 'executedQty': '0', 'cumQuote': '0', 'timeInForce': 'GTC', 'type': 'LIMIT', 'reduceOnly': False, 'closePosition': False, 'side': 'BUY', 'positionSide': 'BOTH', 'stopPrice': '0', 'workingType': 'CONTRACT_PRICE', 'priceProtect': False, 'origType': 'LIMIT', 'time': xxx, 'updateTime': xxx}, {'orderId': 123xxx, 'symbol': 'BTCUSDT', 'status': 'NEW', 'clientOrderId': 'xxx', 'price': '32000', 'avgPrice': '0', 'origQty': '0.001', 'executedQty': '0', 'cumQuote': '0', 'timeInForce': 'GTC', 'type': 'LIMIT', 'reduceOnly': False, 'closePosition': False, 'side': 'BUY', 'positionSide': 'BOTH', 'stopPrice': '0', 'workingType': 'CONTRACT_PRICE', 'priceProtect': False, 'origType': 'LIMIT', 'time': xxx, 'updateTime': xxx}]

Code:

get_open_order = client.futures_get_open_orders(symbol=config.SYMBOL, orderID=123xxx)

get_status = get_open_order['status']
get_qty = get_open_order['origQty']
get_side = get_open_order['side']

print(f"STATUS: {get_status} | QUANTITY: {get_qty} | SIDE: {get_side}")

What's the mistake here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source