From d25e634587d12829817b4d4edb161abe532464ce Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 24 Nov 2023 18:51:26 +0100 Subject: [PATCH] 1.1.0 --- unicorn_binance_trailing_stop_loss/cli.py | 18 +++++++++--------- unittest_binance_trailing_stop_loss.py | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/unicorn_binance_trailing_stop_loss/cli.py b/unicorn_binance_trailing_stop_loss/cli.py index 6f9249c..8e383f2 100755 --- a/unicorn_binance_trailing_stop_loss/cli.py +++ b/unicorn_binance_trailing_stop_loss/cli.py @@ -18,8 +18,10 @@ # Copyright (c) 2022-2023, LUCIT Systems and Development (https://www.lucit.tech) # All rights reserved. -from unicorn_binance_trailing_stop_loss.manager import BinanceTrailingStopLossManager -# from manager import BinanceTrailingStopLossManager # need for testing the cli interface during development +try: + from manager import BinanceTrailingStopLossManager +except ModuleNotFoundError: + from unicorn_binance_trailing_stop_loss.manager import BinanceTrailingStopLossManager from unicorn_binance_rest_api.manager import BinanceRestApiManager, BinanceAPIException from configparser import ConfigParser, ExtendedInterpolation from pathlib import Path @@ -30,10 +32,8 @@ import platform import os import requests -import subprocess import sys import textwrap -import time import webbrowser @@ -643,11 +643,11 @@ def create_directory(directory: str = None) -> bool: ubra_manager=ubra, ubwa_manager=None, warn_on_update=False) as ubtsl: - if test is None: - # Catch Keyboard Interrupt only if there is no test running - while ubtsl.is_manager_stopping() is False: - # This loop continues until the trailing stop loss engine is terminated - await asyncio.sleep(1) + if test is None: + # Catch Keyboard Interrupt only if there is no test running + while ubtsl.is_manager_stopping() is False: + # This loop continues until the trailing stop loss engine is terminated + await asyncio.sleep(1) def main(): try: diff --git a/unittest_binance_trailing_stop_loss.py b/unittest_binance_trailing_stop_loss.py index 06e7c6c..a50d660 100755 --- a/unittest_binance_trailing_stop_loss.py +++ b/unittest_binance_trailing_stop_loss.py @@ -48,8 +48,8 @@ def callback_finished(msg): UBTSL = BinanceTrailingStopLossManager(callback_error=callback_error, callback_finished=callback_finished, - binance_public_key="aaa", - binance_private_key="bbb", + api_key="aaa", + api_secret="bbb", exchange="binance.com-testnet", keep_threshold="20%", reset_stop_loss_price=True,