Create TX (Swap)

Generating the transaction data for calling dex/bridge contract via Rango Exchange.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

The asset X that user likes to swap

string
required

The asset Y that user wants to swap X into that

integer
required

The machine-readable amount of asset X that is going to be swapped

number
required
0.01 to 30

Amount of user's preferred slippage in percent

string
required

User wallet address

string
required

Destination wallet address

boolean

This field should be false when the client wants to preview the route to the user and true when the user accepts the swap. If it's true, the server will be much slower to respond but will check some prerequisites, including the balance of X and any required fees in the user's wallets.

swappers
array of strings

The list of all accepted swappers. An empty list means no filter is required.

swappers
boolean

Defines the provided swappers as the include/exclude list. Default is false (include)

swapperGroups
array of strings

The list of all included/excluded swappers based on tag, empty list means no filter is required

swapperGroups
boolean

Defines the provided swappers' tags as the include/exclude list. Default is false (include)

messagingProtocols
array of strings

Message protocols which will be used to call message before or after swap

messagingProtocols
Allowed:
string

Message to call after or before swap transaction

string

Contract address which should be called before swap transaction

string

Contract address which should be called after swap transaction

boolean

Use this parameter if you want infinite approve from user

boolean

set this parameter to true if you wants to send transactions through a contract

double
0 to 10

Referrer fee in percent, e.g. 0.3

string

Referrer wallet address on source asset (from) blockchain

string

Referrer code

boolean

When it is true, Swappers that have native tokens as fee must be excluded. example: when you call it from AA account.

boolean

Specify that centralized swappers must be included in swappers or not. Default is false (exclude)

boolean

Forces transaction creation by subtracting fees from input if balance is insufficient.

boolean

The transaction execution type the client supports. Sending DEPOSIT limits routing to routes that are executable with a single plain transfer to a deposit address. Default is REGULAR

Headers
string
length between 0 and 40

A unique client generated Id, better use UUID

Responses

400

Bad client request

403

Forbidden

429

Too many requests

500

Internal error

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
*/*