I trying to create an order by “@binance/connector” library in nodejs, it always response 401 error while I already provide the apikey and secret. I have no idea about what is going wrong
javascript code:
const { Spot } = require('@binance/connector')
const apiKey = 'key'
const apiSecret = 'secret'
const client = new Spot(apiKey, apiSecret, {timeout: 5000})
client.account().then(response => client.logger.log(response.data)).catch(error => client.logger.error(error))
client.newOrder('EOSBUSD', 'BUY', 'LIMIT', {
price: '1',
quantity: 10.9,
timeInForce: 'GTC'
}).then(response => client.logger.log(response.data))
.catch(error => client.logger.error(error))