import requests
url = 'https://api2.bybit.com/spot/api/otc/item/list'
BTC_rosbank = {
'userId': 34191553,
'tokenId': 'BTC',
'currencyId': 'RUB',
'payment': 75,
'side': 1,
'size': 10,
'page': 1,
'amount': 30000
}
headers = {
'accept': 'application/json',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'ru-RU',
'cache-control': 'no-cache',
'content-length': '85',
'content-type': 'application/x-www-form-urlencoded',
'cookie': "_gcl_au=1.1.1204346449.1658931640; _by_l_g_d=dfc2731c-84fe-30f1-33fb-a1ae4f96d5de; BYBIT_REG_REF_prod={lang:ru-RU,g:dfc2731c-84fe-30f1-33fb-a1ae4f96d5de,referrer:www.google.com/,source:google.com,medium:other,url:https://www.bybit.com/ru-RU/}; _ga=GA1.2.145230747.1658931647; _ym_d=1658931648; _ym_uid=1658931648885589004; tmr_lvidTS=1658931648556; tmr_lvid=c69af95a84d385bcaf6fea58f48b5d1b; _cc_id=92a064bb5b5d60e101251007d54319d8; permutive-id=b5659c44-4f48-4577-8016-e52f38cc38da; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2234191553%22%2C%22first_id%22%3A%221824007fd5915e-00525034d0bba9c-c4e7526-921600-1824007fd5a306%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%2C%22_a_u_v%22%3A%220.0.5%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTgyNDAwN2ZkNTkxNWUtMDA1MjUwMzRkMGJiYTljLWM0ZTc1MjYtOTIxNjAwLTE4MjQwMDdmZDVhMzA2IiwiJGlkZW50aXR5X2xvZ2luX2lkIjoiMzQxOTE1NTMifQ%3D%3D%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%24identity_login_id%22%2C%22value%22%3A%2234191553%22%7D%2C%22%24device_id%22%3A%221824007fd5915e-00525034d0bba9c-c4e7526-921600-1824007fd5a306%22%7D; BYBIT_REG_REF={lang:ru-RU,g:dfc2731c-84fe-30f1-33fb-a1ae4f96d5de,referrer:www.bybit.com/user/assets/order/spot-history/active,source:bybit.com,medium:other,url:https://www.bybit.com/user-spot/assets/history-trade}; bm_sz=00F5A65665A52136DD153486E08E1A11~YAAQk2pkX6+AEbCCAQAAqzWWzxA73cBtTtea19fsvavVMp1wsX6UQnn+iY/uFserB41cmtaMBvCBupgKfxq2Kk8FBX+40JKG3KEQBpAJTxvlUyPr8MWXS+2HXT40ECh5ynjGprTtUbapJdNKW9XW0FYq2d8wm1P5L2ZiPca9RfLHVx4NvYc6egr6hzxt6mL7BYGm00UT6dBdpHbp7B9M6+qSnAJvd/XWJCrEV/Aky7YhOrP1YgpTVoM0v+A83ZNzWGkqfqZokNimiWHalink3Wr2tr55R1ZyBuqzUbyUyCc94g==~3686960~3752499; bm_mi=5D81BF57B18D0F9BEF0BE08ABBD23C73~YAAQk2pkX9KCEbCCAQAAuVmWzxBXkTYriU6LtaV0yoa0LgXXb4+JLbR/+ogYkIjD6SOtCz8tOeln/3jOIoNBkM92iUt+RPVocthWm05jwqMhKRm1/XZ30kXLniDGRLnXqcHVX9tFxTt6vEgftTeRPwzSV2AEknJfzBgqhdkLQvp/VjvtiRH0REnC8ANes8SKpS1z0qjvjGEtseWreFrwlYu/BnuvAlay/yvZe9xlIP2/PrcUdVlp8SzCvPfFC7a+0+KR2cxy240co0lcrPy+Bbqg8SiKBw0XkWFr/T/afw433lyK7B8xYWygwtBR7KyG3ZsfFm7OclQm~1; _gid=GA1.2.2102331020.1661340118; _ym_isad=1; ak_bmsc=DEFD7BA7F9634A1E43E8CC24695C5ADA~000000000000000000000000000000~YAAQk2pkXwOFEbCCAQAAT3SWzxCkMTxMrN9FW+xg9bN9AigpTxRTtBvvuA8tTVC+Nt/hw58mSn3HsJzCmphpx3oNFkR3tgiA7/e3XTmGlw14MAsv5wyPDbhannD6lrlfTA9CGc/LxmX83yR1zu39cTZzIZym1iLh9Jenqs9bSI4iytsiglUVybZPw7n4V6tIkJPx3G9MfQztBYe333BQzgw0l872fqJ+ErWVcGxQbX8S+yZ///nQBTKoYMTEAZODiM41gQMrWJJ9ZQJdiEHiLCQL/54muLavJdV6Te5biGW++mHz7gB+ViYPYJLisEcvlrVyGauSR6jvF+3wA/+vk0yzRTNeaJQglHVPxEohMUAQp6SoY89zQAJPTDDCfoAlFmlHfHvcTm49RPlsAqM3iS3gQFmftsZql/2aJJdIfDEbLiAMv39NOoA=; panoramaId_expiry=1661426522006; b_t_c_k=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NjE2MDUwMzcsInVzZXJfaWQiOjM0MTkxNTUzLCJnZW5fdHMiOjE2NjEzNDU4Mzd9.QeXNrij6aZ3T5bPhYsIQYCfFB_zPq9Uc2b7Ozt0pMlX2f8JyTV39mulI1_G56POvZF4ry8hZUTqYvZt4yisqhA; tmr_reqNum=602; _gat_UA-126371352-1=1; _abck=951C328F9FD8BAB7E37629777674F5B1~0~YAAQk2pkX+h/FrCCAQAAxynuzwjEVXFPdtn59L4s5VRhIyMU1Tq8zT2zAsfZW4j/goVovI/ieCaiHe0rLQ9KBOY3G4s2wyfroHcNWwVE4wxBwNI0S5epKMICAlT5CJXCRaQ/GZjim/QZve7PbsAt3Mo5wMKW6spc5jfgK2letss7RGOi1fSD33kF3dXto4G1Dh0uPPMTkL+/59x2hzKtkwYEufNplu1f1Cr8dlm1OiOd7xwWya15oW41rHf00DpYnpGm6slquBm6RHsGn9hTZHo4ehjsXLLKiCJ0br2r4SoywTOPPNx1qG54ebSUqQkbRY9ZD60vlGxj4CdjN8PL76xLfvCXvhBR+jN0WGMtG948peiRhOy7fkZjkVbj~-1~-1~-1; bm_sv=42374740203725AD0FCD096B82726D3A~YAAQk2pkX+l/FrCCAQAAxynuzxDQJhno9dlDaciDn/3S8ghCU2OU24ME3Ggh6+bNLlu/mz89jYrsl3QZ/Vv47Iq+3SjCipxj4s/OQXpuf+mlzisIhTAi5r9pycOVYjtE9QWQJlYXua1nSqnCcdnpcRNuR84Z8rH8zMGY0SZKfPuEP8Ab6l8y/GJj2cRfChpbUf6G8W9UEqzaXniZP6e5BVVbgQDhVaeHAmgCSZ9/uLW8s80lipmo1o/r6JTB1LpD~1",
'guid': 'dfc2731c-84fe-30f1-33fb-a1ae4f96d5de',
'lang': 'ru-RU',
'origin': 'https://www.bybit.com',
'platform': 'PC',
'pragma': 'no-cache',
'referer': 'https://www.bybit.com/',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': 'Windows',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-site',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',
'usertoken': 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NjE2MDUwMzcsInVzZXJfaWQiOjM0MTkxNTUzLCJnZW5fdHMiOjE2NjEzNDU4Mzd9.QeXNrij6aZ3T5bPhYsIQYCfFB_zPq9Uc2b7Ozt0pMlX2f8JyTV39mulI1_G56POvZF4ry8hZUTqYvZt4yisqhA',
}
result_BTC_rosbank = requests.post(url, headers=headers, json=BTC_rosbank).json()
print(result_BTC_rosbank)
вот что выдает запрос:
{'ret_code': 30002, 'ret_msg': 'Invalid request.', 'result': None, 'token': None}