curl --request POST \
--url https://api.velora.xyz/transactions/{chainId} \
--header 'Content-Type: application/json' \
--data '
{
"priceRoute": {
"blockNumber": 123,
"network": 1,
"srcToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"srcDecimals": 123,
"srcAmount": "1000000000000000000",
"destToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"destDecimals": 123,
"destAmount": "1000000000000000000",
"bestRoute": [
{}
],
"gasCostUSD": "<string>",
"gasCost": "<string>",
"version": "<string>",
"contractAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"tokenTransferProxy": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"contractMethod": "<string>",
"partnerFee": 123,
"srcUSD": "<string>",
"destUSD": "<string>",
"partner": "<string>",
"maxImpactReached": true,
"hmac": "<string>"
},
"srcToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"destToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"userAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"srcDecimals": 123,
"destDecimals": 123,
"srcAmount": "1000000000000000000",
"destAmount": "1000000000000000000",
"slippage": 5000,
"txOrigin": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"receiver": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"partner": "my-app-name",
"partnerAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"partnerFeeBps": "<string>",
"permit": "<string>",
"deadline": 123,
"isCapSurplus": true,
"takeSurplus": false,
"isSurplusToUser": false,
"isDirectFeeTransfer": false
}
'{
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"value": "0",
"data": "<string>",
"gasPrice": "16000000000",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"gas": "<string>",
"chainId": 1
}Build Market swap transaction
Build calldata for an Augustus v6.2 swap from a Market priceRoute.
curl --request POST \
--url https://api.velora.xyz/transactions/{chainId} \
--header 'Content-Type: application/json' \
--data '
{
"priceRoute": {
"blockNumber": 123,
"network": 1,
"srcToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"srcDecimals": 123,
"srcAmount": "1000000000000000000",
"destToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"destDecimals": 123,
"destAmount": "1000000000000000000",
"bestRoute": [
{}
],
"gasCostUSD": "<string>",
"gasCost": "<string>",
"version": "<string>",
"contractAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"tokenTransferProxy": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"contractMethod": "<string>",
"partnerFee": 123,
"srcUSD": "<string>",
"destUSD": "<string>",
"partner": "<string>",
"maxImpactReached": true,
"hmac": "<string>"
},
"srcToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"destToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"userAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"srcDecimals": 123,
"destDecimals": 123,
"srcAmount": "1000000000000000000",
"destAmount": "1000000000000000000",
"slippage": 5000,
"txOrigin": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"receiver": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"partner": "my-app-name",
"partnerAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"partnerFeeBps": "<string>",
"permit": "<string>",
"deadline": 123,
"isCapSurplus": true,
"takeSurplus": false,
"isSurplusToUser": false,
"isDirectFeeTransfer": false
}
'{
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"value": "0",
"data": "<string>",
"gasPrice": "16000000000",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"gas": "<string>",
"chainId": 1
}Path Parameters
EVM chain ID. Matches priceRoute.network.
EVM chain ID. Supported values today include 1 (Mainnet), 10 (Optimism), 56 (BSC), 137 (Polygon), 8453 (Base), 42161 (Arbitrum), 43114 (Avalanche), 100 (Gnosis). The set is open — call GET /chains for the live list.
1
Query Parameters
Gas price to use for the transaction, in WEI.
Skip on-chain balance, allowance, and transaction-failure checks. The response omits the gas field when enabled.
Skip the gas estimate. The response omits the gas field when enabled.
Return only the contract call parameters instead of a full transaction object.
Return an EIP-1559 transaction with maxFeePerGas and maxPriorityFeePerGas in place of gasPrice.
Body
The priceRoute block returned by GET /prices, passed verbatim — do not recompute or re-encode.
Show child attributes
Show child attributes
Source token address. A token symbol listed in /tokens can be used instead.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Destination token address. A token symbol listed in /tokens can be used instead.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Address of the transaction caller (msg.sender). When using an intermediary contract, userAddress should correspond to msg.sender and receiver to the recipient.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Source token decimals. Can be omitted if a token symbol is used in srcToken.
Destination token decimals. Can be omitted if a token symbol is used in destToken.
Source amount in WEI/raw units. Required when side=SELL. On side=BUY it can be omitted if slippage is provided.
"1000000000000000000"
Destination amount in WEI/raw units. Required when side=BUY. On side=SELL it can be omitted if slippage is provided.
"1000000000000000000"
Allowed slippage in basis points (0–10000). 250 = 2.5%. Required when the non-fixed amount (destAmount on SELL, srcAmount on BUY) is omitted.
0 <= x <= 10000When msg.sender differs from the transaction sender, pass the sender here along with userAddress.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Recipient of the swap output, for Swap & Transfer. Omit when userAddress receives.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Partner string. Used for analytics and fee attribution on your project's swaps.
"my-app-name"
Address entitled to claim partner fees or surplus.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Partner fee in basis points, used with partnerAddress. 200 = 2%.
Signed permit payload (hex). Lets the swap skip the separate approve transaction.
Unix timestamp (seconds) after which the transaction is no longer valid.
Cap collected surplus at 1%.
Collect positive slippage as surplus. Works with partnerAddress.
Route positive slippage / surplus to the user instead of the partner.
Transfer the partner fee directly rather than accruing it in the Fee Vault.
Response
Augustus calldata + tx fields.
Augustus calldata + tx envelope ready to broadcast.
End-user wallet address (the userAddress from the request).
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
The Augustus v6.2 router. Send the transaction here; it is also the ERC-20 spender to approve.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Native token amount in WEI to send with the transaction. "0" for ERC-20 sources.
"0"
Encoded swap calldata.
Suggested gas price in WEI. Replaced by maxFeePerGas / maxPriorityFeePerGas when eip1559=true.
"16000000000"
EIP-1559 max fee per gas in WEI. Present when eip1559=true.
EIP-1559 max priority fee per gas in WEI. Present when eip1559=true.
Gas limit estimate from the API's transaction checks. Returned by POST /transactions unless ignoreChecks or ignoreGasEstimate is set; omitted by GET /swap, where you estimate locally before broadcasting.
EVM chain ID. Supported values today include 1 (Mainnet), 10 (Optimism), 56 (BSC), 137 (Polygon), 8453 (Base), 42161 (Arbitrum), 43114 (Avalanche), 100 (Gnosis). The set is open — call GET /chains for the live list.
1
Was this page helpful?