Morpho V2 Vault Windows
Returns windowed (trailing-period) performance metrics for Morpho V2 lending vaults: TVL, deposit/withdrawal flows, net flow, share price change, and supply APY. Choose a trailing timeframe of 7d, 30d, 90d, or 365d.
GET
https://api.cambrian.org/evm/lending/morpho/v2/vaults/windows
Parameters
timeframe* (string)
Trailing window for historical data results. One of 7d, 30d, 90d, 365d.
vault_address (string)
Morpho V2 vault address
underlying_address (string)
Underlying token address. See tokens for valid addresses.
chain_id (integer)
EVM chain ID.
min_tvl_usd (integer)
Minimum current TVL in USD of the lending vault, not the window average.
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": "vaultAddress",
"type": "FixedString(42)"
},
{
"name": "symbol",
"type": "Nullable(String)"
},
{
"name": "name",
"type": "Nullable(String)"
},
{
"name": "underlyingAddress",
"type": "String"
},
{
"name": "underlyingSymbol",
"type": "String"
},
{
"name": "tvlUsd",
"type": "Float64"
},
{
"name": "tvlUsdChange",
"type": "Float64"
},
{
"name": "depositsUsd",
"type": "Float64"
},
{
"name": "withdrawalsUsd",
"type": "Float64"
},
{
"name": "netFlowUsd",
"type": "Float64"
},
{
"name": "availableLiquidityChangeUsd",
"type": "Float64"
},
{
"name": "sharePriceChange",
"type": "Float64"
},
{
"name": "supplyApy",
"type": "Float64"
},
{
"name": "supplyBaseApy",
"type": "Float64"
},
{
"name": "supplyExtraRewardsApy",
"type": "Float64"
},
{
"name": "updatedAt",
"type": "DateTime('UTC')"
}
],
"data": [
[
8453,
"morpho-v2",
"0xbeef0786756810478b88982de00f3cd7fdb8e7c7",
"grove-steakUSDC",
"Grove x Steakhouse USDC",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
516667797.210692,
-26857635.064372957,
963833.1896120001,
28262797.636445,
-27298964.446833,
-26857635.064372957,
0.0008463429881797602,
0.0452238393463683,
0.0452238393463683,
0,
"2026-11-18T12:33:54+00:00"
],
[
8453,
"morpho-v2",
"0xbeeff2490feffa212fac2f6553682c219e6a8845",
"sirloinUSDC",
"Steakhouse High Yield USDC Edition",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
452923110.376888,
-8034839.821592033,
45859694.163307995,
54141400.80403099,
-8281706.6407229975,
-8034839.821592033,
0.0006408635519086214,
0.04595177162229224,
0.04595177162229224,
0,
"2026-11-18T12:41:42+00:00"
],
[
8453,
"morpho-v2",
"0xbeef0e0834849acc03f0089f01f4f1eeb06873c9",
"steakUSDC",
"Steakhouse Prime USDC",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
142783130.250529,
4845878.270441979,
75204676.381792,
70511615.884629,
4693060.497162998,
4845878.270441979,
0.0008441913499721565,
0.04524143414372803,
0.04524143414372803,
0,
"2026-11-18T12:42:06+00:00"
],
[
8453,
"morpho-v2",
"0x050ce30b927da55177a4914ec73480238bad56f0",
"gtusdcp",
"Gauntlet USDC Prime",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
119989521.179562,
-117110432.63922799,
26187852.421843003,
143838933.14637,
-117651080.72452699,
-117110432.63922799,
0.0008440450653235398,
0.045241501593855066,
0.045241501593855066,
0,
"2026-11-18T12:42:28+00:00"
],
[
8453,
"morpho-v2",
"0x91c056b6d4311a743614fbc03ac32d4e6a2d3a3c",
"CSCBUSDC",
"Clearstar cbAssets Vault",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
29110505.980701,
-4041060.273584999,
12822217.856270999,
16889272.980416007,
-4067055.1241450086,
-4041060.273584999,
0.0009260610481287568,
0.054542145969958045,
0.054542145969958045,
0,
"2026-11-18T12:37:54+00:00"
],
[
8453,
"morpho-v2",
"0xbeeff0be997cca5b1c13a7433c2004637975739e",
"ethenaUSDC",
"Ethena x Steakhouse USDC",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
25934519.956633,
-74971894.090681,
283021.512592,
75294138.147588,
-75011116.634996,
-74971894.090681,
0.0007875765932570111,
0.04278920852376398,
0.04278920852376398,
0,
"2026-11-18T10:24:04+00:00"
],
[
8453,
"morpho-v2",
"0xbeeff7ae5e00aae3db302e4b0d8c883810a58100",
"bbqUSDC",
"Steakhouse High Yield USDC",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
19511743.228927,
-6401743.344912998,
2758493.03481,
9191431.063691001,
-6432938.028881001,
-6401743.344912998,
0.0010544685919500196,
0.059782232897189494,
0.059782232897189494,
0,
"2026-11-18T12:40:27+00:00"
],
[
8453,
"morpho-v2",
"0x392b3ccf36c8adb8094f45573346b457414cd752",
"KPK_USDC_Yield",
"KPK USDC Yield",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
5630474.885148,
394593.81133900024,
1090068.7698660002,
706651.9981630001,
383416.77170300006,
394593.81133900024,
0.0011417935041762028,
0.060519403517089496,
0.060519403517089496,
0,
"2026-11-18T12:33:07+00:00"
],
[
8453,
"morpho-v2",
"0x1deefabee758aabdc29a542b24ca3b75afd56765",
"gtusdcf",
"Gauntlet USDC Frontier",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
5177071.294794,
65958.39633799996,
2880063.9031160004,
2820003.2088599997,
60060.69425600069,
65958.39633799996,
0.0011091418993705027,
0.05905268876116257,
0.05905268876116257,
0,
"2026-11-18T12:40:27+00:00"
],
[
8453,
"morpho-v2",
"0x7c29b2699a508831d444730cd34d99e0ad2d2624",
"fluidkeyUSDCy",
"Fluidkey USDC Yield by KPK",
"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"USDC",
4426336.329741,
286925.0934800003,
889306.7817979999,
612761.04376,
276545.73803799984,
286925.0934800003,
0.0010735670811203857,
0,
0,
0,
"2026-11-18T12:33: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. Trailing 7-Day Vault Window Metrics
Fetch the most recent 7-day windowed metrics for Morpho V2 vaults, limited to 10 results.
curl
curl -X GET "https://api.cambrian.org/evm/lending/morpho/v2/vaults/windows?timeframe=7d&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": "vaultAddress",
14 "type": "FixedString(42)"
15 },
16 {
17 "name": "symbol",
18 "type": "Nullable(String)"
19 },
20 {
21 "name": "name",
22 "type": "Nullable(String)"
23 },
24 {
25 "name": "underlyingAddress",
26 "type": "String"
27 },
28 {
29 "name": "underlyingSymbol",
30 "type": "String"
31 },
32 {
33 "name": "tvlUsd",
34 "type": "Float64"
35 },
36 {
37 "name": "tvlUsdChange",
38 "type": "Float64"
39 },
40 {
41 "name": "depositsUsd",
42 "type": "Float64"
43 },
44 {
45 "name": "withdrawalsUsd",
46 "type": "Float64"
47 },
48 {
49 "name": "netFlowUsd",
50 "type": "Float64"
51 },
52 {
53 "name": "availableLiquidityChangeUsd",
54 "type": "Float64"
55 },
56 {
57 "name": "sharePriceChange",
58 "type": "Float64"
59 },
60 {
61 "name": "supplyApy",
62 "type": "Float64"
63 },
64 {
65 "name": "supplyBaseApy",
66 "type": "Float64"
67 },
68 {
69 "name": "supplyExtraRewardsApy",
70 "type": "Float64"
71 },
72 {
73 "name": "updatedAt",
74 "type": "DateTime('UTC')"
75 }
76 ],
77 "data": [
78 [
79 8453,
80 "morpho-v2",
81 "0xbeef0786756810478b88982de00f3cd7fdb8e7c7",
82 "grove-steakUSDC",
83 "Grove x Steakhouse USDC",
84 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
85 "USDC",
86 516667797.210692,
87 -26857635.064372957,
88 963833.1896120001,
89 28262797.636445,
90 -27298964.446833,
91 -26857635.064372957,
92 0.0008463429881797602,
93 0.0452238393463683,
94 0.0452238393463683,
95 0,
96 "2026-11-18T12:33:54+00:00"
97 ],
98 [
99 8453,
100 "morpho-v2",
101 "0xbeeff2490feffa212fac2f6553682c219e6a8845",
102 "sirloinUSDC",
103 "Steakhouse High Yield USDC Edition",
104 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
105 "USDC",
106 452923110.376888,
107 -8034839.821592033,
108 45859694.163307995,
109 54141400.80403099,
110 -8281706.6407229975,
111 -8034839.821592033,
112 0.0006408635519086214,
113 0.04595177162229224,
114 0.04595177162229224,
115 0,
116 "2026-11-18T12:41:42+00:00"
117 ],
118 [
119 8453,
120 "morpho-v2",
121 "0xbeef0e0834849acc03f0089f01f4f1eeb06873c9",
122 "steakUSDC",
123 "Steakhouse Prime USDC",
124 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
125 "USDC",
126 142783130.250529,
127 4845878.270441979,
128 75204676.381792,
129 70511615.884629,
130 4693060.497162998,
131 4845878.270441979,
132 0.0008441913499721565,
133 0.04524143414372803,
134 0.04524143414372803,
135 0,
136 "2026-11-18T12:42:06+00:00"
137 ],
138 [
139 8453,
140 "morpho-v2",
141 "0x050ce30b927da55177a4914ec73480238bad56f0",
142 "gtusdcp",
143 "Gauntlet USDC Prime",
144 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
145 "USDC",
146 119989521.179562,
147 -117110432.63922799,
148 26187852.421843003,
149 143838933.14637,
150 -117651080.72452699,
151 -117110432.63922799,
152 0.0008440450653235398,
153 0.045241501593855066,
154 0.045241501593855066,
155 0,
156 "2026-11-18T12:42:28+00:00"
157 ],
158 [
159 8453,
160 "morpho-v2",
161 "0x91c056b6d4311a743614fbc03ac32d4e6a2d3a3c",
162 "CSCBUSDC",
163 "Clearstar cbAssets Vault",
164 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
165 "USDC",
166 29110505.980701,
167 -4041060.273584999,
168 12822217.856270999,
169 16889272.980416007,
170 -4067055.1241450086,
171 -4041060.273584999,
172 0.0009260610481287568,
173 0.054542145969958045,
174 0.054542145969958045,
175 0,
176 "2026-11-18T12:37:54+00:00"
177 ],
178 [
179 8453,
180 "morpho-v2",
181 "0xbeeff0be997cca5b1c13a7433c2004637975739e",
182 "ethenaUSDC",
183 "Ethena x Steakhouse USDC",
184 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
185 "USDC",
186 25934519.956633,
187 -74971894.090681,
188 283021.512592,
189 75294138.147588,
190 -75011116.634996,
191 -74971894.090681,
192 0.0007875765932570111,
193 0.04278920852376398,
194 0.04278920852376398,
195 0,
196 "2026-11-18T10:24:04+00:00"
197 ],
198 [
199 8453,
200 "morpho-v2",
201 "0xbeeff7ae5e00aae3db302e4b0d8c883810a58100",
202 "bbqUSDC",
203 "Steakhouse High Yield USDC",
204 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
205 "USDC",
206 19511743.228927,
207 -6401743.344912998,
208 2758493.03481,
209 9191431.063691001,
210 -6432938.028881001,
211 -6401743.344912998,
212 0.0010544685919500196,
213 0.059782232897189494,
214 0.059782232897189494,
215 0,
216 "2026-11-18T12:40:27+00:00"
217 ],
218 [
219 8453,
220 "morpho-v2",
221 "0x392b3ccf36c8adb8094f45573346b457414cd752",
222 "KPK_USDC_Yield",
223 "KPK USDC Yield",
224 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
225 "USDC",
226 5630474.885148,
227 394593.81133900024,
228 1090068.7698660002,
229 706651.9981630001,
230 383416.77170300006,
231 394593.81133900024,
232 0.0011417935041762028,
233 0.060519403517089496,
234 0.060519403517089496,
235 0,
236 "2026-11-18T12:33:07+00:00"
237 ],
238 [
239 8453,
240 "morpho-v2",
241 "0x1deefabee758aabdc29a542b24ca3b75afd56765",
242 "gtusdcf",
243 "Gauntlet USDC Frontier",
244 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
245 "USDC",
246 5177071.294794,
247 65958.39633799996,
248 2880063.9031160004,
249 2820003.2088599997,
250 60060.69425600069,
251 65958.39633799996,
252 0.0011091418993705027,
253 0.05905268876116257,
254 0.05905268876116257,
255 0,
256 "2026-11-18T12:40:27+00:00"
257 ],
258 [
259 8453,
260 "morpho-v2",
261 "0x7c29b2699a508831d444730cd34d99e0ad2d2624",
262 "fluidkeyUSDCy",
263 "Fluidkey USDC Yield by KPK",
264 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
265 "USDC",
266 4426336.329741,
267 286925.0934800003,
268 889306.7817979999,
269 612761.04376,
270 276545.73803799984,
271 286925.0934800003,
272 0.0010735670811203857,
273 0,
274 0,
275 0,
276 "2026-11-18T12:33:07+00:00"
277 ]
278 ],
279 "rows": 10
280 }
281]
2 {
3 "columns": [
4 {
5 "name": "chainId",
6 "type": "UInt16"
7 },
8 {
9 "name": "protocolId",
10 "type": "String"
11 },
12 {
13 "name": "vaultAddress",
14 "type": "FixedString(42)"
15 },
16 {
17 "name": "symbol",
18 "type": "Nullable(String)"
19 },
20 {
21 "name": "name",
22 "type": "Nullable(String)"
23 },
24 {
25 "name": "underlyingAddress",
26 "type": "String"
27 },
28 {
29 "name": "underlyingSymbol",
30 "type": "String"
31 },
32 {
33 "name": "tvlUsd",
34 "type": "Float64"
35 },
36 {
37 "name": "tvlUsdChange",
38 "type": "Float64"
39 },
40 {
41 "name": "depositsUsd",
42 "type": "Float64"
43 },
44 {
45 "name": "withdrawalsUsd",
46 "type": "Float64"
47 },
48 {
49 "name": "netFlowUsd",
50 "type": "Float64"
51 },
52 {
53 "name": "availableLiquidityChangeUsd",
54 "type": "Float64"
55 },
56 {
57 "name": "sharePriceChange",
58 "type": "Float64"
59 },
60 {
61 "name": "supplyApy",
62 "type": "Float64"
63 },
64 {
65 "name": "supplyBaseApy",
66 "type": "Float64"
67 },
68 {
69 "name": "supplyExtraRewardsApy",
70 "type": "Float64"
71 },
72 {
73 "name": "updatedAt",
74 "type": "DateTime('UTC')"
75 }
76 ],
77 "data": [
78 [
79 8453,
80 "morpho-v2",
81 "0xbeef0786756810478b88982de00f3cd7fdb8e7c7",
82 "grove-steakUSDC",
83 "Grove x Steakhouse USDC",
84 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
85 "USDC",
86 516667797.210692,
87 -26857635.064372957,
88 963833.1896120001,
89 28262797.636445,
90 -27298964.446833,
91 -26857635.064372957,
92 0.0008463429881797602,
93 0.0452238393463683,
94 0.0452238393463683,
95 0,
96 "2026-11-18T12:33:54+00:00"
97 ],
98 [
99 8453,
100 "morpho-v2",
101 "0xbeeff2490feffa212fac2f6553682c219e6a8845",
102 "sirloinUSDC",
103 "Steakhouse High Yield USDC Edition",
104 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
105 "USDC",
106 452923110.376888,
107 -8034839.821592033,
108 45859694.163307995,
109 54141400.80403099,
110 -8281706.6407229975,
111 -8034839.821592033,
112 0.0006408635519086214,
113 0.04595177162229224,
114 0.04595177162229224,
115 0,
116 "2026-11-18T12:41:42+00:00"
117 ],
118 [
119 8453,
120 "morpho-v2",
121 "0xbeef0e0834849acc03f0089f01f4f1eeb06873c9",
122 "steakUSDC",
123 "Steakhouse Prime USDC",
124 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
125 "USDC",
126 142783130.250529,
127 4845878.270441979,
128 75204676.381792,
129 70511615.884629,
130 4693060.497162998,
131 4845878.270441979,
132 0.0008441913499721565,
133 0.04524143414372803,
134 0.04524143414372803,
135 0,
136 "2026-11-18T12:42:06+00:00"
137 ],
138 [
139 8453,
140 "morpho-v2",
141 "0x050ce30b927da55177a4914ec73480238bad56f0",
142 "gtusdcp",
143 "Gauntlet USDC Prime",
144 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
145 "USDC",
146 119989521.179562,
147 -117110432.63922799,
148 26187852.421843003,
149 143838933.14637,
150 -117651080.72452699,
151 -117110432.63922799,
152 0.0008440450653235398,
153 0.045241501593855066,
154 0.045241501593855066,
155 0,
156 "2026-11-18T12:42:28+00:00"
157 ],
158 [
159 8453,
160 "morpho-v2",
161 "0x91c056b6d4311a743614fbc03ac32d4e6a2d3a3c",
162 "CSCBUSDC",
163 "Clearstar cbAssets Vault",
164 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
165 "USDC",
166 29110505.980701,
167 -4041060.273584999,
168 12822217.856270999,
169 16889272.980416007,
170 -4067055.1241450086,
171 -4041060.273584999,
172 0.0009260610481287568,
173 0.054542145969958045,
174 0.054542145969958045,
175 0,
176 "2026-11-18T12:37:54+00:00"
177 ],
178 [
179 8453,
180 "morpho-v2",
181 "0xbeeff0be997cca5b1c13a7433c2004637975739e",
182 "ethenaUSDC",
183 "Ethena x Steakhouse USDC",
184 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
185 "USDC",
186 25934519.956633,
187 -74971894.090681,
188 283021.512592,
189 75294138.147588,
190 -75011116.634996,
191 -74971894.090681,
192 0.0007875765932570111,
193 0.04278920852376398,
194 0.04278920852376398,
195 0,
196 "2026-11-18T10:24:04+00:00"
197 ],
198 [
199 8453,
200 "morpho-v2",
201 "0xbeeff7ae5e00aae3db302e4b0d8c883810a58100",
202 "bbqUSDC",
203 "Steakhouse High Yield USDC",
204 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
205 "USDC",
206 19511743.228927,
207 -6401743.344912998,
208 2758493.03481,
209 9191431.063691001,
210 -6432938.028881001,
211 -6401743.344912998,
212 0.0010544685919500196,
213 0.059782232897189494,
214 0.059782232897189494,
215 0,
216 "2026-11-18T12:40:27+00:00"
217 ],
218 [
219 8453,
220 "morpho-v2",
221 "0x392b3ccf36c8adb8094f45573346b457414cd752",
222 "KPK_USDC_Yield",
223 "KPK USDC Yield",
224 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
225 "USDC",
226 5630474.885148,
227 394593.81133900024,
228 1090068.7698660002,
229 706651.9981630001,
230 383416.77170300006,
231 394593.81133900024,
232 0.0011417935041762028,
233 0.060519403517089496,
234 0.060519403517089496,
235 0,
236 "2026-11-18T12:33:07+00:00"
237 ],
238 [
239 8453,
240 "morpho-v2",
241 "0x1deefabee758aabdc29a542b24ca3b75afd56765",
242 "gtusdcf",
243 "Gauntlet USDC Frontier",
244 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
245 "USDC",
246 5177071.294794,
247 65958.39633799996,
248 2880063.9031160004,
249 2820003.2088599997,
250 60060.69425600069,
251 65958.39633799996,
252 0.0011091418993705027,
253 0.05905268876116257,
254 0.05905268876116257,
255 0,
256 "2026-11-18T12:40:27+00:00"
257 ],
258 [
259 8453,
260 "morpho-v2",
261 "0x7c29b2699a508831d444730cd34d99e0ad2d2624",
262 "fluidkeyUSDCy",
263 "Fluidkey USDC Yield by KPK",
264 "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
265 "USDC",
266 4426336.329741,
267 286925.0934800003,
268 889306.7817979999,
269 612761.04376,
270 276545.73803799984,
271 286925.0934800003,
272 0.0010735670811203857,
273 0,
274 0,
275 0,
276 "2026-11-18T12:33:07+00:00"
277 ]
278 ],
279 "rows": 10
280 }
281]
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/v2/vaults/windows"
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/v2/vaults/windows"
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/v2/vaults/windows")
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/v2/vaults/windows")
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