v1

latestOpenAPI 3.0.02026-07-17243469.7 KB
Quote

get/v2/quote

Query parameters

fromChainIdstring required

Chain id of source chain.

fromTokenAddressstring required

Token address on source chain.

toChainIdstring required

Chain id of destination chain.

toTokenAddressstring required

Token address on destination chain.

fromAmountstring required

Amount of sending tokens.

userAddressstring required

Address of user. This will be used to check approvals.

uniqueRoutesPerBridgeboolean required

Flag to return only best route per bridge using the sort criteria

disableSwappingboolean

Flag to specify if routes that have dex swap should be ignored.

includeDexes'oneinch'

Specify Dexes that should be included in routes.

excludeDexes'oneinch'

Specify Dexes that should be excluded in routes. This option will be ignored if includeDexes is specified.

includeBridgesstring[]

Specify Bridges that should be included in routes.

excludeBridgesstring[]

Specify Bridges that should be excluded in routes. This option will be ignored if includeBridges is specified.

sort'output' | 'gas' | 'time' required

Param to sort routes based on.

maxUserTxsstring

Maximum number of transactions. This option will be ignored if singleTxOnly is marked as true.

singleTxOnlyboolean

Only get quotes with one user transaction to bridge.

Headers

API-KEYstring

Response

Returns all the possible routes for bridging tokens from one chain to another. One of the routes can be selected and passed in to start the route.

successboolean required

Status of API.

Example response

{
  "success": true,
  "result": {
    "routes": [
      {
        "routeId": "6a4c26b6-b008-431d-a37c-028e0b30482b",
        "fromAmount": "100000000000000000000",
        "toAmount": "100000000000000000000",
        "totalUserTx": 3,
        "totalGasFeesInUsd": 125.4,
        "sender": "0x3e8cB4bd04d81498aB4b94a392c334F5328b237b",
        "serviceTime": 600
      }
    ],
    "fromAsset": {
      "name": "USD Coin",
      "address": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
      "icon": "https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg",
      "decimals": 6,
      "symbol": "USDC"
    },
    "toAsset": {
      "name": "USD Coin",
      "address": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
      "icon": "https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg",
      "decimals": 6,
      "symbol": "USDC"
    }
  }
}