Example #1
0
 def future_trades(self,symbol,contractType):
     FUTURE_TRADES_RESOURCE = "/api/v1/future_trades.do"
     params = ''
     if symbol:
         params += '&symbol=' + symbol if params else 'symbol=' +symbol
     if contractType:
         params += '&contract_type=' + contractType if params else 'contract_type=' +symbol
     return httpGet(self.__url,FUTURE_TRADES_RESOURCE,params)
Example #2
0
 def future_kline(self,symbol,contractType,period,size=0,since=0):
     FUTURE_KLINE_RESOURCE = "/api/v1/future_kline.do"
     params = 'symbol='+symbol
     params += '&contract_type='+contractType
     params += '&type='+period
     if size!=0:
         params += '&size=' + str(size)
     if since!=0:
         params += '&since=' + str(since)    
     return httpGet(self.__url,FUTURE_KLINE_RESOURCE,params)
Example #3
0
 def future_depth(self,symbol,contractType,size): 
     FUTURE_DEPTH_RESOURCE = "/api/v1/future_depth.do"
     params = ''
     if symbol:
         params += '&symbol=' + symbol if params else 'symbol=' +symbol
     if contractType:
         params += '&contract_type=' + contractType if params else 'contract_type=' +symbol
     if size:
         params += '&size=' + str(size) if params else 'size=' + str(size)
     return httpGet(self.__url,FUTURE_DEPTH_RESOURCE,params)
Example #4
0
 def future_ticker(self,symbol,contractType):
     FUTURE_TICKER_RESOURCE = "/api/v1/future_ticker.do"
     params = ''
     if symbol:
         params += '&symbol=' + symbol if params else 'symbol=' +symbol
     if contractType:
         params += '&contract_type=' + contractType if params else 'contract_type=' +symbol
         
     print(params)
     
     return httpGet(self.__url,FUTURE_TICKER_RESOURCE,params)
Example #5
0
 def future_estimated_price(self,symbol):
     FUTURE_ESTIMATED_PRICE = "/api/v1/future_estimated_price.do"
     params=''
     if symbol:
         params = 'symbol=' +symbol
     return httpGet(self.__url,FUTURE_ESTIMATED_PRICE,params)
Example #6
0
 def exchange_rate(self):
     EXCHANGE_RATE = "/api/v1/exchange_rate.do"
     return httpGet(self.__url,EXCHANGE_RATE,'')
Example #7
0
 def future_index(self,symbol):
     FUTURE_INDEX = "/api/v1/future_index.do"
     params=''
     if symbol:
         params = 'symbol=' +symbol
     return httpGet(self.__url,FUTURE_INDEX,params)