Create a "redeem" transaction

BETA FEATURE - Please contact team to be whitelisted.

Create transaction objects to interact with an EVM blockchain for a specified user.

Path Params
string
enum
required
Defaults to ethereum

The blockchain that will be used for this request.

string
required
Defaults to 0xdf0770df86a8034b3efef0a1bb3c889b8332ff56

The address of the pool that will be used for this request.

Body Params

To create redeem interaction objects, the body of the request depends on the type of pool that you are trying to interact with.

If pool type is not identified as AMM Pool in "Retrieve pools from a protocol route" then you should enter as parameters:

  • user
  • amount

If pool type is identified as AMM Pool in "Retrieve pools from a protocol route" then you should enter as parameters:

  • user
  • tokens (addresses of the underlying tokens)
  • amount
  • amounts_minimum (underlying tokens minimum amounts that you want to redeem)

Be careful in the latter case, the orders inside the array has an impact on which amounts are assigned to each tokens. (Ex.: {tokens: [token_a, token_b], amounts_minimum: [amount_minimum_token_a, amount_minimum_token_b]})

string
required
Defaults to 0x45E954acf1Efc374478dF69B45f12AEFD8AE51a3
number
Defaults to 20
tokens
array of strings
tokens
amounts_desired
array of numbers
amounts_desired
amounts_minimum
array of numbers
amounts_minimum
boolean
Defaults to true

If selected to true, the API will not check if the provided user's address has enought token to perform the action.

boolean
Defaults to false

If selected to true, the API will put the maximum amount for the approval action.

boolean
Defaults to false

BETA FEATURE (only Ethereum, Polygon and Arbitrum chains for now) - If selected to true, the API will return the gas limit necessary for the action.

Responses

approveTx might be null if there is no need for an approval.

Language
Credentials
Bearer
JWT
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json