Skip to main content
POST
/
transactions
/
{chainId}
Build calldata for a Market Swap
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

chainId
integer
required

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.

Example:

1

Query Parameters

gasPrice
string

Gas price to use for the transaction, in WEI.

ignoreChecks
boolean
default:false

Skip on-chain balance, allowance, and transaction-failure checks. The response omits the gas field when enabled.

ignoreGasEstimate
boolean
default:false

Skip the gas estimate. The response omits the gas field when enabled.

onlyParams
boolean
default:false

Return only the contract call parameters instead of a full transaction object.

eip1559
boolean
default:false

Return an EIP-1559 transaction with maxFeePerGas and maxPriorityFeePerGas in place of gasPrice.

Body

application/json
priceRoute
object
required

The priceRoute block returned by GET /prices, passed verbatim — do not recompute or re-encode.

srcToken
string
required

Source token address. A token symbol listed in /tokens can be used instead.

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

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

destToken
string
required

Destination token address. A token symbol listed in /tokens can be used instead.

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

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

userAddress
string
required

Address of the transaction caller (msg.sender). When using an intermediary contract, userAddress should correspond to msg.sender and receiver to the recipient.

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

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

srcDecimals
integer

Source token decimals. Can be omitted if a token symbol is used in srcToken.

destDecimals
integer

Destination token decimals. Can be omitted if a token symbol is used in destToken.

srcAmount
string

Source amount in WEI/raw units. Required when side=SELL. On side=BUY it can be omitted if slippage is provided.

Example:

"1000000000000000000"

destAmount
string

Destination amount in WEI/raw units. Required when side=BUY. On side=SELL it can be omitted if slippage is provided.

Example:

"1000000000000000000"

slippage
integer

Allowed slippage in basis points (0–10000). 250 = 2.5%. Required when the non-fixed amount (destAmount on SELL, srcAmount on BUY) is omitted.

Required range: 0 <= x <= 10000
txOrigin
string

When msg.sender differs from the transaction sender, pass the sender here along with userAddress.

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

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

receiver
string

Recipient of the swap output, for Swap & Transfer. Omit when userAddress receives.

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

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

partner
string

Partner string. Used for analytics and fee attribution on your project's swaps.

Example:

"my-app-name"

partnerAddress
string

Address entitled to claim partner fees or surplus.

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

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

partnerFeeBps
string

Partner fee in basis points, used with partnerAddress. 200 = 2%.

permit
string

Signed permit payload (hex). Lets the swap skip the separate approve transaction.

deadline
integer

Unix timestamp (seconds) after which the transaction is no longer valid.

isCapSurplus
boolean
default:true

Cap collected surplus at 1%.

takeSurplus
boolean
default:false

Collect positive slippage as surplus. Works with partnerAddress.

isSurplusToUser
boolean
default:false

Route positive slippage / surplus to the user instead of the partner.

isDirectFeeTransfer
boolean
default:false

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.

from
string

End-user wallet address (the userAddress from the request).

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

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

to
string

The Augustus v6.2 router. Send the transaction here; it is also the ERC-20 spender to approve.

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

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

value
string

Native token amount in WEI to send with the transaction. "0" for ERC-20 sources.

Example:

"0"

data
string

Encoded swap calldata.

gasPrice
string

Suggested gas price in WEI. Replaced by maxFeePerGas / maxPriorityFeePerGas when eip1559=true.

Example:

"16000000000"

maxFeePerGas
string

EIP-1559 max fee per gas in WEI. Present when eip1559=true.

maxPriorityFeePerGas
string

EIP-1559 max priority fee per gas in WEI. Present when eip1559=true.

gas
string

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.

chainId
integer

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.

Example:

1

Last modified on June 14, 2026