Skip to main content
POST
Withdraw

Authorizations

x-api-key
string
header
required

API key for authentication. Contact Swaps.xyz to obtain an API key.

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]*$
srcTokenAddress
string

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.

Pattern: ^0x[a-fA-F0-9]{40}$
dstToken
object

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

Response

Withdrawal executed successfully

txId
string
required

Workflow transaction ID. Track execution with GET /workflows/getStatus.

txHash
string
required

Transaction hash of the withdrawal

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

Status message of the withdrawal