Ejemplo n.º 1
0
 def test_getTicker(self):
     connection = tidexapi.Connection()
     info = tidexapi.APIInfo(connection)
     for pair in info.pair_names:
         tidexapi.getTicker(pair, connection, info)
         tidexapi.getTicker(pair, connection)
         tidexapi.getTicker(pair, info=info)
         tidexapi.getTicker(pair)
Ejemplo n.º 2
0
 def test_getDepth(self):
     connection = tidexapi.Connection()
     info = tidexapi.APIInfo(connection)
     for pair in info.pair_names:
         tidexapi.getDepth(pair, connection, info)
         sleep(0.21)
         tidexapi.getDepth(pair, connection)
         sleep(0.21)
         tidexapi.getDepth(pair, info=info)
         sleep(0.21)
         tidexapi.getDepth(pair)
         sleep(0.21)
Ejemplo n.º 3
0
#!/usr/bin/env python
import tidexapi

attrs = ('high', 'low', 'avg', 'vol', 'vol_cur', 'last',
         'buy', 'sell', 'updated')

print("Tickers:")
connection = tidexapi.Connection()
info = tidexapi.APIInfo(connection)
for pair in info.pair_names:
    ticker = tidexapi.getTicker(pair, connection)
    print(pair)
    for a in attrs:
        print("\t%s %s" % (a, getattr(ticker, a)))