Execute Swap
Execute a client-quoted LiFi swap, backend-quoted LiFi swap, or feature-gated Ondo Direct market order for a portfolio vault via v2 actions.
POST
v2.portfolio.actions.submit supports client-quoted LiFi swaps,
backend-quoted LiFi swaps, and feature-gated Ondo Direct EVM market orders.
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" with params.provider: "ondo_direct" submits a confirmed Ondo
Direct quote:
chainId(string, required): Ondo Direct execution chain.sellTokenAddress(EVM address, required)buyTokenAddress(EVM address, required)sellAmount(raw integer string, required)recipientAddress(EVM address, required): must be an owned vault on the requested chain.expectedReceiveAmount(raw integer string, required): pass theestimatedReceiveAmountreturned byv2.portfolio.actions.previewOndoDirectQuote; the engine rejects firm quotes that fall outside its server-side deviation guard and fails closed if it is absent.
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).