BingX Headers Generator that allows to access most of the BingX API endpoints
Project description
bingx-headers-generator
BingX Headers Generator is an python library which generates for you all required headers to make requests to BingX non-public API endpoints
Installation
pip install bingx-headers-generator
Examples
from bingx_headers_generator import BingXHeadersGenerator
# custom headers are NOT necessary, but are just an additional option you can pass to request
custom_headers = {
"cache-control": "no-cache, no-store, must-revalidate",
"pragma": "no-cache",
"expires": "0",
}
# btw as I recently checked generator works even with wrong app_version but I left that option in advance of BingX API changes
bingx_headers_generator = BingXHeadersGenerator(
"4.58.39",
"1020975128917528579",
"1052672282142707717",
)
# you can only generate headers
headers = bingx_headers_generator.generate_headers(custom_headers)
# also you can generate just sign header
sign = bingx_headers_generator.generate_sign()
# or you can make full request
res = bingx_headers_generator.make_request(
"GET",
"https://api-app.we-api.com/api/copytrade/v1/real/trader/positions",
custom_headers,
)
How did I find out how to generate headers?
In one of their site files(https://bin.bb-os.com/_nuxt/1491b29.js) I found interesting function - function wt(e)
Go check it and you follow other functions that are called in wt()
and I'm sure you will start to understand the whole process of generating headers
THIS PROJECT IS ONLY FOR LEARN PURPOSE!
Please keep in mind that I do NOT encourage breaking any sort of security on websites
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for bingx_headers_generator-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fda0cb9dee52929c2240fd416eddaaa2522721e25a3768992629ab618a14e3d |
|
MD5 | b4ba1709fa8d987f21f420591b7a3af4 |
|
BLAKE2b-256 | e66dc479553fad45014fd893b0d9373054970b359a81b085387c64a95bd2f142 |
Close
Hashes for bingx_headers_generator-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da321190c99a0e5a3584fa711ecc1034ae1405dab8dab329131973f14409b85c |
|
MD5 | 0e03c337b13e3a304cf983d90d02e70a |
|
BLAKE2b-256 | 6b7144f829c89fd4727d60740f9a1e24da83dc410820aa0ccafddb3610dfbe7d |