Guide on Installing the API from GitHub;
const WebSocket = require("ws");
const DerivAPI = require("@deriv/deriv-api/dist/DerivAPI");
// Use your own app_id instead of 1089 for testing
// Register your own app at api.deriv.com to get a unique app_id.
const connection = new WebSocket(
"wss://ws.binaryws.com/websockets/v3?app_id=1089"
);
const api = new DerivAPI({ connection });
const basic = api.basic;
basic.ping().then(console.log);
Encountered ReferenceError: require is not defined