compass_api_sdk 0.1.14__py3-none-any.whl → 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of compass_api_sdk might be problematic. Click here for more details.

Files changed (38) hide show
  1. compass_api_sdk/_version.py +3 -3
  2. compass_api_sdk/aave_v3.py +214 -0
  3. compass_api_sdk/models/__init__.py +62 -25
  4. compass_api_sdk/models/aave_reserve_overviewop.py +97 -0
  5. compass_api_sdk/models/aavehistoricaltransactionsresponse.py +45 -11
  6. compass_api_sdk/models/aavelooprequest.py +87 -0
  7. compass_api_sdk/models/aavereserveoverviewresponse.py +25 -0
  8. compass_api_sdk/models/borrow.py +46 -12
  9. compass_api_sdk/models/liquidationcall.py +45 -18
  10. compass_api_sdk/models/morpho_market_positionop.py +5 -9
  11. compass_api_sdk/models/morpho_marketsop.py +5 -9
  12. compass_api_sdk/models/morpho_vault_positionop.py +5 -9
  13. compass_api_sdk/models/morpho_vaultsop.py +19 -17
  14. compass_api_sdk/models/morphoborrowrequest.py +8 -5
  15. compass_api_sdk/models/morphodepositrequest.py +8 -5
  16. compass_api_sdk/models/morphorepayrequest.py +8 -5
  17. compass_api_sdk/models/morphosetvaultallowancerequest.py +8 -5
  18. compass_api_sdk/models/morphosupplycollateralrequest.py +8 -5
  19. compass_api_sdk/models/morphowithdrawcollateralrequest.py +8 -5
  20. compass_api_sdk/models/morphowithdrawrequest.py +8 -5
  21. compass_api_sdk/models/redeemunderlying.py +31 -4
  22. compass_api_sdk/models/repay.py +35 -4
  23. compass_api_sdk/models/reserve.py +67 -6
  24. compass_api_sdk/models/supply.py +37 -4
  25. compass_api_sdk/models/swapborrowrate.py +37 -8
  26. compass_api_sdk/models/uniswapbuyexactlyparams.py +6 -6
  27. compass_api_sdk/models/uniswapbuyexactlyrequest.py +6 -6
  28. compass_api_sdk/models/usageascollateral.py +36 -4
  29. compass_api_sdk/morpho.py +63 -47
  30. compass_api_sdk/transaction_batching.py +284 -0
  31. compass_api_sdk/uniswap_v3.py +10 -10
  32. {compass_api_sdk-0.1.14.dist-info → compass_api_sdk-0.2.1.dist-info}/METADATA +12 -11
  33. {compass_api_sdk-0.1.14.dist-info → compass_api_sdk-0.2.1.dist-info}/RECORD +34 -35
  34. compass_api_sdk/models/aavehistoricaltransactionbase.py +0 -113
  35. compass_api_sdk/models/action.py +0 -14
  36. compass_api_sdk/models/collateralreserve.py +0 -16
  37. compass_api_sdk/models/principalreserve.py +0 -16
  38. {compass_api_sdk-0.1.14.dist-info → compass_api_sdk-0.2.1.dist-info}/WHEEL +0 -0
@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "compass_api_sdk"
6
- __version__: str = "0.1.14"
6
+ __version__: str = "0.2.1"
7
7
  __openapi_doc_version__: str = "0.0.1"
8
- __gen_version__: str = "2.598.22"
9
- __user_agent__: str = "speakeasy-sdk/python 0.1.14 2.598.22 0.0.1 compass_api_sdk"
8
+ __gen_version__: str = "2.599.0"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.2.1 2.599.0 0.0.1 compass_api_sdk"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -8,6 +8,220 @@ from typing import Any, Mapping, Optional, Union
8
8
 
9
9
 
10
10
  class AaveV3(BaseSDK):
11
+ def reserve_overview(
12
+ self,
13
+ *,
14
+ chain: models.AaveReserveOverviewChain = models.AaveReserveOverviewChain.ARBITRUM_MAINNET,
15
+ token: models.AaveReserveOverviewToken = models.AaveReserveOverviewToken.USDC,
16
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
17
+ server_url: Optional[str] = None,
18
+ timeout_ms: Optional[int] = None,
19
+ http_headers: Optional[Mapping[str, str]] = None,
20
+ ) -> models.AaveReserveOverviewResponse:
21
+ r"""Reserve overview
22
+
23
+ Returns key metrics for Aave Reserves:
24
+ - Total Supplied (TVL) in USD
25
+ - Total Borrowed in USD
26
+ - Utilization Ratio
27
+
28
+ See below for more info:
29
+
30
+ :param chain: The chain to use.
31
+ :param token: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
32
+ :param retries: Override the default retry configuration for this method
33
+ :param server_url: Override the default server URL for this method
34
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
35
+ :param http_headers: Additional headers to set or replace on requests.
36
+ """
37
+ base_url = None
38
+ url_variables = None
39
+ if timeout_ms is None:
40
+ timeout_ms = self.sdk_configuration.timeout_ms
41
+
42
+ if server_url is not None:
43
+ base_url = server_url
44
+ else:
45
+ base_url = self._get_url(base_url, url_variables)
46
+
47
+ request = models.AaveReserveOverviewRequest(
48
+ chain=chain,
49
+ token=token,
50
+ )
51
+
52
+ req = self._build_request(
53
+ method="GET",
54
+ path="/v0/aave/reserve_overview/get",
55
+ base_url=base_url,
56
+ url_variables=url_variables,
57
+ request=request,
58
+ request_body_required=False,
59
+ request_has_path_params=False,
60
+ request_has_query_params=True,
61
+ user_agent_header="user-agent",
62
+ accept_header_value="application/json",
63
+ http_headers=http_headers,
64
+ security=self.sdk_configuration.security,
65
+ timeout_ms=timeout_ms,
66
+ )
67
+
68
+ if retries == UNSET:
69
+ if self.sdk_configuration.retry_config is not UNSET:
70
+ retries = self.sdk_configuration.retry_config
71
+
72
+ retry_config = None
73
+ if isinstance(retries, utils.RetryConfig):
74
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
75
+
76
+ http_res = self.do_request(
77
+ hook_ctx=HookContext(
78
+ base_url=base_url or "",
79
+ operation_id="aave_reserve_overview",
80
+ oauth2_scopes=[],
81
+ security_source=self.sdk_configuration.security,
82
+ ),
83
+ request=req,
84
+ error_status_codes=["422", "4XX", "5XX"],
85
+ retry_config=retry_config,
86
+ )
87
+
88
+ response_data: Any = None
89
+ if utils.match_response(http_res, "200", "application/json"):
90
+ return utils.unmarshal_json(
91
+ http_res.text, models.AaveReserveOverviewResponse
92
+ )
93
+ if utils.match_response(http_res, "422", "application/json"):
94
+ response_data = utils.unmarshal_json(
95
+ http_res.text, errors.HTTPValidationErrorData
96
+ )
97
+ raise errors.HTTPValidationError(data=response_data)
98
+ if utils.match_response(http_res, "4XX", "*"):
99
+ http_res_text = utils.stream_to_text(http_res)
100
+ raise errors.APIError(
101
+ "API error occurred", http_res.status_code, http_res_text, http_res
102
+ )
103
+ if utils.match_response(http_res, "5XX", "*"):
104
+ http_res_text = utils.stream_to_text(http_res)
105
+ raise errors.APIError(
106
+ "API error occurred", http_res.status_code, http_res_text, http_res
107
+ )
108
+
109
+ content_type = http_res.headers.get("Content-Type")
110
+ http_res_text = utils.stream_to_text(http_res)
111
+ raise errors.APIError(
112
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
113
+ http_res.status_code,
114
+ http_res_text,
115
+ http_res,
116
+ )
117
+
118
+ async def reserve_overview_async(
119
+ self,
120
+ *,
121
+ chain: models.AaveReserveOverviewChain = models.AaveReserveOverviewChain.ARBITRUM_MAINNET,
122
+ token: models.AaveReserveOverviewToken = models.AaveReserveOverviewToken.USDC,
123
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
124
+ server_url: Optional[str] = None,
125
+ timeout_ms: Optional[int] = None,
126
+ http_headers: Optional[Mapping[str, str]] = None,
127
+ ) -> models.AaveReserveOverviewResponse:
128
+ r"""Reserve overview
129
+
130
+ Returns key metrics for Aave Reserves:
131
+ - Total Supplied (TVL) in USD
132
+ - Total Borrowed in USD
133
+ - Utilization Ratio
134
+
135
+ See below for more info:
136
+
137
+ :param chain: The chain to use.
138
+ :param token: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
139
+ :param retries: Override the default retry configuration for this method
140
+ :param server_url: Override the default server URL for this method
141
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
142
+ :param http_headers: Additional headers to set or replace on requests.
143
+ """
144
+ base_url = None
145
+ url_variables = None
146
+ if timeout_ms is None:
147
+ timeout_ms = self.sdk_configuration.timeout_ms
148
+
149
+ if server_url is not None:
150
+ base_url = server_url
151
+ else:
152
+ base_url = self._get_url(base_url, url_variables)
153
+
154
+ request = models.AaveReserveOverviewRequest(
155
+ chain=chain,
156
+ token=token,
157
+ )
158
+
159
+ req = self._build_request_async(
160
+ method="GET",
161
+ path="/v0/aave/reserve_overview/get",
162
+ base_url=base_url,
163
+ url_variables=url_variables,
164
+ request=request,
165
+ request_body_required=False,
166
+ request_has_path_params=False,
167
+ request_has_query_params=True,
168
+ user_agent_header="user-agent",
169
+ accept_header_value="application/json",
170
+ http_headers=http_headers,
171
+ security=self.sdk_configuration.security,
172
+ timeout_ms=timeout_ms,
173
+ )
174
+
175
+ if retries == UNSET:
176
+ if self.sdk_configuration.retry_config is not UNSET:
177
+ retries = self.sdk_configuration.retry_config
178
+
179
+ retry_config = None
180
+ if isinstance(retries, utils.RetryConfig):
181
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
182
+
183
+ http_res = await self.do_request_async(
184
+ hook_ctx=HookContext(
185
+ base_url=base_url or "",
186
+ operation_id="aave_reserve_overview",
187
+ oauth2_scopes=[],
188
+ security_source=self.sdk_configuration.security,
189
+ ),
190
+ request=req,
191
+ error_status_codes=["422", "4XX", "5XX"],
192
+ retry_config=retry_config,
193
+ )
194
+
195
+ response_data: Any = None
196
+ if utils.match_response(http_res, "200", "application/json"):
197
+ return utils.unmarshal_json(
198
+ http_res.text, models.AaveReserveOverviewResponse
199
+ )
200
+ if utils.match_response(http_res, "422", "application/json"):
201
+ response_data = utils.unmarshal_json(
202
+ http_res.text, errors.HTTPValidationErrorData
203
+ )
204
+ raise errors.HTTPValidationError(data=response_data)
205
+ if utils.match_response(http_res, "4XX", "*"):
206
+ http_res_text = await utils.stream_to_text_async(http_res)
207
+ raise errors.APIError(
208
+ "API error occurred", http_res.status_code, http_res_text, http_res
209
+ )
210
+ if utils.match_response(http_res, "5XX", "*"):
211
+ http_res_text = await utils.stream_to_text_async(http_res)
212
+ raise errors.APIError(
213
+ "API error occurred", http_res.status_code, http_res_text, http_res
214
+ )
215
+
216
+ content_type = http_res.headers.get("Content-Type")
217
+ http_res_text = await utils.stream_to_text_async(http_res)
218
+ raise errors.APIError(
219
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
220
+ http_res.status_code,
221
+ http_res_text,
222
+ http_res,
223
+ )
224
+
11
225
  def rate(
12
226
  self,
13
227
  *,
@@ -17,6 +17,12 @@ from .aave_rateop import (
17
17
  AaveRateRequestTypedDict,
18
18
  AaveRateToken,
19
19
  )
20
+ from .aave_reserve_overviewop import (
21
+ AaveReserveOverviewChain,
22
+ AaveReserveOverviewRequest,
23
+ AaveReserveOverviewRequestTypedDict,
24
+ AaveReserveOverviewToken,
25
+ )
20
26
  from .aave_token_priceop import (
21
27
  AaveTokenPriceChain,
22
28
  AaveTokenPriceRequest,
@@ -46,18 +52,22 @@ from .aaveborrowrequest import (
46
52
  AaveBorrowRequestAmountTypedDict,
47
53
  AaveBorrowRequestTypedDict,
48
54
  )
49
- from .aavehistoricaltransactionbase import (
50
- AaveHistoricalTransactionBase,
51
- AaveHistoricalTransactionBaseTypedDict,
52
- )
53
55
  from .aavehistoricaltransactionsresponse import (
54
56
  AaveHistoricalTransactionsResponse,
55
57
  AaveHistoricalTransactionsResponseTypedDict,
58
+ Transaction,
59
+ TransactionTypedDict,
56
60
  )
57
61
  from .aaveliquiditychangeresponse import (
58
62
  AaveLiquidityChangeResponse,
59
63
  AaveLiquidityChangeResponseTypedDict,
60
64
  )
65
+ from .aavelooprequest import (
66
+ AaveLoopRequest,
67
+ AaveLoopRequestTypedDict,
68
+ CollateralAmount,
69
+ CollateralAmountTypedDict,
70
+ )
61
71
  from .aaverateresponse import AaveRateResponse, AaveRateResponseTypedDict
62
72
  from .aaverepayparams import (
63
73
  AaveRepayParams,
@@ -71,6 +81,10 @@ from .aaverepayrequest import (
71
81
  AaveRepayRequestAmountTypedDict,
72
82
  AaveRepayRequestTypedDict,
73
83
  )
84
+ from .aavereserveoverviewresponse import (
85
+ AaveReserveOverviewResponse,
86
+ AaveReserveOverviewResponseTypedDict,
87
+ )
74
88
  from .aavesupplyparams import (
75
89
  AaveSupplyParams,
76
90
  AaveSupplyParamsAmount,
@@ -107,7 +121,6 @@ from .aavewithdrawrequest import (
107
121
  AaveWithdrawRequestAmountTypedDict,
108
122
  AaveWithdrawRequestTypedDict,
109
123
  )
110
- from .action import Action
111
124
  from .aerodrome_slipstream_liquidity_provision_positionsop import (
112
125
  AerodromeSlipstreamLiquidityProvisionPositionsChain,
113
126
  AerodromeSlipstreamLiquidityProvisionPositionsRequest,
@@ -222,10 +235,9 @@ from .aerodromeslipstreamwithdrawliquidityprovisionrequest import (
222
235
  AerodromeSlipstreamWithdrawLiquidityProvisionRequestTypedDict,
223
236
  )
224
237
  from .allowanceinforesponse import AllowanceInfoResponse, AllowanceInfoResponseTypedDict
225
- from .borrow import Borrow, BorrowTypedDict
238
+ from .borrow import Borrow, BorrowTypedDict, Borrowratemode
226
239
  from .chain import Chain
227
240
  from .chaininfo import ChainInfo, ChainInfoTypedDict
228
- from .collateralreserve import CollateralReserve, CollateralReserveTypedDict
229
241
  from .compass_api_backend_models_morpho_read_response_get_markets_asset import (
230
242
  CompassAPIBackendModelsMorphoReadResponseGetMarketsAsset,
231
243
  CompassAPIBackendModelsMorphoReadResponseGetMarketsAssetTypedDict,
@@ -312,6 +324,7 @@ from .morphoborrowrequest import (
312
324
  MorphoBorrowRequest,
313
325
  MorphoBorrowRequestAmount,
314
326
  MorphoBorrowRequestAmountTypedDict,
327
+ MorphoBorrowRequestChain,
315
328
  MorphoBorrowRequestTypedDict,
316
329
  )
317
330
  from .morphocheckmarketpositionresponse import (
@@ -326,6 +339,7 @@ from .morphodepositrequest import (
326
339
  MorphoDepositRequest,
327
340
  MorphoDepositRequestAmount,
328
341
  MorphoDepositRequestAmountTypedDict,
342
+ MorphoDepositRequestChain,
329
343
  MorphoDepositRequestTypedDict,
330
344
  )
331
345
  from .morphogetmarketsresponse import (
@@ -337,17 +351,23 @@ from .morphogetvaultsresponse import (
337
351
  MorphoGetVaultsResponseTypedDict,
338
352
  )
339
353
  from .morphomarket import MorphoMarket, MorphoMarketTypedDict
340
- from .morphorepayrequest import MorphoRepayRequest, MorphoRepayRequestTypedDict
354
+ from .morphorepayrequest import (
355
+ MorphoRepayRequest,
356
+ MorphoRepayRequestChain,
357
+ MorphoRepayRequestTypedDict,
358
+ )
341
359
  from .morphosetvaultallowancerequest import (
342
360
  MorphoSetVaultAllowanceRequest,
343
361
  MorphoSetVaultAllowanceRequestAmount,
344
362
  MorphoSetVaultAllowanceRequestAmountTypedDict,
363
+ MorphoSetVaultAllowanceRequestChain,
345
364
  MorphoSetVaultAllowanceRequestTypedDict,
346
365
  )
347
366
  from .morphosupplycollateralrequest import (
348
367
  MorphoSupplyCollateralRequest,
349
368
  MorphoSupplyCollateralRequestAmount,
350
369
  MorphoSupplyCollateralRequestAmountTypedDict,
370
+ MorphoSupplyCollateralRequestChain,
351
371
  MorphoSupplyCollateralRequestTypedDict,
352
372
  )
353
373
  from .morphovault import MorphoVault, MorphoVaultTypedDict
@@ -355,9 +375,14 @@ from .morphowithdrawcollateralrequest import (
355
375
  MorphoWithdrawCollateralRequest,
356
376
  MorphoWithdrawCollateralRequestAmount,
357
377
  MorphoWithdrawCollateralRequestAmountTypedDict,
378
+ MorphoWithdrawCollateralRequestChain,
358
379
  MorphoWithdrawCollateralRequestTypedDict,
359
380
  )
360
- from .morphowithdrawrequest import MorphoWithdrawRequest, MorphoWithdrawRequestTypedDict
381
+ from .morphowithdrawrequest import (
382
+ MorphoWithdrawRequest,
383
+ MorphoWithdrawRequestChain,
384
+ MorphoWithdrawRequestTypedDict,
385
+ )
361
386
  from .multicallaction import (
362
387
  Body,
363
388
  BodyTypedDict,
@@ -378,7 +403,6 @@ from .multicallexecuterequest import (
378
403
  MulticallExecuteRequestTypedDict,
379
404
  )
380
405
  from .portfolio import Portfolio, PortfolioTypedDict
381
- from .principalreserve import PrincipalReserve, PrincipalReserveTypedDict
382
406
  from .redeemunderlying import RedeemUnderlying, RedeemUnderlyingTypedDict
383
407
  from .repay import Repay, RepayTypedDict
384
408
  from .reserve import Reserve, ReserveTypedDict
@@ -503,14 +527,14 @@ from .uniswap_quote_sell_exactlyop import (
503
527
  )
504
528
  from .uniswapbuyexactlyparams import (
505
529
  UniswapBuyExactlyParams,
506
- UniswapBuyExactlyParamsAmountOut,
507
- UniswapBuyExactlyParamsAmountOutTypedDict,
530
+ UniswapBuyExactlyParamsAmount,
531
+ UniswapBuyExactlyParamsAmountTypedDict,
508
532
  UniswapBuyExactlyParamsTypedDict,
509
533
  )
510
534
  from .uniswapbuyexactlyrequest import (
511
535
  UniswapBuyExactlyRequest,
512
- UniswapBuyExactlyRequestAmountOut,
513
- UniswapBuyExactlyRequestAmountOutTypedDict,
536
+ UniswapBuyExactlyRequestAmount,
537
+ UniswapBuyExactlyRequestAmountTypedDict,
514
538
  UniswapBuyExactlyRequestTypedDict,
515
539
  )
516
540
  from .uniswapbuyquoteinforesponse import (
@@ -658,8 +682,6 @@ __all__ = [
658
682
  "AaveBorrowRequestAmount",
659
683
  "AaveBorrowRequestAmountTypedDict",
660
684
  "AaveBorrowRequestTypedDict",
661
- "AaveHistoricalTransactionBase",
662
- "AaveHistoricalTransactionBaseTypedDict",
663
685
  "AaveHistoricalTransactionsChain",
664
686
  "AaveHistoricalTransactionsRequest",
665
687
  "AaveHistoricalTransactionsRequestTypedDict",
@@ -671,6 +693,8 @@ __all__ = [
671
693
  "AaveLiquidityChangeResponse",
672
694
  "AaveLiquidityChangeResponseTypedDict",
673
695
  "AaveLiquidityChangeToken",
696
+ "AaveLoopRequest",
697
+ "AaveLoopRequestTypedDict",
674
698
  "AaveRateChain",
675
699
  "AaveRateRequest",
676
700
  "AaveRateRequestTypedDict",
@@ -685,6 +709,12 @@ __all__ = [
685
709
  "AaveRepayRequestAmount",
686
710
  "AaveRepayRequestAmountTypedDict",
687
711
  "AaveRepayRequestTypedDict",
712
+ "AaveReserveOverviewChain",
713
+ "AaveReserveOverviewRequest",
714
+ "AaveReserveOverviewRequestTypedDict",
715
+ "AaveReserveOverviewResponse",
716
+ "AaveReserveOverviewResponseTypedDict",
717
+ "AaveReserveOverviewToken",
688
718
  "AaveSupplyParams",
689
719
  "AaveSupplyParamsAmount",
690
720
  "AaveSupplyParamsAmountTypedDict",
@@ -718,7 +748,6 @@ __all__ = [
718
748
  "AaveWithdrawRequestAmount",
719
749
  "AaveWithdrawRequestAmountTypedDict",
720
750
  "AaveWithdrawRequestTypedDict",
721
- "Action",
722
751
  "AerodromeLPPositionsResponse",
723
752
  "AerodromeLPPositionsResponseTypedDict",
724
753
  "AerodromePosition",
@@ -811,11 +840,12 @@ __all__ = [
811
840
  "BodyTypedDict",
812
841
  "Borrow",
813
842
  "BorrowTypedDict",
843
+ "Borrowratemode",
814
844
  "Chain",
815
845
  "ChainInfo",
816
846
  "ChainInfoTypedDict",
817
- "CollateralReserve",
818
- "CollateralReserveTypedDict",
847
+ "CollateralAmount",
848
+ "CollateralAmountTypedDict",
819
849
  "CompassAPIBackendModelsMorphoReadResponseGetMarketsAsset",
820
850
  "CompassAPIBackendModelsMorphoReadResponseGetMarketsAssetTypedDict",
821
851
  "CompassAPIBackendModelsMorphoReadResponseGetVaultsAsset",
@@ -867,6 +897,7 @@ __all__ = [
867
897
  "MorphoBorrowRequest",
868
898
  "MorphoBorrowRequestAmount",
869
899
  "MorphoBorrowRequestAmountTypedDict",
900
+ "MorphoBorrowRequestChain",
870
901
  "MorphoBorrowRequestTypedDict",
871
902
  "MorphoCheckMarketPositionResponse",
872
903
  "MorphoCheckMarketPositionResponseTypedDict",
@@ -875,6 +906,7 @@ __all__ = [
875
906
  "MorphoDepositRequest",
876
907
  "MorphoDepositRequestAmount",
877
908
  "MorphoDepositRequestAmountTypedDict",
909
+ "MorphoDepositRequestChain",
878
910
  "MorphoDepositRequestTypedDict",
879
911
  "MorphoGetMarketsResponse",
880
912
  "MorphoGetMarketsResponseTypedDict",
@@ -889,14 +921,17 @@ __all__ = [
889
921
  "MorphoMarketsRequest",
890
922
  "MorphoMarketsRequestTypedDict",
891
923
  "MorphoRepayRequest",
924
+ "MorphoRepayRequestChain",
892
925
  "MorphoRepayRequestTypedDict",
893
926
  "MorphoSetVaultAllowanceRequest",
894
927
  "MorphoSetVaultAllowanceRequestAmount",
895
928
  "MorphoSetVaultAllowanceRequestAmountTypedDict",
929
+ "MorphoSetVaultAllowanceRequestChain",
896
930
  "MorphoSetVaultAllowanceRequestTypedDict",
897
931
  "MorphoSupplyCollateralRequest",
898
932
  "MorphoSupplyCollateralRequestAmount",
899
933
  "MorphoSupplyCollateralRequestAmountTypedDict",
934
+ "MorphoSupplyCollateralRequestChain",
900
935
  "MorphoSupplyCollateralRequestTypedDict",
901
936
  "MorphoVault",
902
937
  "MorphoVaultPositionChain",
@@ -909,8 +944,10 @@ __all__ = [
909
944
  "MorphoWithdrawCollateralRequest",
910
945
  "MorphoWithdrawCollateralRequestAmount",
911
946
  "MorphoWithdrawCollateralRequestAmountTypedDict",
947
+ "MorphoWithdrawCollateralRequestChain",
912
948
  "MorphoWithdrawCollateralRequestTypedDict",
913
949
  "MorphoWithdrawRequest",
950
+ "MorphoWithdrawRequestChain",
914
951
  "MorphoWithdrawRequestTypedDict",
915
952
  "MulticallAction",
916
953
  "MulticallActionType",
@@ -923,8 +960,6 @@ __all__ = [
923
960
  "MulticallExecuteRequestTypedDict",
924
961
  "Portfolio",
925
962
  "PortfolioTypedDict",
926
- "PrincipalReserve",
927
- "PrincipalReserveTypedDict",
928
963
  "R",
929
964
  "RTypedDict",
930
965
  "RedeemUnderlying",
@@ -999,13 +1034,15 @@ __all__ = [
999
1034
  "TokenTransferRequestToken",
1000
1035
  "TokenTransferRequestTokenTypedDict",
1001
1036
  "TokenTransferRequestTypedDict",
1037
+ "Transaction",
1038
+ "TransactionTypedDict",
1002
1039
  "UniswapBuyExactlyParams",
1003
- "UniswapBuyExactlyParamsAmountOut",
1004
- "UniswapBuyExactlyParamsAmountOutTypedDict",
1040
+ "UniswapBuyExactlyParamsAmount",
1041
+ "UniswapBuyExactlyParamsAmountTypedDict",
1005
1042
  "UniswapBuyExactlyParamsTypedDict",
1006
1043
  "UniswapBuyExactlyRequest",
1007
- "UniswapBuyExactlyRequestAmountOut",
1008
- "UniswapBuyExactlyRequestAmountOutTypedDict",
1044
+ "UniswapBuyExactlyRequestAmount",
1045
+ "UniswapBuyExactlyRequestAmountTypedDict",
1009
1046
  "UniswapBuyExactlyRequestTypedDict",
1010
1047
  "UniswapBuyQuoteInfoResponse",
1011
1048
  "UniswapBuyQuoteInfoResponseTypedDict",
@@ -0,0 +1,97 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from compass_api_sdk.types import BaseModel
5
+ from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
6
+ from enum import Enum
7
+ from typing_extensions import Annotated, TypedDict
8
+
9
+
10
+ class AaveReserveOverviewChain(str, Enum):
11
+ r"""The chain to use."""
12
+
13
+ BASE_MAINNET = "base:mainnet"
14
+ ETHEREUM_MAINNET = "ethereum:mainnet"
15
+ ARBITRUM_MAINNET = "arbitrum:mainnet"
16
+
17
+
18
+ class AaveReserveOverviewToken(str, Enum):
19
+ r"""A class representing the token.
20
+
21
+ This class is used to represent the token in the system. Notice individual
22
+ endpoints' documentation where per chain tokens are presented.
23
+ """
24
+
25
+ ONE_INCH = "1INCH"
26
+ AAVE = "AAVE"
27
+ BAL = "BAL"
28
+ CB_BTC = "cbBTC"
29
+ CB_ETH = "cbETH"
30
+ CRV = "CRV"
31
+ CRV_USD = "crvUSD"
32
+ DAI = "DAI"
33
+ ENS = "ENS"
34
+ ET_HX = "ETHx"
35
+ FRAX = "FRAX"
36
+ FXS = "FXS"
37
+ GHO = "GHO"
38
+ KNC = "KNC"
39
+ LDO = "LDO"
40
+ LINK = "LINK"
41
+ LUSD = "LUSD"
42
+ MKR = "MKR"
43
+ OS_ETH = "osETH"
44
+ PYUSD = "PYUSD"
45
+ R_ETH = "rETH"
46
+ RPL = "RPL"
47
+ RS_ETH = "rsETH"
48
+ S_DAI = "sDAI"
49
+ SNX = "SNX"
50
+ STG = "STG"
51
+ S_US_DE = "sUSDe"
52
+ T_BTC = "tBTC"
53
+ UNI = "UNI"
54
+ USDC = "USDC"
55
+ US_DE = "USDe"
56
+ USDS = "USDS"
57
+ USDT = "USDT"
58
+ WBTC = "WBTC"
59
+ WE_ETH = "weETH"
60
+ WETH = "WETH"
61
+ WST_ETH = "wstETH"
62
+ ARB = "ARB"
63
+ EURS = "EURS"
64
+ MAI = "MAI"
65
+ USD_CE = "USDCe"
66
+ AERO = "AERO"
67
+ EUR = "EUR"
68
+ VIRTUAL = "VIRTUAL"
69
+
70
+
71
+ class AaveReserveOverviewRequestTypedDict(TypedDict):
72
+ chain: AaveReserveOverviewChain
73
+ r"""The chain to use."""
74
+ token: AaveReserveOverviewToken
75
+ r"""A class representing the token.
76
+
77
+ This class is used to represent the token in the system. Notice individual
78
+ endpoints' documentation where per chain tokens are presented.
79
+ """
80
+
81
+
82
+ class AaveReserveOverviewRequest(BaseModel):
83
+ chain: Annotated[
84
+ AaveReserveOverviewChain,
85
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
86
+ ] = AaveReserveOverviewChain.ARBITRUM_MAINNET
87
+ r"""The chain to use."""
88
+
89
+ token: Annotated[
90
+ AaveReserveOverviewToken,
91
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
92
+ ] = AaveReserveOverviewToken.USDC
93
+ r"""A class representing the token.
94
+
95
+ This class is used to represent the token in the system. Notice individual
96
+ endpoints' documentation where per chain tokens are presented.
97
+ """
@@ -1,31 +1,65 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .aavehistoricaltransactionbase import (
5
- AaveHistoricalTransactionBase,
6
- AaveHistoricalTransactionBaseTypedDict,
7
- )
4
+ from .borrow import Borrow, BorrowTypedDict
5
+ from .liquidationcall import LiquidationCall, LiquidationCallTypedDict
6
+ from .redeemunderlying import RedeemUnderlying, RedeemUnderlyingTypedDict
7
+ from .repay import Repay, RepayTypedDict
8
+ from .supply import Supply, SupplyTypedDict
9
+ from .swapborrowrate import SwapBorrowRate, SwapBorrowRateTypedDict
10
+ from .usageascollateral import UsageAsCollateral, UsageAsCollateralTypedDict
8
11
  from compass_api_sdk.types import BaseModel
9
- from typing import List
10
- from typing_extensions import TypedDict
12
+ from compass_api_sdk.utils import get_discriminator
13
+ from pydantic import Discriminator, Tag
14
+ from typing import List, Union
15
+ from typing_extensions import Annotated, TypeAliasType, TypedDict
16
+
17
+
18
+ TransactionTypedDict = TypeAliasType(
19
+ "TransactionTypedDict",
20
+ Union[
21
+ RedeemUnderlyingTypedDict,
22
+ RepayTypedDict,
23
+ SupplyTypedDict,
24
+ UsageAsCollateralTypedDict,
25
+ BorrowTypedDict,
26
+ SwapBorrowRateTypedDict,
27
+ LiquidationCallTypedDict,
28
+ ],
29
+ )
30
+
31
+
32
+ Transaction = Annotated[
33
+ Union[
34
+ Annotated[Borrow, Tag("Borrow")],
35
+ Annotated[LiquidationCall, Tag("LiquidationCall")],
36
+ Annotated[RedeemUnderlying, Tag("RedeemUnderlying")],
37
+ Annotated[Repay, Tag("Repay")],
38
+ Annotated[Supply, Tag("Supply")],
39
+ Annotated[SwapBorrowRate, Tag("SwapBorrowRate")],
40
+ Annotated[UsageAsCollateral, Tag("UsageAsCollateral")],
41
+ ],
42
+ Discriminator(lambda m: get_discriminator(m, "action", "action")),
43
+ ]
11
44
 
12
45
 
13
46
  class AaveHistoricalTransactionsResponseTypedDict(TypedDict):
14
47
  r"""Response model for getting Aave historical transactions."""
15
48
 
16
- total: int
17
49
  offset: int
50
+ r"""Specifies how many transactions to skip before returning results, letting you choose the starting point for the data you want to receive."""
18
51
  limit: int
19
- transactions: List[AaveHistoricalTransactionBaseTypedDict]
52
+ r"""Sets the maximum number of transactions to include in the response, helping control the size of the returned dataset."""
53
+ transactions: List[TransactionTypedDict]
20
54
 
21
55
 
22
56
  class AaveHistoricalTransactionsResponse(BaseModel):
23
57
  r"""Response model for getting Aave historical transactions."""
24
58
 
25
- total: int
26
-
27
59
  offset: int
60
+ r"""Specifies how many transactions to skip before returning results, letting you choose the starting point for the data you want to receive."""
28
61
 
29
62
  limit: int
63
+ r"""Sets the maximum number of transactions to include in the response, helping control the size of the returned dataset."""
30
64
 
31
- transactions: List[AaveHistoricalTransactionBase]
65
+ transactions: List[Transaction]