Problem with Reverents on Binance API with React
As a cropper of cryptocurrency, the alleviation of the requested API binance can be a non -deletery part of the creation of the renewed and efficient attachments. However, at the existence of react, the vest does not always go, as it was planned. In this state, we will utter in the problem of the invitations on the API Binance with the react and the resolution for the resolution of these problems.
API Binance
Binance – this is the preserving cryptocurrency, which provides the covered API for the disabilities for access to its own inheritance. The API will make the final points for different operats, the trades, the management of the counters and the many second. Conducting Binance’s documentation, requested Get Het, that API-Keys (also extended access tokens) are transferred to the API REST CROSE -s mbx-apikey.
Problem: HMAC Sha256 Signatures
Easters on the requested Get in API Binance with React you need to connect HMAC SHA256. The case is not less, there are two problems that can be used to use this method:
- If this is not included or the badge, you get the scraper.
- Binning HMAC SHA256 : Binance API is the concrete format for signature HMAC Sha256, which includes in the key generation and its use for the signature.
Problem with Availability in React
Here are some of the general problems that are paid the deepening.
Issue 1: Unsetable Passing token Access Cherisi X-MBX-APikey
- Decision: Encourage that your token access is rightly transferred to the ZagolovkaX-MBX-APikey.
- Combining the oblique: “Extens the unusual parameter” Apikey “in Zagolovka X-MBX-APikey.”
Issue 2: Subcribe HMAC Sha256 Needless or Otsta
- Resolution: Encourage that you generate an adverse key and use it for the creation of the HMAC SHA256 signature. You can generate a new key, using the library
binauthetify
.
- Combining the Oshbak: “The unbelievers or the HMAC Sha256 values”.
Issue 3: Ulabble body structure Press
- Resolution: Encourage that you include all the unusual parameters into your body, so as Api-Key and Access token (API-Token).
- Combining the oblique: “Extens the unusual parameter” Apikey “in Zagolovka X-MBX-APikey.”
Primer code
Here’s the primer of that, as the signs of HMAC SHA256 with the help:
`JSX
{Binance}}@binauthentify/binance-api ';
Const API = New Binance ({
Access_token: 'Your_api_token',
Secret_key: 'Your_secret_key',
});
Const Request = {
Method: 'Get',
Zagolovki: {
'X-MBX-APIKEY':your_access_token,
}
};
API.GET (Request) .then ((Response) => {
Console.log (Response.data);
}). Catch (((Oshchyk) => {
Console.error (Oshbak);
});
In this, the binance copy is assigned to your token access and a secreted key. Object Request
includes in the sieve of the API-Key Zagolovok, using theX-MBX-APikey
from the token.
conclusion
Introduction to the Purus on API Binance with React can be simple, if you are followed by these Recots:
- Put the API-KEY CHERE CHERE `-MBX-APIKY.
- Revenge that HMAC SHA256 signatures are included in your housing.
- Revenge that all the unusual parameters are provided and right.
Sesnate these potential problems, the disabilities can make the renewable and efficient attachments, use reagnery, in order to assemble with API binance.