-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtest.py
55 lines (39 loc) · 941 Bytes
/
test.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
import asyncio
import ccxt
import ccxt.async_support as ccxtasync
#i = 0
#async def func():
# for e in ccxtasync.exchanges:
# exchange = getattr(ccxtasync,e)()
# try:
# has = exchange.has
# except :
# print(e)
# finally:
# await exchange.close()
#asyncio.get_event_loop().run_until_complete(func())
#print(str(getattr(ccxt,e)().enableRateLimit))
# i+=1
#print(i)
#ExchangeNotAvailable('zb {"result":false,"message":"\\u670d\\u52a1\\u7aef\\u5fd9\\u788c"}',)
#e = ccxt.theocean()
#print(e.name)
e = ccxt.zb()
e.verbose = True
markets = e.fetch_markets()
print(e.has)
for market in markets:
print(e.fetch_ticker(market["symbol"]))
print("done")
input()
'''
import ccxt
import time
e = ccxt.luno()
e.enableRateLimit = True
for i in range(100):
t = time.time()
print(e.fetchTicker("BTC/EUR"))
print("elapsed:" + str(time.time()-t))
input()
'''