Documentation WIP 2 (added demo param)
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
# Side Strategy Bybit Bot
|
# Side Strategy Bybit Bot
|
||||||
This is a simple semi-automatic trading bot working with Bybit API and written in Python.
|
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.
|
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`
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import time
|
|
||||||
import traceback
|
import traceback
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
||||||
|
|
||||||
# Общий лог ну совсем
|
# Максимально подробный общий лог
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
if options.showExtraDebugLogs:
|
||||||
superGeneralLogger = logging.getLogger('superGeneral')
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
superGeneralLogger = logging.getLogger('superGeneral')
|
||||||
|
|||||||
@ -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',
|
||||||
|
|||||||
@ -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)]
|
||||||
|
|||||||
Reference in New Issue
Block a user