· 7 years ago · Jul 19, 2018, 10:56 PM
1import pandas as pd
2import numpy as np
3
4client = Client('api_key', 'secret_key')
5
6
7t_df = pd.DataFrame(client.get_all_tickers())
8tickers = t_df.loc[:, ['symbol']]
9
10
11def tick_data(*args, **kwargs):
12for i in tickers:
13 tick_df = pd.DataFrame(client.get_ticker())
14 tick = tick_df.loc[:, ['symbol', 'volume']]
15 tick.iloc[:,['volume']].astype(int)
16
17 if tick['volume'].dtype != np.number:
18 print('yes')
19 else:
20 print('no')
21return tick
22
23def tick_data(*args, **kwargs):
24for i in tickers:
25 tick_df = pd.DataFrame(client.get_ticker())
26 tick = tick_df.loc[:, ['symbol', 'volume']].values
27 tick[:,['volume'].astype(int)
28
29 if tick['volume'].dtype != np.number:
30 print('yes')
31 else:
32 print('no')
33return tick
34
35def tick_data(*args, **kwargs):
36for i in tickers:
37 tick_df = pd.DataFrame(client.get_ticker())
38 tick = tick_df.loc[:, ['symbol', 'volume']]
39 tick[:,['volume']].astype(int)
40
41 if tick['volume'].dtype != np.number:
42 print('yes')
43 else:
44 print('no')
45return tick