phone-arrow-up-rightCall Data API

Generate swap call data for Rooster Protocol

post

Endpoint to generate the necessary call data for executing a token swap on the Rooster Protocol.

Body
inputTokenAddressstringRequired

Address of the input token. Use '0x0000000000000000000000000000000000000000' for the native gas token.

outputTokenAddressstringRequired

Address of the output token.

recipientAddressstringRequired

Address of the recipient of the output tokens.

amountstringRequired

Amount of the input token to swap (in its smallest unit, e.g., Wei).

slippagenumber · floatOptional

Optional. Slippage tolerance percentage (e.g., 3 for 3%). Defaults to a predefined value.

amountOutMinimumstringOptional

Optional. Minimum amount of output tokens expected (in Wei). If not provided, it will be calculated based on the slippage.

Responses
chevron-right
200

Successfully generated swap call data.

application/json
post
/swap/callData

Last updated