This endpoint allows users to trade a variable amount of one token to receive an exact amount of another token using the Uniswap protocol.
The transaction is executed on the specified blockchain network, and the user must provide the necessary transaction details, including the token to buy, the token to pay with, and the exact amount to receive. If the token being paid with is ETH and needs to be wrapped, the appropriate amount will be wrapped automatically.
Required Allowances
In order to make this transaction, token allowances need to be set for the following contracts.
UniswapV3RouterRequest model for buying an exact amount of tokens.
The symbol or address of the token to swap from..
"WETH"
The symbol or address of the token to swap to..
"WETH"
The swap fee of the pool
0.01, 0.05, 0.3, 1.0 "0.3"
The amount of 'token_out' to buy.
x > 01.5
The maximum slippage allowed in percent. e.g. 1 means 1 % slippage allowed.
0 <= x <= 100.5
arbitrum, base, ethereum The address of the transaction sender.
"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"
"UNISWAP_BUY_EXACTLY"Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
Successful Response
The unsigned transaction data. User must sign and broadcast to network.
The estimated amount in for the transaction. The actual input amount for this transaction is guaranteed be within the acceptable threshold, defined by the max_slippage_percent, relative to this quote.