Ponimania Parameter Consulate Signature in Binance API
In that time, you ask you to get the access to the end of the “policeman data” with the parameter of signatures, it is important to reap this function. In this state, we break the fact that such a parameter of the signature and how it is realyzed.
What is this parameter signature?
The parameter of the signs – this is a mechanism that has been distributed to the requests of API, which allows you to include add -ant data or information in your invite. At the point of indicating this parameter within the substantiality of the URLs you can transfer the sensitive or non -standard data, which are not included in the standard hull.
In the Binance Binance, the “Polish Data” parameter is signed for the restoration of the conquret polish data, not revealing them from the help of API.
How to use the signsatory parameter
For the use of the parameter the sowing with the edge of the “Data Data” on Binance:
- Format:
- Pass the signature values in the Tello : You can put out the parametersig in the case of your request, if you are not low -dangered.
PRIMER PRESS:
Here’s a reception, which includes the parameter in the pre -seat sig
and translates some of the data on the root:
`JSON
& IRATUTY=btcussdt
Realization in your code
Here’s the primer of that, how to cope with the parameter of the sowing subscription in your code:
`Python
Importies
Binanceuserdata Class:
Def __init __ (Self, Base_url, API_KEY, API_SECRET):
self.base_url = Base_url
self.api_key = api_key
self.api_secret = api_secret
Def get_user_data (Self, Simvol, Quolicity, Date and Temporary Record, STORON):
Submit URL -Address with the help parameter signature
URL = f "{self.base_url}/API/V3/Spot/Userdata? Sig = {Self.get_signature ()} &"
Add other parameters in URL -ads
Params = {
"Simvol": Simvol,
"Values": colicity,
"Timestamp": Timestamp,
"STORON": STORON,
}
Answer = Reques.get (URL, Params = Params)
Reporting.json ()
Def Get_Signature (Self):
Generate signature on the basis of your API key and secrets
Change them on their real values
Api_key = self.api_key
api_secret = self.api_secret
Subscribe = f "{api_key}: {api_secret}"
Return the signature
Primmer Using:
binance_user_data_api = binanceuserdataapi (" "Your_api_key", "Your_api_secret")
Symbol = "eth"
Values = 1000.00
Timestamp = 1643723903
Side = "Bid"
User_Data_Response = binance_user_data_api.get_user_data (Simvol, Calicia, Date and Temporary Record, Solo)
Print (User_data_pressponse)
conclusion
The parameter of the request signatures the binance API, which allows you to translate confidal or non -standard data, does not discover its help on the invocation. The follow -up of these steps and the realization of this mechanism in your code, you can withdraw access to the end of the “Polish data” about binance.