Skip to main content
Every order, limit or DCA, is funded from a single per-wallet vault. Before creating any order you resolve your vault, then craft and sign a deposit transaction. This is the shared setup for both price orders and DCA: the only thing that differs is one field on the deposit. Every request needs the JWT from authentication and the x-api-key header.

The vault

Each wallet has one vault, a Privy-managed custodial account that holds deposits for all your orders. The vault address is resolved from your JWT, so you never pass it into later calls. The examples below assume a headers object carrying your API key and the JWT from authentication:

Get your vault

Retrieve your vault, or register one on first use:
The code above calls GET /vault first and falls back to GET /vault/register on first use. GET /vault/register returns 409 if a vault already exists, so calling GET /vault first avoids that error.

Craft a deposit

POST /deposit/craft builds an unsigned transaction that moves tokens from your wallet into your vault. Set orderType (and orderSubType for price orders) to match the order you are about to create.

Deposit parameters

Match the deposit to the order you will create: For a price order, both orderType: "price" and orderSubType are required; omitting either returns a 4xx. The deposit amount must be worth at least 10 USD. A smaller amount is rejected at this step with 400 "Order must be at least 10 USD (current value: X USD)". For DCA, each round must also be worth at least 10 USD, checked when you create the order.

Response

For orderSubType: "otoco", the response also includes outputTokenAccount for the account used by the conditional OCO pair.
The vault address is resolved from your JWT, so you never pass it. You also do not pass inputTokenAccount or outputTokenAccount into the create call; the API stores them against the deposit requestId. The requestId is single-use and is consumed by the create call as depositRequestId.

Sign the deposit

Sign the returned transaction client-side. There is no separate submit step: you hand the signed transaction to the create call, which lands the deposit on-chain.
Carry two values into the create call:
  • deposit.requestIddepositRequestId
  • depositSignedTxdepositSignedTx
Then create the order for your family:

Authentication

The challenge-response JWT flow every request needs.

Integration Flow

How the endpoints chain from auth to withdrawal.

Create Order (Limit)

Single, OCO, and OTOCO price orders.

Create a DCA Order

Time-based and price-conditional schedules.

Craft Deposit (API)

Full deposit request and response schema.