Build Parameters for Transaction
Build Transaction
POST
https://apiv5.paraswap.io/transactions/:network
Build parameters for a transaction with the response from /prices
endpoint.
Path Parameters
Name | Type | Description |
---|---|---|
network | number | Network ID. (Mainnet - 1, Ropsten - 3, Polygon - 137, BSC - 56, Avalanche - 43114). |
Query Parameters
Name | Type | Description |
---|---|---|
gasPrice | string | Gas-price to be used for the transaction in wei. |
ignoreChecks | boolean | Allows the API to skip performing on-chain checks such as balances, allowances, as well as possible transaction failures.
*Note: The response does not contain |
ignoreGasEstimate | boolean | Allows the API to skip gas checks
*Note: The response does not contain |
onlyParams | boolean | Allows the API to return the contract parameters only.
Default: |
eip1559 | boolean | Allows the API to return EIP-1559 styled transaction with *Note: We currently support EIP1559 transactions in the following chains: Mainnet, Ropsten, and Avalanche. Default: |
Request Body
Name | Type | Description |
---|---|---|
srcToken | string | Destination Token Address. Only Token Symbol could be specified for tokens from |
srcDecimals | integer | Source Token Decimals. (Can be omitted if Token Symbol is provided for |
destToken | string | Destination Token Address. Only Token Symbol could be specified for tokens from |
destDecimals | integer | Destination Token Decimals. (Can be omitted if Token Symbol is provided for |
srcAmount | integer | Source Amount with decimals. Required if side=SELL. Could only be omitted if slippage is provided when side=BUY |
destAmount | integer | Destination amount with decimals. Required if side=BUY. Could only be omitted if slippage is provided when side=SELL. |
priceRoute | object |
|
slippage | integer | Allowed slippage percentage represented in basis points.
Eg: for 2.5% slippage, set the value to 2.5 * 100 = 250; for 10% = 1000. Slippage could be passed instead of |
userAddress | string | Address of the caller of the transaction ( |
txOrigin | string | Whenever |
receiver | string | Address of the Receiver (that will receive the output of the swap). Used for Swap&Transfer. |
partnerAddress | string | Address that will be entitled to claim fees or surplus. *Note: Fees have to be claimed from the Fee Claimer contract |
partnerFeeBps | string | If provided it is used together with *Note: Fees have to be claimed from the Fee Claimer contract |
partner | string | Your project name. Used for providing analytics on your project swaps. |
permit | string | Hex string for the signature used for Permit. This can be used to avoid giving approval. Helps in saving gas. |
deadline | integer | Timestamp (10 digit/seconds precision) till when the given transaction is valid. For a deadline of 5 minute, deadline: |
positiveSlippageToUser | boolean | (deprecated). Use "takeSurplus" instead. Allows to collect the full positive slippage. Works with Default: |
takeSurplus | boolean | Allows to collect surplus. Works with Default: false |
Last updated