-
Notifications
You must be signed in to change notification settings - Fork 0
/
tickers.py
47 lines (37 loc) · 1.83 KB
/
tickers.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
from binance.spot import Spot
def tickers():
client = Spot(key='<your key here>', secret='<your secret here>')
print("\nGENERAL:\n")
print(client.ticker_price("BTCUSDT"))
print(client.ticker_price("ETHUSDT"))
print(client.ticker_price("ZECUSDT"))
print(client.ticker_price("BNBUSDT"))
print(client.ticker_price("ADAUSDT"))
print(client.ticker_price("AVAXUSDT"))
print(client.ticker_price("XMRUSDT"))
print(client.ticker_price("ETCUSDT"))
print("\nDEFI:\n")
print(client.ticker_price("AAVEUSDT"))
print(client.ticker_price("UNIUSDT"))
print(client.ticker_price("SUSHIUSDT"))
print(client.ticker_price("1INCHUSDT"))
print(client.ticker_price("LINKUSDT"))
print(client.ticker_price("YFIUSDT"))
print(client.ticker_price("CAKEUSDT"))
print("\nCHANGES VERSUS BITCOIN:\n")
if (client.ticker_24hr("ETHBTC")['priceChangePercent'] > '0'):
print("ETH/BTC = +" + client.ticker_24hr("ETHBTC")['priceChangePercent'] + "%")
else:
print("ETH/BTC = " + client.ticker_24hr("ETHBTC")['priceChangePercent'] + "%")
if (client.ticker_24hr("ZECBTC")['priceChangePercent'] > '0'):
print("ZEC/BTC = +" + client.ticker_24hr("ZECBTC")['priceChangePercent'] + "%")
else:
print("ZEC/BTC = " + client.ticker_24hr("ZECBTC")['priceChangePercent'] + "%")
if (client.ticker_24hr("AAVEBTC")['priceChangePercent'] > '0'):
print("AAVE/BTC = +" + client.ticker_24hr("AAVEBTC")['priceChangePercent'] + "%")
else:
print("AAVE/BTC = " + client.ticker_24hr("AAVEBTC")['priceChangePercent'] + "%")
if (client.ticker_24hr("BNBBTC")['priceChangePercent'] > '0'):
print("BNB/BTC = +" + client.ticker_24hr("BNBBTC")['priceChangePercent'] + "%")
else:
print("BNB/BTC = " + client.ticker_24hr("BNBBTC")['priceChangePercent'] + "%")