Uniswap Create Swap Response Structure is a JSON Structure definition published by Uniswap. It conforms to the https://json-schema.org/draft/2020-12/schema meta-schema.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "CreateSwapResponse Structure",
"description": "JSON Structure for CreateSwapResponse from Uniswap Trading API",
"structure": {
"type": "object",
"properties": {
"requestId": {
"type": "string",
"description": "A unique ID for the request."
},
"swap": {
"type": "object",
"properties": {
"to": {
"$ref": "receiverWalletAddress"
},
"from": {
"$ref": "senderWalletAddress"
},
"data": {
"type": "string",
"description": "The calldata for the transaction."
},
"value": {
"type": "string",
"description": "The quantity of ETH tokens approved for spending by the transaction, denominated in wei. Note that by default Uniswap Labs sets this to the maximum approvable spend."
},
"gasLimit": {
"$ref": "gasLimit"
},
"chainId": {
"$ref": "ChainId"
},
"maxFeePerGas": {
"$ref": "maxFeePerGas"
},
"maxPriorityFeePerGas": {
"$ref": "maxPriorityFeePerGas"
},
"gasPrice": {
"$ref": "gasPrice"
}
},
"required": [
"to",
"from",
"data",
"value",
"chainId"
]
},
"gasFee": {
"type": "string",
"description": "The total estimated gas cost of this transaction (eg. `gasLimit` multiplied by `maxFeePerGas`) in the base unit of the chain."
}
},
"required": [
"requestId",
"swap"
]
}
}
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.