Live position economics (the APY includes any collateral-side incentive, as the strategy’s ladder does).
amountDepositedInLoanToken
The on-chain deposit basis in loan-token units (not a USD cost basis).
exitLiquidity
Can this position actually be unwound? See below.
Exit health (per position)
Closing swaps the full leveraged collateral, so exit health is measured against the whole position — not your equity:
"exitLiquidity": { "tier": "good", // deep | good | limited | thin | unknown "cleanExitSize": "$500K+", // largest notional that exits cleanly "unwindSizeUsd": 264.2, // this position's full unwind notional "exceedsCleanExitSize": false, // ← act on this "noSwapRoute": false // hard flag: collateral currently unswappable}
Poll this on open positions. A market can be deep while your position still exceeds the depth that exits cleanly — exceedsCleanExitSize: true means expect slippage on close. If a route disappears entirely, you can still exit in-kind (repay + remove_collateral need no swap) — see Oracle & exit liquidity.
A vault is two legs the user holds directly: the stock as their own Morpho collateral with USDG debt, and the Spiral yield loop that debt funds. get_positions re-assembles them and removes the vault’s yield loop(s) from positions. yieldLoopMatch says how the loop was attributed:
yieldLoopMatch
Meaning
tagged
The app recorded the loop for this vault when it was opened (the primary signal).
basis
Exactly one open loop’s deposit basis matches the vault’s stock debt.
mixed
Some loops tagged, the rest matched on basis (stacked opens).
ambiguous
More than one loop could be the leg. Nothing is claimed: the candidates are listed in ambiguousYieldLoopIds and stay in positions; build_equity_exit_tx then needs yieldPositionIds.
A vault’s yield loop cannot be managed alone: build_manage_tx refuses every action on it, because closing it by itself would leave the stock leg standing with its debt. Unwind the whole vault with build_equity_exit_tx.
No cost-basis or realized P&L — those require off-chain history. Positions are read live from chain and returned newest-first.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Spiral Stake","colors":{"primary":"#4b17ea","light":"#a482f5","dark":"#3410a3"},"logo":{"light":"https://mintcdn.com/spiralstake/KVoPxdPSFxXm2PV4/logo/light.svg?fit=max\u0026auto=format\u0026n=KVoPxdPSFxXm2PV4\u0026q=85\u0026s=2e7bbfd957c77e5e315b967b2ad1a784","dark":"https://mintcdn.com/spiralstake/ff_ggnmHnBIs7x1Q/logo/dark.svg?fit=max\u0026auto=format\u0026n=ff_ggnmHnBIs7x1Q\u0026q=85\u0026s=3aa45b1a7e9a1d6369e5513fe2d89cf0"},"favicon":"https://mintcdn.com/spiralstake/ezzot5F3fAAA0HMo/favicon.svg?fit=max\u0026auto=format\u0026n=ezzot5F3fAAA0HMo\u0026q=85\u0026s=91d63239c1ca951e7f3d13b78fd55df0","navbar":{"links":[{"href":"mailto:abhishek@spiralstake.xyz","label":"Support"}],"primary":{"type":"button","label":"Go To App","href":"https://app.spiralstake.xyz"}},"footer":{"socials":{"x":"https://x.com/0xspiralstake","github":"https://github.com/spiral-stake"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"App","icon":"arrow-up-right-from-square","href":"https://app.spiralstake.xyz"},{"anchor":"MCP endpoint","icon":"plug","href":"https://api.spiralstake.xyz/mcp"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"spiralstake","hasAudioNarration":false,"actualSubdomain":"spiralstake","customDomains":["docs.spiralstake.xyz"],"gitSource":{"type":"github","owner":"spiral-stake","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ab4f53ad2967b4fbe68f2ce","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"API Reference","count":28},{"language":"default","tag":"Agents (MCP)","count":27},{"language":"default","tag":"Integration API","count":27},{"language":"default","tag":"Tools","count":11},{"language":"default","tag":"Docs","count":11},{"language":"default","tag":"Guides","count":9},{"language":"default","tag":"Reference","count":7},{"language":"default","tag":"Get Started","count":6},{"language":"default","tag":"Concepts","count":4},{"language":"default","tag":"Understand","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"agents/tools/get-positions","slug":"/agents/tools/get-positions","pageMetadata":{"title":"get_positions","description":"Read a wallet's open and closed positions from chain state.","href":"/agents/tools/get-positions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Read a wallet’s open and closed positions from chain state.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Reads a wallet’s leverage positions — and, on Robinhood Chain, its open stock + yield equity vaults — directly from chain state (read-only).`}),`\n`,_jsx(Heading,{level:`2`,id:`input`,children:`Input`}),`\n`,_jsx(ParamField,{path:`userAddress`,type:`string`,required:true,id:`param-user-address`,children:`Wallet address to read positions for.`}),`\n`,_jsx(ParamField,{path:`chainId`,type:`integer`,default:`1`,id:`param-chain-id`}),`\n`,_jsx(Heading,{level:`2`,id:`output`,children:`Output`}),`\n`,_jsx(_components.p,{children:`Each position carries:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsxs(_components.td,{children:[`On-chain index — feeds `,_jsx(_components.a,{href:`/agents/tools/build-manage-tx`,children:_jsx(_components.code,{children:`build_manage_tx`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positionId`})}),_jsxs(_components.td,{children:[`Globally-unique `,_jsx(_components.code,{children:\"${chainId}-${strategyId}-${id}\"}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`open`}),` / `,_jsx(_components.code,{children:`liquidated`})]}),_jsx(_components.td,{children:`Lifecycle flags.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`amountLeveragedCollateral`}),`, `,_jsx(_components.code,{children:`amountLoan`})]}),_jsx(_components.td,{children:`Collateral and debt.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ltv`}),` / liquidation LTV + headroom`]}),_jsx(_components.td,{children:`Current risk.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`leverage`}),`, `,_jsx(_components.code,{children:`netValueUsd`}),`, `,_jsx(_components.code,{children:`currentLeverageApyPct`})]}),_jsx(_components.td,{children:`Live position economics (the APY includes any collateral-side incentive, as the strategy’s ladder does).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amountDepositedInLoanToken`})}),_jsx(_components.td,{children:`The on-chain deposit basis in loan-token units (not a USD cost basis).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`exitLiquidity`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Can this position actually be unwound?`}),` See below.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`exit-health-per-position`,children:`Exit health (per position)`}),`\n`,_jsxs(_components.p,{children:[`Closing swaps the `,_jsx(_components.strong,{children:`full`}),` leveraged collateral, so exit health is measured against the whole position — not your equity:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"exitLiquidity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tier\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"good\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// deep | good | limited | thin | unknown`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cleanExitSize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$500K+\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// largest notional that exits cleanly`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unwindSizeUsd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`264.2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// this position's full unwind notional`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"exceedsCleanExitSize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ← act on this`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"noSwapRoute\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // hard flag: collateral currently unswappable`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Poll this on open positions. A market can be `,_jsx(_components.code,{children:`deep`}),` while `,_jsx(_components.em,{children:`your`}),` position still exceeds the depth that exits cleanly — `,_jsx(_components.code,{children:`exceedsCleanExitSize: true`}),` means expect slippage on close. If a route disappears entirely, you can still exit in-kind (`,_jsx(_components.code,{children:`repay`}),` + `,_jsx(_components.code,{children:`remove_collateral`}),` need `,_jsx(_components.strong,{children:`no swap`}),`) — see `,_jsx(_components.a,{href:`/agents/concepts/oracle-and-liquidity`,children:`Oracle \u0026 exit liquidity`}),`.`]})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"chainId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"userAddress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"positions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"positionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1-0x3274…-0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"open\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"leverage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3.0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"currentLeverageApyPct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5.64\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`positions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` call`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"get_positions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userAddress:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0x…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`2`,id:`equity-vaults-equitypositions`,children:[`Equity vaults (`,_jsx(_components.code,{children:`equityPositions`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`A vault is two legs the user holds directly: the stock as their own Morpho collateral with USDG debt, and the Spiral yield loop that debt funds. `,_jsx(_components.code,{children:`get_positions`}),` re-assembles them and `,_jsxs(_components.strong,{children:[`removes the vault’s yield loop(s) from `,_jsx(_components.code,{children:`positions`})]}),`. `,_jsx(_components.code,{children:`yieldLoopMatch`}),` says how the loop was attributed:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`yieldLoopMatch`})}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tagged`})}),_jsx(_components.td,{children:`The app recorded the loop for this vault when it was opened (the primary signal).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`basis`})}),_jsx(_components.td,{children:`Exactly one open loop’s deposit basis matches the vault’s stock debt.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mixed`})}),_jsx(_components.td,{children:`Some loops tagged, the rest matched on basis (stacked opens).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ambiguous`})}),_jsxs(_components.td,{children:[`More than one loop could be the leg. `,_jsx(_components.strong,{children:`Nothing is claimed`}),`: the candidates are listed in `,_jsx(_components.code,{children:`ambiguousYieldLoopIds`}),` and stay in `,_jsx(_components.code,{children:`positions`}),`; `,_jsx(_components.code,{children:`build_equity_exit_tx`}),` then needs `,_jsx(_components.code,{children:`yieldPositionIds`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`none`})}),_jsx(_components.td,{children:`The stock leg is open but no loop matches.`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"equityPositions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"strategyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"equity-0x50bc…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"curator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Longbow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stock\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SPY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"collateral\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1.291249\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"collateralUsd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"990.02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"priceUsd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"766.6309\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"debtUsdg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"494.960000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ltvPct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"liquidationLtvPct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"62.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ltvHeadroomPct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"12.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"liquidationPriceUsd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"613.3047\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"priceDropToLiquidationPct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"20.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"borrowApyPct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0.06\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"yieldLoops\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [ { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"collateralSymbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"syrupUSDG\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ltvPct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"90.48\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"currentLeverageApyPct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"40.79\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } ],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"yieldLoopMatch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"basis\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"netValueUsd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"984.11\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currentNetApyPct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"20.37\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`A vault’s yield loop cannot be managed alone: `,_jsx(_components.a,{href:`/agents/tools/build-manage-tx`,children:_jsx(_components.code,{children:`build_manage_tx`})}),` refuses every action on it, because closing it by itself would leave the stock leg standing with its debt. Unwind the whole vault with `,_jsx(_components.a,{href:`/agents/tools/build-equity-exit-tx`,children:_jsx(_components.code,{children:`build_equity_exit_tx`})}),`.`]})}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`No cost-basis or realized P\u0026L — those require off-chain history. Positions are read live from chain and returned newest-first.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"get_positions","description":"Read a wallet's open and closed positions from chain state.","href":"/agents/tools/get-positions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Input","slug":"input","depth":2,"children":[]},{"title":"Output","slug":"output","depth":2,"children":[]},{"title":"Exit health (per position)","slug":"exit-health-per-position","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]},{"title":"Equity vaults (equityPositions)","slug":"equity-vaults-equitypositions","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"spiralstake","siteName":"Spiral Stake","title":"get_positions - Spiral Stake","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-24T10:02:38.956Z","originalFileLocation":"agents/tools/get-positions.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Read a wallet\u0026#x27;s open and closed positions from chain state.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Spiral Stake\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"get_positions - Spiral Stake\">\u003cmeta data-mint-head property=\"og:description\" content=\"Read a wallet\u0026#x27;s open and closed positions from chain state.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Spiral Stake\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.spiralstake.xyz/agents/tools/get-positions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://spiralstake.mintlify.site/_mintlify/api/og/v2?division=Tools\u0026amp;title=get_positions\u0026amp;description=Read+a+wallet%27s+open+and+closed+positions+from+chain+state.\u0026amp;theme=dd83de8f00839a3cfa454433\u0026amp;signature=4fbb723e9c7a905e60b050d1d7dc9441d47055c8c818d5586f2711c875567ccc\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"get_positions - Spiral Stake\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Read a wallet\u0026#x27;s open and closed positions from chain state.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://spiralstake.mintlify.site/_mintlify/api/og/v2?division=Tools\u0026amp;title=get_positions\u0026amp;description=Read+a+wallet%27s+open+and+closed+positions+from+chain+state.\u0026amp;theme=dd83de8f00839a3cfa454433\u0026amp;signature=4fbb723e9c7a905e60b050d1d7dc9441d47055c8c818d5586f2711c875567ccc\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/spiralstake/wmrw5u4E1Gb6ap93/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Spiral Stake\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4b17ea\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.spiralstake.xyz/agents/tools/get-positions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/agents/tools/get-positions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.spiralstake.xyz/#organization\",\"name\":\"Spiral Stake\",\"url\":\"https://docs.spiralstake.xyz\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/spiralstake/KVoPxdPSFxXm2PV4/logo/light.svg?fit=max\u0026auto=format\u0026n=KVoPxdPSFxXm2PV4\u0026q=85\u0026s=2e7bbfd957c77e5e315b967b2ad1a784\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.spiralstake.xyz#website\",\"name\":\"Spiral Stake\",\"url\":\"https://docs.spiralstake.xyz\",\"publisher\":{\"@id\":\"https://docs.spiralstake.xyz/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.spiralstake.xyz/agents/tools/get-positions#webpage\",\"url\":\"https://docs.spiralstake.xyz/agents/tools/get-positions\",\"name\":\"get_positions\",\"description\":\"Read a wallet's open and closed positions from chain state.\",\"dateModified\":\"2026-09-24T10:02:38.956Z\",\"isPartOf\":{\"@id\":\"https://docs.spiralstake.xyz#website\"},\"breadcrumb\":{\"@id\":\"https://docs.spiralstake.xyz/agents/tools/get-positions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.spiralstake.xyz/agents/tools/get-positions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tools\",\"item\":\"https://docs.spiralstake.xyz/agents/tools/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"get_positions\",\"item\":\"https://docs.spiralstake.xyz/agents/tools/get-positions\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.spiralstake.xyz/agents/tools/get-positions#article\",\"headline\":\"get_positions\",\"name\":\"get_positions\",\"description\":\"Read a wallet's open and closed positions from chain state.\",\"url\":\"https://docs.spiralstake.xyz/agents/tools/get-positions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.spiralstake.xyz/agents/tools/get-positions#webpage\"},\"dateModified\":\"2026-09-24T10:02:38.956Z\",\"publisher\":{\"@id\":\"https://docs.spiralstake.xyz/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.spiralstake.xyz#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Spiral Stake\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Spiral Stake\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/agents/tools/get-positions.md","siteName":"Spiral Stake","nav":{"global":{"anchors":[{"anchor":"App","icon":"arrow-up-right-from-square","href":"https://app.spiralstake.xyz"},{"anchor":"MCP endpoint","icon":"plug","href":"https://api.spiralstake.xyz/mcp"}]},"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/overview"}]},{"tab":"Agents (MCP)","groups":[{"group":"Introduction","pages":[{"title":"Introduction","href":"/agents/introduction"},{"title":"Quickstart","href":"/agents/quickstart"}]},{"group":"Connect a client","pages":[{"title":"Claude Desktop","href":"/agents/connect/claude-desktop"},{"title":"Cursor","href":"/agents/connect/cursor"},{"title":"Other clients","href":"/agents/connect/other-clients"}]},{"group":"Concepts","pages":[{"title":"Strategies \u0026 risk facts","href":"/agents/concepts/strategies"},{"title":"Oracle \u0026 exit liquidity","href":"/agents/concepts/oracle-and-liquidity"},{"title":"Non-custodial execution","href":"/agents/concepts/non-custodial"},{"title":"Chains","href":"/agents/concepts/chains"}]},{"group":"Tools","pages":[{"title":"Tools overview","href":"/agents/tools/overview"},{"title":"list_strategies","href":"/agents/tools/list-strategies"},{"title":"get_strategy","href":"/agents/tools/get-strategy"},{"title":"get_prices","href":"/agents/tools/get-prices"},{"title":"simulate_leverage","href":"/agents/tools/simulate-leverage"},{"title":"build_leverage_tx","href":"/agents/tools/build-leverage-tx"},{"title":"build_manage_tx","description":"Build the unsigned transaction to adjust or close an open position.","href":"/agents/tools/build-manage-tx"},{"title":"get_positions","href":"/agents/tools/get-positions"},{"title":"simulate_equity_deposit","description":"Deterministic preview of a stock + yield equity-vault deposit — no wallet needed.","href":"/agents/tools/simulate-equity-deposit"},{"title":"build_equity_deposit_tx","href":"/agents/tools/build-equity-deposit-tx"},{"title":"build_equity_exit_tx","href":"/agents/tools/build-equity-exit-tx"}]},{"group":"Guides","pages":[{"title":"Find the best yield","href":"/agents/guides/find-the-best-yield"},{"title":"Open a position","href":"/agents/guides/open-a-position"},{"title":"Manage \u0026 close","href":"/agents/guides/manage-and-close"},{"title":"Stock + yield vaults","href":"/agents/guides/stock-plus-yield-vault"}]},{"group":"Reference","pages":[{"title":"Rate limits \u0026 errors","href":"/agents/reference/rate-limits-and-errors"},{"title":"Discovery","href":"/agents/reference/discovery"},{"title":"Disclaimer","href":"/agents/reference/disclaimer"}]}]},{"tab":"Integration API","pages":[{"title":"Integration API","href":"/integration/introduction"}]}]},"basePath":"","title":"get_positions - Spiral Stake","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":[],"chunks":[]}