-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathalert.py
More file actions
28 lines (23 loc) · 703 Bytes
/
alert.py
File metadata and controls
28 lines (23 loc) · 703 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
27
28
from auth import get_token
"""
This will assist in generating the alert message to be pasted into tradingview.
"""
def generate_alert_message():
print('Enter type: (limit, market, etc.)')
type = input()
print('Enter Side (buy or sell): ')
side = input()
print('Enter Amount:')
amount = input()
print('Enter Symbol')
symbol = input()
if type == 'limit':
print('Enter limit price:')
price = input()
else:
price = None
key = get_token()
print("Copy:\n:")
output = {"type": type, "side": side, "amount": amount, "symbol": symbol, "price": price, "key": key}
print(str(output).replace('\'', '\"'))
generate_alert_message()