Skip to main content
POST
Deposit assets into vault

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

address
string
required

Stellar address of the vault contract

Example:

"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3"

Query Parameters

network
enum<string>

Stellar network (testnet or mainnet). Defaults to mainnet.

Available options:
testnet,
mainnet

Body

application/json

Deposit parameters. Optional parameters: invest (defaults to true), slippageBps (defaults to 0)

amounts
number[]
required

One amount per vault asset, in the order of assets in GET /vault/{address}, each in that asset's smallest unit (7 decimals for every listed asset: 1 USDC = 10000000). JSON integers. Must contain at least one positive amount.

Required range: x >= 0
Example:
caller
string
required

Stellar address of the user making the deposit. Must be a valid Stellar public key.

Example:

"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"

invest
boolean
default:true

Whether to invest the deposited assets immediately into the vault strategy. Defaults to true.

Example:

true

slippageBps
number
default:0

Slippage tolerance in basis points (bps). 10000 = 100%, 100 = 1%, 50 = 0.5%. Default is 0 bps (0%)

Required range: 0 <= x <= 10000
Example:

100

Response

Unsigned transaction built for caller. Nothing moves until it is signed and submitted (POST /send).

xdr
string | null

Base64 transaction envelope ready for the caller to sign. null when the caller is a smart wallet (C address): build your own transaction around operationXDR.

simulationResponse
any

[amounts deposited per asset, shares minted, invest result]. Amounts and shares are integer strings.

functionName
string

Contract function the transaction calls

operationXDR
string

Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions

isSmartWallet
boolean

Whether caller is a contract (C) address

params
any

Arguments the contract function was called with, as the API resolved them