Skip to content

Commit

Permalink
1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-zehentleitner committed Nov 24, 2023
1 parent ca9d530 commit d25e634
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions unicorn_binance_trailing_stop_loss/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,10 +32,8 @@
import platform
import os
import requests
import subprocess
import sys
import textwrap
import time
import webbrowser


Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions unittest_binance_trailing_stop_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d25e634

Please sign in to comment.