OpenSea · Schema
SwapExecuteRequest
Request body for executing a token swap
NFTMarketplaceWeb3BlockchainTradingDigital Assets
Properties
| Name | Type | Description |
|---|---|---|
| from_assets | array | Tokens to swap from (at least one required) |
| to_assets | array | Tokens to swap to (at least one required) |
| address | string | Wallet address executing the swap |
| recipient | string | Recipient address (defaults to sender address) |
| slippage_tolerance | number | Slippage tolerance as a decimal (0.0 to 0.5, default: 0.01) |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://opensea.io/schemas/SwapExecuteRequest",
"title": "SwapExecuteRequest",
"type": "object",
"description": "Request body for executing a token swap",
"properties": {
"from_assets": {
"type": "array",
"description": "Tokens to swap from (at least one required)",
"items": {
"$ref": "#/components/schemas/SwapAssetInput"
}
},
"to_assets": {
"type": "array",
"description": "Tokens to swap to (at least one required)",
"items": {
"$ref": "#/components/schemas/SwapAssetInput"
}
},
"address": {
"type": "string",
"description": "Wallet address executing the swap",
"example": "0x1234567890abcdef1234567890abcdef12345678"
},
"recipient": {
"type": "string",
"description": "Recipient address (defaults to sender address)"
},
"slippage_tolerance": {
"type": "number",
"format": "double",
"description": "Slippage tolerance as a decimal (0.0 to 0.5, default: 0.01)",
"example": 0.01
}
},
"required": [
"address",
"from_assets",
"to_assets"
]
}