Morpho Markets
Returns Morpho Blue lending market data across supported EVM chains, including loan and collateral token pairs, supply/borrow volumes, utilization, APYs, and liquidation thresholds. You can filter results by market, chain, token addresses, and minimum TVL, and sort by any available market metric.
GET
https://api.cambrian.org/evm/lending/morpho/markets
Parameters
market_id (string)
ID of the Morpho Blue 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": "FixedString(66)"
},
{
"name": "loanAddress",
"type": "FixedString(42)"
},
{
"name": "loanSymbol",
"type": "Nullable(String)"
},
{
"name": "collateralAddress",
"type": "FixedString(42)"
},
{
"name": "collateralSymbol",
"type": "Nullable(String)"
},
{
"name": "supplyUsd",
"type": "Float64"
},
{
"name": "borrowUsd",
"type": "Float64"
},
{
"name": "tvlUsd",
"type": "Float64"
},
{
"name": "availableLiquidityUsd",
"type": "Float64"
},
{
"name": "supplyApy",
"type": "Nullable(Float64)"
},
{
"name": "borrowApy",
"type": "Nullable(Float64)"
},
{
"name": "utilizationRate",
"type": "Float64"
},
{
"name": "lltv",
"type": "Nullable(Float64)"
},
{
"name": "updatedAt",
"type": "DateTime('UTC')"
}
],
"data": [
[
8453,
"morpho-blue",
"0xcef58e59e342247e6e9c662d1c1532ab17ab3399ba9476ab06f82f65c7226c12",
"0x247e14c540a49987114cb152c3c5ebdc7fc86662",
"KITE",
"0x80c602c2d43b201980a1a6822380b54c5ca80aa6",
"SENT",
1006207335928.374,
272159868.9461771,
1006207335928.374,
1005935176059.4279,
6.768965738058079e-8,
0.00025025669686917773,
0.0002704809031183118,
0.86,
"2026-05-28T02:26:15+00:00"
],
[
8453,
"morpho-blue",
"0x1df8b06ed8976333236a895d464bc1ebdc6f1683fc3e450efa5611abfad979a6",
"0x247e14c540a49987114cb152c3c5ebdc7fc86662",
"KITE",
"0x80c602c2d43b201980a1a6822380b54c5ca80aa6",
"SENT",
1006207287887.4144,
3521.7255076059505,
1006207287887.4144,
1006207284365.689,
3.516723445942382e-11,
0.010047781274121093,
3.5e-9,
0.385,
"2026-03-22T08:29:41+00:00"
],
[
8453,
"morpho-blue",
"0x00219077aa239da531666a36ada5c92fda9a359750445635e85921624ca67fe5",
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
"GMORPHO",
32642066734.56219,
32642066734.56057,
32642066734.56219,
0.001621246337890625,
2979.957942092736,
2979.957942092885,
0.9999999999999502,
0.98,
"2026-03-26T17:18:55+00:00"
],
[
8453,
"morpho-blue",
"0x9103c3b4e834476c9a62ea009ba2c884ee42e94e6e314a26f04d312434191836",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
1788998504.745858,
1612092923.532003,
1788998504.745858,
176905581.21385503,
0.046943838458642445,
0.05209529524237455,
0.9011147405967307,
0.86,
"2026-10-23T22:01:49+00:00"
],
[
8453,
"morpho-blue",
"0x54cf9be57fdfa6457a660991907434ff9d295c465a603a50126ff647d50b7354",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
"0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34",
"USDe",
377072156.02057,
339730022.603875,
377072156.02057,
37342133.416695,
0.039818037208803045,
0.04419471974761935,
0.9009682024502018,
0.915,
"2026-10-23T22:01:33+00:00"
],
[
8453,
"morpho-blue",
"0x017f24e318f06b555716a3852f33d01c6d04d52505936ccd7ac13322b137e596",
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
"GMORPHO",
293442518.1580768,
293442518.1580768,
293442518.1580768,
0,
0,
0,
1,
0.98,
"2025-04-22T21:03:51+00:00"
],
[
8453,
"morpho-blue",
"0x0918f1be3b13c3ca2f8a737496efc9fbcd5031b09145fe01851af74f850c4b60",
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
"GMORPHO",
293442518.1580768,
293442518.1580768,
293442518.1580768,
0,
0,
0,
1,
0.98,
"2025-04-22T21:03:51+00:00"
],
[
8453,
"morpho-blue",
"0x0c1b4c8670f03a87548d6f7fa79118c98d24f3ea0d56e21934ef0f1b64f2170d",
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
"GMORPHO",
293442518.1580768,
293442518.1580768,
293442518.1580768,
0,
0,
0,
1,
0.98,
"2025-04-22T21:03:51+00:00"
],
[
8453,
"morpho-blue",
"0x0d090f3c9534d606691234900733fa18fbc1cd55036d615d2b49e038b7bab45c",
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
"GMORPHO",
293442518.1580768,
293442518.1580768,
293442518.1580768,
0,
0,
0,
1,
0.98,
"2025-04-22T21:03:51+00:00"
],
[
8453,
"morpho-blue",
"0x144da00c4202f8eba04c7e5edf2e47a0618eac8094b5b90c4a0a6b553dd2657e",
"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
"cbBTC",
"0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
"GMORPHO",
293442518.1580768,
293442518.1580768,
293442518.1580768,
0,
0,
0,
1,
0.98,
"2025-04-22T21:03:51+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 Morpho Blue Markets
Retrieve the latest Morpho Blue markets on Base, limited to 10 results.
curl
curl -X GET "https://api.cambrian.org/evm/lending/morpho/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": "FixedString(66)"
15 },
16 {
17 "name": "loanAddress",
18 "type": "FixedString(42)"
19 },
20 {
21 "name": "loanSymbol",
22 "type": "Nullable(String)"
23 },
24 {
25 "name": "collateralAddress",
26 "type": "FixedString(42)"
27 },
28 {
29 "name": "collateralSymbol",
30 "type": "Nullable(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": "Float64"
47 },
48 {
49 "name": "supplyApy",
50 "type": "Nullable(Float64)"
51 },
52 {
53 "name": "borrowApy",
54 "type": "Nullable(Float64)"
55 },
56 {
57 "name": "utilizationRate",
58 "type": "Float64"
59 },
60 {
61 "name": "lltv",
62 "type": "Nullable(Float64)"
63 },
64 {
65 "name": "updatedAt",
66 "type": "DateTime('UTC')"
67 }
68 ],
69 "data": [
70 [
71 8453,
72 "morpho-blue",
73 "0xcef58e59e342247e6e9c662d1c1532ab17ab3399ba9476ab06f82f65c7226c12",
74 "0x247e14c540a49987114cb152c3c5ebdc7fc86662",
75 "KITE",
76 "0x80c602c2d43b201980a1a6822380b54c5ca80aa6",
77 "SENT",
78 1006207335928.374,
79 272159868.9461771,
80 1006207335928.374,
81 1005935176059.4279,
82 6.768965738058079e-8,
83 0.00025025669686917773,
84 0.0002704809031183118,
85 0.86,
86 "2026-05-28T02:26:15+00:00"
87 ],
88 [
89 8453,
90 "morpho-blue",
91 "0x1df8b06ed8976333236a895d464bc1ebdc6f1683fc3e450efa5611abfad979a6",
92 "0x247e14c540a49987114cb152c3c5ebdc7fc86662",
93 "KITE",
94 "0x80c602c2d43b201980a1a6822380b54c5ca80aa6",
95 "SENT",
96 1006207287887.4144,
97 3521.7255076059505,
98 1006207287887.4144,
99 1006207284365.689,
100 3.516723445942382e-11,
101 0.010047781274121093,
102 3.5e-9,
103 0.385,
104 "2026-03-22T08:29:41+00:00"
105 ],
106 [
107 8453,
108 "morpho-blue",
109 "0x00219077aa239da531666a36ada5c92fda9a359750445635e85921624ca67fe5",
110 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
111 "cbBTC",
112 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
113 "GMORPHO",
114 32642066734.56219,
115 32642066734.56057,
116 32642066734.56219,
117 0.001621246337890625,
118 2979.957942092736,
119 2979.957942092885,
120 0.9999999999999502,
121 0.98,
122 "2026-03-26T17:18:55+00:00"
123 ],
124 [
125 8453,
126 "morpho-blue",
127 "0x9103c3b4e834476c9a62ea009ba2c884ee42e94e6e314a26f04d312434191836",
128 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
129 "USDC",
130 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
131 "cbBTC",
132 1788998504.745858,
133 1612092923.532003,
134 1788998504.745858,
135 176905581.21385503,
136 0.046943838458642445,
137 0.05209529524237455,
138 0.9011147405967307,
139 0.86,
140 "2026-10-23T22:01:49+00:00"
141 ],
142 [
143 8453,
144 "morpho-blue",
145 "0x54cf9be57fdfa6457a660991907434ff9d295c465a603a50126ff647d50b7354",
146 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
147 "USDC",
148 "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34",
149 "USDe",
150 377072156.02057,
151 339730022.603875,
152 377072156.02057,
153 37342133.416695,
154 0.039818037208803045,
155 0.04419471974761935,
156 0.9009682024502018,
157 0.915,
158 "2026-10-23T22:01:33+00:00"
159 ],
160 [
161 8453,
162 "morpho-blue",
163 "0x017f24e318f06b555716a3852f33d01c6d04d52505936ccd7ac13322b137e596",
164 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
165 "cbBTC",
166 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
167 "GMORPHO",
168 293442518.1580768,
169 293442518.1580768,
170 293442518.1580768,
171 0,
172 0,
173 0,
174 1,
175 0.98,
176 "2025-04-22T21:03:51+00:00"
177 ],
178 [
179 8453,
180 "morpho-blue",
181 "0x0918f1be3b13c3ca2f8a737496efc9fbcd5031b09145fe01851af74f850c4b60",
182 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
183 "cbBTC",
184 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
185 "GMORPHO",
186 293442518.1580768,
187 293442518.1580768,
188 293442518.1580768,
189 0,
190 0,
191 0,
192 1,
193 0.98,
194 "2025-04-22T21:03:51+00:00"
195 ],
196 [
197 8453,
198 "morpho-blue",
199 "0x0c1b4c8670f03a87548d6f7fa79118c98d24f3ea0d56e21934ef0f1b64f2170d",
200 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
201 "cbBTC",
202 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
203 "GMORPHO",
204 293442518.1580768,
205 293442518.1580768,
206 293442518.1580768,
207 0,
208 0,
209 0,
210 1,
211 0.98,
212 "2025-04-22T21:03:51+00:00"
213 ],
214 [
215 8453,
216 "morpho-blue",
217 "0x0d090f3c9534d606691234900733fa18fbc1cd55036d615d2b49e038b7bab45c",
218 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
219 "cbBTC",
220 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
221 "GMORPHO",
222 293442518.1580768,
223 293442518.1580768,
224 293442518.1580768,
225 0,
226 0,
227 0,
228 1,
229 0.98,
230 "2025-04-22T21:03:51+00:00"
231 ],
232 [
233 8453,
234 "morpho-blue",
235 "0x144da00c4202f8eba04c7e5edf2e47a0618eac8094b5b90c4a0a6b553dd2657e",
236 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
237 "cbBTC",
238 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
239 "GMORPHO",
240 293442518.1580768,
241 293442518.1580768,
242 293442518.1580768,
243 0,
244 0,
245 0,
246 1,
247 0.98,
248 "2025-04-22T21:03:51+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": "FixedString(66)"
15 },
16 {
17 "name": "loanAddress",
18 "type": "FixedString(42)"
19 },
20 {
21 "name": "loanSymbol",
22 "type": "Nullable(String)"
23 },
24 {
25 "name": "collateralAddress",
26 "type": "FixedString(42)"
27 },
28 {
29 "name": "collateralSymbol",
30 "type": "Nullable(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": "Float64"
47 },
48 {
49 "name": "supplyApy",
50 "type": "Nullable(Float64)"
51 },
52 {
53 "name": "borrowApy",
54 "type": "Nullable(Float64)"
55 },
56 {
57 "name": "utilizationRate",
58 "type": "Float64"
59 },
60 {
61 "name": "lltv",
62 "type": "Nullable(Float64)"
63 },
64 {
65 "name": "updatedAt",
66 "type": "DateTime('UTC')"
67 }
68 ],
69 "data": [
70 [
71 8453,
72 "morpho-blue",
73 "0xcef58e59e342247e6e9c662d1c1532ab17ab3399ba9476ab06f82f65c7226c12",
74 "0x247e14c540a49987114cb152c3c5ebdc7fc86662",
75 "KITE",
76 "0x80c602c2d43b201980a1a6822380b54c5ca80aa6",
77 "SENT",
78 1006207335928.374,
79 272159868.9461771,
80 1006207335928.374,
81 1005935176059.4279,
82 6.768965738058079e-8,
83 0.00025025669686917773,
84 0.0002704809031183118,
85 0.86,
86 "2026-05-28T02:26:15+00:00"
87 ],
88 [
89 8453,
90 "morpho-blue",
91 "0x1df8b06ed8976333236a895d464bc1ebdc6f1683fc3e450efa5611abfad979a6",
92 "0x247e14c540a49987114cb152c3c5ebdc7fc86662",
93 "KITE",
94 "0x80c602c2d43b201980a1a6822380b54c5ca80aa6",
95 "SENT",
96 1006207287887.4144,
97 3521.7255076059505,
98 1006207287887.4144,
99 1006207284365.689,
100 3.516723445942382e-11,
101 0.010047781274121093,
102 3.5e-9,
103 0.385,
104 "2026-03-22T08:29:41+00:00"
105 ],
106 [
107 8453,
108 "morpho-blue",
109 "0x00219077aa239da531666a36ada5c92fda9a359750445635e85921624ca67fe5",
110 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
111 "cbBTC",
112 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
113 "GMORPHO",
114 32642066734.56219,
115 32642066734.56057,
116 32642066734.56219,
117 0.001621246337890625,
118 2979.957942092736,
119 2979.957942092885,
120 0.9999999999999502,
121 0.98,
122 "2026-03-26T17:18:55+00:00"
123 ],
124 [
125 8453,
126 "morpho-blue",
127 "0x9103c3b4e834476c9a62ea009ba2c884ee42e94e6e314a26f04d312434191836",
128 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
129 "USDC",
130 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
131 "cbBTC",
132 1788998504.745858,
133 1612092923.532003,
134 1788998504.745858,
135 176905581.21385503,
136 0.046943838458642445,
137 0.05209529524237455,
138 0.9011147405967307,
139 0.86,
140 "2026-10-23T22:01:49+00:00"
141 ],
142 [
143 8453,
144 "morpho-blue",
145 "0x54cf9be57fdfa6457a660991907434ff9d295c465a603a50126ff647d50b7354",
146 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
147 "USDC",
148 "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34",
149 "USDe",
150 377072156.02057,
151 339730022.603875,
152 377072156.02057,
153 37342133.416695,
154 0.039818037208803045,
155 0.04419471974761935,
156 0.9009682024502018,
157 0.915,
158 "2026-10-23T22:01:33+00:00"
159 ],
160 [
161 8453,
162 "morpho-blue",
163 "0x017f24e318f06b555716a3852f33d01c6d04d52505936ccd7ac13322b137e596",
164 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
165 "cbBTC",
166 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
167 "GMORPHO",
168 293442518.1580768,
169 293442518.1580768,
170 293442518.1580768,
171 0,
172 0,
173 0,
174 1,
175 0.98,
176 "2025-04-22T21:03:51+00:00"
177 ],
178 [
179 8453,
180 "morpho-blue",
181 "0x0918f1be3b13c3ca2f8a737496efc9fbcd5031b09145fe01851af74f850c4b60",
182 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
183 "cbBTC",
184 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
185 "GMORPHO",
186 293442518.1580768,
187 293442518.1580768,
188 293442518.1580768,
189 0,
190 0,
191 0,
192 1,
193 0.98,
194 "2025-04-22T21:03:51+00:00"
195 ],
196 [
197 8453,
198 "morpho-blue",
199 "0x0c1b4c8670f03a87548d6f7fa79118c98d24f3ea0d56e21934ef0f1b64f2170d",
200 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
201 "cbBTC",
202 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
203 "GMORPHO",
204 293442518.1580768,
205 293442518.1580768,
206 293442518.1580768,
207 0,
208 0,
209 0,
210 1,
211 0.98,
212 "2025-04-22T21:03:51+00:00"
213 ],
214 [
215 8453,
216 "morpho-blue",
217 "0x0d090f3c9534d606691234900733fa18fbc1cd55036d615d2b49e038b7bab45c",
218 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
219 "cbBTC",
220 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
221 "GMORPHO",
222 293442518.1580768,
223 293442518.1580768,
224 293442518.1580768,
225 0,
226 0,
227 0,
228 1,
229 0.98,
230 "2025-04-22T21:03:51+00:00"
231 ],
232 [
233 8453,
234 "morpho-blue",
235 "0x144da00c4202f8eba04c7e5edf2e47a0618eac8094b5b90c4a0a6b553dd2657e",
236 "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
237 "cbBTC",
238 "0xda1c2c3c8fad503662e41e324fc644dc2c5e0ccd",
239 "GMORPHO",
240 293442518.1580768,
241 293442518.1580768,
242 293442518.1580768,
243 0,
244 0,
245 0,
246 1,
247 0.98,
248 "2025-04-22T21:03:51+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/morpho/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/morpho/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/morpho/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/morpho/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