首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行binance-api-节点模块

运行binance-api-节点模块
EN

Stack Overflow用户
提问于 2020-09-27 06:14:34
回答 1查看 830关注 0票数 0

我使用npm安装Binance API节点。我达到以下步骤:

代码语言:javascript
复制
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上找到。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-09-27 06:34:53

  1. 您需要按照这位医生创建API键
  2. 一旦您拥有了API密钥和密钥,您将分别存储在apiKeyapiSecret中。3.如果您没有适当的babel配置,则需要使用基本的commonjs要求。const Binance = require('binance-api-node').default而不是ES6 import
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64085410

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档