binance-exchange/node-binance-api

Reqest futuresHistoricalTrades and get status code: 401 Unauthorized

Cheny-chen opened this issue · 1 comments

I follow the sample code. but get response as following

console.info( await binance.futuresHistoricalTrades( "XMRUSDT" ) );

{
  code: -2015,
  msg: 'Invalid API-key, IP, or permissions for action, request ip: 61.230.53.158'
}

If I send via postman, I got the same error
{{url}}/api/v3/historicalTrades?symbol=BTCUSDT&limit=500&fromId
-Header "Content-Type:application/json"
-Header "X-MBX-APIKEY: {binance-api-key}"

{
    "code": -2015,
    "msg": "Invalid API-key, IP, or permissions for action."
}

try making a new api key, the old ones are often not given correct permissions