Skip to content

Commit

Permalink
Edit bot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanramoscfa committed Jan 17, 2024
1 parent c18ccbd commit ab905a0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions authentication/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,6 @@ def etrade_login(self):
print('ConnectionError: Trying again with chrome.')
time.sleep(self.sleep)
self.sleep *= 2 # Exponential backoff
except Exception as e:
print(f"An unexpected error occurred: {e}")
time.sleep(self.sleep)
self.sleep *= 2 # Exponential backoff

raise Exception("Failed to connect to Etrade API after multiple retries")

@staticmethod
Expand Down
6 changes: 3 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ def run(self):
# Execute trades
print('')
if self.preview:
print('Previewing Trades...')
print('Previewing Trades...\n')
place_order = self.execute.execute_trades(
current_portfolio, new_portfolio_shares, self.account_id_key, self.preview, self.prints
)
else:
# Preview trades first
print('Previewing Trades...')
print('Previewing Trades...\n')
self.preview = True
self.execute.execute_trades(
current_portfolio, new_portfolio_shares, self.account_id_key, self.preview, self.prints
)
# Execute trades
print('Executing Trades...')
print('\nExecuting Trades...\n')
self.preview = False
place_order = self.execute.execute_trades(
current_portfolio, new_portfolio_shares, self.account_id_key, self.preview, self.prints
Expand Down
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/searchindex.js

Large diffs are not rendered by default.

0 comments on commit ab905a0

Please sign in to comment.