Documentation WIP 2 (added demo param)

This commit is contained in:
2025-05-18 23:36:44 +03:00
parent 87d56de922
commit 444727c22e
5 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,3 @@
import time
import traceback import traceback
import asyncio import asyncio

View File

@ -1,6 +1,8 @@
import logging import logging
import sys import sys
import options
generalLogPath = "./generalLog.log" generalLogPath = "./generalLog.log"
tradingLogPath = "./tradingLog.log" tradingLogPath = "./tradingLog.log"
@ -29,6 +31,7 @@ generalLogger = setupLogger('general', logging.INFO, generalLogPath, generalForm
tradingFormatter = logging.Formatter('%(asctime)s - %(message)s') tradingFormatter = logging.Formatter('%(asctime)s - %(message)s')
tradingLogger = setupLogger('trade', logging.NOTSET, tradingLogPath, tradingFormatter) tradingLogger = setupLogger('trade', logging.NOTSET, tradingLogPath, tradingFormatter)
# Общий лог ну совсем # Максимально подробный общий лог
if options.showExtraDebugLogs:
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
superGeneralLogger = logging.getLogger('superGeneral') superGeneralLogger = logging.getLogger('superGeneral')

View File

@ -5,8 +5,10 @@ demoTrading = config('DEMOTRADING', default='False').lower() != 'false' # Use d
# Please do not combine testnet and demo trading # Please do not combine testnet and demo trading
leverage = int(config('LEVERAGE', default='1')) # Leverage leverage = int(config('LEVERAGE', default='1')) # Leverage
# notification = 1 # Telegram notifications (not currently supported) # notification = 1 # Telegram notifications (not currently supported)
showExtraDebugLogs = config('SHOWEXTRADEBUGLOGS', default='False').lower() != 'false'
loopSleepTime = int(config('LOOPSLEEPTIME', default='1')) # Time passing between checks for stopping strategy loopSleepTime = int(config('LOOPSLEEPTIME', default='1')) # Time passing between checks for stopping strategy
paramsLines = ['highEnd', paramsLines = ['highEnd',

View File

@ -1,9 +1,11 @@
from decouple import config from decouple import config
import re import re
def checkWhiteList(id): def checkWhiteList(id):
# Checks if id exists in the whitelist. Returnes 1 if exists and 0 if not # Checks if id exists in the whitelist. Returnes 1 if exists and 0 if not
return id in chatIDs return id in chatIDs
chatIDsstring = config('WHITELIST', default='') chatIDsstring = config('WHITELIST', default='')
chatIDs = [int(x) for x in re.split(r',\s*', chatIDsstring)] chatIDs = [int(x) for x in re.split(r',\s*', chatIDsstring)]