-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_norm.py
53 lines (38 loc) · 1.21 KB
/
main_norm.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# change here
from pip._vendor.distlib.compat import raw_input
from calculate_price import OrderRecord
# fees
from wow_normal_fetch import WowNormalFetch
G2G_FEE = 8.99
PAYPAL_FEE = 3.99
WITHDRAW_FEE = 0.99
def calculate_price_list(orders_list: list, interest_rate, dollar_exchange_rate, price_per):
OrderRecord.calculate_orders_price(
orders_list,
float(interest_rate),
G2G_FEE,
PAYPAL_FEE,
WITHDRAW_FEE,
float(dollar_exchange_rate),
price_per
)
orders_list.sort()
def print_list(order_list: list):
OrderRecord.print_orders(order_list)
def start():
wow_norm = WowNormalFetch()
wow_norm_orders = wow_norm.fetch_orders()
print("\n===================================")
while True:
interest_rate = raw_input("Enter Interest Rate % (q): ")
if interest_rate == 'q':
break
if interest_rate == '':
continue
dollar_exchange_rate = raw_input("Enter dollar exchange rate (to destination currency): ")
calculate_price_list(wow_norm_orders, interest_rate, dollar_exchange_rate, 1000000)
print_list(wow_norm_orders)
# end loop
if __name__ == "__main__":
start()
# end if