-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBinanceBotRunner.py
31 lines (27 loc) · 1.36 KB
/
BinanceBotRunner.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from BinanceAPI import BinanceBot
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--symbol', type=str, help='Market Symbol (Ex: XVG - ETH)', required=True)
parser.add_argument('--btcorbnb', type=str, help='Market Symbol (Ex: BNB - BTC)', required=False)
parser.add_argument('--profit', type=int, help='Market Symbol (Ex: 3 - 10)', required=False)
parser.add_argument('--wallet', type=int, help='Market Symbol (Ex: 50 - 100)', required=False)
parser.add_argument('--stoploss', type=int, help='Market Symbol (Ex: 3 - 6)', required=False)
args = parser.parse_args()
btcOrBnb = 'BTC'
profitPercentage = 2 # % percentage of the profit we want
walletPercentage = 100 # % percentage of wallet we use btc or bnb
stop_loss_pecentage = 5 # %percentage of stop loss
short_symbol = str(args.symbol).upper()
if args.btcorbnb:
btcOrBnb = str(args.btcorbnb).upper()
if args.profit:
profitPercentage = args.profit
if args.wallet:
walletPercentage = args.wallet
if args.stoploss:
stop_loss_pecentage = args.stoploss
bot = BinanceBot(short_symbol=short_symbol, btcOrBnb=btcOrBnb, profitPercentage=profitPercentage,
walletPercentage=walletPercentage, stop_loss_pecentage=stop_loss_pecentage)
print(bot.client.ping())
bot.run()