LI.FI Connections API

The Connections API from LI.FI — 1 operation(s) for connections.

Operations 1

GET /v1/connections Returns all possible connections between two chains.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lifi-connections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lifi-connections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LI.FI Connections API
  version: 1.0.0
  description: LI.FI provides the best cross-chain swap across all liquidity pools and bridges.
servers:
- url: https://li.quest
  description: LI.FI Production Environment
- url: https://staging.li.quest
  description: LI.FI Staging Environment
tags:
- name: Connections
paths:
  /v1/connections:
    get:
      parameters:
      - example: POL
        name: fromChain
        description: The chain that should be the start of the possible connections.
        schema:
          type: string
        in: query
        required: true
      - name: toChain
        description: The chain that should be the end of the possible connections.
        schema:
          type: string
        in: query
        required: true
      - example: DAI
        name: fromToken
        description: Only return connections starting with this token.
        schema:
          type: string
        in: query
        required: false
      - name: toToken
        description: Only return connections ending with this token.
        schema:
          type: string
        in: query
        required: false
      - example: EVM,SVM,UTXO,MVM,TVM
        name: chainTypes
        description: 'Restrict the resulting connections to the given chainTypes. Available values: EVM, SVM, UTXO, MVM, TVM.'
        schema:
          type: string
        in: query
        required: false
      - name: allowBridges
        description: List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
        schema:
          type: array
          items:
            type: string
        in: query
        required: false
      - name: denyBridges
        description: List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
        schema:
          type: array
          items:
            type: string
        in: query
        required: false
      - name: preferBridges
        description: List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
        schema:
          type: array
          items:
            type: string
        in: query
        required: false
      - name: allowExchanges
        description: List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
        schema:
          type: array
          items:
            type: string
        in: query
        required: false
      - name: denyExchanges
        description: List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
        schema:
          type: array
          items:
            type: string
        in: query
        required: false
      - name: preferExchanges
        description: List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
        schema:
          type: array
          items:
            type: string
        in: query
        required: false
      - name: allowSwitchChain
        description: Whether connections that require chain switch should be included in the response.
        schema:
          default: true
          type: boolean
        in: query
        required: false
      - name: allowDestinationCall
        description: Whether connections that includes destination call should be included in the response.
        schema:
          default: true
          type: boolean
        in: query
        required: false
      - name: x-lifi-api-key
        description: Authentication header, register in the LI.FI Partner Portal (https://portal.li.fi/ ) to get your API Key.
        schema:
          type: string
        in: header
      responses:
        '200':
          $ref: '#/components/responses/ConnectionsResponse'
      summary: Returns all possible connections between two chains.
      description: '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.'
      tags:
      - Connections
components:
  schemas:
    Connection:
      title: Root Type for Connection
      description: A connection from one chain to another defined by tokens that can be exchanged for another.
      required:
      - toTokens
      - toChainId
      - fromTokens
      - fromChainId
      type: object
      properties:
        fromChainId:
          description: The sending chain
          type: number
        toChainId:
          description: The receiving chain
          type: number
        fromTokens:
          description: List of possible tokens that can be sent
          type: array
          items:
            $ref: '#/components/schemas/BaseToken'
        toTokens:
          description: List of tokens that can be received
          type: array
          items:
            $ref: '#/components/schemas/BaseToken'
      example:
        connections:
        - fromChainId: 137
          toChainId: 1
          fromTokens:
          - address: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
            chainId: 137
          toTokens:
          - address: '0x6b175474e89094c44da98b954eedeac495271d0f'
            chainId: 1
          - address: '0x0000000000000000000000000000000000000000'
            chainId: 1
        - fromChainId: 137
          toChainId: 10
          fromTokens:
          - address: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
            chainId: 137
          toTokens:
          - address: '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1'
            chainId: 10
          - address: '0x0000000000000000000000000000000000000000'
            chainId: 10
        - fromChainId: 137
          toChainId: 56
          fromTokens:
          - address: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
            chainId: 137
          toTokens:
          - address: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3'
            chainId: 56
          - address: '0x2170ed0880ac9a755fd29b2688956bd959f933f8'
            chainId: 56
    BaseToken:
      title: Root Type for BaseToken
      description: Minimal token representation returned by the connections endpoint
      required:
      - address
      - chainId
      type: object
      properties:
        address:
          description: Address of the token
          type: string
        chainId:
          format: number
          description: Id of the token's chain
          type: number
      example:
        address: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
        chainId: 137
    ConnectionsResponse:
      title: Root Type for ConnectionsResponse
      description: ''
      type: object
      properties:
        connections:
          description: The possible connections
          type: array
          items:
            $ref: '#/components/schemas/Connection'
      example:
        connections:
        - fromChainId: 137
          toChainId: 1
          fromTokens:
          - address: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
            chainId: 137
          toTokens:
          - address: '0x6b175474e89094c44da98b954eedeac495271d0f'
            chainId: 1
          - address: '0x0000000000000000000000000000000000000000'
            chainId: 1
  responses:
    ConnectionsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConnectionsResponse'
          examples:
            ConnectionsResponse:
              value:
                connections:
                - fromChainId: 137
                  toChainId: 1
                  fromTokens:
                  - address: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
                    chainId: 137
                  toTokens:
                  - address: '0x6b175474e89094c44da98b954eedeac495271d0f'
                    chainId: 1
                  - address: '0x0000000000000000000000000000000000000000'
                    chainId: 1
      description: ''