Roibal / Cryptocurrency-Trading-Bots-Python-Beginner-Advance

Crypto Trading Bots in Python - Triangular Arbitrage, Beginner & Advanced Cryptocurrency Trading Bots Written in Python
https://www.youtube.com/channel/UCVTnyT4fUxYkvawbggo8-AQ
MIT License
1.29k stars 438 forks source link

Error - convert_time_binance / 'serverTime' #25

Closed ghost closed 5 years ago

ghost commented 5 years ago

Traceback (most recent call last): File "RBB.py", line 348, in run() File "RBB.py", line 104, in run scalping_orders(coin, 1, 1) File "RBB.py", line 194, in scalping_orders ap, aq, bp, bq, place_ask_order, place_bid_order, spread, proj_spread, max_bid, min_ask = visualize_market_depth(wait, tot_time, coin) File "RBB.py", line 225, in visualize_market_depth ask_pri, ask_quan, bid_pri, bid_quan, ask_order, bid_order = market_depth(sym) File "RBB.py", line 146, in market_depth print("Order Book: ", convert_time_binance(client.get_server_time())) File "RBB.py", line 133, in convert_time_binance gg=int(aa) ValueError: invalid literal for int() with base 10: "{u'serverTime': 1546615734852"

Roibal commented 5 years ago

I believe you are using an old or historic version of one of the bots. This issue has been resolved in newer bots, but basically it needs to call 'serverTime', i.e.: line 146 should read: ... = market_depth(sym['serverTime'])