Skip to main content
POST
/
workflows
/
polymarket
/
withdraw
Withdraw
curl --request POST \
  --url https://api-v2.swaps.xyz/api/workflows/polymarket/withdraw \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "evmEoa": "<string>",
  "dstWalletAddress": "<string>",
  "expiration": 123,
  "signatureByEvmEoa": "<string>"
}
'
{
  "txHash": "<string>",
  "status": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.swaps.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Limited demo key for API Reference: 5c951bc81da566bbd030ba8e20724063.

Body

application/json
evmEoa
string
required

User's EVM wallet address (the signer)

Pattern: ^0x[a-fA-F0-9]{40}$
dstWalletAddress
string
required

Wallet address that receives the withdrawn funds

Pattern: ^0x[a-fA-F0-9]{40}$
expiration
integer
required

Unix timestamp (seconds) when the signature expires. Must be within the next ~300 seconds.

signatureByEvmEoa
string
required

EIP-712 signature by the EOA over the Withdraw typed data.

Pattern: ^0x[a-fA-F0-9]*$
dstToken
object

Optional destination token (address + chainId). When set, the proxy collateral is swapped into this token before delivery.

Response

Withdrawal executed successfully

txHash
string
required

Transaction hash of the withdrawal

Pattern: ^0x[a-fA-F0-9]*$
status
string
required

Status message of the withdrawal