Canonical portfolio-first tRPC surface for CLI and agent integrations
TheDocumentation Index
Fetch the complete documentation index at: https://docs.glider.fi/llms.txt
Use this file to discover all available pages before exploring further.
v2 tRPC namespace is the canonical API surface for agent and CLI consumers.
POST /v1/trpcv2.*v2.portfolio.create.* and v2.portfolio.permission.refresh.*v2.portfolio.builder.getProfile, saveProfile, getDraft, saveDraft, recommend, and seedCopilotv2.portfolio.builder.generateDraft and remixDraftv2.portfolio.scheduledFunctions.*v2.portfolio.*, v2.executions.*, v2.automationRuns.*, and deprecated v2.operations.*x-glider-owner-address is optional and must match canonical owner when provided.v2.public.* non-owner read surfacesv2.portfolio.*
list, listByOwnerDbV2, get, statusvaults.listperformance.get, performance.series, performance.assetMetricsactivity.list, activity.allocationHistory.list, activity.allocationHistory.chartrecipients.listdeposit.instructionsbuilder.getProfile, builder.saveProfile, builder.getDraft, builder.saveDraft, builder.recommend, builder.generateDraft, builder.remixDraft, builder.seedCopilotcreate.prepare, create.confirmpermission.status, permission.refresh.prepare, permission.refresh.confirmarchive, unarchiveupdates.list, updates.get, updates.preview, updates.create, updates.submit, updates.supersedeapprovals.list, approvals.get, approvals.decideruns.list, runs.getevents.list, events.streamcontext.list, context.getagents.list, agents.getactions.submitpolicy.evaluate, policy.scheduleAdvisorypolicy.config.get, policy.config.updateschedule.get, schedule.create, schedule.update, schedule.setFromText, schedule.pause, schedule.archive, schedule.resume, schedule.runNowscheduledFunctions.list, scheduledFunctions.create, scheduledFunctions.delete (beta/private rollout; exposed in the webapp only behind the recurring-swaps and recurring-transfers feature flags)v2.executions.*
get, detail, result, list, streamv2.automationRuns.*
get, events, streamv2.workflows.* (feature-gated beta/private rollout)
list, getdrafts.list, drafts.start, drafts.startFromWorkflow, drafts.get, drafts.answer, drafts.cancelauthoring.validate, authoring.previewv2.operations.* (deprecated)
v2.agentAuth.*
createApiKeyv2.public.*
portfolio.list, portfolio.listByIds, portfolio.getportfolio.vaults.listportfolio.schedule.getportfolio.activity.list, portfolio.activity.allocationHistory, portfolio.activity.allocationHistoryChartaccount.profile.getaccount.assets.listaccount.performance.seriesaccount.performance.overviewactions.submit Withdrawal Modesv2.portfolio.actions.submit with kind: "withdraw":
mode: "withdraw" transfers the selected assets out directly.mode: "transfer" requires recipient and is limited to the owner address or
an owned vault.mode: "external" requires recipient for external wallet withdrawals.mode: "withdraw_as_usdc" requires recipient and lets the backend either:
actions.submit Swap Constraintsv2.portfolio.actions.submit with kind: "swap":
params.chainId remains the execution chain for the submitted LiFi route.params.executionConstraints is optional and additive. When present, the
backend enforces stricter settlement rules without changing existing generic
swap callers.params.executionConstraints.sameChainOnly: true rejects multi-chain routes.params.executionConstraints.expectedVaultChainId requires the route to stay
on that chain and settle into the authenticated portfolio’s exact vault on
that chain.actions.submit Yield Actionsv2.portfolio.actions.submit with kind: "yield":
mode: "deposit" requires assetId and submits a manual engine
yield-deposit operation.mode: "withdraw" requires assetId and submits a manual engine
yield-withdraw operation for a USDC-denominated exit amount.mode: "redeem" requires shareAssetId and submits a manual engine
yield-redeem operation for an exact share-token amount.42161) USDC targets for
Aave V3, Morpho Steakhouse High Yield, and Fluid.kind: "execution";
clients should poll v2.executions.get or stream v2.executions.stream.v2.portfolio.performance.series and v2.public.account.performance.series return a unified response containing historical TWR series, pre-computed stats per timeframe, and a live value snapshot:
series[] may include a trailing isLive: true point representing the current live valuation.stats is keyed by PerformanceChartResolution (DAY, WEEK, MONTH, YEAR, ALL).live contains the real-time portfolio value and per-asset breakdown. live.assets is present on v2.portfolio.performance.series but omitted from the account-level endpoint.v2.portfolio.actions.submit also includes additive execution guidance:
nextSteps.poll -> v2.executions.getnextSteps.stream -> v2.executions.streamnextRecommendedCommands with ready-to-copy polling/stream commandsrefs.executionSource distinguishes manual and automated starts (manual, scheduled, event, scheduled_function)refs.requestId, refs.scheduleId, refs.scheduledFunctionId, and refs.scheduledRunAt are additive correlation fields when the upstream flow can provide themv2.executions.get for a lightweight summary handle,
v2.executions.detail for the persisted execution narrative, and
v2.executions.result for raw terminal machine output.
v2.executions.detail returns:
operation: the canonical execution handlesummary: the current headline, phase, and terminal reason when availabletimeline: curated execution events suitable for user-facing progress UIs or agentsgraph: optional rebalance observer graph metadata for richer visualizationsv2.executions.stream is the canonical typed realtime surface for first-party
web clients. It replays ordered canonical execution events and then switches to
live tail delivery.
Each event uses this envelope:
cursor. SSE reconnects also use the same opaque
cursor via Last-Event-ID.v2.executions.get and v2.executions.detail remain the snapshot and
hydration APIs.GET /v1/executions/:operationId/stream exposes the same canonical event log
over SSE for CLIs, API integrators, and future chat surfaces.GET /v1/ai/executions/:operationId/ag-ui-stream exposes an AG-UI projection
of that same execution log for TanStack AI-compatible clients.v2.automationRuns.get for the current canonical authored-run snapshot and
v2.automationRuns.events for ordered timeline pagination.
v2.automationRuns.get returns:
run: the current automation run handlelatestSequence: the latest persisted timeline sequencev2.automationRuns.events returns:
runIditems: canonical automation timeline itemsnextSequence: the last delivered sequence for resume/pollingv2.automationRuns.stream is the typed realtime surface for authored
automation-engine runs. It follows the same resume model as
v2.executions.stream.
Each event uses this envelope:
cursor.GET /v1/automation-runs/:runId and
GET /v1/automation-runs/:runId/events.sessionKeys.getPortfolioSignableMessage -> v2.portfolio.create.preparesessionKeys.createPortfolioWithSignature -> v2.portfolio.create.confirmsessionKeys.refreshSessionKeyMessage* -> v2.portfolio.permission.refresh.preparesessionKeys.refreshSessionKeyWithSignature -> v2.portfolio.permission.refresh.confirmstrategyInstances.getStrategyInstancesOwnedByAddress -> v2.portfolio.listv2.portfolio.listByOwnerDbV2strategyInstances.getStrategyInstance -> v2.portfolio.getstrategyInstances.archiveStrategyInstance -> v2.portfolio.archivestrategyInstances.unarchiveStrategyInstance -> v2.portfolio.unarchivestrategyInstances.getUnifiedPortfolioHistory -> v2.portfolio.activity.list (kind="history")v2.portfolio.activity.allocationHistory.list
items remains the cursor-paginated newest-first activity feed for the History table.checkpoints for backward compatibility when includeCheckpoints=true; chart consumers should pass includeCheckpoints=false and use the fixed chart route instead.v2.portfolio.activity.allocationHistory.chart
checkpoints is the 90-day chart-ready sampled allocation series. It includes daily balance-history snapshots, including days without events, so charts should not treat event rows as the only drawable points.allocationHistory.list; chart checkpoints do not use the event cursor.strategyInstances.getStrategyPerformanceMultipleTimeframes -> v2.portfolio.performance.get (timeframes)strategyInstances.getNetDepositsAndWithdrawals -> v2.portfolio.performance.get (netFlows)strategyInstances.getStrategyPerformanceSeries -> v2.portfolio.performance.seriesv2.portfolio.performance.assetMetricsstrategyInstances.getStrategyInstanceVaultsOwnedByAddress -> v2.portfolio.recipients.liststrategyInstances.getStrategyInstancesOwnedByAddress (public profile view) -> v2.public.portfolio.listv2.public.portfolio.listByIdsstrategyInstances.getStrategyInstance (unowned read) -> v2.public.portfolio.getvaults.getVaultsPortfolioDataForStrategyInstance (unowned read) -> v2.public.portfolio.vaults.listschedules.getStrategyInstanceSchedule (unowned read) -> v2.public.portfolio.schedule.getv2.public.portfolio.activity.allocationHistoryv2.public.portfolio.activity.allocationHistoryChartv2.public.account.profile.getstrategyInstances.getAllAssetsAcrossWalletStrategies (public profile aggregate) -> v2.public.account.assets.liststrategyInstances.getAccountPerformanceOverview (public profile aggregate) -> v2.public.account.performance.overviewstrategyInstances.getAccountPerformanceSeries (public profile aggregate) -> v2.public.account.performance.seriesrebalance.execute -> v2.portfolio.actions.submit (kind="rebalance")withdrawAndDeposits.process* -> v2.portfolio.actions.submit (kind="withdraw")bridge.processBridgeRequest -> v2.portfolio.actions.submit (kind="bridge")executeLifiQuote.execute -> v2.portfolio.actions.submit (kind="swap")v2.portfolio.actions.submit (kind="swap_backend_quote")v2.portfolio.actions.submit
(kind="yield", returned as kind="execution")schedules.* -> v2.portfolio.schedule.*v2.portfolio.scheduledFunctions.*rebalance.getStatus / workflows.* / temporal.* / bridge.getBridgeStatus / executeLifiQuote.getStatus -> v2.executions.get / v2.executions.detail / v2.executions.result / v2.executions.streamrebalance.execute and migrated schedules.* write mutations), and should be treated as v2.portfolio.*-only.v2.*.portfolioId), even when internal implementations still use strategy-instance identifiers.v2.executions.list reads from the persisted execution narrative store for rebalance, swap, withdraw, and bridge.v2.executions.get can also hydrate manual engine execution handles, including yield actions, from the runtime engine operation API while those operations are in flight.v2.executions.detail reads the persisted execution narrative store and adds timeline plus optional graph metadata.v2.executions.stream replays and tails the canonical execution event log rather than synthesizing updates from repeated detail polling in the normal path.v2.operations.* remains mounted temporarily as a deprecated, best-effort surface only.v2.portfolio.status is resilient: permission/session data still returns if rebalance status source is unavailable; rebalance is null and degraded.rebalanceUnavailable=true.v2.portfolio.status includes additive semantic convergence metadata for owner UIs:
state: awaiting_review | queued | moving | blocked | aligned | failedsummary: portfolio-level explanation of the highest-priority outstanding conditionapprovalId?, proposalId?, runId?, targetId?, targetType?, executionStatus?, updatedAt: optional references for detail surfacesv2.portfolio.updates.* is the desired-state composer surface for webapp-v2:
preview derives semantic before/after state without mutating live strategy definitionscreate writes a draft revisionsubmit(mode="review") promotes that revision to pending_reviewsubmit(mode="apply_now") accepts the revision and syncs it through blueprint versioning for runtime parityget returns PORTFOLIO_UPDATE_NOT_FOUND when the revision is missing; it does not return a nullable success payloadrevision metadata so owner surfaces can reason about desired-state historydismissed for review declinesv2.portfolio.approvals.* is the canonical owner-facing approval surface:
portfolio_update or portfolio_update)decide is the canonical owner decision entrypointv2.portfolio.runs.* exposes semantic convergence/execution rows projected from desired-state apply, copilot execution, and rebalance runtime sources.v2.portfolio.events.* exposes stored semantic control-plane history:
list returns canonical timeline events and paginates with an opaque cursor derived from (createdAt,id)stream provides polling-backed internal event streaming for owner surfaces and can resume from the last opaque cursordb-v2 reads by default; operational read repair remains available only behind PORTFOLIO_CONTROL_PLANE_ENABLE_READ_REPAIRv2.portfolio.context.* exposes immutable context snapshots referenced by approvals, runs, and events.v2.portfolio.agents.* exposes portfolio-scoped automated principals and their allowed scopes.v2.portfolio.permission.status (session keys + evm agent only) for lighter polling.canonical_strategy_blueprint_id:
v2.portfolio.list returns it on each portfolio row.v2.portfolio.get and v2.public.portfolio.get return it on the nested blueprint object.v2.portfolio.listByOwnerDbV2 is the db-v2-backed authenticated owner-list route used by the webapp dashboard shell.id, archived, created_at, owner_address, owner_account_index, blueprint_name, blueprint_description, is_public, primary_chain_id, updated_at, and vault_addresses.v2.portfolio.performance.series is now a typed envelope, not a raw array:
series: historical/accounting performance pointsstats: backend-computed DAY | WEEK | MONTH | YEAR | ALL metrics with absoluteChangeUsd and twrPctlive: current value plus normalized live.assetslive.assets uses frontend-facing asset IDs directly and includes:
assetId, optional dbAssetId, symbol, decimals, priceUsd, valueUsd, liveBalanceFormatted, liveBalanceRaw, vaultAddressv2.portfolio.performance.assetMetrics augments live assets with db-v2 analytics:
assetId, optional dbAssetId, marketValueUsd, netInvestedUsd, pnlUsd, priceUsd, priceMissing, asOfv2.portfolio.schedule.get adds scheduleStatus (active | paused | disabled | archived | null).scheduleExists=false, scheduleId=null, scheduleData=null) while still reporting scheduleStatus="archived".v2.portfolio.schedule.create, v2.portfolio.schedule.update, and v2.portfolio.schedule.setFromText return SCHEDULE_ARCHIVED and do not reactivate automation.v2.portfolio.schedule.runNow includes additive operation identifiers: accepted, runId, and operationId.v2.portfolio.scheduledFunctions.* is currently in beta/private rollout and is hidden in the webapp unless the relevant UI feature flag is enabled for the user.v2.portfolio.scheduledFunctions.list accepts additive
includeTargeting=true to include schedules owned by the user’s investing
account or other owned portfolios when their config targets the requested
portfolio.v2.portfolio.scheduledFunctions.create supports additive
schedule input for functionKey="recurring_swap" and functionKey="recurring_transfer":
hourly, or { frequency: "daily" | "weekly", hourUtc, day? }.intervalMs/startAt/endAt.v2.portfolio.scheduledFunctions.delete is a soft delete. Rows are retained for audit/history, marked deleted in storage, and excluded from normal list/run queries.hourUtc and weekly day are interpreted in UTC; local DST shifts are not preserved.recurring_swap: buy a token with USDC or sell a token to USDC.recurring_transfer: move Base USDC from the Investing Account into an owned Base portfolio.v2.portfolio.builder.* persists pre-portfolio onboarding state in db-v2.builder.generateDraft first attempts deterministic portfolio-construction parsing/resolution for allocation prompts, then falls back to the legacy generated strategy path when the prompt is unsupported or incomplete.construction: reviewStatus, per-asset requiresConfirmation, reviewMode, reviewReason, candidate alternatives, and questions[] for asset/chain/contract clarification before a generated draft is applied.v2.portfolio.policy.evaluate is the canonical machine-facing evaluator for rebalance, schedule, swap, and withdraw.v2.portfolio.policy.scheduleAdvisory is a convenience wrapper over the same schedule evaluation path.v2.portfolio.policy.config.get|update is the additive Smart Portfolio configuration surface for declarative allocation, rebalance, and yield settings.swap and withdraw policy evaluation uses chainIds to derive request exposure. Raw requestExposure remains accepted temporarily for wire compatibility, but is ignored.rebalance, schedule, and scheduleAdvisory still accept legacy currentExposure / plannedExposure fields for compatibility, but those fields are ignored immediately.withdraw policy evaluation also ignores legacy raw portfolioTotalUsd and isFullWithdraw inputs; the backend derives those facts authoritatively when available.status, allowed, primaryBlockingReason, reasons, remainingConditions, and nextEligibleAt, and now also include:
authoritativefactsruleResultsprimaryBlockingReason and each entry in reasons[] now also include:
policyIdcategorypolicySetId when the reason came from a chain-scoped policy setruleResults[] now includes:
reasonCodespolicyIdsreasonCode remains as the first/primary code for backward compatibility.facts[].status distinguishes present, missing, stale, and synthetic.facts[].origin distinguishes backend-loaded facts (server), backend-derived request facts (derived), and caller-supplied fallback/hypothetical facts (client).authoritative=true only means the triggered policy rules had sufficient trusted backend facts; missing, stale, synthetic-only, or client-sourced required facts downgrade the decision to non-authoritative.fallbackPrimaryChainId is treated as a compatibility hint rather than the source of truth.remainingConditions[] may include market_available for Ondo-backed rebalance and swap decisions, carrying the blocked asset IDs, symbols, availability type (closed or halted), and nextOpenAt when Ondo provides a reopen time.schedule input on the schedule policy endpoints returns the backend default cadence instead of a denial.primary_chain_id = "1":
REBALANCE_ETH_MAINNET_COOLDOWN_ACTIVE>= 24h,24h.SCHEDULE_ETH_MAINNET_INTERVAL_TOO_SHORT, SCHEDULE_ETH_MAINNET_INTERVAL_ONLY$10,$10, only full-balance withdraw is allowed.WITHDRAW_ETH_MAINNET_BELOW_MINIMUM, WITHDRAW_ETH_MAINNET_FULL_REQUIRED_UNDER_MINIMUMkind="swap" and kind="swap_backend_quote"):
$10,LIFI_ETH_MAINNET_BELOW_MINIMUM_TRADEv2.portfolio.scheduledFunctions.* currently allows:
functionKey="recurring_swap"functionKey="recurring_transfer"functionKey="recurring_account_deposit" for account-origin recurring
deposits into an existing portfoliorecurring_swap is intentionally narrow: buy a token with USDC or sell a token to USDC.recurring_transfer is intentionally narrow: transfer Base USDC from the Investing Account into an owned portfolio with an active Base vault.v2.public.portfolio.list, v2.public.portfolio.listByIds, v2.public.portfolio.get, v2.public.portfolio.vaults.list, v2.public.portfolio.schedule.get, v2.public.portfolio.performance.*, v2.public.portfolio.activity.list, v2.public.portfolio.activity.allocationHistory, and v2.public.portfolio.activity.allocationHistoryChart do not currently enforce is_public.
PORTFOLIO_NOT_FOUND when the portfolio does not exist.v2.public.portfolio.listByIds is the lightweight multi-card hydration route for curated public portfolio pages.
portfolioIds[] with up to 50 ids.results keyed by portfolio id.null for that entry instead of failing the whole batch.v2.public.account.profile.get is the canonical user-profile hydration endpoint used by /user/:userId.
is_public.v2.public.account.assets.list, v2.public.account.performance.series, and v2.public.account.performance.overview are owner-scoped aggregates with no per-portfolio visibility check.v2.agentAuth.createApiKey keeps ownerAddress optional for compatibility.ownerAddress is provided, it must match the authenticated wallet address.v2.* in owner-authenticated flows:
v2.portfolio.updates.*v2.portfolio.actions.submitv2.portfolio.actions.submitv2.portfolio.actions.submit (kind="swap")v2.portfolio.actions.submit (kind="swap_backend_quote")v2.portfolio.activity.listv2.portfolio.statusv2.executions.get in migrated withdraw/transfer/swap pathsv2.public.* in non-owner/public flows:
v2.public.account.profile.getETH/USDC) is unsupported and rejected client-side (legacy backend path is also unsupported)strategyInstances.*schedules.getSchedulesForMultipleStrategies (no v2 equivalent yet)