tiagosiebler / bybit-api

Node.js SDK for the Bybit APIs and WebSockets, with TypeScript & browser support.

Home Page:https://www.npmjs.com/package/bybit-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo Trading Api Key Error

welteles opened this issue · comments

I recently generated an API key and secret for my Demo Trading account. However, upon attempting to use them, I encountered the following error message:

image

I'm currently using the latest version of the software. Could you please assist me in resolving this issue?

My Code.

import { RestClientV5 } from 'bybit-api'; const client = new RestClientV5({testnet: false, key, secret});

commented

You need to include demoTrading: true else the SDK doesn't know to use the dedicated demo trading API (different URL from the live environment):
https://github.com/tiagosiebler/bybit-api/blob/master/examples/demo-trading.ts#L19-L37

Thank you so Much!