我在执行代码时使用 Binance Broker api。
我收到此错误: data: { code: -1021, msg: '此请求的时间戳位于 recvWindow 之外。' }
然后我使用了 binance 服务器时间戳并收到另一个错误: data: { code: -1022, msg: '此请求的签名无效。' }
----- My sample code -------
'use strict'
//Modules
const crypto = require('crypto');
const axios = require('axios');
const moment = require('moment');
const keys = require('./config/keys');
//Keys
const apiKey = keys.keys.apiKey;
async function api_call(config){
var response = {}
try {
response = await axios(config);
response = {
error: false,
data : response.data
}
} catch (error) {
response …Run Code Online (Sandbox Code Playgroud)