def future_position(self, symbol, contract_type): params = { 'api_key': self.__api_key, 'symbol': symbol, 'contract_type': contract_type } params['sign'] = HttpsRequest.build_sign(params, self.__secret_key) return HttpsRequest.post(OKCoinBase.RESOURCES_URL['position'], params)
def future_withdraw_info(self, symbol, withdraw_id): params = { 'api_key': self._api_key, 'symbol': symbol, 'withdraw_id': withdraw_id } params['sign'] = HttpsRequest.build_sign(params, self._secret_key) return HttpsRequest.post(OKCoinBase.RESOURCES_URL['withdraw_info'], params)
def future_cancel(self, symbol, contract_type, order_id): params = { 'api_key': self._api_key, 'symbol': symbol, 'contract_type': contract_type, 'order_id': order_id } params['sign'] = HttpsRequest.build_sign(params, self._secret_key) return HttpsRequest.post(OKCoinBase.RESOURCES_URL['cancel'], params)
def future_trade_history(self, symbol, date, since): params = { 'api_key': self.__api_key, 'symbol': symbol, 'date': date, 'since': since } params['sign'] = HttpsRequest.build_sign(params, self.__secret_key) return HttpsRequest.post(OKCoinBase.RESOURCES_URL['trades_history'], params)
def future_batch_trade(self, symbol, contract_type, orders_data, lever_rate): params = { 'api_key': self._api_key, 'symbol': symbol, 'contract_type': contract_type, 'orders_data': orders_data, 'lever_rate': lever_rate } params['sign'] = HttpsRequest.build_sign(params, self._secret_key) return HttpsRequest.post(OKCoinBase.RESOURCES_URL['batch_trade'], params)
def future_withdraw(self, symbol, charge_fee, trade_pwd, withdraw_address, withdraw_amount, target): params = { 'api_key': self._api_key, 'symbol': symbol, 'charge_fee': charge_fee, 'trade_pwd': trade_pwd, 'withdraw_address': withdraw_address, 'withdraw_amount': withdraw_amount, 'target': target } params['sign'] = HttpsRequest.build_sign(params, self._secret_key) return HttpsRequest.post(OKCoinBase.RESOURCES_URL['withdraw'], params)
def future_explosive(self, symbol, contract_type, status, current_page, page_number, page_length): params = { 'api_key': self._api_key, 'symbol': symbol, 'contract_type': contract_type, 'status': status, 'current_page': current_page, 'page_number': page_number, 'page_length': page_length } params['sign'] = HttpsRequest.build_sign(params, self._secret_key) return HttpsRequest.post(OKCoinBase.RESOURCES_URL['explosive'], params)
def future_order_info(self, symbol, contract_type, order_id, status, current_page, page_length): params = { 'api_key': self._api_key, 'symbol': symbol, 'contract_type': contract_type, 'order_id': order_id, 'status': status, 'current_page': current_page, 'page_length': page_length } params['sign'] = HttpsRequest.build_sign(params, self._secret_key) return HttpsRequest.post(OKCoinBase.RESOURCES_URL['order_info'], params)
def future_trade(self, symbol, contract_type, price='', amount='', trade_type='', match_price='', lever_rate=''): params = { 'api_key': self.__api_key, 'symbol': symbol, 'contract_type': contract_type, 'amount': amount, 'type': trade_type, 'match_price': match_price, 'lever_rate': lever_rate } if price: params['price'] = price params['sign'] = HttpsRequest.build_sign(params, self.__secret_key) return HttpsRequest.post(OKCoinBase.RESOURCES_URL['trades'], params)
def future_user_info_4fix(self): params = {'api_key': self._api_key} params['sign'] = HttpsRequest.build_sign(params, self._secret_key) return HttpsRequest.post(self, OKCoinBase.RESOURCES_URL['user_info_4fix'], params)