Withdraws the user’s Polymarket proxy-wallet collateral to an arbitrary dstWalletAddress. Optional dstToken swaps the proxy collateral into a different token (and/or chain) before delivery.
This endpoint always requires an EIP-712 signatureByEvmEoa produced by the user’s EOA over { dstToken, dstWalletAddress, expiration } — see the Polymarket Signing Guide. The signature is what authorizes funds being sent to a wallet other than the EOA.
The endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.
Optional source token address to withdraw from the proxy wallet. Always on Polygon, so only the address is needed. Defaults to pUSD collateral. Set to USDC.e to sweep funds stuck as USDC.e.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Swaps API Documentation","description":"Swaps is the execution layer for moving value across chains: swaps, bridges, cross-chain contract calls, prediction market trading, and dedicated stableswap liquidity — behind one API. Users transact with any token on any chain; Swaps handles routing, transaction construction, and end-to-end tracking.","colors":{"primary":"#6366F1","light":"#8B5CF6","dark":"#4F46E5"},"logo":{"light":"https://mintcdn.com/swaps/0Y1Q5nsbTP7RcDGa/logo/light.svg?fit=max\u0026auto=format\u0026n=0Y1Q5nsbTP7RcDGa\u0026q=85\u0026s=b4ef18d882340b146df26c61511553d2","dark":"https://mintcdn.com/swaps/0Y1Q5nsbTP7RcDGa/logo/dark.svg?fit=max\u0026auto=format\u0026n=0Y1Q5nsbTP7RcDGa\u0026q=85\u0026s=59d4110408236ccb8bf596629a4999a0"},"favicon":"https://mintcdn.com/swaps/0Y1Q5nsbTP7RcDGa/favicon.svg?fit=max\u0026auto=format\u0026n=0Y1Q5nsbTP7RcDGa\u0026q=85\u0026s=0cd613f8ed2a18d7e151a1c01caa9db5","navbar":{"primary":{"type":"button","label":"Get Started","href":"https://dashboard.moonpay.com/signup"}},"footer":{"socials":{"x":"https://x.com/moonpay","linkedin":"https://www.linkedin.com/company/moonpay"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"swaps","hasAudioNarration":false,"actualSubdomain":"swaps","customDomains":["docs.swaps.xyz"],"gitSource":{"type":"github","owner":"swaps-xyz","repo":"box-monorepo","deployBranch":"main","contentDirectory":"apps/box-docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad7945dd201333bc5d36e53","collectionId":"986309f2-3617-4b94-a80e-23119a550aa4","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad7945dd201333bc5d36e53"},"entitlements":{},"buildId":"6ad7945dd201333bc5d36e53","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Prediction Market Reference","count":24},{"language":"default","tag":"Documentation","count":10},{"language":"default","tag":"Swap API Reference","count":10},{"language":"default","tag":"Trading","count":8},{"language":"default","tag":"Guides","count":6},{"language":"default","tag":"Getting Started","count":6},{"language":"default","tag":"User Positions \u0026 Activity","count":5},{"language":"default","tag":"Market Information","count":4},{"language":"default","tag":"Core","count":4},{"language":"default","tag":"Protocol Reference","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"llms-txt-v2","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":"vite-origin","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":"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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"prediction-market-reference/withdraw","slug":"/prediction-market-reference/withdraw","pageMetadata":{"title":"Withdraw","description":"Withdraws the user's Polymarket proxy-wallet collateral to an arbitrary `dstWalletAddress`. Optional `dstToken` swaps the proxy collateral into a different token (and/or chain) before delivery.\n\nThis endpoint **always requires** an EIP-712 `signatureByEvmEoa` produced by the user's EOA over `{ dstToken, dstWalletAddress, expiration }` — see the [Polymarket Signing Guide](/prediction-market-reference/polymarket-signing). The signature is what authorizes funds being sent to a wallet other than the EOA.\n\nThe endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json post /api/workflows/polymarket/withdraw","href":"/prediction-market-reference/withdraw","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Withdraws the user’s Polymarket proxy-wallet collateral to an arbitrary \", _jsx(_components.code, {\n children: \"dstWalletAddress\"\n }), \". Optional \", _jsx(_components.code, {\n children: \"dstToken\"\n }), \" swaps the proxy collateral into a different token (and/or chain) before delivery.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This endpoint \", _jsx(_components.strong, {\n children: \"always requires\"\n }), \" an EIP-712 \", _jsx(_components.code, {\n children: \"signatureByEvmEoa\"\n }), \" produced by the user’s EOA over \", _jsx(_components.code, {\n children: \"{ dstToken, dstWalletAddress, expiration }\"\n }), \" — see the \", _jsx(_components.a, {\n href: \"/prediction-market-reference/polymarket-signing\",\n children: \"Polymarket Signing Guide\"\n }), \". The signature is what authorizes funds being sent to a wallet other than the EOA.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"The endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.\"\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Withdraw","description":"Withdraws the user's Polymarket proxy-wallet collateral to an arbitrary `dstWalletAddress`. Optional `dstToken` swaps the proxy collateral into a different token (and/or chain) before delivery.\n\nThis endpoint **always requires** an EIP-712 `signatureByEvmEoa` produced by the user's EOA over `{ dstToken, dstWalletAddress, expiration }` — see the [Polymarket Signing Guide](/prediction-market-reference/polymarket-signing). The signature is what authorizes funds being sent to a wallet other than the EOA.\n\nThe endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json post /api/workflows/polymarket/withdraw","href":"/prediction-market-reference/withdraw","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Withdraw","description":"Withdraws the user's Polymarket proxy-wallet collateral to an arbitrary `dstWalletAddress`. Optional `dstToken` swaps the proxy collateral into a different token (and/or chain) before delivery.\n\nThis endpoint **always requires** an EIP-712 `signatureByEvmEoa` produced by the user's EOA over `{ dstToken, dstWalletAddress, expiration }` — see the [Polymarket Signing Guide](/prediction-market-reference/polymarket-signing). The signature is what authorizes funds being sent to a wallet other than the EOA.\n\nThe endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.","operationId":"withdraw","requestBody":"5d22ae4b-9f2b-48f6-bd59-7f40c9aa192d","responses":{"200":"35cfbb08-dc2d-463e-9d1f-ac5582f4d225","400":"28964d57-86d0-4c95-87e7-516ae2c783fd","401":"74be3bb3-c73c-4889-9bc5-790fc23e82e6","500":"72aeb03c-bac2-43ee-ab0c-40662c698e26"},"method":"post","type":"path","servers":["23cfa1ea-51ed-491e-a68d-f63bc5e6ca0b"],"security":["f4caf088-94f7-40ce-966f-ba0b84e77084"],"path":"/api/workflows/polymarket/withdraw","baseUrlOptions":["https://api-v2.swaps.xyz"],"title":"Withdraw","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["evmEoa","dstWalletAddress","expiration","signatureByEvmEoa"],"properties":{"evmEoa":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"User's EVM wallet address (the signer)","isRequired":true,"uniqueKey":"evmEoa","typeLabel":"string"},"dstWalletAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Wallet address that receives the withdrawn funds","isRequired":true,"uniqueKey":"dstWalletAddress","typeLabel":"string"},"expiration":{"type":"integer","description":"Unix timestamp (seconds) when the signature expires. Must be within the next ~300 seconds.","isRequired":true,"uniqueKey":"expiration","typeLabel":"integer"},"signatureByEvmEoa":{"type":"string","pattern":"^0x[a-fA-F0-9]*$","description":"EIP-712 signature by the EOA over the `Withdraw` typed data.","isRequired":true,"uniqueKey":"signatureByEvmEoa","typeLabel":"string"},"srcTokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Optional source token address to withdraw from the proxy wallet. Always on Polygon, so only the address is needed. Defaults to pUSD collateral. Set to USDC.e to sweep funds stuck as USDC.e.","uniqueKey":"srcTokenAddress","typeLabel":"string"},"dstToken":{"type":"object","required":["address","chainId"],"description":"Optional destination token (address + chainId). When set, the source token is swapped into this token before delivery.","properties":{"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Destination token contract address","isRequired":true,"uniqueKey":"dstToken.address","typeLabel":"string"},"chainId":{"type":"number","description":"Destination chain ID. See the [chain list](/resources/chain-list).","isRequired":true,"uniqueKey":"dstToken.chainId","typeLabel":"number"}},"uniqueKey":"dstToken","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"evmEoa":"\u003cstring>","dstWalletAddress":"\u003cstring>","expiration":123,"signatureByEvmEoa":"\u003cstring>","srcTokenAddress":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"35cfbb08-dc2d-463e-9d1f-ac5582f4d225":{"description":"Withdrawal executed successfully","content":{"application/json":{"schema":{"type":"object","required":["txId","txHash","status"],"properties":{"txId":{"type":"string","description":"Workflow transaction ID. Track execution with `GET /workflows/getStatus`.","isRequired":true,"uniqueKey":"txId","typeLabel":"string"},"txHash":{"type":"string","pattern":"^0x[a-fA-F0-9]*$","description":"Transaction hash of the withdrawal","isRequired":true,"uniqueKey":"txHash","typeLabel":"string"},"status":{"type":"string","description":"Status message of the withdrawal","isRequired":true,"uniqueKey":"status","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"txId":"\u003cstring>","txHash":"\u003cstring>","status":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"28964d57-86d0-4c95-87e7-516ae2c783fd":{"description":"Bad request due to missing or invalid parameters, or an invalid/expired signature","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","description":"Always false for error responses","enum":[false],"example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","name","message","title","statusCode","timestamp"],"properties":{"code":{"type":"string","description":"Error type code for programmatic handling","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"name":{"type":"string","description":"Error class name","isRequired":true,"uniqueKey":"error.name","typeLabel":"string"},"message":{"type":"string","description":"Detailed error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"title":{"type":"string","description":"Short, user-friendly error title","isRequired":true,"uniqueKey":"error.title","typeLabel":"string"},"statusCode":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"error.statusCode","typeLabel":"integer"},"timestamp":{"type":"string","description":"ISO 8601 timestamp when the error occurred","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"\u003cstring>","name":"\u003cstring>","message":"\u003cstring>","title":"\u003cstring>","statusCode":123,"timestamp":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"74be3bb3-c73c-4889-9bc5-790fc23e82e6":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","description":"Always false for error responses","enum":[false],"example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","name","message","title","statusCode","timestamp"],"properties":{"code":{"type":"string","description":"Error type code for programmatic handling","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"name":{"type":"string","description":"Error class name","isRequired":true,"uniqueKey":"error.name","typeLabel":"string"},"message":{"type":"string","description":"Detailed error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"title":{"type":"string","description":"Short, user-friendly error title","isRequired":true,"uniqueKey":"error.title","typeLabel":"string"},"statusCode":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"error.statusCode","typeLabel":"integer"},"timestamp":{"type":"string","description":"ISO 8601 timestamp when the error occurred","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"\u003cstring>","name":"\u003cstring>","message":"\u003cstring>","title":"\u003cstring>","statusCode":123,"timestamp":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"72aeb03c-bac2-43ee-ab0c-40662c698e26":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","description":"Always false for error responses","enum":[false],"example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","name","message","title","statusCode","timestamp"],"properties":{"code":{"type":"string","description":"Error type code for programmatic handling","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"name":{"type":"string","description":"Error class name","isRequired":true,"uniqueKey":"error.name","typeLabel":"string"},"message":{"type":"string","description":"Detailed error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"title":{"type":"string","description":"Short, user-friendly error title","isRequired":true,"uniqueKey":"error.title","typeLabel":"string"},"statusCode":{"type":"integer","description":"HTTP status code","isRequired":true,"uniqueKey":"error.statusCode","typeLabel":"integer"},"timestamp":{"type":"string","description":"ISO 8601 timestamp when the error occurred","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"\u003cstring>","name":"\u003cstring>","message":"\u003cstring>","title":"\u003cstring>","statusCode":123,"timestamp":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"f4caf088-94f7-40ce-966f-ba0b84e77084":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. Contact Swaps.xyz to obtain an API key.","scopes":[]}}},"servers":{"23cfa1ea-51ed-491e-a68d-f63bc5e6ca0b":{"url":"https://api-v2.swaps.xyz","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. Contact Swaps.xyz to obtain an API key.","scopes":[]},"schema":{"title":"x-api-key","type":"string","description":"API key for authentication. Contact Swaps.xyz to obtain an API key.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"prediction-market-reference/openapi.json"},"subdomain":"swaps","siteName":"Swaps API Documentation","title":"Withdraw - Swaps API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-06T23:49:39.532Z","originalFileLocation":"prediction-market-reference/withdraw.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=\"Withdraws the user\u0026#x27;s Polymarket proxy-wallet collateral to an arbitrary dstWalletAddress. Optional dstToken swaps the proxy collateral into a different token (and/or chain) before delivery. This endpoint always requires an EIP-712 signatureByEvmEoa produced by the user\u0026#x27;s EOA over { dstToken, dstWalletAddress, expiration } — see the Polymarket Signing Guide. The signature is what authorizes funds being sent to a wallet other than the EOA. The endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Swaps API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/swaps/GMGSy86BYr2YqEGa/_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/swaps/GMGSy86BYr2YqEGa/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/swaps/GMGSy86BYr2YqEGa/_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/swaps/GMGSy86BYr2YqEGa/_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/swaps/GMGSy86BYr2YqEGa/_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/swaps/GMGSy86BYr2YqEGa/_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/swaps/GMGSy86BYr2YqEGa/_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/swaps/GMGSy86BYr2YqEGa/_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/swaps/GMGSy86BYr2YqEGa/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Withdraw - Swaps API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Withdraws the user\u0026#x27;s Polymarket proxy-wallet collateral to an arbitrary dstWalletAddress. Optional dstToken swaps the proxy collateral into a different token (and/or chain) before delivery. This endpoint always requires an EIP-712 signatureByEvmEoa produced by the user\u0026#x27;s EOA over { dstToken, dstWalletAddress, expiration } — see the Polymarket Signing Guide. The signature is what authorizes funds being sent to a wallet other than the EOA. The endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Swaps API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.swaps.xyz/prediction-market-reference/withdraw\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://swaps.mintlify.app/_mintlify/api/og/v2?division=Trading\u0026amp;title=Withdraw\u0026amp;description=Withdraws+the+user%27s+Polymarket+proxy-wallet+collateral+to+an+arbitrary+%60dstWalletAddress%60.+Optional+%60dstToken%60+swaps+the+proxy+collateral+into+a+different+toke\u0026amp;theme=e402633778683274be5dc99a\u0026amp;signature=67841433b3811c175d9ca2943f2f519a2bfea8807bbdf387ca757b4c5c956122\">\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=\"Withdraw - Swaps API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Withdraws the user\u0026#x27;s Polymarket proxy-wallet collateral to an arbitrary dstWalletAddress. Optional dstToken swaps the proxy collateral into a different token (and/or chain) before delivery. This endpoint always requires an EIP-712 signatureByEvmEoa produced by the user\u0026#x27;s EOA over { dstToken, dstWalletAddress, expiration } — see the Polymarket Signing Guide. The signature is what authorizes funds being sent to a wallet other than the EOA. The endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://swaps.mintlify.app/_mintlify/api/og/v2?division=Trading\u0026amp;title=Withdraw\u0026amp;description=Withdraws+the+user%27s+Polymarket+proxy-wallet+collateral+to+an+arbitrary+%60dstWalletAddress%60.+Optional+%60dstToken%60+swaps+the+proxy+collateral+into+a+different+toke\u0026amp;theme=e402633778683274be5dc99a\u0026amp;signature=67841433b3811c175d9ca2943f2f519a2bfea8807bbdf387ca757b4c5c956122\">\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/swaps/GMGSy86BYr2YqEGa/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Swaps API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.swaps.xyz/prediction-market-reference/withdraw\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/prediction-market-reference/withdraw.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.swaps.xyz/#organization\",\"name\":\"Swaps API Documentation\",\"url\":\"https://docs.swaps.xyz\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/swaps/0Y1Q5nsbTP7RcDGa/logo/light.svg?fit=max\u0026auto=format\u0026n=0Y1Q5nsbTP7RcDGa\u0026q=85\u0026s=b4ef18d882340b146df26c61511553d2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.swaps.xyz#website\",\"name\":\"Swaps API Documentation\",\"url\":\"https://docs.swaps.xyz\",\"publisher\":{\"@id\":\"https://docs.swaps.xyz/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.swaps.xyz/prediction-market-reference/withdraw#webpage\",\"url\":\"https://docs.swaps.xyz/prediction-market-reference/withdraw\",\"name\":\"Withdraw\",\"description\":\"Withdraws the user's Polymarket proxy-wallet collateral to an arbitrary dstWalletAddress. Optional dstToken swaps the proxy collateral into a different token (and/or chain) before delivery. This endpoint always requires an EIP-712 signatureByEvmEoa produced by the user's EOA over { dstToken, dstWalletAddress, expiration } — see the Polymarket Signing Guide. The signature is what authorizes funds being sent to a wallet other than the EOA. The endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.\",\"dateModified\":\"2026-08-06T23:49:39.532Z\",\"isPartOf\":{\"@id\":\"https://docs.swaps.xyz#website\"},\"breadcrumb\":{\"@id\":\"https://docs.swaps.xyz/prediction-market-reference/withdraw#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.swaps.xyz/prediction-market-reference/withdraw#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trading\",\"item\":\"https://docs.swaps.xyz/prediction-market-reference/place-order-chain-abstracted\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Withdraw\",\"item\":\"https://docs.swaps.xyz/prediction-market-reference/withdraw\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.swaps.xyz/prediction-market-reference/withdraw#apireference\",\"headline\":\"Withdraw\",\"name\":\"Withdraw\",\"description\":\"Withdraws the user's Polymarket proxy-wallet collateral to an arbitrary dstWalletAddress. Optional dstToken swaps the proxy collateral into a different token (and/or chain) before delivery. This endpoint always requires an EIP-712 signatureByEvmEoa produced by the user's EOA over { dstToken, dstWalletAddress, expiration } — see the Polymarket Signing Guide. The signature is what authorizes funds being sent to a wallet other than the EOA. The endpoint awaits successful execution of the withdrawal transaction before returning the transaction hash.\",\"url\":\"https://docs.swaps.xyz/prediction-market-reference/withdraw\",\"mainEntityOfPage\":{\"@id\":\"https://docs.swaps.xyz/prediction-market-reference/withdraw#webpage\"},\"dateModified\":\"2026-08-06T23:49:39.532Z\",\"publisher\":{\"@id\":\"https://docs.swaps.xyz/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.swaps.xyz#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Swaps API Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Swaps API Documentation","nav":{"global":{"anchors":[]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Swap API Reference","pages":[{"title":"Swap API Reference","href":"/swap-api-reference/overview"}]},{"tab":"Prediction Market Reference","groups":[{"group":"Getting Started","pages":[{"title":"Overview","href":"/prediction-market-reference/overview"},{"title":"Integration Patterns","href":"/prediction-market-reference/integration-patterns"},{"title":"Transaction Lifecycle","href":"/prediction-market-reference/transaction-lifecycle"},{"title":"Polymarket Signing Guide","href":"/prediction-market-reference/polymarket-signing"}]},{"group":"Trading","pages":[{"title":"Place Order (Chain Abstracted)","href":"/prediction-market-reference/place-order-chain-abstracted"},{"title":"Create or Fetch User","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json post /api/workflows/polymarket/createOrFetchPolymarketUser","href":"/prediction-market-reference/create-or-fetch-user"},{"title":"Place Order","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json post /api/workflows/polymarket/placeOrder","href":"/prediction-market-reference/place-order"},{"title":"Sell Position","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json post /api/workflows/polymarket/sellPosition","href":"/prediction-market-reference/sell-position"},{"title":"Redeem Position","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json post /api/workflows/polymarket/redeemPosition","href":"/prediction-market-reference/redeem-position"},{"title":"Merge Position","description":"Merges a full set of position tokens back into collateral by burning them. Can be used to claim winnings from resolved markets or clean up positions. Endpoint awaits successful execution of the merge transaction before returning the transaction hash.","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json post /api/workflows/polymarket/mergePositions","href":"/prediction-market-reference/merge-position"},{"title":"Withdraw","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json post /api/workflows/polymarket/withdraw","href":"/prediction-market-reference/withdraw"},{"title":"Get Workflow Status","description":"Retrieves the status of a workflow transaction by transaction ID.","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/getStatus","href":"/prediction-market-reference/get-workflow-status"}]},{"group":"Market Discovery","pages":[{"title":"Search Markets","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/search","href":"/prediction-market-reference/search-markets"},{"title":"Get Trending Markets","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getTrendingMarkets","href":"/prediction-market-reference/get-trending-markets"},{"title":"Get Tags","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getTags","href":"/prediction-market-reference/get-tags"}]},{"group":"Market Information","pages":[{"title":"Get Event","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getEvent","href":"/prediction-market-reference/get-event"},{"title":"Get Markets","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getMarkets","href":"/prediction-market-reference/get-markets"},{"title":"Get Market Price","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getMarketPrice","href":"/prediction-market-reference/get-market-price"},{"title":"Get Price History","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getPriceHistory","href":"/prediction-market-reference/get-price-history"}]},{"group":"User Positions \u0026 Activity","pages":[{"title":"Get Current Positions","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getCurrentPositions","href":"/prediction-market-reference/get-current-positions"},{"title":"Get Closed Positions","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getClosedPositions","href":"/prediction-market-reference/get-closed-positions"},{"title":"Get Trades","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getTrades","href":"/prediction-market-reference/get-trades"},{"title":"Get Activity","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getActivity","href":"/prediction-market-reference/get-activity"},{"title":"Get Profit and Loss","deprecated":null,"version":null,"openapi":"/prediction-market-reference/openapi.json get /api/workflows/polymarket/getPnL","href":"/prediction-market-reference/get-profit-and-loss"}]}]},{"tab":"Protocol Reference","pages":[{"title":"Protocol Reference","href":"/protocol-reference/overview"}]}]},"basePath":"","title":"Withdraw - Swaps API Documentation","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}