Documentation
Use Cases
Prerequisites

Prerequisites

Before integrating use cases, you need to handle the following things:

  • Contact us to get access to the SDK package and client ID. You can also try the MOCK mode without a client ID.
  • Install the SDK package.
  • Create an SDK instance with your client ID. Every user's CEX account should have an exchange instance.
  • Subscribe to events to connect SDK's cache with the storage and manage errors.
  1. Install our @cedelabs-private/sdk package. Contact our team to get access to the package:
npm install @cedelabs-private/sdk
  1. Create SDK instance with your client ID.
💡
To get a valid client ID, please contact us.
import CedeSDK from "@cedelabs-private/sdk";
 
const SDK_MODE = "REAL";
const cedeSDK = new CedeSDK(SDK_MODE, { clientId: YOUR_CLIENT_ID });
  1. For Cex account, you'll need to create an exchange instance. Depending on exchanges, you can use OAuth or API keys authentication.
const exchangeInstanceId = await cedeSDK.api.registerExchangeInstance({
  exchangeId: "coinbase",
  apiKey: "api key here",
  secretKey: "private key here",
});

Now, you can use the exchangeInstanceId to interact with the exchange.