Execute LiFi Swap
Execute either a client-quoted or backend-quoted LiFi swap for a portfolio vault via v2 actions.
POST
v2.portfolio.actions.submit supports two LiFi swap submission modes:
kind: "swap" submits a client-supplied RouteExtended:
chainId(string, required): execution chain for the submitted route.executionConstraints(object, optional): additive backend-side settlement guards for stricter callers such as Investing Account manual trades.sameChainOnly(boolean, optional): rejects multi-chain routes.expectedVaultChainId(string, optional): requires the route to execute on that chain and settle into the authenticated portfolio’s exact vault on that chain.
route(RouteExtended, required): precomputed LiFi route payload.slippageBps(integer, optional): per-trade slippage override in basis points (0to1000). When provided, this overrides user preference and default fallback slippage for that trade.
kind: "swap_backend_quote" submits raw quote parameters and lets the backend
fetch the LiFi route inside engine before execution:
fromChainId(string, required)fromTokenAddress(string, required)fromAmount(string, required)toChainId(string, required)toTokenAddress(string, required)toAddress(string, required): must be owned by the authenticated user or one of their owned vaultsslippageBps(integer, optional): overrides only slippage while backend quoting still uses saved user or portfolio swap preferences plus server defaults for the remaining route settings
swap execution handle. Use:
v2.executions.getfor lightweight summary pollingv2.executions.detailfor the persisted execution timelinev2.executions.resultfor terminal machine outputv2.executions.streamfor canonical realtime execution events over subscriptionsGET /v1/executions/:operationId/streamfor direct SSE consumers such as CLIs, external integrations, or chat surfacesGET /v1/ai/executions/:operationId/ag-ui-streamfor TanStack AI / AG-UI consumers that want standard AG-UI event chunks over SSE
This tRPC endpoint requires an authenticated wallet session (SIWE).