I’m getting an error on the first basic order one. The error I’m getting is :
(node:7412) UnhandledPromiseRejectionWarning: #<Object>
(node:7412) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:7412) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
My code is simply
const GeminiAPI = require("gemini-api").default;
const secret = "xxxxxxxxxxxxxxxxxxx";
const key = "xxxxxxxxxxxxxxxxxxxxxxx";
const restClient = new GeminiAPI({key, secret, sandbox:true});
restClient.newOrder({amount:10,price:100,side:"buy",symbol:"btcusd"})
.then(response => console.log(response));
I’m going to have a look at this later, but the kids are up now, but if anyone who knows node/ javascript better than me can point me in the right direction that would be massively appreciated. And yes I’ve removed the key and secret in the post.