示例#1
0
 def details(self, symbol, order_id, time):
     params = {
         'api_key': self._api_key,
         'symbol': symbol,
         'order_id': order_id,
         'time': time,
     }
     return request_get('{}/order/make_detail'.format(Trading_Macro_v2),
                        params=dict(params, **{'sign': self.get_sign(params)}))
示例#2
0
 def orders(self, symbol, states, time, **kwargs):
     params = dict({
         'api_key': self._api_key,
         'symbol': symbol,
         'states': states,
         'time': time,
     }, **kwargs)
     return request_get('{}/order/orders'.format(Trading_Macro_v2),
                        params=dict(params, **{'sign': self.get_sign(params)}))
示例#3
0
 def match_results(self, symbol, start_date, end_date, time, **kwargs):
     params = dict({
         'api_key': self._api_key,
         'symbol': symbol,
         'start-date': start_date,
         'end-date': end_date,
         'time': time,
     }, **kwargs)
     return request_get('{}/order/match_results'.format(Trading_Macro_v2),
                        params=dict(params, **{'sign': self.get_sign(params)}))
示例#4
0
 def kline(symbol, period, size=150):
     return request_get(
         '{0}/market/history/kline?symbol={1}&period={2}&size={3}'.format(Trading_Macro, symbol, period, size))
示例#5
0
 def trade(symbol, size=1):
     return request_get('{0}/market/history/trade?symbol={1}&size={2}'.format(Trading_Macro, symbol, size))
示例#6
0
 def depth(symbol, type='step0'):
     return request_get('{0}/market/depth?symbol={1}&type={2}'.format(Trading_Macro, symbol, type))
示例#7
0
 def ticker(symbol):
     return request_get('{0}/market/detail?symbol={1}'.format(Trading_Macro, symbol))
示例#8
0
 def tickers():
     return request_get(Market_List)
示例#9
0
 def currencys():
     return request_get('{}/currencys'.format(Trading_Macro_v2))
示例#10
0
 def timestamp():
     return request_get('{}/timestamp'.format(Trading_Macro_v2))