forked from yangdemin/dingpan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
2line.py
62 lines (47 loc) · 1.56 KB
/
2line.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
import ccxt
import datetime
import time
# OK! speed bitkk ——》bitforex-》 huobiru ->coinex
exchange = ccxt.allcoin({
'proxies': {
'http': 'http://144.202.27.74:8888', # no auth
'https': 'https://144.202.27.74:8888', # no auth
}})
data = exchange.fetch_ticker('BTC/USDT')
print(data)
# exchange = ccxt.coinex()
# timeStart1 = datetime.datetime.now()
# data = exchange.fetch_ticker('BTC/USDT')
# timeEnd1 = datetime.datetime.now()
# print(data)
# print("iso t: %s" % timeStart1.isoformat())
# print(timeEnd1-timeStart1)
# exchange = ccxt.huobiru()
# print("exchange:",exchange["url"])
# timeStart1 = datetime.datetime.now()
# data = exchange.fetch_ticker('EOS/USDT')
# timeEnd1 = datetime.datetime.now()
# print(data)
# print("iso t:%s" % timeStart1.isoformat())
# print(timeEnd1-timeStart1)
# exchange = ccxt.bitforex()
# timeStart1 = datetime.datetime.now()
# data = exchange.fetch_ticker('BTC/USDT')
# timeEnd1 = datetime.datetime.now()
# print(data)
# print("iso t:%s" % timeStart1.isoformat())
# print(timeEnd1-timeStart1)
# exchange = ccxt.bitkk()
# timeStart1 = datetime.datetime.now()
# data = exchange.fetch_ticker('BTC/USDT')
# timeEnd1 = datetime.datetime.now()
# print(data)
# print("iso t:%s" % timeStart1.isoformat())
# print(timeEnd1-timeStart1)
# exchange2 = ccxt.binance({
# 'proxies': {
# 'http': 'http://127.0.0.1:1080', # no auth
# 'https': 'https://127.0.0.1:1080', # with auth
# }})
# data2 = exchange2.fetch_ticker('BTC/USDT')
# print(data2)