How can I get real-time from Binance’s ‘transactTime’?
For example, let’s say I executed an buy order like this:
buy_limit = client.create_order(symbol='ETHUSDT', side='BUY', type='MARKET', quantity=0.0032)
and print(buy_limit) is following:
{'symbol': 'ETHUSDT', 'orderId': 7391031015, 'orderListId': -1, 'clientOrderId': 'xNCb0pAlXJELjmBWCuxpD0', 'transactTime': 1641965637373, 'price': '0.00000000', 'origQty': '0.00320000', 'executedQty': '0.00320000', 'cummulativeQuoteQty': '10.32073600', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'BUY', 'fills': [{'price': '3225.23000000', 'qty': '0.00320000', 'commission': '0.00000320', 'commissionAsset': 'ETH', 'tradeId': 728617066}]}
at here how can I convert transactTime: 1641965637373
to real-time?
Assuming Binance using epoch time, I tried following, but it shows wrong time
seconds = 1641965637373
local_time = time.ctime(seconds)
print("Local time:", local_time)