def get_market_sell(self, symbol_id): if not check_is_all_digit(symbol_id): return InvalidParamsHttpResponse path = '/api/v1/market/sell/' params = {'symbol_id': symbol_id} return self.get(path, params)
def list_withdraw_addr(self, coin_id): if not check_is_all_digit(coin_id): return InvalidParamsHttpResponse path = '/api/v1/coin/withdraw/addr/list/' data = {'coin_id': coin_id} return self.post(path, data)
def add_new_withdraw(self, coin_id, addr_id, volume): if not check_is_all_digit(coin_id, addr_id): return InvalidParamsHttpResponse path = '/api/v1/coin/withdraw/new/' data = {'coin_id': coin_id, 'addr_id': addr_id, 'volume': volume} return self.post(path, data)
def get_prepay_addr(self, coin_id): if not check_is_all_digit(coin_id): return InvalidParamsHttpResponse path = '/api/v1/coin/prepay/addr/' data = {'coin_id': coin_id} return self.post(path, data)
def get_order_detail2(self, symbol_id, order_id): if not check_is_all_digit(symbol_id, order_id): return InvalidParamsHttpResponse path = '/api/v1/order/detail2/' data = {'symbol_id': symbol_id, 'order_id': order_id} return self.post(path, data)
def get_quotation_depth(self, symbol_id): if not check_is_all_digit(symbol_id): return InvalidParamsHttpResponse path = '/api/v1/market/depth/' params = {'symbol_id': symbol_id} return self.get(path, params)
def list_withdraw_history(self, coin_id, page_num=1, page_size=10): if not check_is_all_digit(coin_id, page_num, page_size): return InvalidParamsHttpResponse path = '/api/v1/coin/withdraw/new/' data = { 'coin_id': coin_id, 'page_num': page_num, 'page_size': page_size } return self.post(path, data)
def place_order_sell(self, symbol_id, price, volume, side): if not check_is_all_digit(symbol_id): return InvalidParamsHttpResponse path = '/api/v1/order/' + side + '/' data = { 'symbol_id': symbol_id, 'price': '{}'.format(price), 'volume': '{}'.format(volume) } return self.post(path, data)
def get_user_deal_history(self, symbol_id, search_direction=2, start_time=0, count=10): if not check_is_all_digit(symbol_id, search_direction, start_time, count): return InvalidParamsHttpResponse path = '/api/v1/deal/history/' data = { 'symbol_id': symbol_id, 'direction': search_direction, 'start': start_time, 'count': count } return self.post(path, data)
def get_market_kline(self, symbol_id, start_time=0, search_direction=2, count=10, kline_type=1): if not check_is_all_digit(symbol_id, start_time, search_direction, count, kline_type): return InvalidParamsHttpResponse path = '/api/v1/market/kline/' params = { 'symbol_id': symbol_id, 'st': start_time, 'direction': search_direction, 'count': count, 'kline_type': kline_type } return self.get(path, params)