Returns all possible connections between two chains.

This endpoint gives information about all possible transfers between chains. fromChain and toChain are required. Additional filters such as token, bridge, and exchange can be used to narrow the result further. Information about which chains and tokens are supported can be taken from the response of the /v1/chains endpoint. Information about which bridges and exchanges are supported can be taken from the response of the /v1/tools endpoint.

get/v1/connections

Request

Query parameters

fromChainstring required

The chain that should be the start of the possible connections.

toChainstring required

The chain that should be the end of the possible connections.

fromTokenstring

Only return connections starting with this token.

toTokenstring

Only return connections ending with this token.

chainTypesstring

Restrict the resulting connections to the given chainTypes. Available values: EVM, SVM, UTXO, MVM, TVM, STL.

allowBridgesstring[]

List of bridges that are allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

denyBridgesstring[]

List of bridges that are not allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

preferBridgesstring[]

List of bridges that should be preferred for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

allowExchangesstring[]

List of exchanges that are allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

denyExchangesstring[]

List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

preferExchangesstring[]

List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

allowSwitchChainboolean

Whether connections that require chain switch should be included in the response.

allowDestinationCallboolean

Whether connections that includes destination call should be included in the response.

Headers

x-lifi-api-keystring

Authentication header, register in the LI.FI Partner Portal (https://portal.li.fi/ ) to get your API Key.

Response

Example response

{
  "connections": [
    {
      "fromChainId": 137,
      "toChainId": 1,
      "fromTokens": [
        {
          "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
          "chainId": 137
        }
      ],
      "toTokens": [
        {
          "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
          "chainId": 1
        },
        {
          "address": "0x0000000000000000000000000000000000000000",
          "chainId": 1
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.