Euler Markets
Returns Euler lending market data across supported EVM chains, including loan/collateral token pairs, supply and borrow USD volumes, TVL, utilization, APYs, and LTV. You can filter results by market, chain, loan/collateral token, and minimum TVL, with pagination and sorting support.
GET
https://api.cambrian.org/evm/lending/euler/markets
Parameters
market_id (string)
ID of the Euler market
loan_address (string)
Loan token address. See tokens for valid addresses.
collateral_address (string)
Collateral token address. See tokens for valid addresses.
chain_id (integer)
EVM chain ID.
min_tvl_usd (integer)
Minimum TVL Usd of the lending pool/vault
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": "String"
},
{
"name": "marketId",
"type": "String"
},
{
"name": "loanAddress",
"type": "String"
},
{
"name": "loanSymbol",
"type": "String"
},
{
"name": "collateralAddress",
"type": "String"
},
{
"name": "collateralSymbol",
"type": "String"
},
{
"name": "supplyUsd",
"type": "Float64"
},
{
"name": "borrowUsd",
"type": "Float64"
},
{
"name": "tvlUsd",
"type": "Float64"
},
{
"name": "availableLiquidityUsd",
"type": "Nullable(Float64)"
},
{
"name": "supplyApy",
"type": "Float64"
},
{
"name": "borrowApy",
"type": "Float64"
},
{
"name": "utilizationRate",
"type": "Float64"
},
{
"name": "ltv",
"type": "Float64"
},
{
"name": "updatedAt",
"type": "DateTime('UTC')"
}
],
"data": [
[
8453,
"euler-lend",
"0xdc4efb20ce286b421f6361734a2a006a1f24af8d_0x60c61a47804283a514bfcdf163138b7528720d0f",
"0x4200000000000000000000000000000000000006",
"WETH",
"0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22",
"cbETH",
8954802.140514288,
8046724.270904993,
8954802.140514288,
908077.8696092957,
0.011963178634703333,
0.014792478700203615,
0.8985931955435541,
0.95,
"2026-10-23T19:34:11+00:00"
],
[
8453,
"euler-lend",
"0xdc4efb20ce286b421f6361734a2a006a1f24af8d_0x6d6021ff46b0d4b800c210aab3ad10b9e3e53113",
"0x4200000000000000000000000000000000000006",
"WETH",
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
8954802.140514288,
8046724.270904993,
8954802.140514288,
908077.8696092957,
0.011963178634703333,
0.014792478700203615,
0.8985931955435541,
0.8,
"2026-10-23T19:34:11+00:00"
],
[
8453,
"euler-lend",
"0xdc4efb20ce286b421f6361734a2a006a1f24af8d_0x91a9ed5d4368499b1fe41f721ab13e64760b3f05",
"0x4200000000000000000000000000000000000006",
"WETH",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
8954802.140514288,
8046724.270904993,
8954802.140514288,
908077.8696092957,
0.011963178634703333,
0.014792478700203615,
0.8985931955435541,
0.83,
"2026-10-23T19:34:11+00:00"
],
[
8453,
"euler-lend",
"0x4c1aeda9b43efcf1da1d1755b18802aabe90f61e_0x81744b5b5527852832f2dd3554c191d3b1342108",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
"0x7d214438d0f27afccc23b3d1e1a53906ace5cfea",
"reUSD",
612382.77117,
464343.973954,
612382.77117,
148038.797216,
0.0633294645091585,
0.09279967521249799,
0.7582577365245571,
0.97,
"2026-10-23T21:37:59+00:00"
],
[
8453,
"euler-lend",
"0x4c1aeda9b43efcf1da1d1755b18802aabe90f61e_0xfe885b1cfd237e8ed2d839335143752ee15856ba",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
"0xb20000000000000000000078ee7ce2fe4908108c",
"NVDA",
612382.77117,
464343.973954,
612382.77117,
148038.797216,
0.0633294645091585,
0.09279967521249799,
0.7582577365245571,
0.9,
"2026-10-23T21:37:59+00:00"
],
[
8453,
"euler-lend",
"0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x0a1a3b5f2041f33522c4efc754a7d096f880ee16",
"0x4200000000000000000000000000000000000006",
"WETH",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
327192.5854606601,
271819.076687443,
327192.5854606601,
55373.50877321708,
0.01654880082765754,
0.02213336980146674,
0.8307617249478445,
0.84,
"2026-10-23T14:22:07+00:00"
],
[
8453,
"euler-lend",
"0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x358f25f82644eabb441d0df4af8746614fb9ea49",
"0x4200000000000000000000000000000000000006",
"WETH",
"0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22",
"cbETH",
327192.5854606601,
271819.076687443,
327192.5854606601,
55373.50877321708,
0.01654880082765754,
0.02213336980146674,
0.8307617249478445,
0.92,
"2026-10-23T14:22:07+00:00"
],
[
8453,
"euler-lend",
"0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x3f0d3fd87a42bdaa3dfcc13ada42ea922e638a7a",
"0x4200000000000000000000000000000000000006",
"WETH",
"0xecac9c5f704e954931349da37f60e39f515c11c1",
"LBTC",
327192.5854606601,
271819.076687443,
327192.5854606601,
55373.50877321708,
0.01654880082765754,
0.02213336980146674,
0.8307617249478445,
0.78,
"2026-10-23T14:22:07+00:00"
],
[
8453,
"euler-lend",
"0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x5fe2de3e565a6a501a4ec44aab8664b1d674ac25",
"0x4200000000000000000000000000000000000006",
"WETH",
"0x940181a94a35a4569e4529a3cdfb74e38fd98631",
"AERO",
327192.5854606601,
271819.076687443,
327192.5854606601,
55373.50877321708,
0.01654880082765754,
0.02213336980146674,
0.8307617249478445,
0.63,
"2026-10-23T14:22:07+00:00"
],
[
8453,
"euler-lend",
"0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x882018411bc4a020a879cee183441fc9fa5d7f8b",
"0x4200000000000000000000000000000000000006",
"WETH",
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
327192.5854606601,
271819.076687443,
327192.5854606601,
55373.50877321708,
0.01654880082765754,
0.02213336980146674,
0.8307617249478445,
0.78,
"2026-10-23T14:22:07+00:00"
]
],
"rows": 10
}
]
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 Euler Markets on Base
Retrieve the top Euler lending markets, limited to 10 results.
curl
curl -X GET "https://api.cambrian.org/evm/lending/euler/markets?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": "String"
11 },
12 {
13 "name": "marketId",
14 "type": "String"
15 },
16 {
17 "name": "loanAddress",
18 "type": "String"
19 },
20 {
21 "name": "loanSymbol",
22 "type": "String"
23 },
24 {
25 "name": "collateralAddress",
26 "type": "String"
27 },
28 {
29 "name": "collateralSymbol",
30 "type": "String"
31 },
32 {
33 "name": "supplyUsd",
34 "type": "Float64"
35 },
36 {
37 "name": "borrowUsd",
38 "type": "Float64"
39 },
40 {
41 "name": "tvlUsd",
42 "type": "Float64"
43 },
44 {
45 "name": "availableLiquidityUsd",
46 "type": "Nullable(Float64)"
47 },
48 {
49 "name": "supplyApy",
50 "type": "Float64"
51 },
52 {
53 "name": "borrowApy",
54 "type": "Float64"
55 },
56 {
57 "name": "utilizationRate",
58 "type": "Float64"
59 },
60 {
61 "name": "ltv",
62 "type": "Float64"
63 },
64 {
65 "name": "updatedAt",
66 "type": "DateTime('UTC')"
67 }
68 ],
69 "data": [
70 [
71 8453,
72 "euler-lend",
73 "0xdc4efb20ce286b421f6361734a2a006a1f24af8d_0x60c61a47804283a514bfcdf163138b7528720d0f",
74 "0x4200000000000000000000000000000000000006",
75 "WETH",
76 "0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22",
77 "cbETH",
78 8954802.140514288,
79 8046724.270904993,
80 8954802.140514288,
81 908077.8696092957,
82 0.011963178634703333,
83 0.014792478700203615,
84 0.8985931955435541,
85 0.95,
86 "2026-10-23T19:34:11+00:00"
87 ],
88 [
89 8453,
90 "euler-lend",
91 "0xdc4efb20ce286b421f6361734a2a006a1f24af8d_0x6d6021ff46b0d4b800c210aab3ad10b9e3e53113",
92 "0x4200000000000000000000000000000000000006",
93 "WETH",
94 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
95 "cbBTC",
96 8954802.140514288,
97 8046724.270904993,
98 8954802.140514288,
99 908077.8696092957,
100 0.011963178634703333,
101 0.014792478700203615,
102 0.8985931955435541,
103 0.8,
104 "2026-10-23T19:34:11+00:00"
105 ],
106 [
107 8453,
108 "euler-lend",
109 "0xdc4efb20ce286b421f6361734a2a006a1f24af8d_0x91a9ed5d4368499b1fe41f721ab13e64760b3f05",
110 "0x4200000000000000000000000000000000000006",
111 "WETH",
112 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
113 "USDC",
114 8954802.140514288,
115 8046724.270904993,
116 8954802.140514288,
117 908077.8696092957,
118 0.011963178634703333,
119 0.014792478700203615,
120 0.8985931955435541,
121 0.83,
122 "2026-10-23T19:34:11+00:00"
123 ],
124 [
125 8453,
126 "euler-lend",
127 "0x4c1aeda9b43efcf1da1d1755b18802aabe90f61e_0x81744b5b5527852832f2dd3554c191d3b1342108",
128 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
129 "USDC",
130 "0x7d214438d0f27afccc23b3d1e1a53906ace5cfea",
131 "reUSD",
132 612382.77117,
133 464343.973954,
134 612382.77117,
135 148038.797216,
136 0.0633294645091585,
137 0.09279967521249799,
138 0.7582577365245571,
139 0.97,
140 "2026-10-23T21:37:59+00:00"
141 ],
142 [
143 8453,
144 "euler-lend",
145 "0x4c1aeda9b43efcf1da1d1755b18802aabe90f61e_0xfe885b1cfd237e8ed2d839335143752ee15856ba",
146 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
147 "USDC",
148 "0xb20000000000000000000078ee7ce2fe4908108c",
149 "NVDA",
150 612382.77117,
151 464343.973954,
152 612382.77117,
153 148038.797216,
154 0.0633294645091585,
155 0.09279967521249799,
156 0.7582577365245571,
157 0.9,
158 "2026-10-23T21:37:59+00:00"
159 ],
160 [
161 8453,
162 "euler-lend",
163 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x0a1a3b5f2041f33522c4efc754a7d096f880ee16",
164 "0x4200000000000000000000000000000000000006",
165 "WETH",
166 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
167 "USDC",
168 327192.5854606601,
169 271819.076687443,
170 327192.5854606601,
171 55373.50877321708,
172 0.01654880082765754,
173 0.02213336980146674,
174 0.8307617249478445,
175 0.84,
176 "2026-10-23T14:22:07+00:00"
177 ],
178 [
179 8453,
180 "euler-lend",
181 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x358f25f82644eabb441d0df4af8746614fb9ea49",
182 "0x4200000000000000000000000000000000000006",
183 "WETH",
184 "0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22",
185 "cbETH",
186 327192.5854606601,
187 271819.076687443,
188 327192.5854606601,
189 55373.50877321708,
190 0.01654880082765754,
191 0.02213336980146674,
192 0.8307617249478445,
193 0.92,
194 "2026-10-23T14:22:07+00:00"
195 ],
196 [
197 8453,
198 "euler-lend",
199 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x3f0d3fd87a42bdaa3dfcc13ada42ea922e638a7a",
200 "0x4200000000000000000000000000000000000006",
201 "WETH",
202 "0xecac9c5f704e954931349da37f60e39f515c11c1",
203 "LBTC",
204 327192.5854606601,
205 271819.076687443,
206 327192.5854606601,
207 55373.50877321708,
208 0.01654880082765754,
209 0.02213336980146674,
210 0.8307617249478445,
211 0.78,
212 "2026-10-23T14:22:07+00:00"
213 ],
214 [
215 8453,
216 "euler-lend",
217 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x5fe2de3e565a6a501a4ec44aab8664b1d674ac25",
218 "0x4200000000000000000000000000000000000006",
219 "WETH",
220 "0x940181a94a35a4569e4529a3cdfb74e38fd98631",
221 "AERO",
222 327192.5854606601,
223 271819.076687443,
224 327192.5854606601,
225 55373.50877321708,
226 0.01654880082765754,
227 0.02213336980146674,
228 0.8307617249478445,
229 0.63,
230 "2026-10-23T14:22:07+00:00"
231 ],
232 [
233 8453,
234 "euler-lend",
235 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x882018411bc4a020a879cee183441fc9fa5d7f8b",
236 "0x4200000000000000000000000000000000000006",
237 "WETH",
238 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
239 "cbBTC",
240 327192.5854606601,
241 271819.076687443,
242 327192.5854606601,
243 55373.50877321708,
244 0.01654880082765754,
245 0.02213336980146674,
246 0.8307617249478445,
247 0.78,
248 "2026-10-23T14:22:07+00:00"
249 ]
250 ],
251 "rows": 10
252 }
253]
2 {
3 "columns": [
4 {
5 "name": "chainId",
6 "type": "UInt16"
7 },
8 {
9 "name": "protocolId",
10 "type": "String"
11 },
12 {
13 "name": "marketId",
14 "type": "String"
15 },
16 {
17 "name": "loanAddress",
18 "type": "String"
19 },
20 {
21 "name": "loanSymbol",
22 "type": "String"
23 },
24 {
25 "name": "collateralAddress",
26 "type": "String"
27 },
28 {
29 "name": "collateralSymbol",
30 "type": "String"
31 },
32 {
33 "name": "supplyUsd",
34 "type": "Float64"
35 },
36 {
37 "name": "borrowUsd",
38 "type": "Float64"
39 },
40 {
41 "name": "tvlUsd",
42 "type": "Float64"
43 },
44 {
45 "name": "availableLiquidityUsd",
46 "type": "Nullable(Float64)"
47 },
48 {
49 "name": "supplyApy",
50 "type": "Float64"
51 },
52 {
53 "name": "borrowApy",
54 "type": "Float64"
55 },
56 {
57 "name": "utilizationRate",
58 "type": "Float64"
59 },
60 {
61 "name": "ltv",
62 "type": "Float64"
63 },
64 {
65 "name": "updatedAt",
66 "type": "DateTime('UTC')"
67 }
68 ],
69 "data": [
70 [
71 8453,
72 "euler-lend",
73 "0xdc4efb20ce286b421f6361734a2a006a1f24af8d_0x60c61a47804283a514bfcdf163138b7528720d0f",
74 "0x4200000000000000000000000000000000000006",
75 "WETH",
76 "0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22",
77 "cbETH",
78 8954802.140514288,
79 8046724.270904993,
80 8954802.140514288,
81 908077.8696092957,
82 0.011963178634703333,
83 0.014792478700203615,
84 0.8985931955435541,
85 0.95,
86 "2026-10-23T19:34:11+00:00"
87 ],
88 [
89 8453,
90 "euler-lend",
91 "0xdc4efb20ce286b421f6361734a2a006a1f24af8d_0x6d6021ff46b0d4b800c210aab3ad10b9e3e53113",
92 "0x4200000000000000000000000000000000000006",
93 "WETH",
94 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
95 "cbBTC",
96 8954802.140514288,
97 8046724.270904993,
98 8954802.140514288,
99 908077.8696092957,
100 0.011963178634703333,
101 0.014792478700203615,
102 0.8985931955435541,
103 0.8,
104 "2026-10-23T19:34:11+00:00"
105 ],
106 [
107 8453,
108 "euler-lend",
109 "0xdc4efb20ce286b421f6361734a2a006a1f24af8d_0x91a9ed5d4368499b1fe41f721ab13e64760b3f05",
110 "0x4200000000000000000000000000000000000006",
111 "WETH",
112 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
113 "USDC",
114 8954802.140514288,
115 8046724.270904993,
116 8954802.140514288,
117 908077.8696092957,
118 0.011963178634703333,
119 0.014792478700203615,
120 0.8985931955435541,
121 0.83,
122 "2026-10-23T19:34:11+00:00"
123 ],
124 [
125 8453,
126 "euler-lend",
127 "0x4c1aeda9b43efcf1da1d1755b18802aabe90f61e_0x81744b5b5527852832f2dd3554c191d3b1342108",
128 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
129 "USDC",
130 "0x7d214438d0f27afccc23b3d1e1a53906ace5cfea",
131 "reUSD",
132 612382.77117,
133 464343.973954,
134 612382.77117,
135 148038.797216,
136 0.0633294645091585,
137 0.09279967521249799,
138 0.7582577365245571,
139 0.97,
140 "2026-10-23T21:37:59+00:00"
141 ],
142 [
143 8453,
144 "euler-lend",
145 "0x4c1aeda9b43efcf1da1d1755b18802aabe90f61e_0xfe885b1cfd237e8ed2d839335143752ee15856ba",
146 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
147 "USDC",
148 "0xb20000000000000000000078ee7ce2fe4908108c",
149 "NVDA",
150 612382.77117,
151 464343.973954,
152 612382.77117,
153 148038.797216,
154 0.0633294645091585,
155 0.09279967521249799,
156 0.7582577365245571,
157 0.9,
158 "2026-10-23T21:37:59+00:00"
159 ],
160 [
161 8453,
162 "euler-lend",
163 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x0a1a3b5f2041f33522c4efc754a7d096f880ee16",
164 "0x4200000000000000000000000000000000000006",
165 "WETH",
166 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
167 "USDC",
168 327192.5854606601,
169 271819.076687443,
170 327192.5854606601,
171 55373.50877321708,
172 0.01654880082765754,
173 0.02213336980146674,
174 0.8307617249478445,
175 0.84,
176 "2026-10-23T14:22:07+00:00"
177 ],
178 [
179 8453,
180 "euler-lend",
181 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x358f25f82644eabb441d0df4af8746614fb9ea49",
182 "0x4200000000000000000000000000000000000006",
183 "WETH",
184 "0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22",
185 "cbETH",
186 327192.5854606601,
187 271819.076687443,
188 327192.5854606601,
189 55373.50877321708,
190 0.01654880082765754,
191 0.02213336980146674,
192 0.8307617249478445,
193 0.92,
194 "2026-10-23T14:22:07+00:00"
195 ],
196 [
197 8453,
198 "euler-lend",
199 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x3f0d3fd87a42bdaa3dfcc13ada42ea922e638a7a",
200 "0x4200000000000000000000000000000000000006",
201 "WETH",
202 "0xecac9c5f704e954931349da37f60e39f515c11c1",
203 "LBTC",
204 327192.5854606601,
205 271819.076687443,
206 327192.5854606601,
207 55373.50877321708,
208 0.01654880082765754,
209 0.02213336980146674,
210 0.8307617249478445,
211 0.78,
212 "2026-10-23T14:22:07+00:00"
213 ],
214 [
215 8453,
216 "euler-lend",
217 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x5fe2de3e565a6a501a4ec44aab8664b1d674ac25",
218 "0x4200000000000000000000000000000000000006",
219 "WETH",
220 "0x940181a94a35a4569e4529a3cdfb74e38fd98631",
221 "AERO",
222 327192.5854606601,
223 271819.076687443,
224 327192.5854606601,
225 55373.50877321708,
226 0.01654880082765754,
227 0.02213336980146674,
228 0.8307617249478445,
229 0.63,
230 "2026-10-23T14:22:07+00:00"
231 ],
232 [
233 8453,
234 "euler-lend",
235 "0x859160db5841e5cfb8d3f144c6b3381a85a4b410_0x882018411bc4a020a879cee183441fc9fa5d7f8b",
236 "0x4200000000000000000000000000000000000006",
237 "WETH",
238 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
239 "cbBTC",
240 327192.5854606601,
241 271819.076687443,
242 327192.5854606601,
243 55373.50877321708,
244 0.01654880082765754,
245 0.02213336980146674,
246 0.8307617249478445,
247 0.78,
248 "2026-10-23T14:22:07+00:00"
249 ]
250 ],
251 "rows": 10
252 }
253]
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/euler/markets"
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/euler/markets"
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/euler/markets")
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/euler/markets")
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