def cancel_order(self, currency_pair, order_ids): # POST https: // openapi.digifinex.vip / v2 / cancel_order # POST参数: # order_id = 1000001, 1000002, 1000003 # apiKey = 59328e10e296a # timestamp = 1410431266 # sign = 0a8d39b515fd8f3f8b848a4c459884c2 CANCEL_ORDER_RESOURCE = '/v2/cancel_order' timestamp = int(time.time()) if isinstance(order_ids, str): _order_ids = order_ids if isinstance(order_ids, list): _order_ids = list(map(lambda x: str(x), order_ids)) _order_ids = ','.join(_order_ids) params = { 'timestamp': timestamp, 'order_id': _order_ids, } params['sign'] = sign(self.account, params) result = requests.post(self.base_url + CANCEL_ORDER_RESOURCE, data=params) result = universal.CancelOrderResult(self.MARKET, currency_pair, result.text, order_ids) return result
def cancel_order(self, currency_pair, order_id): k = KRAKEN_RAW_API.API(key=self.account.api_key, secret=self.account.secret_key) result = k.query_private('CancelOrder', {'txid': order_id}) result = universal.CancelOrderResult(self.MARKET, currency_pair, result, order_id) return result
def cancel_order(self, currency_pair, order_id): from packages import util aex2 = util.Client(self.account.api_key, self.account.secret_key, self.user_id) result = aex2.cancelOrder(currency_pair.reference, order_id, currency_pair.base) result = universal.CancelOrderResult(self.MARKET, currency_pair, result, order_id) return result