💻Get the recommended slippage value of ETH/Base token

Get the recommended slippage value based on the input blockchain code and token contract address

Access point: /defi/router/v1/recommend_slippage/{chain}

Request method: GET

Request parameters:

Parameter name

Parameter Description

Is it necessary

Example

token_address

the contract address of the output token

yes

0xbacacd83b68c92ae07ef382d0c0277d1bd1c7c4d

token_in_address

enter the token contract address

no, the main purpose is to solve the problem of accumulated slippage when swapping two alt coins

0x0c48250eb1f29491f1efbeec0261eb556f0973c7

Return parameter:

Parameter name

Parameter Description

Example

msg

error message

amountIn is required

code

correct 0, Incorrect -1

0

data

returns the recommended slippage value. If it is 10%, it returns "10". display_slippage is the displayed slippage value.

{

"recommend_slippage":"1",

"display_slippage":"1",

"has_tax":false

}

Last updated