-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
96 lines (82 loc) · 3.61 KB
/
main.py
File metadata and controls
96 lines (82 loc) · 3.61 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
from CryptoPriceX import *
banner = """
______ __ ____ _ _ __
/ ____/_____ __ __ ____ / /_ ____ / __ \ _____ (_)_____ ___ | |/ /
/ / / ___// / / // __ \ / __// __ \ / /_/ // ___// // ___// _ \ | /
/ /___ / / / /_/ // /_/ // /_ / /_/ // ____// / / // /__ / __// |
\____//_/ \__, // .___/ \__/ \____//_/ /_/ /_/ \___/ \___//_/|_|
/____//_/
_________________________________________________________________________________
-------------------------------- [CryptoPriceX] ---------------------------------
Request the price of the crypto you want with the currency pair you want !
© Valmar Corporation - Jpiix Underground Corporation - 2023 Version 2.2
---------------------------------------------------------------------------------
"""
# ~~~~~~~~~~~ Main ~~~~~~~~~~~ #
def main():
print(banner)
time.sleep(1)
print("\n# ~~~~~~~~~~~~~~ Crypto Monnaies ~~~~~~~~~~~~~~~ #")
for sigle, nom in cryptos.items():
print( sigle + " - " + nom)
print("# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #")
print("\n# ~~~~~~~~~~~~ Fiduciaires Monnaies ~~~~~~~~~~~~ #")
for sigle, nom in fiduciaires.items():
print( sigle + " - " + nom)
print("# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #")
time.sleep(1)
crypto = input("\n[default:BTC] Which crypto do you want ? ")
if crypto == "":
crypto = "BTC"
else:
crypto = crypto.upper()
while crypto not in ["BTC", "ETH", "LTC", "BCH", "ADA", "XLM", "DOGE", "EOS"]:
print("Please enter a valid crypto : BTC, ETH or LTC...")
crypto = input("\n[default:BTC] Which crypto do you want ? ")
if crypto == "":
crypto = "BTC"
else:
crypto = crypto.upper()
monnaie = input("[default:EUR] Which currency pair do you want ? ")
if monnaie == "":
monnaie = "EUR"
else:
monnaie = monnaie.upper()
while monnaie not in ["USDT", "EUR", "GBP", "AUD", "BRL"]:
print("Please enter a valid currency pair : EUR, USD or GBP...")
monnaie = input("\n[default:EUR] Which currency pair do you want ? ")
if monnaie == "":
monnaie = "EUR"
else:
monnaie = monnaie.upper()
print("\nSearching... check the price of " + crypto + " in " + monnaie + " !")
res = request(url + crypto + monnaie)
print("\n# ~~~~~~~~~~~~~~~ Result ~~~~~~~~~~~~~~~ #")
print(" result : 1", crypto,"=",res,monnaie,)
print("# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #\n")
time.sleep(1)
choice = input("\nDo you want to continue ? [Y/N] ").upper()
if choice == "Y":
clear()
time.sleep(1)
main()
elif choice == "N":
print("\nGoodbye !")
time.sleep(2)
clear()
exit()
else:
while choice not in ["Y", "N"]:
print("Please enter a valid choice : Y or N...")
choice = input("\nDo you want to continue ? [Y/N] ").upper()
if choice == "Y":
clear()
time.sleep(1)
main()
elif choice == "N":
print("\nGoodbye !")
time.sleep(2)
clear()
exit()
if __name__ == "__main__":
main()