跳转到主要内容
GET
/
v1
/
chains
List supported chains
curl --request GET \
  --url https://earn.li.fi/v1/chains \
  --header 'x-lifi-api-key: <api-key>'
[
  {
    "name": "Ethereum",
    "chainId": 1,
    "networkCaip": "eip155:1"
  },
  {
    "name": "Base",
    "chainId": 8453,
    "networkCaip": "eip155:8453"
  },
  {
    "name": "Arbitrum One",
    "chainId": 42161,
    "networkCaip": "eip155:42161"
  }
]

授权

x-lifi-api-key
string
header
必填

响应

200 - application/json

Supported chains

name
string
必填

Human-readable chain name.

示例:

"Ethereum"

chainId
integer
必填

EVM chain ID.

必填范围: -9007199254740991 <= x <= 9007199254740991
示例:

1

networkCaip
string
必填

CAIP-2 network identifier.

示例:

"eip155:1"