Create your first swap through the LightSwap Direct API in about five minutes, from API key to deposit address.
This walkthrough takes you from zero to a created swap: activate a key, list assets, validate an address, quote, swap, poll.
1. Get your API key
Sign in on lightswap.me, open Account → Business, and select Activate business account. The API key is shown once. Copy it and store it somewhere safe.Set it on your backend:
export LIGHTSWAP_API_KEY="lsk_live_..."
API keys are backend credentials. Never put one in browser code, a mobile app, or a public repository.
The response contains the deposit instructions: address, amount, network, token, and deadline. Only now should your user send funds. A quote response never carries deposit details.
Poll every 30 seconds until the status is terminal: completed, refunded, failed, or expired.
Next steps
Integration flow
Memos, refund addresses, and retry behavior in detail.
Statuses and errors
Every status and error code, with suggested handling.
Limits
Rate limits, quote lifetime, and deposit windows.
API Reference
Request and response fields for every endpoint.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"LightSwap Documentation","colors":{"primary":"#0C8C5E","light":"#18E299","dark":"#18E299"},"logo":{"light":"https://mintcdn.com/lightswap/ka8_BxmX7QeJdfKZ/logo/title-logo.png?fit=max\u0026auto=format\u0026n=ka8_BxmX7QeJdfKZ\u0026q=85\u0026s=69eac73df0f7e08308c88218f915f6ad","dark":"https://mintcdn.com/lightswap/ka8_BxmX7QeJdfKZ/logo/title-logo-dark.png?fit=max\u0026auto=format\u0026n=ka8_BxmX7QeJdfKZ\u0026q=85\u0026s=0edd46e3351849a9a31f37f720c819b7"},"favicon":"https://mintcdn.com/lightswap/5hH4uTIi26OLLq2a/favicon.svg?fit=max\u0026auto=format\u0026n=5hH4uTIi26OLLq2a\u0026q=85\u0026s=4d9d9cedc3d506f7afca9f9bcf484c55","navbar":{"links":[{"href":"https://lightswap.me/support","label":"Support"}],"primary":{"type":"button","label":"Open App","href":"https://lightswap.me"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lightswap","hasAudioNarration":false,"actualSubdomain":"lightswap","customDomains":["docs.lightswap.me"],"gitSource":{"type":"github","owner":"lightswapme","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"issues":false,"thumbs":false},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aef495a59edac7bace68031","clientVersion":"0.0.4131","searchFilterCounts":[{"language":"default","tag":"Business","count":18},{"language":"default","tag":"Documentation","count":17},{"language":"default","tag":"Account","count":7},{"language":"default","tag":"API Reference","count":7},{"language":"default","tag":"Direct API","count":7},{"language":"default","tag":"Introduction","count":6},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"Swaps","count":3},{"language":"default","tag":"Widget","count":1},{"language":"default","tag":"Support","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"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":"business/quickstart","slug":"/business/quickstart","pageMetadata":{"title":"Quickstart","description":"Create your first swap through the LightSwap Direct API in about five minutes, from API key to deposit address.","href":"/business/quickstart"},"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: \"Create your first swap through the LightSwap Direct API in about five minutes, from API key to deposit address.\"\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This walkthrough takes you from zero to a created swap: activate a key, list assets, validate an address, quote, swap, poll.`}),`\n`,_jsx(Heading,{level:`2`,id:`1-get-your-api-key`,children:`1. Get your API key`}),`\n`,_jsxs(_components.p,{children:[`Sign in on `,_jsx(_components.a,{href:`https://lightswap.me/account`,children:`lightswap.me`}),`, open `,_jsx(_components.strong,{children:`Account → Business`}),`, and select `,_jsx(_components.strong,{children:`Activate business account`}),`. The API key is shown once. Copy it and store it somewhere safe.`]}),`\n`,_jsx(_components.p,{children:`Set it on your backend:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LIGHTSWAP_API_KEY=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lsk_live_...\"`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`API keys are backend credentials. Never put one in browser code, a mobile app, or a public repository.`})}),`\n`,_jsx(Heading,{level:`2`,id:`2-list-assets`,children:`2. List assets`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://lightswap.me/api/partner/v1/asset?network=tron\u0026symbol=USDT\"`}),_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:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key: $LIGHTSWAP_API_KEY\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The response gives you canonical lowercase network values, decimals, and memo requirements. Use these exact values in later calls.`}),`\n`,_jsx(Heading,{level:`2`,id:`3-validate-the-destination-address`,children:`3. Validate the destination address`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://lightswap.me/api/partner/v1/address\"`}),_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:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content-type: application/json\"`}),_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:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key: $LIGHTSWAP_API_KEY\"`}),_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:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"network\": \"tron\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"token\": \"USDT\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": \"TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"memo\": null`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Do this before quoting so your users catch address mistakes early.`}),`\n`,_jsx(Heading,{level:`2`,id:`4-create-a-quote`,children:`4. Create a quote`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://lightswap.me/api/partner/v1/quote\"`}),_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:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content-type: application/json\"`}),_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:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key: $LIGHTSWAP_API_KEY\"`}),_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:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"from\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"network\": \"bitcoin\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"token\": \"BTC\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": \"0.01\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"to\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"network\": \"tron\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"token\": \"USDT\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customerId\": \"u_123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"externalId\": \"order-123\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Quotes live for 3 minutes. Amounts are decimal strings.`}),`\n`,_jsx(Heading,{level:`2`,id:`5-create-the-swap`,children:`5. Create the swap`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -X POST `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://lightswap.me/api/partner/v1/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\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content-type: application/json\"`}),_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:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key: $LIGHTSWAP_API_KEY\"`}),_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:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quoteId\": \"pq_aaaaaaaaaaaaaaaaaaaaaaaa\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"destination\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": \"TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"memo\": null`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"notificationEmail\": \"optional@example.com\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The response contains the deposit instructions: address, amount, network, token, and deadline. `,_jsx(_components.strong,{children:`Only now should your user send funds.`}),` A quote response never carries deposit details.`]}),`\n`,_jsx(Heading,{level:`2`,id:`6-poll-the-status`,children:`6. Poll the status`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://lightswap.me/api/partner/v1/swap/AB12CD34EF56\"`}),_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:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key: $LIGHTSWAP_API_KEY\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Poll every 30 seconds until the status is terminal: `,_jsx(_components.code,{children:`completed`}),`, `,_jsx(_components.code,{children:`refunded`}),`, `,_jsx(_components.code,{children:`failed`}),`, or `,_jsx(_components.code,{children:`expired`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Integration flow`,icon:`plug`,href:`/integrations/direct-api/integration-flow`,children:_jsx(_components.p,{children:`Memos, refund addresses, and retry behavior in detail.`})}),_jsx(Card,{title:`Statuses and errors`,icon:`circle-check`,href:`/integrations/direct-api/statuses-errors`,children:_jsx(_components.p,{children:`Every status and error code, with suggested handling.`})}),_jsx(Card,{title:`Limits`,icon:`gauge`,href:`/integrations/direct-api/limits`,children:_jsx(_components.p,{children:`Rate limits, quote lifetime, and deposit windows.`})}),_jsx(Card,{title:`API Reference`,icon:`brackets-curly`,href:`/api-reference/introduction`,children:_jsx(_components.p,{children:`Request and response fields for every endpoint.`})})]})]})}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":"Quickstart","description":"Create your first swap through the LightSwap Direct API in about five minutes, from API key to deposit address.","href":"/business/quickstart"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Get your API key","slug":"1-get-your-api-key","depth":2,"children":[]},{"title":"2. List assets","slug":"2-list-assets","depth":2,"children":[]},{"title":"3. Validate the destination address","slug":"3-validate-the-destination-address","depth":2,"children":[]},{"title":"4. Create a quote","slug":"4-create-a-quote","depth":2,"children":[]},{"title":"5. Create the swap","slug":"5-create-the-swap","depth":2,"children":[]},{"title":"6. Poll the status","slug":"6-poll-the-status","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"lightswap","siteName":"LightSwap Documentation","title":"Quickstart - LightSwap Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-02T10:31:13.171Z","originalFileLocation":"business/quickstart.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=\"Create your first swap through the LightSwap Direct API in about five minutes, from API key to deposit address.\">\u003cmeta data-mint-head name=\"application-name\" content=\"LightSwap Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/svg+xml\" sizes=\"180x180\" href=\"https://mintcdn.com/lightswap/5hH4uTIi26OLLq2a/favicon.svg?fit=max\u0026amp;auto=format\u0026amp;n=5hH4uTIi26OLLq2a\u0026amp;q=85\u0026amp;s=4d9d9cedc3d506f7afca9f9bcf484c55\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintcdn.com/lightswap/5hH4uTIi26OLLq2a/favicon.svg?fit=max\u0026amp;auto=format\u0026amp;n=5hH4uTIi26OLLq2a\u0026amp;q=85\u0026amp;s=4d9d9cedc3d506f7afca9f9bcf484c55\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintcdn.com/lightswap/5hH4uTIi26OLLq2a/favicon.svg?fit=max\u0026amp;auto=format\u0026amp;n=5hH4uTIi26OLLq2a\u0026amp;q=85\u0026amp;s=4d9d9cedc3d506f7afca9f9bcf484c55\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintcdn.com/lightswap/5hH4uTIi26OLLq2a/favicon.svg?fit=max\u0026amp;auto=format\u0026amp;n=5hH4uTIi26OLLq2a\u0026amp;q=85\u0026amp;s=4d9d9cedc3d506f7afca9f9bcf484c55\">\u003cmeta data-mint-head property=\"og:title\" content=\"Quickstart - LightSwap Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create your first swap through the LightSwap Direct API in about five minutes, from API key to deposit address.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LightSwap Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.lightswap.me/business/quickstart\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lightswap.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Quickstart\u0026amp;description=Create+your+first+swap+through+the+LightSwap+Direct+API+in+about+five+minutes%2C+from+API+key+to+deposit+address.\u0026amp;theme=66410e18503af4e3697c64a2\u0026amp;signature=3a8c521f586ae953eb0850511917ef36fa306367b2c9be5e92ba7cf8229c4715\">\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=\"Quickstart - LightSwap Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create your first swap through the LightSwap Direct API in about five minutes, from API key to deposit address.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lightswap.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Quickstart\u0026amp;description=Create+your+first+swap+through+the+LightSwap+Direct+API+in+about+five+minutes%2C+from+API+key+to+deposit+address.\u0026amp;theme=66410e18503af4e3697c64a2\u0026amp;signature=3a8c521f586ae953eb0850511917ef36fa306367b2c9be5e92ba7cf8229c4715\">\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=\"https://mintlify.s3.us-west-1.amazonaws.com/lightswap/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LightSwap Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0C8C5E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.lightswap.me/business/quickstart\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/business/quickstart.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.lightswap.me/#organization\",\"name\":\"LightSwap Documentation\",\"url\":\"https://docs.lightswap.me\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lightswap/ka8_BxmX7QeJdfKZ/logo/title-logo.png?fit=max\u0026auto=format\u0026n=ka8_BxmX7QeJdfKZ\u0026q=85\u0026s=69eac73df0f7e08308c88218f915f6ad\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.lightswap.me#website\",\"name\":\"LightSwap Documentation\",\"url\":\"https://docs.lightswap.me\",\"publisher\":{\"@id\":\"https://docs.lightswap.me/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.lightswap.me/business/quickstart#webpage\",\"url\":\"https://docs.lightswap.me/business/quickstart\",\"name\":\"Quickstart\",\"description\":\"Create your first swap through the LightSwap Direct API in about five minutes, from API key to deposit address.\",\"dateModified\":\"2026-08-02T10:31:13.171Z\",\"isPartOf\":{\"@id\":\"https://docs.lightswap.me#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lightswap.me/business/quickstart#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lightswap.me/business/quickstart#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://docs.lightswap.me/business/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Quickstart\",\"item\":\"https://docs.lightswap.me/business/quickstart\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.lightswap.me/business/quickstart#article\",\"headline\":\"Quickstart\",\"name\":\"Quickstart\",\"description\":\"Create your first swap through the LightSwap Direct API in about five minutes, from API key to deposit address.\",\"url\":\"https://docs.lightswap.me/business/quickstart\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lightswap.me/business/quickstart#webpage\"},\"dateModified\":\"2026-08-02T10:31:13.171Z\",\"publisher\":{\"@id\":\"https://docs.lightswap.me/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.lightswap.me#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LightSwap Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"LightSwap Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/business/quickstart.md","siteName":"LightSwap Documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Business","groups":[{"group":"Get started","icon":"rocket","pages":[{"title":"Add swaps to your product","sidebarTitle":"Overview","description":"Three ways to integrate LightSwap: the widget, the Direct API, or a referral link. Pick the one that fits your product.","href":"/business/overview"},{"title":"Quickstart","href":"/business/quickstart"},{"title":"Revenue sharing","sidebarTitle":"Revenue sharing","description":"Earn 0.5% of swap volume from your integration with self-serve activation, instant keys, and USDC payouts to your LightSwap account.","href":"/business/revenue-sharing"}]},{"group":"Direct API","icon":"code","pages":[{"title":"Introduction","href":"/integrations/direct-api/introduction"},{"title":"Authentication","href":"/integrations/direct-api/authentication"},{"title":"Integration flow","href":"/integrations/direct-api/integration-flow"},{"title":"Statuses and errors","href":"/integrations/direct-api/statuses-errors"},{"title":"Limits","href":"/integrations/direct-api/limits"},{"title":"Refunds","href":"/integrations/direct-api/refunds"},{"title":"Risk and hold policy","href":"/integrations/direct-api/risk-policy"}]},{"group":"Widget","icon":"app-window","pages":[{"title":"Widget","href":"/integrations/widget/introduction"}]},{"group":"API Reference","icon":"square-terminal","pages":[{"title":"Overview","href":"/api-reference/introduction"},{"title":"List assets","openapi":"api-reference/openapi.json GET /asset","href":"/api-reference/asset"},{"title":"Validate address","openapi":"api-reference/openapi.json POST /address","href":"/api-reference/address"},{"title":"Create quote","openapi":"api-reference/openapi.json POST /quote","href":"/api-reference/quote"},{"title":"Swap","openapi":"api-reference/openapi.json POST /swap","href":"/api-reference/swap"},{"title":"Swap history","openapi":"api-reference/openapi.json GET /swap","href":"/api-reference/swaps"},{"title":"Swap status","openapi":"api-reference/openapi.json GET /swap/{id}","href":"/api-reference/swap-status"}]}]}]},"basePath":"","title":"Quickstart - LightSwap Documentation","buildId":"dpl_5joLUXmnJgwqjrHAS4dxZrQTdxgh","deploymentId":"dpl_5joLUXmnJgwqjrHAS4dxZrQTdxgh","dynamics":[],"chunks":[]}