Lending Protocols
This endpoint lists all of the supported lending protocols across EVM chains. It returns each protocol's identifier, display name, and the number of pools/vaults currently tracked for it. Use it as a starting point to find out which lending integrations are available.
GET
https://api.cambrian.org/evm/lending/protocols
Parameters
chain_id (integer)
EVM chain ID.
limit (integer)
Limit the number of results.
offset (integer)
Offset the results, allows you to skip a number of rows before starting to return rows.
order_asc (array)
List of column names to order by in ascending order divided by comma. Leave empty items to combine with descending order
order_desc (array)
List of column names to order by in descending order divided by comma. Leave empty items to combine with ascending order
Responses
Code
Description
200
Successful response
Media type: application/vnd.cambrian.table.v1.0.0+json
[
{
"columns": [
{
"name": "chainId",
"type": "UInt16"
},
{
"name": "protocolId",
"type": "LowCardinality(String)"
},
{
"name": "protocolName",
"type": "LowCardinality(String)"
},
{
"name": "poolCount",
"type": "UInt64"
}
],
"data": [
[
8453,
"aave-v3",
"Aave V3",
15
],
[
8453,
"euler-lend",
"Euler Lend",
450
],
[
8453,
"fluid-borrow",
"Fluid Borrow",
37
],
[
8453,
"fluid-lend",
"Fluid Lend",
6
],
[
8453,
"morpho-blue",
"Morpho Blue",
4347
],
[
8453,
"morpho-v1",
"Morpho V1",
514
],
[
8453,
"morpho-v2",
"Morpho V2",
3644
]
],
"rows": 7
}
]
400
Bad Request: Invalid request parameters or malformed request.
401
Unauthorized: Missing or invalid API key. Include X-API-Key header with your request.
403
Forbidden: Invalid API key or insufficient permissions to access this resource.
404
Not Found: Endpoint or resource does not exist.
408
Request Timeout: Request took too long to process. Try again.
500
Internal Server Error: An unexpected error occurred while processing your request.
503
Service Unavailable: The server is temporarily unable to handle the request. Please try again later.
Examples
1. List Supported Lending Protocols
Retrieve the list of supported lending protocols, limited to 10 results.
curl
curl -X GET "https://api.cambrian.org/evm/lending/protocols?limit=10" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
JSON
1[
2 {
3 "columns": [
4 {
5 "name": "chainId",
6 "type": "UInt16"
7 },
8 {
9 "name": "protocolId",
10 "type": "LowCardinality(String)"
11 },
12 {
13 "name": "protocolName",
14 "type": "LowCardinality(String)"
15 },
16 {
17 "name": "poolCount",
18 "type": "UInt64"
19 }
20 ],
21 "data": [
22 [
23 8453,
24 "aave-v3",
25 "Aave V3",
26 15
27 ],
28 [
29 8453,
30 "euler-lend",
31 "Euler Lend",
32 450
33 ],
34 [
35 8453,
36 "fluid-borrow",
37 "Fluid Borrow",
38 37
39 ],
40 [
41 8453,
42 "fluid-lend",
43 "Fluid Lend",
44 6
45 ],
46 [
47 8453,
48 "morpho-blue",
49 "Morpho Blue",
50 4347
51 ],
52 [
53 8453,
54 "morpho-v1",
55 "Morpho V1",
56 514
57 ],
58 [
59 8453,
60 "morpho-v2",
61 "Morpho V2",
62 3644
63 ]
64 ],
65 "rows": 7
66 }
67]
2 {
3 "columns": [
4 {
5 "name": "chainId",
6 "type": "UInt16"
7 },
8 {
9 "name": "protocolId",
10 "type": "LowCardinality(String)"
11 },
12 {
13 "name": "protocolName",
14 "type": "LowCardinality(String)"
15 },
16 {
17 "name": "poolCount",
18 "type": "UInt64"
19 }
20 ],
21 "data": [
22 [
23 8453,
24 "aave-v3",
25 "Aave V3",
26 15
27 ],
28 [
29 8453,
30 "euler-lend",
31 "Euler Lend",
32 450
33 ],
34 [
35 8453,
36 "fluid-borrow",
37 "Fluid Borrow",
38 37
39 ],
40 [
41 8453,
42 "fluid-lend",
43 "Fluid Lend",
44 6
45 ],
46 [
47 8453,
48 "morpho-blue",
49 "Morpho Blue",
50 4347
51 ],
52 [
53 8453,
54 "morpho-v1",
55 "Morpho V1",
56 514
57 ],
58 [
59 8453,
60 "morpho-v2",
61 "Morpho V2",
62 3644
63 ]
64 ],
65 "rows": 7
66 }
67]
x402 Payment Option
This endpoint supports pay-per-use access via the x402 payment protocol (v2): pay $0.05 USDC per request using blockchain micropayments. No API key required.
Quickstart (Typescript)
bash
npm install @x402/fetch @x402/evm viem
TypeScript
1import { x402Client } from "@x402/core/client";
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/evm/lending/protocols"
11);
12const data = await response.json();
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/evm/lending/protocols"
11);
12const data = await response.json();
Quickstart (Python)
bash
pip install "x402[httpx]"
Python
1import asyncio, os
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/evm/lending/protocols")
13 print(response.json())
14asyncio.run(main())
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/evm/lending/protocols")
13 print(response.json())
14asyncio.run(main())
Payment Flow
- Send a normal request to the endpoint (no API key needed)
- Server returns 402 Payment Required with payment details
- The x402 SDK automatically signs a payment authorization with your wallet
- The SDK resubmits the request with the signed payment
- Server verifies payment and returns the API response
The x402 SDK handles steps 2 through 5 automatically.
Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request