# LI.FI — Returns all possible connections between two chains.

Get LI.FI Chain Connections data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Lifi, pass parameters such as fromChain, fromToken, toChain, and retrieve structured data including source chain identifier, destination chain identifier, source token group, and destination token group for narrow asset selectors, and prepare quote requests.

Documentation: https://openany.si/lifi/lifi-li-fi-returns-all-possible-connections-between-two-chains/16731586-af0f-4dac-bf2c-57ffccc4860d/
API ID: 16731586-af0f-4dac-bf2c-57ffccc4860d
Provider: lifi
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/lifi/v1/connections
Page update time: 2026-12-03T02:43:34.369Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:43:33.273Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## LI.FI Chain Connections API

fromChain and toChain are required. Optional fromToken, toToken and tool restrictions narrow the returned connections; the response does not include an amount-specific quote.

## What You Can Build

- **Narrow asset selectors**: Offer only connections returned for the selected chains.
- **Prepare quote requests**: Resolve a connection, then request an amount-specific quote.

## Returned Data

| Field | Meaning |
| --- | --- |
| `connections[].fromChainId` | Source chain identifier |
| `connections[].toChainId` | Destination chain identifier |
| `connections[].fromTokens` | Source token group |
| `connections[].toTokens` | Destination token group |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "LI.FI — Returns all possible connections between two chains. request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "fromChain": {
          "type": "string",
          "description": "The chain that should be the start of the possible connections."
        },
        "toChain": {
          "type": "string",
          "description": "The chain that should be the end of the possible connections."
        },
        "fromToken": {
          "type": "string",
          "description": "Only return connections starting with this token."
        },
        "toToken": {
          "type": "string",
          "description": "Only return connections ending with this token."
        },
        "chainTypes": {
          "type": "string",
          "description": "Restrict the resulting connections to the given chainTypes. Available values: EVM, SVM, UTXO, MVM, TVM, STL."
        },
        "allowBridges": {
          "type": "array",
          "description": "List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
          "items": {
            "type": "string"
          }
        },
        "denyBridges": {
          "type": "array",
          "description": "List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
          "items": {
            "type": "string"
          }
        },
        "preferBridges": {
          "type": "array",
          "description": "List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
          "items": {
            "type": "string"
          }
        },
        "allowExchanges": {
          "type": "array",
          "description": "List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
          "items": {
            "type": "string"
          }
        },
        "denyExchanges": {
          "type": "array",
          "description": "List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
          "items": {
            "type": "string"
          }
        },
        "preferExchanges": {
          "type": "array",
          "description": "List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
          "items": {
            "type": "string"
          }
        },
        "allowSwitchChain": {
          "type": "boolean",
          "description": "Whether connections that require chain switch should be included in the response."
        },
        "allowDestinationCall": {
          "type": "boolean",
          "description": "Whether connections that includes destination call should be included in the response."
        }
      },
      "required": [
        "fromChain",
        "toChain"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "connections": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fromChainId": {
            "type": "integer"
          },
          "fromTokens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "address": {
                  "type": "string"
                },
                "chainId": {
                  "type": "integer"
                }
              }
            }
          },
          "toChainId": {
            "type": "integer"
          },
          "toTokens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "address": {
                  "type": "string"
                },
                "chainId": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Documentation example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/lifi/v1/connections?fromChain=1&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&toChain=10&toToken=0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "connections": [
    {
      "fromChainId": 1,
      "fromTokens": [
        {
          "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
          "chainId": 1
        }
      ],
      "toChainId": 10,
      "toTokens": [
        {
          "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
          "chainId": 10
        }
      ]
    }
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which parameters are mandatory?
fromChain and toChain are required.

### Can I restrict the token pair?
Use fromToken and toToken filters.

### Can I constrain bridges or exchanges?
Use the supported allow, deny and prefer tool filters.

### What do allowSwitchChain and allowDestinationCall control?
They control whether connections requiring a chain switch or destination call are included.

### Does a returned connection guarantee execution?
No. Request an amount-specific quote and inspect its result; connectivity alone is not a transfer completion.

### Are network fees the OpenAny API call price?
No. Gas and transfer fee estimates describe the on-chain operation. Review the selected implementation pricing separately for the OpenAny request.

## Available implementations
- lifi: https://openany.si/lifi/lifi-li-fi-returns-all-possible-connections-between-two-chains/16731586-af0f-4dac-bf2c-57ffccc4860d/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
