Beispiel #1
0
 def order_list(self, currency_pair, current_page=1, page_length=200):
     from packages import util
     aex2 = util.Client(self.account.api_key, self.account.secret_key,
                        self.user_id)
     result = aex2.getOrderList(currency_pair.base, currency_pair.reference)
     result = universal.SubmittedOrderList(currency_pair, self.MARKET,
                                           result)
     return result
Beispiel #2
0
 def order_list(self, currency_pair, current_page=1, page_length=200):
     ORDER_HISTORY_RESOURCE = "/api/v1/order_history.do"
     params = {
         'api_key': self.account.api_key,
         'symbol': currency_pair,
         'status': 0,
         'current_page': current_page,
         'page_length': page_length
     }
     params['sign'] = buildMySign(params, self.account.secret_key)
     result = httpPost(self.base_url, ORDER_HISTORY_RESOURCE, params)
     result = universal.SubmittedOrderList(currency_pair, self.__market,
                                           result)
     return result
Beispiel #3
0
    def order_list(self,currency_pair=None, current_page=1, page_length=200):
        # symbol, page, type are optional
        # https://openapi.digifinex.vip/v2/open_orders?symbol=usdt_btc&page=1&apiKey=59328e10e296a&timestamp=1410431266&sign=0a8d39b515fd8f3f8b848a4c459884c2

        ORDER_LIST_RESOURCE='/v2/open_orders'
        params={}
        params['timestamp']=str(time.time())
        if currency_pair:
            params['symbol']= make_currency_pair_string(currency_pair)
        if current_page:
            params['page']=str(current_page)
        params['sign']=sign(self.account,params)

        result = requests.get(self.base_url + ORDER_LIST_RESOURCE, params)
        result = universal.SubmittedOrderList(currency_pair, self.MARKET, result.text )
        return result