Closed vahurtad closed 6 years ago
I tried doing the code one step at a time, and using GDAXConfig was my problem. To get the better view of the error I found out how to use Promise as it would print out Promise<{pending}>.
const gdaxConfig:GDAXConfig ={
logger:logger,
apiUrl: process.env.GDAX_API_URL || 'https://api.gdax.com',
auth: {
key: process.env.GDAX_KEY,
secret: process.env.GDAX_SECRET,
passphrase: process.env.GDAX_PASSPHRASE
}
};
const gdax = new GDAXExchangeAPI(gdaxConfig);
gdax.loadBalances().then(function(token){
console.log(token);
}).catch(function(err){
console.log('er',err);
})
er { Error: Error loading account balances on GDAX
at authClient.getAccounts.then.catch (C:\xxx\src\exchanges\gdax\GDAXExchangeAPI.ts:323:35)
at process._tickCallback (internal/process/next_tick.js:68:7)
cause: undefined,
time: 2018-05-17T01:37:46.753Z, response:
{ status: undefined, body: '{"message":"request timestamp expired"}' } }
I fixed my computer clock from another issue so now it works! #113
error running the gdaxConsole.ts file
ts-node gdaxConsole.ts --product BCH-USD