运行 binance-api-节点模块
run binance-api-node module
我使用 npm 安装了 Binance API 节点。我进行到以下步骤:
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))
能否指导我如何 运行 这部分。可以在 https://github.com/Ashlar/binance-api-node
上找到节点模块
- 您需要在 this doc
之后创建 API 密钥
2。一旦你有了 API 密钥和密钥,你就可以分别存储在 apiKey
和 apiSecret
中。
3. 如果你没有合适的 babel 配置,你将需要使用基本的 commonjs
要求。
const Binance = require('binance-api-node').default
而不是 ES6 import
我使用 npm 安装了 Binance API 节点。我进行到以下步骤:
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))
能否指导我如何 运行 这部分。可以在 https://github.com/Ashlar/binance-api-node
上找到节点模块- 您需要在 this doc 之后创建 API 密钥
2。一旦你有了 API 密钥和密钥,你就可以分别存储在 apiKey
和 apiSecret
中。
3. 如果你没有合适的 babel 配置,你将需要使用基本的 commonjs
要求。
const Binance = require('binance-api-node').default
而不是 ES6 import