def test_get_open_channels(self, session): response = requests.get(f'{trading_url}/api/user/daccs/open-channels', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_get_profile_cards(self, session): response = requests.get(f'{trading_url}/api/profile/cards', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_get_active_payments(self, session): response = requests.get(f'{trading_url}/api/payment/active-payments', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_post_kyc_telegram(self, session): response = requests.post(f'{trading_url}/api/kyc/telegram-passport', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_post_affiliate_enroll(self, session): response = requests.post(f'{trading_url}/api/profile/affiliate/enroll', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_post_cancel(self, session): response = requests.post(f'{trading_url}/api/payment/cancel/0', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_get_account(self, session, account): response = requests.get(f'{trading_url}/api/account/{account}', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_post_kyc_application(self, session): response = requests.post(f'{trading_url}/api/kyc/application', headers={'X-Auth-Nonce': session['nonce']}, json={}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_get_notification_settings(self, session): response = requests.get( f'{trading_url}/api/user/notification-settings', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_post_renew_deposit_address(self, session, account, account_currency): response = requests.post( f'{trading_url}/api/account/{account}/deposit/{account_currency}/renew', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_post_info_acc_name(self, session, account, name): data = {'name': name} response = requests.post(f'{trading_url}/api/account/{account}/info', json=data, headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_post_profile_settings(self, session, lang): data = {'lang': lang} response = requests.post(f'{trading_url}/api/profile/settings', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies'], json=data) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_post_create_margin(self, session, currency): data = {"currency": currency} response = requests.post(f'{trading_url}/api/user/create/margin', headers={'X-Auth-Nonce': session['nonce']}, json=data, cookies=session['cookies']) logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_post_create_payment(self, session, payment_ratio, base_amount, cancel_payment): data = { "quoteAmount": str(round(float(base_amount) * float(payment_ratio), 2)), "quoteCurrency": "EUR", "baseAmount": base_amount, "baseCurrency": "BTC", "language": "ru", "ratio": payment_ratio, "account": get_accounts(session, kind='Spot') } response = requests.post(f'{trading_url}/api/payment/create', headers={'X-Auth-Nonce': session['nonce']}, json=data, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_post_internal_transfer(self, session, kind_from, kind_to): from_account = get_accounts(session, kind=kind_from)[0] to_account = list( set(get_accounts(session, kind=kind_to)).symmetric_difference( [from_account]))[0] data = { "id": str(time.time_ns()), "fromAccount": int(from_account), "toAccount": int(to_account), "amount": "0.00010000", "currency": "BTC" } response = requests.get( f'{trading_url}/api/account/{get_accounts(session)[0]}/internal-transfer', headers={'X-Auth-Nonce': session['nonce']}, cookies=session['cookies']) logging.info(response.headers) logging.info(response.text) assert response.status_code == 200
def test_get_paysystem_countries(self): response = requests.get( f'{trading_url}/api/common/paysystem-countries') logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_get_payment_ratio(self): response = requests.get(f'{trading_url}/api/common/payment/ratio') logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_get_historical_currency_ratios(self): response = requests.get( f'{trading_url}/api/common/historical-currency-ratios') logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_get_referral_levels(self): response = requests.get(f'{trading_url}/api/common/referral-levels') logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_get_candles(self, currency): response = requests.get( f'{trading_url}/api/market-data/candles/{currency}/1h') logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_get_news(self): response = requests.get(f'{trading_url}/api/common/news') logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_get_market_watch(self): response = requests.get(f'{trading_url}/api/market-data/market-watch') logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_spec_margin_trading(self): response = requests.get( f'{trading_url}/api/common/platform-specification/margin-trading') logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200
def test_get_investments(self): response = requests.get(f'{trading_url}/api/market-data/investments') logging.info(response.status_code) logging.info(response.text) assert response.status_code == 200