Prerequisites
Before integrating use cases, you need to complete the following steps:
- 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 your storage and manage errors.
- Install our @cedelabs-private/sdk package. Contact our team to get access to the package:
npm install @cedelabs-private/sdk- 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 });- For each Cex account, you'll need to create an exchange instance. Depending on the exchange, 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.