Skip to main content

Backend SDKs

Ensure you have completed the Prerequisites section before continuing.

Installation & Configuration

If you're using npm:

npm install @dashx/node

If you're using yarn:

yarn add @dashx/node
const DashX = require('@dashx/node');

// Initialize DashX SDK
const dx = DashX.createClient({
publicKey: process.env.DASHX_PUBLIC_KEY,
privateKey: process.env.DASHX_PRIVATE_KEY,
});

The SDK can also be initialized with no parameters, dashx-node will then look for these env variables DASHX_PUBLIC_KEY and DASHX_PRIVATE_KEY.

const DashX = require('@dashx/node');

// Initialize DashX SDK
const dx = DashX.createClient();