We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Short Description:
var apiSecret = process.env.SECRET_KEY
const getParameters = async ()=>{ const response = await fetch('https://api.binance.com/api/v3/time',{ headers:{ "X-MBX-APIKEY":process.env.API_KEY } }) const {serverTime}= await response.json() const query_string = timestamp=${serverTime}; const signature = crypto .createHmac('sha256', apiSecret) .update(query_string) .digest('hex')
timestamp=${serverTime}
console.log(serverTime); console.log(signature); return {serverTime,signature}
}
try{ const {serverTime,signature}= await getParameters()
const response = await fetch(`https://api.binance.com/api/v3/order?symbol=${base}×tamp=${serverTime}&signature=${signature}`,{ headers:{ "X-MBX-APIKEY":process.env.API_KEY, "signature":signature } }) .then((response) => response.json()) .then((data) => console.log(data)); // console.log(response); res.status(200).json(response)
nodejs version:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Short Description:
var apiSecret = process.env.SECRET_KEY
const getParameters = async ()=>{
const response = await fetch('https://api.binance.com/api/v3/time',{
headers:{
"X-MBX-APIKEY":process.env.API_KEY
}
})
const {serverTime}= await response.json()
const query_string =
timestamp=${serverTime}
;const signature = crypto
.createHmac('sha256', apiSecret)
.update(query_string)
.digest('hex')
}
try{
const {serverTime,signature}= await getParameters()
nodejs version:
The text was updated successfully, but these errors were encountered: