Account & funds
Setup, deposit, delegation, and the withdrawal endpoints.
Setup and funds movement. These submit to your Solana RPC. Simple builders return { "transactionBase64": "…" }; withdrawal/settlement builders add a receipt PDA to poll. Shared conventions: Conventions. Background: Funds lifecycle.
POST
/transaction-builder/deposit · /deposit-direct
POST
/transaction-builder/init-basket · /init-deposit-ledger
POST
/transaction-builder/delegate-basket
POST
/transaction-builder/withdraw · /custody-settlement · /withdrawal-settle · /request-withdrawal
Deposit
POST /transaction-builder/deposit
One-shot deposit that conditionally bundles any missing setup (basket, deposit ledger, delegation, trade vault).
owner
string
✓
Owner wallet pubkey (signer / fee payer)
tokenSymbol
string
✓
Token to deposit (e.g. USDC, SOL)
amount
string
✓
Amount, UI units
Deposit (direct)
POST /transaction-builder/deposit-direct
Lower-level deposit — no bundled setup. Source ATA and token program are derived from the mint; native SOL is wrapped automatically.
owner
string
✓
Deposit destination
fundingOwner
string
—
Funding wallet (signer / fee payer). Defaults to owner
tokenMint
string
✓
SPL mint to deposit
amount
string
✓
Amount, UI units
Init basket / deposit ledger
POST /transaction-builder/init-basket — creates the owner's Basket PDA. POST /transaction-builder/init-deposit-ledger — creates the owner's deposit-ledger PDA.
Both take { "owner": "…", "payer"?: "…" } (payer defaults to owner) → { "transactionBase64": "…" }.
Delegate basket
POST /transaction-builder/delegate-basket
Delegates the basket so it can be traded (one-time per wallet). { "owner": "…", "payer"?: "…" } (payer defaults to owner) → { "transactionBase64": "…" }.
Withdraw
POST /transaction-builder/withdraw
Single-call withdrawal. The client supplies a fee payer that must differ from owner and co-signs the returned transaction with both keys. Task walkthrough: Withdraw funds.
owner
string
✓
Owner wallet pubkey
tokenSymbol
string
✓
Token to withdraw (e.g. USDC, SOL)
amount
string
✓
Amount, UI units
feePayer
string
✓
Client-owned fee payer. Must differ from owner
feePayerTopUpLamports
number
—
Optional owner → feePayer top-up (lamports) for escrow rent
Response — WithdrawResponseDto
transactionBase64
Unsigned tx — client co-signs owner + fee-payer slots
receipt
Withdrawal-escrow receipt PDA to poll for completion
custodySettlementRequired
true → call custody-settlement first, then retry
isNativeSol
true → released funds arrive as WSOL; unwrap afterward
Custody settlement
POST /transaction-builder/custody-settlement
Settles a custody's trade vault ahead of a withdrawal it can't otherwise cover. Call when withdraw returns custodySettlementRequired: true, then retry.
{ "owner": "…", "tokenSymbol": "USDC" } → { "transactionBase64": "…", "receipt": "…" }.
Withdrawal settle
POST /transaction-builder/withdrawal-settle
Resumes/finalizes a pending withdrawal that didn't complete automatically.
{ "owner": "…", "tokenMint": "…" } → { "transactionBase64": "…" }.
Request withdrawal
POST /transaction-builder/request-withdrawal
Lower-level request step — locks amount of tokenMint and delegates it for automatic release. Like withdraw, needs a feePayer distinct from owner.
{ "owner", "tokenMint", "amount", "feePayer" } → { "transactionBase64": "…", "receipt": "…" }.
Last updated
Was this helpful?

