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)}))
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)}))
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)}))
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))
def trade(symbol, size=1): return request_get('{0}/market/history/trade?symbol={1}&size={2}'.format(Trading_Macro, symbol, size))
def depth(symbol, type='step0'): return request_get('{0}/market/depth?symbol={1}&type={2}'.format(Trading_Macro, symbol, type))
def ticker(symbol): return request_get('{0}/market/detail?symbol={1}'.format(Trading_Macro, symbol))
def tickers(): return request_get(Market_List)
def currencys(): return request_get('{}/currencys'.format(Trading_Macro_v2))
def timestamp(): return request_get('{}/timestamp'.format(Trading_Macro_v2))