depth
Build an app

App integration

Keep your product’s interface. Let the SDK handle confidential protocol operations.

On this page

What your app owns

  • Connect wallets and display amounts, fees, and order bounds before signing.
  • Create a new SDK client when the wallet or environment changes.
  • Track operation IDs and nonces through submission, confirmation, and recovery.
  • Clear private views and unpublished order terms when the wallet changes.

Configure the connection

Use your own endpoints
import { create_depth } from "@depthhq/sdk";

const depth = await create_depth({
  environment: "devnet",
  wallet: traderWallet,
  appId,
  rpcUrl: rpcUrl,
  serviceUrl: serviceUrl,
  viewAuthorization: "wallet",
});

Public endpoints use HTTPS. Loopback HTTP is allowed for local development. Keep provider credentials behind your own server proxy.

The signed manifest must match the selected network, deployed program, MXE, and market configuration. Its signer must be the program’s onchain upgrade authority.

Manage your app

Owner actions
const update = await admin.app.setFee(1);
await update.confirm();

const app = await admin.app.summary();

An appId attributes a trade and its app fee. It does not grant access to the trader’s wallet or private account.

Load only what you need

Import chart data from @depthhq/sdk/data. Load the transaction SDK when a wallet connects. The included trader and maker terminals consume the public exports and serve as integration examples.

Documentation
8 results