-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.py
More file actions
26 lines (18 loc) · 641 Bytes
/
Copy pathcli.py
File metadata and controls
26 lines (18 loc) · 641 Bytes
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
from bot import BinanceClient
print("+---------+")
print("| TRADBOT |")
print("+---------+")
print("Thank you for using TradBot")
print("Enter your trades in the format <symbol> <side> <order> <quantity> <price>")
client = BinanceClient(API, SECRET)
while True:
trade = input().split()
result = client.create_order(trade[0], trade[1], trade[2], float(trade[3]))
print(result)
while True:
choice = input("Continue?(Y/ N) ").lower().strip()
if choice in ("y", "n"):
break
print("Choice should be either 'y' or 'n'")
if choice == "n":
break