Skip to main content
POST
Migrate a full position between two DeFindex vaults

Authorizations

Authorization
string
header
required

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

Query Parameters

network
enum<string>

Stellar network to use (testnet or mainnet)

Available options:
testnet,
mainnet

Body

application/json
from
string
required

User's Stellar public key (G-address). This account holds the source vault shares and must sign the returned XDR.

Example:

"GDR4KOVET27WYMB4H7UOBHKKOKXXER7ULHFIS7EMRISJUTKTS6BKQZWG"

fromVault
string
required

Source DeFindex vault contract address. The full share balance held by from is withdrawn from this vault.

Example:

"CCA2ZJP5BVRXYTQH4FAGHCAUMRYCXVC4CRYC2NXHWMR7TIVX36U7F5HR"

toVault
string
required

Target DeFindex vault contract address. Must expose the same assets, in the same order, as fromVault.

Example:

"CBJSNWFJ4DKVIB6MJIPNEO77RX3FK7Y46XKHU2WONOPU5MUSO4VKK55W"

slippageBps
number
default:10

Buffer in basis points applied to the simulated withdrawal proceeds before they are deposited into the target vault. 10000 = 100%, 100 = 1%. Defaults to 10 bps (0.1%). The buffer is left behind in the wallet as dust; raising it makes the transaction more resilient to price-per-share movement between simulation and submission.

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

10

Response

Unsigned migration transaction built successfully.

xdr
string

Unsigned transaction XDR (base64)

simulationResponse
any

Native-decoded per-invocation return values

functionName
string
Example:

"exec"

operationXDR
string

Base64-encoded router operation

isSmartWallet
boolean
Example:

false