def unbind_mfa(self, dubblePhoneMsgType, dubblePhoneCode): params = { 'dubblePhoneMsgType': dubblePhoneMsgType, 'dubblePhoneCode': dubblePhoneCode } url = '/api/v2/inner/user/unBindMfa' return Utils.Utils().http_post_request(params, url)
def login_verify(self, dubbleGoogleCode, username, uuid): params = { 'dubbleGoogleCode': dubbleGoogleCode, 'username': username, 'uuid': uuid } url = '/api/v2/inner/user/check' return Utils.Utils().http_post_request(params, url)
def find_password_three(self, userName, newPassword, confirmPassword): params = { 'userName': userName, 'newPassword': newPassword, 'confirmPassword': confirmPassword } url = '/api/v2/inner/user/findPassword/resetPassword' return Utils.Utils().http_post_request(params, url)
def bind_email(self, email, dubbleGoogleCode, dubblePhoneCode, dubblePhoneMsgType): params = { 'email': email, 'dubbleGoogleCode': dubbleGoogleCode, 'dubblePhoneCode': dubblePhoneCode, 'dubblePhoneMsgType': dubblePhoneMsgType } url = '/api/v2/inner/user/bindEmail' return Utils.Utils().http_post_request(params, url)
def get_kline(self, symbol, type, size, frome, to): params = { 'symbol': symbol, 'type': type, 'size': size, 'from': frome, 'to': to } url = '/api/v2/pub/kline' return Utils.Utils().http_get_request(params, url)
def get_withdraw_recorde(self, assetType, start, end, frome, size): params = { 'assetType': assetType, 'start': start, 'end': end, 'frome': frome, 'size': size } url = '/api/v2/inner/finance/withdrawRecord' return Utils.Utils().http_get_request(params, url)
def get_coin_address(self, csessionid, sig, token, scene, assetType): params = { 'csessionid': csessionid, 'sig': sig, 'token': token, 'scene': scene, 'assetType': assetType } url = '/api/v2/inner/finance/getCoinAddress' return Utils.Utils().http_get_request(params, url)
def bind_maf(self, code, dubblePhoneMsgType, dubblePhoneCode, dubbleGoogleCode): params = { 'code': code, 'dubblePhoneMsgType': dubblePhoneMsgType, 'dubblePhoneCode': dubblePhoneCode, 'dubbleGoogleCode': dubbleGoogleCode } url = '/api/v2/inner/user/bindMfa' return Utils.Utils().http_post_request(params, url)
def find_password_one(self, csessionid, sig, token, scene, userName, lang): params = { 'csessionid': csessionid, 'sig': sig, 'token': token, 'scene': scene, 'userName': userName, 'lang': lang } url = '/api/v2/inner/user/findPassword/checkUser' return Utils.Utils().http_post_request(params, url)
def trade(self, price, amount, type, tradePassword, symbol, source): params = { 'price': price, 'amount': amount, 'type': type, 'tradePassword': tradePassword, 'symbol': symbol, 'source': source } url = '/api/v2/inner/trade/placeOrder' return Utils.Utils().http_post_request(params, url)
def get_phone_code(self, csessionid, sig, token, scene, phone, type): params = { 'csessionid': csessionid, 'sig': sig, 'token': token, 'scene': scene, 'phone': phone, 'type': type } url = '/api/v2/verifiable/phonecode' return Utils.Utils().http_get_request(params, url)
def set_trade_pwd(self, pwd, pwdT, dubbleGoogleCode, dubblePhoneMsgType, dubblePhoneCode): params = { 'pwd': pwd, 'pwdT': pwdT, 'dubbleGoogleCode': dubbleGoogleCode, 'dubblePhoneMsgType': dubblePhoneMsgType, 'dubblePhoneCode': dubblePhoneCode } url = '/api/v2/inner/user/setTradePwd' return Utils.Utils().http_post_request(params, url)
def set_login_policy(self, code, type, dubbleGoogleCode, dubblePhoneMsgType, dubblePhoneCode): params = { 'code': code, 'type': type, 'dubbleGoogleCode': dubbleGoogleCode, 'dubblePhoneMsgType': dubblePhoneMsgType, 'dubblePhoneCode': dubblePhoneCode, } url = '/api/v2/inner/user/setLoginPolicy' return Utils.Utils().http_post_request(params, url)
def get_account_recorde(self, assetType, handleType, startDate, endDate, pageNo, pageSize): params = { 'assetType': assetType, 'handleType': handleType, 'startDate': startDate, 'endDate': endDate, 'pageNo': pageNo, 'pageSize': pageSize, } url = '/api/v2/inner/finance/accountRecord' return Utils.Utils().http_get_request(params, url)
def get_email_code(self, csessionid, sig, token, scene, email, type, lang): params = { 'csessionid': csessionid, 'sig': sig, 'token': token, 'scene': scene, 'email': email, 'type': type, 'lang': lang } url = '/api/v2/inner/email/code' return Utils.Utils().http_get_request(params, url)
def register(self, userName, code, password, passwordAgain, agreement): params = { 'userName': userName, 'code': code, 'password': password, 'passwordAgain': passwordAgain, 'agreement': agreement, 'channelId': '', 'utmSource': '' } url = '/api/v2/inner/user/regist' return Utils.Utils().http_post_request(params, url)
def set_mobile(self, phone, phoneMsgType, phoneCode, dubblePhoneCode, dubblePhoneMsgType, dubbleGoogleCode, status): params = { 'phone': phone, 'phoneMsgType': phoneMsgType, 'phoneCode': phoneCode, 'dubblePhoneCode': dubblePhoneCode, 'dubblePhoneMsgType': dubblePhoneMsgType, 'dubbleGoogleCode': dubbleGoogleCode, 'status': status } url = '/api/v2/inner/user/setMobile' return Utils.Utils().http_post_request(params, url)
def get_order_record(self, symbolID, orderType, startDate, endDate, status, orderID, size): params = { 'symbolID': symbolID, 'orderType': orderType, 'startDate': startDate, 'endDate': endDate, 'status': status, 'orderID': orderID, 'size': size } url = '/api/v2/inner/trade/orderRecord' return Utils.Utils().http_get_request(params, url)
def login(self, user, password): params = { 'loginName': user, 'password': password, 'udesk': False, 'sig': '', 'token': '', 'scene': '', 'sso': '', 'return_to': '' } url = '/api/v2/inner/user/weblogin' return Utils.Utils().http_post_request(params, url)
def add_address(self, address, assetType, remark, isAuth, withdrawPassword, dubbleGoogleCode, dubblePhoneCode, dubblePhoneMsgType): params = { 'address': address, 'assetType': assetType, 'remark': remark, 'isAuth': isAuth, 'withdrawPassword': withdrawPassword, 'dubbleGoogleCode': dubbleGoogleCode, 'dubblePhoneCode': dubblePhoneCode, 'dubblePhoneMsgType': dubblePhoneMsgType } url = '/api/v2/inner/finance/addAddress' return Utils.Utils().http_post_request(params, url)
def certify_one(self, cardType, nation, bankId, userName, birthday, cardNum, bankCardNum, token): params = { 'cardType': cardType, 'nation': nation, 'bankId': bankId, 'userName': userName, 'birthday': birthday, 'cardNum': cardNum, 'bankCardNum': bankCardNum, 'token': token } url = '/api/v2/inner/user/certify' return Utils.Utils().http_post_request(params, url)
def apply_withdraw(self, assetType, addressId, withdrawFee, withdrawAmount, source, dubbleGoogleCode, dubblePhoneCode, dubblePhoneMsgType, withdrawPassword): params = { 'assetType': assetType, 'addressId': addressId, 'withdrawFee': withdrawFee, 'withdrawAmount': withdrawAmount, 'source': source, 'dubbleGoogleCode': dubbleGoogleCode, 'dubblePhoneCode': dubblePhoneCode, 'dubblePhoneMsgType': dubblePhoneMsgType, 'withdrawPassword': withdrawPassword } url = '/api/v2/inner/finance/applyWithdraw' return Utils.Utils().http_post_request(params, url)
def get_exchange(self): params = {} url = '/api/v2/pub/exchange' return Utils.Utils().http_get_request(params, url)
def get_ticker(self, symbol): params = {'symbol': symbol} url = '/api/v2/pub/ticker' return Utils.Utils().http_get_request(params, url)
def get_index_klines(self, market): params = {'market': market} url = '/api/v2/pub/index/klines' return Utils.Utils().http_get_request(params, url)
def get_index_info(self, lang): params = {'lang': lang} url = '/api/v2/pub/index/info' return Utils.Utils().http_get_request(params, url)
def cancel_buyorder(self, orderId, symbol, source): params = {'orderId': orderId, 'symbol': symbol, 'source': source} url = '/api/v2/inner/trade/cancelOrder' return Utils.Utils().http_post_request(params, url)
def get_footer(self): params = {} url = '/api/v2/inner/footer' return Utils.Utils().http_get_request(params, url)
def get_pretoset(self): params = {} url = '/api/v2/pub/preToSetting' return Utils.Utils().http_get_request(params, url)
def get_finance_limit(self): params = {} url = '/api/v2/inner/finance/financeLimit' return Utils.Utils().http_get_request(params, url)