mcardillo55 / cbpro-trader

Automated cryptocurrency trading on Coinbase Pro (formerly gdax-trader)
GNU General Public License v3.0
218 stars 72 forks source link

Getting the following TypeError. #1

Closed philippeowagner closed 7 years ago

philippeowagner commented 7 years ago
File "/mnt/volume-fra1-01/daytrade/gdax-trader/engine.py", line 104, in print_amounts  self.logger.debug("[BALANCES] USD: %.2f BTC: %.8f" % (self.usd, self.btc))

TypeError: float argument required, not NoneType
philippeowagner commented 7 years ago

With "debug"

-- GDAX Websocket Opened ---
[HEARTBEAT] 2017-09-26 20:49:40.357000+00:00 21346229
Candlestick Closed!
[CANDLESTICK 1] Time: 2017-09-26 20:48:00+00:00 Open: 3906.98 High: 3906.98 Low: 3906.97 Close: 3906.98 Vol: 5.78517958
Traceback (most recent call last):
  File "gdax-trader/gdax-trader.py", line 95, in <module>
    trade_engine.print_amounts()
  File "/mnt/volume-fra1-01/daytrade/gdax-trader/engine.py", line 104, in print_amounts
    self.logger.debug("[BALANCES] USD: %.2f BTC: %.8f" % (self.usd, self.btc))
TypeError: float argument required, not NoneType

-- Order Book Closed ---
philippeowagner commented 7 years ago

and with "curses"

  File "gdax-trader.py", line 88, in <module>
    interface.update_orders(trade_engine)
  File "/Users/phi/Sandbox/daytrade/gdax-trader/curses_interface.py", line 63, in update_orders
    (fill.get('side').upper(),
AttributeError: 'unicode' object has no attribute 'get'