1️⃣Get Quote

Returns feasible routes and best quotations

This API returns the best quotes from yBridge

Get the best quote for bridging tokens

GET endpoint/quote

Query Parameters

Name
Type
Description

srcChainId*

String

ID of source chain

fromTokenAddress*

String

Token to be swapped from source chain

amount*

String

Amount of tokens to be swapped.

destChainId*

String

ID of target chain

toTokenAddress*

String

Token to be received on target chain

{
    "isSuccess": false,
    "msg": "The minimum swap amount for this trading pair should be equivalent to {min_amount} {token_symbol}."
    "statusCode": "6",
    "destChainId": "<target chain ID>",
    "fromTokenAddress": "<address>",
    "toTokenAddress": "<address>",
    "fromTokenAmount": "<amount>",
    "contractAddress": null,
    "srcChainId": "<source chain ID>",
    "toTokenAmount": "0",
    "xyFee": null,
}

Parameter/Response Details

  • Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE as the address for the native token in your parameter.

  • Note that the amount parameter should be padded with zeroes. For example, pass 100000000 instead of 100 if the decimal digits of the token are 6.

Example Request

This request is asking a quote of 0.5 ETH on Ethereum to BNB on BSC.

Last updated

Was this helpful?