GET /trade/v1/{chainId}/swap/single
Generate transaction data for single-chain trade via Unizen DEX Aggregator
[just text field] Please enter token in following format: Bearer
The chain ID of the chain where the swap will be conducted
56Possible values: The transactionData object obtained from the /quote API, parsed as a string.
{}The native currency value for this transaction, obtained from the /quote API response.
0The user's address that conducts the trade.
0xF0Fbf42C54Ac40dA016003baD35E5AefaC6E1CE1The wallet address that will receive the funds.
0xF0Fbf42C54Ac40dA016003baD35E5AefaC6E1CE1tradeType obtained from the /quote API response
0Possible values: Generate transaction data for single-chain trade
The data associated with the transaction
Contract version to execute the trade
v1the estimated amount of gas needed for the transaction
11231133211313the estimate gas error, returned from RPC
Execution revertedThe value of the transaction in the native currency.
0Allowance of the user for the involved token
56442235035It is true if the amount to trade exceeds user's funds
falseIt is true if the there is not enough allowance for the token sold
falseIt is true if there is not enough gas for the transaction
falseFor EIP1559 usage
20748300881For EIP1559 usage
maxPriorityFeePerGasGas Price
56442235035The raw error returned from RPC or our smart contract
Error: invalid BigNumber string (argument="value", value="", code=INVALID_ARGUMENT, version=bignumber/5.7.0)Generate transaction data for single-chain trade
Last updated