Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
VladKochetov007 committed Nov 8, 2021
1 parent 6d8fcd4 commit 9c53e59
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion quick_trade/brokers.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def exit_last_order(self):

@utils.wait_success
def get_balance(self, currency: str) -> float:
return self.client.fetch_total_balance()[currency]
return self.client.fetch_free_balance()[currency]

@classmethod
def _add_order_count(cls):
Expand Down
10 changes: 5 additions & 5 deletions quick_trade/trading_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,17 +968,17 @@ def start_trading(pair, strat):
def log_data(self):
self.fig.log_y(_row=self.fig.data_row,
_col=self.fig.data_col)
utils.logger.debug('(%s) log data', self)
utils.logger.info('(%s) log data', self)

def log_deposit(self):
self.fig.log_y(_row=self.fig.deposit_row,
_col=self.fig.deposit_col)
utils.logger.debug('(%s) log deposit', self)
utils.logger.info('(%s) log deposit', self)

def log_returns(self):
self.fig.log_y(_row=self.fig.returns_row,
_col=self.fig.returns_col)
utils.logger.debug('(%s) log returns', self)
utils.logger.info('(%s) log returns', self)

@utils.assert_logger
def set_client(self, your_client: TradingClient):
Expand All @@ -988,7 +988,7 @@ def set_client(self, your_client: TradingClient):
assert isinstance(your_client, TradingClient), 'your_client must be of type <TradingClient>'

self.client = your_client
utils.logger.debug('(%s) set client', self)
utils.logger.info('(%s) set client', self)

@utils.assert_logger
def convert_signal(self,
Expand All @@ -1002,7 +1002,7 @@ def convert_signal(self,
for pos, val in enumerate(self.returns):
if val == old:
self.returns[pos] = new
utils.logger.debug("(%s) signals converted: %s >> %s", self, old, new)
utils.logger.info("(%s) signals converted: %s >> %s", self, old, new)
return self.returns

@utils.assert_logger
Expand Down
2 changes: 1 addition & 1 deletion quick_trade/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
calmar ratio: {}
max drawdown: {}%""" # .format(Trader.losses, Trader.trades, ...)

__version__: str = "6.9.3"
__version__: str = "6.9.4"
__author__: str = 'Vlad Kochetov'
__credits__: List[str] = [
"Hemerson Tacon -- Stack overflow",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
with open('README.md') as file:
long_desc = file.read()

__version__ = "6.9.3"
__version__ = "6.9.4"

setup(
name='quick_trade',
Expand Down

0 comments on commit 9c53e59

Please sign in to comment.