Feb-04-2018, 11:49 AM
Hi. I give up, i just can't make this work.
If i type:
order_status_info = client.get_my_trades(symbol='LTCUSDT',limit=1)
print order_status_info
I get:
[{u'orderId': 6261652, u'isBuyer': False, u'price': u'153.99000000', u'isMaker': False, u'qty': u'0.33400000', u'commission': u'0.05143266', u'time': 1517695072404, u'commissionAsset': u'USDT', u'id': 1327699, u'isBestMatch': True}]
I need just the price so i type:
print order_status_info['price']
and it doesn't work: TypeError: list indices must be integers, not str
What am i doing wrong? Thanks
If i type:
order_status_info = client.get_my_trades(symbol='LTCUSDT',limit=1)
print order_status_info
I get:
[{u'orderId': 6261652, u'isBuyer': False, u'price': u'153.99000000', u'isMaker': False, u'qty': u'0.33400000', u'commission': u'0.05143266', u'time': 1517695072404, u'commissionAsset': u'USDT', u'id': 1327699, u'isBestMatch': True}]
I need just the price so i type:
print order_status_info['price']
and it doesn't work: TypeError: list indices must be integers, not str
What am i doing wrong? Thanks