-
Notifications
You must be signed in to change notification settings - Fork 1
/
poloniex.py
181 lines (158 loc) · 7.39 KB
/
poloniex.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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
import requests
import json
#requisicao = requests.get('https://poloniex.com/public?command=returnTicker')
#cotacao = json.loads(requisicao.text)
#print(cotacao['BTC_BCN']['last'])
#print(cotacao['BTC_BCN']['lowestAsk'])
#print(cotacao['BTC_BCN']['highestBid'])
def poloniex_btc_last():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_BTC']['last']
def poloniex_btc_ask():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_BTC']['lowestAsk']
def poloniex_btc_bid():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_BTC']['highestBid']
def poloniex_dash():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_DASH']['last']
def poloniex_ltc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_LTC']['last']
def poloniex_nxt():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_NXT']['last']
def poloniex_zrx():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_ZRX']['last']
def poloniex_eos():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_EOS']['last']
def poloniex_omg():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_OMG']['last']
def poloniex_xmrbtc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_XMR']['last']
def poloniex_xmr():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_XMR']['last']
def poloniex_xrp():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_XRP']['last']
def poloniex_eth():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_ETH']['last']
def poloniex_ethbtc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_ETH']['last']
def poloniex_etcbtc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_ETC']['last']
def poloniex_etc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_ETC']['last']
def poloniex_ethetc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['ETH_ETC']['last']
def poloniex_rep():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_REP']['last']
def poloniex_repbtc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_REP']['last']
def poloniex_repeth():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['ETH_REP']['last']
def poloniex_zecbtc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_ZEC']['last']
def poloniex_zeceth():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['ETH_ZEC']['last']
def poloniex_zec():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_ZEC']['last']
def poloniex_gntbtc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_GNT']['last']
def poloniex_ethgnt():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['ETH_GNT']['last']
def poloniex_bchbtc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_BCH']['last']
def poloniex_bcheth():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['ETH_BCH']['last']
def poloniex_bch():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['USDT_BCH']['last']
def poloniex_eosbtc():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['BTC_EOS']['last']
def poloniex_eoseth():
poloniextick = requests.get("https://poloniex.com/public?command=returnTicker")
return poloniextick.json()['ETH_EOS']['last']
print('--------------COTAÇÕES POLONIEX--------------')
poloniexliveeoseth = float(poloniex_eoseth())
print('EOS/ETH last',poloniexliveeoseth)
poloniexliveeosbtc = float(poloniex_eosbtc())
print('EOS/BTC last',poloniexliveeosbtc)
poloniexlivebch = float(poloniex_bch())
print('BCH/USDT last',poloniexlivebch)
poloniexlivebcheth = float(poloniex_bcheth())
print('BCH/ETH last',poloniexlivebcheth)
poloniexlivebchbtc = float(poloniex_bchbtc())
print('BCH/BTC last',poloniexlivebchbtc)
poloniexliveethgnt = float(poloniex_ethgnt())
print('GNT/ETH last',poloniexliveethgnt)
poloniexlivebtcgnt = float(poloniex_gntbtc())
print('BTC/GNT last',poloniexlivebtcgnt)
poloniexlivezec = float(poloniex_zec())
print('ZEC/USDT last',poloniexlivezec)
poloniexlivezeceth = float(poloniex_zeceth())
print('ETH/ZEC last',poloniexlivezeceth)
poloniexlivezecbtc = float(poloniex_zecbtc())
print('BTC/ZEC last',poloniexlivezecbtc)
poloniexliverepeth = float(poloniex_repeth())
print('ETH/REP last',poloniexliverepeth)
poloniexliverepbtc = float(poloniex_repbtc())
print('REP/BTC last',poloniexliverepbtc)
poloniexliverep = float(poloniex_rep())
print('REP/USDT last',poloniexliverep)
poloniexliveethetc = float(poloniex_ethetc())
print('ETC/ETH last',poloniexliveethetc)
poloniexliveetc = float(poloniex_etc())
print('ETC/USDT last',poloniexliveetc)
poloniexliveetcbtc = float(poloniex_etcbtc())
print('ETC/BTC last',poloniexliveetcbtc)
poloniexliveethbtc = float(poloniex_ethbtc())
print('ETH/BTC last',poloniexliveethbtc)
poloniexliveeth = float(poloniex_eth())
print('ETH/USDT last',poloniex_eth())
poloniexlivexrp = float(poloniex_xrp())
print('XRP/USD last',poloniexlivexrp)
poloniexlivexmr = float(poloniex_xmr())
print('XMR/USD last',poloniexlivexmr)
poloniexlivexmrbtc = float(poloniex_xmrbtc())
print('XMR/BTC last',poloniexlivexmrbtc)
poloniexliveomg = float(poloniex_omg())
print('OMG/BTC last',poloniexliveomg)
poloniexliveeos = float(poloniex_eos())
print('EOS/USDT last',poloniexliveeos)
poloniexlivezrx = float(poloniex_zrx())
print('ZRX/BTC Last',poloniexlivezrx)
poloniexlivenxt = float(poloniex_nxt())
print('NXT/USDT last',poloniexlivenxt)
poloniexliveltc = float(poloniex_ltc())
print('LTC/USDT last',poloniexliveltc)
poloniexlivedash = float(poloniex_dash())
print('DASH/USDT last',poloniexlivedash)
poloniexlivebtclast = float(poloniex_btc_last())
print('BTC/USDT Last',poloniexlivebtclast)
poloniexlivebtcask = float(poloniex_btc_ask())
#print('BTC_USDT Ask',poloniexlivebtcask)
poloniexlivebtcbid = float(poloniex_btc_bid())
#print('BTC_USDT Bid',poloniexlivebtcbid)