Documentation WIP 2 (added demo param)

This commit is contained in:
2025-05-18 23:36:44 +03:00
parent 957b411ce1
commit 94d14efa4f
5 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# Side Strategy Bybit Bot
This is a simple semi-automatic trading bot working with Bybit API and written in Python.
The strategy is based on the side moving of the token which crosses user input levels. On the level cross long and short orders are opened.
### For the install and setup guide look at the `setup.md`
### For the install and setup guide look at the `setup.md`

View File

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

View File

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

View File

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