lifi.swap is one of many ops the Composer supports. It has a dedicated page here because it’s worth explaining in depth — for the complete, live list of every op, see the Op Catalog.
lifi.swap is the primary cross-token primitive in a flow. It consumes a resource on the amountIn port and produces a new resource of the resourceOut token on the amountOut port, using LI.FI’s aggregator to pick the best route across DEXes and bridges. Because the aggregator already returns a minimum-out guarantee (providesMinimum), you usually do not need a separate slippage guard — pass slippage in the config instead and the minimum is baked into the quote.Use lifi.swap for any on-chain or cross-chain swap that terminates in a standard ERC-20. For deposits into a vault or lending market, prefer lifi.zap, which additionally chains a routing-edge deposit after the swap.
lifi.swap requests a concrete quote from the LI.FI aggregator when you compile the flow and pins the quoted input amount. The on-chain swap spends exactly that pinned amount — no more, no less.If the runtime amount that actually flows into amountIn is larger than the pinned amount, the difference surfaces on a second output port, unspentIn, as a first-class linear resource of the input token. This typically happens when the amountIn value is only fully known at runtime — for example, when it comes from an upstream op whose output differs from the preview used to derive the quote, or when the input is simulation-resolved. If the actual amountIn is less than the pinned amount, the transaction reverts.Semantics of unspentIn:
Same token as amountIn. The leftover keeps the input resource; it is not swapped or burned.
Exact partition.unspentIn = amountIn minus the amount consumed by the quoted swap. The op ignores any pre-existing dust on the execution address — it only accounts for the input that was handed in.
Fully composable. Treat it like any other linear resource output: bind it to a downstream node (merge, swap it again, sweep it to a recipient) and it does not appear as a terminal.
Omitted when zero. If the runtime amount exactly matches the quote, unspentIn is suppressed from producedResources rather than showing up as a noisy zero terminal.
Input and output must differ. Configuring resourceOut to the same resource as amountIn is a validation error — use a no-op node or skip the swap instead.
amountOut is reported as the delta produced by the swap (post-call balance minus pre-call balance), not the total post-call balance. This matches “what this swap produced” even when the execution address already holds some of the output token.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"LI.FI","description":"Get the best price execution for any swaps and bridging across EVM chains, Solana, Bitcoin and alt-VMs. Enable trading across all DEX aggregators, bridges, and intent-systems and save hundreds of developer hours.","colors":{"primary":"#5C67FF","light":"#fab6f4","dark":"#5C67FF"},"logo":{"light":"https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max\u0026auto=format\u0026n=EmProAEgMrruLUbI\u0026q=85\u0026s=f435348680e682acea6e3b9af339ed7a","dark":"https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max\u0026auto=format\u0026n=EmProAEgMrruLUbI\u0026q=85\u0026s=d02539147db168291d7c711beb45d10b"},"favicon":"https://mintcdn.com/lifi/jEGN0oG6bNsdv0a3/logo/favicon.svg?fit=max\u0026auto=format\u0026n=jEGN0oG6bNsdv0a3\u0026q=85\u0026s=35fb6353ca8815e24daf1025135fef38","api":{"openapi":"openapi.yaml"},"appearance":{"default":"dark"},"background":{"color":{"light":"#FAFAFF","dark":"#000B29"}},"navbar":{"links":[{"href":"https://lifihelp.zendesk.com/hc/en-us","label":"Support"}],"primary":{"type":"button","label":"Get Started","href":"https://portal.li.fi/signup"}},"footer":{"socials":{"x":"https://x.com/lifiprotocol","github":"https://github.com/lifinance","website":"https://li.fi/"},"links":[{"header":"Company","items":[{"label":"Careers","href":"https://li.fi/careers"},{"label":"Brand Assets","href":"https://li.fi/brand-assets"},{"label":"About","href":"https://li.fi/"}]},{"header":"Tools","items":[{"label":"LI.FI Explorer","href":"https://explorer.li.fi/?utm_source=lifi\u0026utm_medium=footer_link_tools\u0026utm_campaign=lifi_to_explorer"}]},{"header":"Legal","items":[{"label":"Privacy Policy","href":"https://li.fi/legal/privacy-policy"},{"label":"Terms of Service","href":"https://li.fi/legal/terms-and-conditions"},{"label":"Imprint","href":"https://li.fi/legal/imprint"}]}]},"styling":{"eyebrows":"section","codeblocks":"system","latex":false},"integrations":{"ga4":{"measurementId":"G-NTE1P73M4Q"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"languages":[{"language":"en","href":"introduction/introduction"},{"language":"zh-Hans","href":"zh-Hans/introduction/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lifi","hasAudioNarration":false,"actualSubdomain":"lifi","customDomains":["docs.li.fi"],"gitSource":{"type":"github","owner":"lifinance","repo":"public-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae4467b6255dab49421940b","collectionId":"fe96f741-47cb-43b3-b1b9-c7bfc174e641","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae4467b6255dab49421940b"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4467b6255dab49421940b","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"en","tag":"Overview","count":48},{"language":"en","tag":"Composer","count":46},{"language":"zh-Hans","tag":"Composer","count":46},{"language":"zh-Hans","tag":"概述","count":44},{"language":"en","tag":"API Reference","count":34},{"language":"en","tag":"Intents \u0026 Solvers","count":32},{"language":"zh-Hans","tag":"意图与求解器","count":32},{"language":"en","tag":"Integrate via Composer API","count":30},{"language":"zh-Hans","tag":"通过 Composer API 集成","count":30},{"language":"zh-Hans","tag":"API 参考","count":29},{"language":"en","tag":"Reference","count":23},{"language":"en","tag":"For Agents","count":21},{"language":"en","tag":"Widget","count":20},{"language":"zh-Hans","tag":"Widget","count":20},{"language":"zh-Hans","tag":"参考文档","count":19},{"language":"en","tag":"Getting Started","count":16},{"language":"en","tag":"General API","count":16},{"language":"zh-Hans","tag":"通用 API","count":16},{"language":"zh-Hans","tag":"企业级功能","count":15},{"language":"zh-Hans","tag":"入门","count":14}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"composer/composer-api/ops/lifi-swap","slug":"/composer/composer-api/ops/lifi-swap","pageMetadata":{"title":"lifi.swap","description":"Swap tokens via the LI.FI aggregator API","href":"/composer/composer-api/ops/lifi-swap"},"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: \"Swap tokens via the LI.FI aggregator API\"\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];const ComposeItemDetail=({kind,id})=>{const _components={a:`a`,..._provideComponents()};const[state,setState]=useState({data:null,error:null});const[copied,setCopied]=useState(null);useEffect(()=>{let cancelled=false;setState({data:null,error:null});const path=kind===`edge`?`/compose/zap-packs`:`/compose/manifest`;const run=async()=>{try{const response=await fetch(`https://composer.li.quest${path}`);if(!response.ok)throw new Error(`HTTP ${response.status} ${response.statusText}`);const body=await response.json();if(!body||body.success!==true){throw new Error(body?.error?.message??`Unexpected response shape`)}if(!cancelled)setState({data:body.data,error:null})}catch(err){if(!cancelled)setState({data:null,error:err.message??String(err)})}};run();return()=>{cancelled=true}},[kind,id]);if(state.error){return _jsxs(`div`,{style:{padding:`0.75rem 1rem`,border:`1px solid #f5c6cb`,background:`#f8d7da`,color:`#721c24`,borderRadius:`6px`},children:[_jsxs(`strong`,{children:[`Failed to load `,kind,` `,_jsx(`code`,{children:id}),`.`]}),_jsx(`div`,{style:{fontFamily:`monospace`,marginTop:`0.25rem`,fontSize:`0.9em`},children:state.error})]})}if(!state.data)return _jsxs(`div`,{children:[`Loading `,kind,` details…`]});const notFound=label=>_jsxs(`div`,{style:{padding:`0.75rem 1rem`,border:`1px solid #ffeaa7`,background:`#fff3cd`,color:`#856404`,borderRadius:`6px`},children:[_jsxs(`strong`,{children:[`No `,kind,` found for id `,_jsx(`code`,{children:id}),`.`]}),_jsxs(`div`,{style:{marginTop:`0.25rem`,fontSize:`0.9em`},children:[`It may have been renamed or removed. See the `,_jsxs(_components.a,{href:`/composer/${label}`,children:[label,` catalog`]}),` for the current list.`]})]});const renderSchema=schema=>{if(!schema)return _jsx(`div`,{style:{opacity:.6,fontSize:`0.9em`},children:`No config schema.`});return _jsx(`pre`,{style:{background:`#0d1117`,color:`#e6edf3`,padding:`0.75rem`,borderRadius:`6px`,overflow:`auto`,fontSize:`0.85em`,border:`1px solid #30363d`},children:_jsx(`code`,{style:{color:`inherit`,background:`transparent`},children:JSON.stringify(schema,null,2)})})};const renderPortRows=ports=>{if(!ports||ports.length===0)return _jsx(`div`,{style:{opacity:.6,fontSize:`0.9em`},children:`None.`});return _jsxs(`table`,{children:[_jsx(`thead`,{children:_jsxs(`tr`,{children:[_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`Name`})}),_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`Kind`})}),_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`Details`})})]})}),_jsx(`tbody`,{children:ports.map((port,idx)=>{const{name,kind:portKind,...rest}=port;const entries=Object.entries(rest);return _jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`code`,{children:name??`—`})}),_jsx(`td`,{children:_jsx(`code`,{children:portKind??`—`})}),_jsx(`td`,{children:entries.length===0?_jsx(`span`,{style:{opacity:.5},children:`—`}):entries.map(([k,v])=>_jsxs(`span`,{style:{display:`inline-block`,marginRight:`0.5rem`},children:[_jsxs(`span`,{style:{opacity:.7},children:[k,`:`]}),` `,_jsx(`code`,{children:typeof v===`string`?v:JSON.stringify(v)})]},k))})]},`${name??`port`}-${idx}`)})})]})};const renderSelectors=selectors=>{if(!selectors||selectors.length===0)return _jsx(`div`,{style:{opacity:.6,fontSize:`0.9em`},children:`No selectors.`});return _jsxs(`table`,{children:[_jsx(`thead`,{children:_jsxs(`tr`,{children:[_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`Binding`})}),_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`Source`})}),_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`Match`})}),_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`Selection`})})]})}),_jsx(`tbody`,{children:selectors.map((sel,idx)=>_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`code`,{children:sel.binding??`—`})}),_jsx(`td`,{children:_jsx(`code`,{children:sel.source??`—`})}),_jsx(`td`,{children:_jsx(`code`,{children:sel.match?JSON.stringify(sel.match):`—`})}),_jsx(`td`,{children:_jsx(`code`,{children:sel.selection?JSON.stringify(sel.selection):`—`})})]},`${sel.binding??`sel`}-${idx}`))})]})};const shortAddress=addr=>addr\u0026\u0026addr.length>10?`${addr.slice(0,6)}…${addr.slice(-4)}`:addr;const copyAddress=async(address,key)=>{if(!address)return;try{if(navigator?.clipboard?.writeText){await navigator.clipboard.writeText(address)}else{const el=document.createElement(`textarea`);el.value=address;el.setAttribute(`readonly`,``);el.style.position=`absolute`;el.style.left=`-9999px`;document.body.appendChild(el);el.select();document.execCommand(`copy`);document.body.removeChild(el)}setCopied(key);setTimeout(()=>setCopied(current=>current===key?null:current),1200)}catch{}};const addressCell=(address,chainId,rowIdx,side)=>{const key=`${rowIdx}-${side}`;const isCopied=copied===key;return _jsxs(_Fragment,{children:[_jsx(`code`,{role:`button`,tabIndex:0,title:isCopied?`Copied!`:`Click to copy ${address}`,onClick:()=>copyAddress(address,key),onKeyDown:e=>{if(e.key===`Enter`||e.key===` `){e.preventDefault();copyAddress(address,key)}},style:{cursor:`pointer`,background:isCopied?`#d4edda`:undefined,color:isCopied?`#155724`:undefined,textDecoration:`underline dotted`,textDecorationColor:`#999`,borderRadius:`3px`,padding:isCopied?`0 2px`:undefined},children:isCopied?`Copied!`:shortAddress(address)}),_jsxs(`span`,{style:{opacity:.6},children:[` · chain `,chainId]})]})};if(kind===`edge`){const packs=state.data;const pack=packs.find(p=>p.protocol===id);if(!pack)return notFound(`routing-edges`);const edges=pack.edges??[];return _jsxs(_Fragment,{children:[_jsxs(`div`,{style:{marginBottom:`0.5rem`,fontSize:`0.9em`,opacity:.75},children:[`Protocol `,_jsx(`code`,{children:pack.protocol}),` · `,_jsx(`code`,{children:edges.length}),` edges`]}),_jsx(`h3`,{children:`Edges`}),edges.length===0?_jsx(`div`,{style:{opacity:.6,fontSize:`0.9em`},children:`No edges registered.`}):_jsxs(`table`,{children:[_jsx(`thead`,{children:_jsxs(`tr`,{children:[_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`Type`})}),_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`In`})}),_jsx(`th`,{className:`mint-text-left`,children:_jsx(`strong`,{children:`Out`})})]})}),_jsx(`tbody`,{children:edges.map((edge,idx)=>_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`code`,{children:edge.type})}),_jsx(`td`,{children:addressCell(edge.in?.address??``,edge.in?.chainId??``,idx,`in`)}),_jsx(`td`,{children:addressCell(edge.out?.address??``,edge.out?.chainId??``,idx,`out`)})]},`${edge.type}-${edge.in?.address}-${edge.out?.address}-${idx}`))})]})]})}const manifest=state.data;let item=null;if(kind===`op`)item=(manifest.operations??[]).find(op=>op.id===id);else if(kind===`materialiser`)item=(manifest.materialisers??[]).find(m=>m.kind===id);else if(kind===`guard`)item=(manifest.guards??[]).find(g=>g.kind===id);if(!item)return notFound(`${kind}s`);return _jsxs(_Fragment,{children:[_jsxs(`div`,{style:{marginBottom:`0.5rem`,fontSize:`0.9em`,opacity:.75},children:[`Manifest version `,_jsx(`code`,{children:manifest.manifestVersion}),item.description?_jsxs(_Fragment,{children:[` · `,item.description]}):null]}),_jsx(`h3`,{children:`Signature`}),_jsxs(`ul`,{children:[_jsxs(`li`,{children:[_jsx(`strong`,{children:`Kind:`}),` `,_jsx(`code`,{children:kind})]}),_jsxs(`li`,{children:[_jsx(`strong`,{children:`Id:`}),` `,_jsx(`code`,{children:id})]}),item.accepts?_jsxs(`li`,{children:[_jsx(`strong`,{children:`Accepts:`}),` `,_jsx(`code`,{children:item.accepts})]}):null]}),kind===`op`?_jsxs(_Fragment,{children:[_jsx(`h3`,{children:`Input ports`}),renderPortRows(item.inputs),_jsx(`h3`,{children:`Output ports`}),renderPortRows(item.outputs)]}):null,kind===`guard`?_jsxs(_Fragment,{children:[_jsx(`h3`,{children:`Selectors`}),renderSelectors(item.compatibility?.selectors)]}):null,_jsx(`h3`,{children:`Config schema`}),renderSchema(item.configSchema)]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`lifi.swap`}),` is one of many ops the Composer supports. It has a dedicated page here because it’s worth explaining in depth — for the complete, live list of every op, see the `,_jsx(_components.a,{href:`/composer/composer-api/ops`,children:`Op Catalog`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`lifi.swap`}),` is the primary cross-token primitive in a flow. It consumes a resource on the `,_jsx(_components.code,{children:`amountIn`}),` port and produces a new resource of the `,_jsx(_components.code,{children:`resourceOut`}),` token on the `,_jsx(_components.code,{children:`amountOut`}),` port, using LI.FI’s aggregator to pick the best route across DEXes and bridges. Because the aggregator already returns a minimum-out guarantee (`,_jsx(_components.code,{children:`providesMinimum`}),`), you usually do `,_jsx(_components.strong,{children:`not`}),` need a separate slippage guard — pass `,_jsx(_components.code,{children:`slippage`}),` in the config instead and the minimum is baked into the quote.`]}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`lifi.swap`}),` for any on-chain or cross-chain swap that terminates in a standard ERC-20. For deposits into a vault or lending market, prefer `,_jsx(_components.a,{href:`/composer/composer-api/ops/lifi-zap`,children:_jsx(_components.code,{children:`lifi.zap`})}),`, which additionally chains a routing-edge deposit after the swap.`]}),`\n`,_jsxs(Heading,{level:`2`,id:`understanding-unspentin`,children:[`Understanding `,_jsx(_components.code,{children:`unspentIn`})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`lifi.swap`}),` requests a concrete quote from the LI.FI aggregator when you compile the flow and pins the quoted input amount. The on-chain swap spends `,_jsx(_components.strong,{children:`exactly`}),` that pinned amount — no more, no less.`]}),`\n`,_jsxs(_components.p,{children:[`If the runtime amount that actually flows into `,_jsx(_components.code,{children:`amountIn`}),` is `,_jsx(_components.em,{children:`larger`}),` than the pinned amount, the difference surfaces on a second output port, `,_jsx(_components.code,{children:`unspentIn`}),`, as a first-class linear resource of the input token. This typically happens when the `,_jsx(_components.code,{children:`amountIn`}),` value is only fully known at runtime — for example, when it comes from an upstream op whose output differs from the preview used to derive the quote, or when the input is simulation-resolved. If the actual `,_jsx(_components.code,{children:`amountIn`}),` is less than the pinned amount, the transaction reverts.`]}),`\n`,_jsxs(_components.p,{children:[`Semantics of `,_jsx(_components.code,{children:`unspentIn`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Same token as `,_jsx(_components.code,{children:`amountIn`}),`.`]}),` The leftover keeps the input resource; it is not swapped or burned.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Exact partition.`}),` `,_jsx(_components.code,{children:`unspentIn`}),` = `,_jsx(_components.code,{children:`amountIn`}),` minus the amount consumed by the quoted swap. The op ignores any pre-existing dust on the execution address — it only accounts for the input that was handed in.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Fully composable.`}),` Treat it like any other linear resource output: bind it to a downstream node (merge, swap it again, sweep it to a recipient) and it does `,_jsx(_components.strong,{children:`not`}),` appear as a terminal.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Omitted when zero.`}),` If the runtime amount exactly matches the quote, `,_jsx(_components.code,{children:`unspentIn`}),` is suppressed from `,_jsx(_components.code,{children:`producedResources`}),` rather than showing up as a noisy zero terminal.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Input and output must differ.`}),` Configuring `,_jsx(_components.code,{children:`resourceOut`}),` to the same resource as `,_jsx(_components.code,{children:`amountIn`}),` is a validation error — use a no-op node or skip the swap instead.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`amountOut`}),` is reported as the `,_jsx(_components.strong,{children:`delta`}),` produced by the swap (post-call balance minus pre-call balance), not the total post-call balance. This matches “what this swap produced” even when the execution address already holds some of the output token.`]})}),`\n`,_jsx(_MdxComponentBoundary,{name:`ComposeItemDetail`,children:_jsx(ComposeItemDetail,{kind:`op`,id:`lifi.swap`})}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(_components.p,{children:`Swap WETH → USDC on Ethereum mainnet:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,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:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` builder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`flow`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'swap-weth-to-usdc'`}),_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\":`#9CDCFE`},children:` inputs:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`amountIn:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resources`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`erc20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`WETH`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`builder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`lifi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`swap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'swap'`}),_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\":`#9CDCFE`},children:` bind:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`amountIn:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` builder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`inputs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`amountIn`}),_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\":`#9CDCFE`},children:` config:`}),_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\":`#9CDCFE`},children:` resourceOut:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resources`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`erc20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`USDC`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` slippage:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.03`}),_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`,_jsxs(_components.p,{children:[`Full runnable recipe: `,_jsx(_components.a,{href:`/composer/composer-api/recipes/swap-and-zap`,children:`Swap and zap`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{ComposeItemDetail,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":{"codeStyling":"system","config":{},"pageMetadata":{"title":"lifi.swap","description":"Swap tokens via the LI.FI aggregator API","href":"/composer/composer-api/ops/lifi-swap"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[153,8071,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Understanding unspentIn","slug":"understanding-unspentin","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/lifi/951d8dd0c2dbce84/plausible.js","/_mintlify/custom/lifi/8e3c41579c236ea7/scripts/translate-docs.js","/_mintlify/custom/lifi/b34903975490ec23/scripts/generate-md-redirects.js","/_mintlify/custom/lifi/516472b23ab068ad/scripts/check-links.js","/_mintlify/custom/lifi/70364f7a7384bb43/scripts/markdown-chunker.js","/_mintlify/custom/lifi/6c99617851837b30/scripts/translation-config.js","/_mintlify/custom/lifi/8f88293865b45873/scripts/verify-translation-coverage.js"],"dynamicCss":".mint-text-left {\n text-align: left\n}","subdomain":"lifi","siteName":"LI.FI","title":"lifi.swap - LI.FI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/composer/composer-api/ops/lifi-swap","matchLevel":0},"zh-Hans":{"href":"/zh-Hans/composer/composer-api/ops/lifi-swap","matchLevel":1}}},"lastModified":"2026-07-06T13:36:03.138Z","originalFileLocation":"composer/composer-api/ops/lifi-swap.mdx","locale":"en"},"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=\"dark\"}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=\"Swap tokens via the LI.FI aggregator API\">\u003cmeta data-mint-head name=\"application-name\" content=\"LI.FI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lifi/uhSlA1vHRUBoEVMw/_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/lifi/uhSlA1vHRUBoEVMw/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lifi/uhSlA1vHRUBoEVMw/_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/lifi/uhSlA1vHRUBoEVMw/_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/lifi/uhSlA1vHRUBoEVMw/_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/lifi/uhSlA1vHRUBoEVMw/_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/lifi/uhSlA1vHRUBoEVMw/_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/lifi/uhSlA1vHRUBoEVMw/_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/lifi/uhSlA1vHRUBoEVMw/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"lifi.swap - LI.FI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Swap tokens via the LI.FI aggregator API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LI.FI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.li.fi/composer/composer-api/ops/lifi-swap\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lifi.mintlify.app/_mintlify/api/og/v2?division=Ops\u0026amp;title=lifi.swap\u0026amp;description=Swap+tokens+via+the+LI.FI+aggregator+API\u0026amp;theme=bbd760f308f6962e114ab426\u0026amp;signature=8f77e8d887ae8c651084446c324b7af31ab3817979f3e7ec3b6169390d515f69\">\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=\"lifi.swap - LI.FI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Swap tokens via the LI.FI aggregator API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lifi.mintlify.app/_mintlify/api/og/v2?division=Ops\u0026amp;title=lifi.swap\u0026amp;description=Swap+tokens+via+the+LI.FI+aggregator+API\u0026amp;theme=bbd760f308f6962e114ab426\u0026amp;signature=8f77e8d887ae8c651084446c324b7af31ab3817979f3e7ec3b6169390d515f69\">\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/lifi/uhSlA1vHRUBoEVMw/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LI.FI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5C67FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.li.fi/composer/composer-api/ops/lifi-swap\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/composer/composer-api/ops/lifi-swap.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.li.fi/composer/composer-api/ops/lifi-swap\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://docs.li.fi/zh-Hans/composer/composer-api/ops/lifi-swap\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.li.fi/composer/composer-api/ops/lifi-swap\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.li.fi/#organization\",\"name\":\"LI.FI\",\"url\":\"https://docs.li.fi\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max\u0026auto=format\u0026n=EmProAEgMrruLUbI\u0026q=85\u0026s=f435348680e682acea6e3b9af339ed7a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.li.fi#website\",\"name\":\"LI.FI\",\"url\":\"https://docs.li.fi\",\"publisher\":{\"@id\":\"https://docs.li.fi/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.li.fi/composer/composer-api/ops/lifi-swap#webpage\",\"url\":\"https://docs.li.fi/composer/composer-api/ops/lifi-swap\",\"name\":\"lifi.swap\",\"description\":\"Swap tokens via the LI.FI aggregator API\",\"dateModified\":\"2026-07-06T13:36:03.138Z\",\"isPartOf\":{\"@id\":\"https://docs.li.fi#website\"},\"breadcrumb\":{\"@id\":\"https://docs.li.fi/composer/composer-api/ops/lifi-swap#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.li.fi/composer/composer-api/ops/lifi-swap#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrate via Composer API\",\"item\":\"https://docs.li.fi/composer/composer-api/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reference\",\"item\":\"https://docs.li.fi/composer/composer-api/reference/flow-wire-format\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ops\",\"item\":\"https://docs.li.fi/composer/composer-api/ops/index\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"lifi.swap\",\"item\":\"https://docs.li.fi/composer/composer-api/ops/lifi-swap\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.li.fi/composer/composer-api/ops/lifi-swap#article\",\"headline\":\"lifi.swap\",\"name\":\"lifi.swap\",\"description\":\"Swap tokens via the LI.FI aggregator API\",\"url\":\"https://docs.li.fi/composer/composer-api/ops/lifi-swap\",\"mainEntityOfPage\":{\"@id\":\"https://docs.li.fi/composer/composer-api/ops/lifi-swap#webpage\"},\"dateModified\":\"2026-07-06T13:36:03.138Z\",\"publisher\":{\"@id\":\"https://docs.li.fi/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.li.fi#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LI.FI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"LI.FI","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/introduction/introduction"}]},{"tab":"Enterprise (New)","pages":[{"title":"Enterprise (New)","href":"/enterprise/overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/sdk/overview"}]},{"tab":"Widget","pages":[{"title":"Widget","href":"/widget/overview"}]},{"tab":"Composer","groups":[{"group":"Introduction","pages":[{"title":"Overview","href":"/composer/overview"},{"title":"Composer 101","href":"/composer/composer-101"}]},{"group":"Integrate via Composer API","pages":[{"title":"Overview","href":"/composer/composer-api/overview"},{"group":"Integration Guides","pages":[{"title":"Quickstart","href":"/composer/composer-api/quickstart"},{"title":"Build a Flow","href":"/composer/composer-api/guides/build-a-flow"}]},{"group":"Concepts","pages":[{"title":"Flow Structure","href":"/composer/composer-api/concepts/flow-anatomy"},{"title":"Resource Model","href":"/composer/composer-api/concepts/resources-and-ports"},{"title":"References","href":"/composer/composer-api/concepts/ref-grammar"},{"title":"Execution Model","href":"/composer/composer-api/concepts/execution-model"},{"title":"Guards","href":"/composer/composer-api/concepts/simulation-and-guards"},{"title":"Terminal Resources","href":"/composer/composer-api/concepts/sweeping-and-amounts"}]},{"group":"Recipes","pages":[{"title":"Overview","href":"/composer/composer-api/recipes/index"},{"title":"Dust sweep","href":"/composer/composer-api/recipes/dust-sweep"},{"title":"Swap and Deposit","href":"/composer/composer-api/recipes/swap-and-zap"},{"title":"Split Deposits","href":"/composer/composer-api/recipes/split-and-zap"},{"title":"Debt Migration","href":"/composer/composer-api/recipes/debt-migration"}]},{"group":"Reference","pages":[{"title":"Flow Schema","href":"/composer/composer-api/reference/flow-wire-format"},{"title":"SDK Reference","href":"/composer/composer-api/reference/sdk-api"},{"title":"Errors","href":"/composer/composer-api/reference/error-codes"},{"title":"Addresses","href":"/composer/composer-api/reference/addresses"},{"group":"Ops","pages":[{"title":"Op Catalog","description":"Every op registered in the compose manifest, rendered live.","href":"/composer/composer-api/ops/index"},{"title":"lifi.swap","href":"/composer/composer-api/ops/lifi-swap"},{"title":"lifi.zap","description":"Route tokens into a DeFi protocol position via the edge catalog","href":"/composer/composer-api/ops/lifi-zap"},{"title":"core.call","href":"/composer/composer-api/ops/core-call"}]},{"group":"Materialisers","pages":[{"title":"Materialisers catalog","href":"/composer/composer-api/materialisers/index"},{"title":"balanceOf","href":"/composer/composer-api/materialisers/balance-of"},{"title":"call","href":"/composer/composer-api/materialisers/call"},{"title":"directDeposit","href":"/composer/composer-api/materialisers/direct-deposit"},{"title":"flashloan","href":"/composer/composer-api/materialisers/flashloan"}]},{"group":"Guard Types","pages":[{"title":"Guards catalog","href":"/composer/composer-api/guards/index"},{"title":"slippage","href":"/composer/composer-api/guards/slippage"},{"title":"core.numericInvariant","href":"/composer/composer-api/guards/numeric-invariant"}]}]}]},{"group":"Integrate via LI.FI API","pages":[{"title":"Overview","href":"/composer/lifi-api/overview"},{"group":"Integration Guides","pages":[{"title":"Quickstart","href":"/composer/lifi-api/quickstart"},{"title":"API Integration","href":"/composer/lifi-api/guides/api-integration"},{"title":"SDK Integration","href":"/composer/lifi-api/guides/sdk-integration"},{"title":"Widget Integration","href":"/composer/lifi-api/guides/widget-integration"},{"title":"Cross-Chain Composer","href":"/composer/lifi-api/guides/cross-chain-compose"},{"title":"Withdrawals","href":"/composer/lifi-api/guides/withdrawals"},{"title":"Deposit Examples","href":"/composer/lifi-api/recipes/vault-deposits"}]},{"group":"Reference","pages":[{"title":"API Parameters","href":"/composer/lifi-api/reference/api-parameters"},{"title":"Error Handling","href":"/composer/lifi-api/reference/error-handling"},{"title":"Limitations","href":"/composer/lifi-api/reference/limitations"}]}]},{"group":"Resources","pages":[{"title":"Supported Protocols \u0026 Chains","href":"/composer/protocols-and-chains"},{"title":"New Protocol Onboarding","href":"/composer/for-protocols/integration-guide"},{"title":"Permissioned Products \u0026 Compliance","href":"/composer/permissioned-products-and-compliance"}]}]},{"tab":"Earn","pages":[{"title":"Earn","href":"/earn/overview"}]},{"tab":"Perps","pages":[{"title":"Perps","href":"/perps/overview"}]},{"tab":"Intents \u0026 Solvers","pages":[{"title":"Intents \u0026 Solvers","href":"/lifi-intents/introduction"}]},{"tab":"For Agents","pages":[{"title":"For Agents","href":"/agents/overview"}]},{"tab":"Widget Playground","href":"https://playground.li.fi/"},{"tab":"Bigmi","pages":[{"title":"Bigmi","href":"/bigmi/overview"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/gas-options"}]},{"tab":"FAQs","pages":[{"title":"FAQs","href":"/faqs/fees-monetization"}]}]},{"language":"zh-Hans","pages":[{"title":"zh-Hans","href":"/zh-Hans/composer/composer-api/ops/lifi-swap"}]}]},"basePath":"","title":"lifi.swap - LI.FI","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}