I used npm to install the Binance API node. I reach to the following step:
import Binance from 'binance-api-node'
const client = Binance()
// Authenticated client, can make signed calls
const client2 = Binance({
apiKey: 'xxx',
apiSecret: 'xxx',
getTime: xxx, // time generator function, optional, defaults to () => Date.now()
})
client.time().then(time => console.log(time))
Could you please guide me on how to run this part. The node module could be found on https://github.com/Ashlar/binance-api-node
2. Once you have your API key and secret key, you store in
apiKeyandapiSecretrespectively. 3. If you do not have an appropriate babel config, you will need to use the basiccommonjsrequires.const Binance = require('binance-api-node').defaultinstead ofES6 import