how to send HMAC SHA 256 Secret key to binance api?

Viewed 674
1 Answers

You need to pass the X-MBX-APIKEY as a request header, not as a GET param.

Unfortunately your code doesn't show how you build the request, but here's an example using axios:

axios({
    url: 'https://api.binance.com/api/v3/myTrades',
    method: 'get',
    headers: {
        'X-MBX-APIKEY': config.API_Key
    }
}).then((response) => {
    console.log(response);
})
Related