Hi @ivan or @thecil , I got stuck again!
when I try to run my index.js file (i have replaced the last 4 & 5 characters of the key and secret for safety reasons):
const GeminiAPI = require("gemini-api").default;
const secret = "2bFz9ojXFE7beUEYyZvcYgSv****";
const key = "master-Vctx0N0MUQq4qni*****";
const restClient = new GeminiAPI({key, secret, sandbox:true});
restClient.newOrder({amount: 10, price: 27000, side:"buy", symbol:"btcusd"})
.then(response => console.log(response));
I get the following from the terminal (I am running all of this from an Ubuntu 20.04 Huawei notebook by the way, but I had no trouble installing yarn or the gemini package. I had node JS from beforehand).
(node:100099) UnhandledPromiseRejectionWarning: #<Object>
(Use `node --trace-warnings ...` to show where the warning was created)
(node:100099) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:100099) [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.
Then I ran the following command: node --trace-warnings index.js, and I get the following:
(node:100146) UnhandledPromiseRejectionWarning: #<Object>
at emitUnhandledRejectionWarning (internal/process/promises.js:170:15)
at processPromiseRejections (internal/process/promises.js:247:11)
at processTicksAndRejections (internal/process/task_queues.js:94:32)
(node:100146) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:100146) [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.
at emitDeprecationWarning (internal/process/promises.js:180:11)
at processPromiseRejections (internal/process/promises.js:249:13)
at processTicksAndRejections (internal/process/task_queues.js:94:32)
so, then I ran the following command: node --unhandled-rejections=strict index.js, and I get the following:
internal/process/promises.js:213
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: 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(). The promise rejected with the reason "#<Object>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
please a little help!