API Reference

Create a "swap" transaction

BETA FEATURE - Please contact team to be whitelisted.

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

Log in to see full request history
Path Params
string
required
Defaults to optimism

The blockchain that will be used for this request.

Body Params

BETA FEATURE - Please contact team to be whitelisted.

This endpoint creates a swap on the protocol you selected to execute the exchange between the tokens you chose.

string
required
Defaults to 0x45E954acf1Efc374478dF69B45f12AEFD8AE51a3
string
required
Defaults to 0x7f5c764cbc14f9669b88837ca1490cca17c31607
string
required
Defaults to 0x94b008aa00579c1307b0ef2c499ad98a8ce58e58
number
Defaults to 20
number

The maximum acceptable slippage that will be accepted to perform the swap (0.02 for 2%). If no value for this optional parameter is provided in the API request, the default slippage percentage is 2%.

string
required
Defaults to 1inch/v5
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.

string

Referrer string that will be used on the DEX aggregators API.

Responses

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

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