depth
Run Depth

Run the services

Start the API, settlement keeper, and managed maker workers.

On this page

Prepare the workspace

Use pnpm, Bun, and Node with support for --env-file-if-exists. Contract builds additionally require the pinned Solana, Anchor, Rust, and Arcium toolchains.

Install and build packages
pnpm install --frozen-lockfile
node scripts/build-package.mjs bindings schema sdk maker-sdk

Create a root .env.local from .env.example if you do not already have one. All configured file paths resolve from the repository root.

Configure the services

SettingPurpose
SOLANA_RPC_URLServer and worker RPC endpoint.
DEPTH_ENVIRONMENTSelected environment; devnet for these guides.
DEPTH_DEVNET_MANIFEST_PATHSigned deployment JSON served by the API.
DEPTH_KEEPER_KEYPAIR_PATHFunded signer for settlement transactions.
DEPTH_AUTOMATION_SECRET32 random bytes encoded as hex for the maker registry.
DEPTH_VIEW_RELAY_ENABLEDSet true to sponsor authorized private reads.
PYTH_ORACLE_MODEsponsored reads the feed; hermes enables the publisher.

Hermes publishing also needs PYTH_API_KEY. Sponsored mode requires no Hermes key; stale source data still stops trading. Keep signer files and environment secrets private.

Start and stop

Managed services
pnpm services:start
pnpm services:status
pnpm services:stop

The supervisor manages the API, keeper, maker workers, and client. To run individual processes, use separate terminals:

Individual processes
pnpm --dir server start
pnpm --dir server keeper
pnpm maker
pnpm dev

Monitor readiness

EndpointChecks
GET /healthAPI liveness.
GET /readyWorkers, oracle freshness, funding, market status, and quotes.
Keeper /healthz · default port 8786Keeper process health.
Maker /healthz · default port 8789Maker supervisor health.

Keep durable state

  • Back up data/maker and the automation secret together.
  • Mount durable worker storage when hosting.
  • Use one supervisor per registry and one worker per maker/hedge account.
  • Set SOLANA_RPC_RPS within the provider’s request allowance.

Runtime logs and process state live in data/runtime. Local managed services need the host to remain awake; public hosting is configured separately.

Documentation
8 results