compass_api_sdk 0.4.2__py3-none-any.whl → 0.4.4__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.

@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "compass_api_sdk"
6
- __version__: str = "0.4.2"
6
+ __version__: str = "0.4.4"
7
7
  __openapi_doc_version__: str = "0.0.1"
8
8
  __gen_version__: str = "2.605.6"
9
- __user_agent__: str = "speakeasy-sdk/python 0.4.2 2.605.6 0.0.1 compass_api_sdk"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.4.4 2.605.6 0.0.1 compass_api_sdk"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -8,24 +8,35 @@ from typing import Any, Mapping, Optional, Union
8
8
 
9
9
 
10
10
  class AaveV3(BaseSDK):
11
- def std_rate(
11
+ def rate(
12
12
  self,
13
13
  *,
14
- chain: models.AaveStdRateChain = models.AaveStdRateChain.ETHEREUM_MAINNET,
15
- token: models.AaveStdRateToken = models.AaveStdRateToken.USDC,
16
- days: int = 7,
14
+ chain: models.AaveRateChain = models.AaveRateChain.ARBITRUM_MAINNET,
15
+ token: models.AaveRateToken = models.AaveRateToken.USDC,
17
16
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
18
17
  server_url: Optional[str] = None,
19
18
  timeout_ms: Optional[int] = None,
20
19
  http_headers: Optional[Mapping[str, str]] = None,
21
- ) -> models.AaveSTDRateResponse:
22
- r"""Standard deviation of interest rates
20
+ ) -> models.AaveRateResponse:
21
+ r"""Interest Rates: now
22
+
23
+ Returns the latest APY and APR rates for a specified token on Aave, for both
24
+ deposits and loans.
25
+
26
+ **Annual percentage yield (APY)** is the yearly return/cost after continuous
27
+ compounding of the per-second rate stored on-chain. This value is the same value as
28
+ seen the on [app.aave.com](
29
+ https://app.aave.com/)
30
+ but more up-to-date as it is taken directly from the
31
+ blockchain every time this endpoint is called.
23
32
 
24
- Returns the standard deviation of Interest Rates for Aave Reserves over time.
33
+ **Annual percentage rate (APR)** is the yearly simple interest rate (no
34
+ compounding).
35
+
36
+ For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
25
37
 
26
38
  :param chain: The chain to use.
27
- :param token: The symbol of the tokenn..
28
- :param days: The number of days for which the standard deviation shall be calculated.
39
+ :param token: The symbol of the asset to fetch the users' position on..
29
40
  :param retries: Override the default retry configuration for this method
30
41
  :param server_url: Override the default server URL for this method
31
42
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -41,15 +52,14 @@ class AaveV3(BaseSDK):
41
52
  else:
42
53
  base_url = self._get_url(base_url, url_variables)
43
54
 
44
- request = models.AaveStdRateRequest(
55
+ request = models.AaveRateRequest(
45
56
  chain=chain,
46
57
  token=token,
47
- days=days,
48
58
  )
49
59
 
50
60
  req = self._build_request(
51
61
  method="GET",
52
- path="/v0/aave/std_rate/get",
62
+ path="/v0/aave/rate/get",
53
63
  base_url=base_url,
54
64
  url_variables=url_variables,
55
65
  request=request,
@@ -74,7 +84,7 @@ class AaveV3(BaseSDK):
74
84
  http_res = self.do_request(
75
85
  hook_ctx=HookContext(
76
86
  base_url=base_url or "",
77
- operation_id="aave_std_rate",
87
+ operation_id="aave_rate",
78
88
  oauth2_scopes=[],
79
89
  security_source=self.sdk_configuration.security,
80
90
  ),
@@ -85,7 +95,7 @@ class AaveV3(BaseSDK):
85
95
 
86
96
  response_data: Any = None
87
97
  if utils.match_response(http_res, "200", "application/json"):
88
- return utils.unmarshal_json(http_res.text, models.AaveSTDRateResponse)
98
+ return utils.unmarshal_json(http_res.text, models.AaveRateResponse)
89
99
  if utils.match_response(http_res, "422", "application/json"):
90
100
  response_data = utils.unmarshal_json(
91
101
  http_res.text, errors.HTTPValidationErrorData
@@ -111,24 +121,35 @@ class AaveV3(BaseSDK):
111
121
  http_res,
112
122
  )
113
123
 
114
- async def std_rate_async(
124
+ async def rate_async(
115
125
  self,
116
126
  *,
117
- chain: models.AaveStdRateChain = models.AaveStdRateChain.ETHEREUM_MAINNET,
118
- token: models.AaveStdRateToken = models.AaveStdRateToken.USDC,
119
- days: int = 7,
127
+ chain: models.AaveRateChain = models.AaveRateChain.ARBITRUM_MAINNET,
128
+ token: models.AaveRateToken = models.AaveRateToken.USDC,
120
129
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
121
130
  server_url: Optional[str] = None,
122
131
  timeout_ms: Optional[int] = None,
123
132
  http_headers: Optional[Mapping[str, str]] = None,
124
- ) -> models.AaveSTDRateResponse:
125
- r"""Standard deviation of interest rates
133
+ ) -> models.AaveRateResponse:
134
+ r"""Interest Rates: now
135
+
136
+ Returns the latest APY and APR rates for a specified token on Aave, for both
137
+ deposits and loans.
138
+
139
+ **Annual percentage yield (APY)** is the yearly return/cost after continuous
140
+ compounding of the per-second rate stored on-chain. This value is the same value as
141
+ seen the on [app.aave.com](
142
+ https://app.aave.com/)
143
+ but more up-to-date as it is taken directly from the
144
+ blockchain every time this endpoint is called.
126
145
 
127
- Returns the standard deviation of Interest Rates for Aave Reserves over time.
146
+ **Annual percentage rate (APR)** is the yearly simple interest rate (no
147
+ compounding).
148
+
149
+ For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
128
150
 
129
151
  :param chain: The chain to use.
130
- :param token: The symbol of the tokenn..
131
- :param days: The number of days for which the standard deviation shall be calculated.
152
+ :param token: The symbol of the asset to fetch the users' position on..
132
153
  :param retries: Override the default retry configuration for this method
133
154
  :param server_url: Override the default server URL for this method
134
155
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -144,15 +165,14 @@ class AaveV3(BaseSDK):
144
165
  else:
145
166
  base_url = self._get_url(base_url, url_variables)
146
167
 
147
- request = models.AaveStdRateRequest(
168
+ request = models.AaveRateRequest(
148
169
  chain=chain,
149
170
  token=token,
150
- days=days,
151
171
  )
152
172
 
153
173
  req = self._build_request_async(
154
174
  method="GET",
155
- path="/v0/aave/std_rate/get",
175
+ path="/v0/aave/rate/get",
156
176
  base_url=base_url,
157
177
  url_variables=url_variables,
158
178
  request=request,
@@ -177,7 +197,7 @@ class AaveV3(BaseSDK):
177
197
  http_res = await self.do_request_async(
178
198
  hook_ctx=HookContext(
179
199
  base_url=base_url or "",
180
- operation_id="aave_std_rate",
200
+ operation_id="aave_rate",
181
201
  oauth2_scopes=[],
182
202
  security_source=self.sdk_configuration.security,
183
203
  ),
@@ -188,7 +208,7 @@ class AaveV3(BaseSDK):
188
208
 
189
209
  response_data: Any = None
190
210
  if utils.match_response(http_res, "200", "application/json"):
191
- return utils.unmarshal_json(http_res.text, models.AaveSTDRateResponse)
211
+ return utils.unmarshal_json(http_res.text, models.AaveRateResponse)
192
212
  if utils.match_response(http_res, "422", "application/json"):
193
213
  response_data = utils.unmarshal_json(
194
214
  http_res.text, errors.HTTPValidationErrorData
@@ -225,9 +245,9 @@ class AaveV3(BaseSDK):
225
245
  timeout_ms: Optional[int] = None,
226
246
  http_headers: Optional[Mapping[str, str]] = None,
227
247
  ) -> models.AaveAvgRateResponse:
228
- r"""Average interest rates
248
+ r"""Interest Rates: time average
229
249
 
230
- Returns time averaged Interest Rates for Aave Reserves.
250
+ Provides time-weighted averages of deposit and borrow rates for Aave reserves.
231
251
 
232
252
  :param chain: The chain to use.
233
253
  :param token: The symbol of the token..
@@ -328,9 +348,9 @@ class AaveV3(BaseSDK):
328
348
  timeout_ms: Optional[int] = None,
329
349
  http_headers: Optional[Mapping[str, str]] = None,
330
350
  ) -> models.AaveAvgRateResponse:
331
- r"""Average interest rates
351
+ r"""Interest Rates: time average
332
352
 
333
- Returns time averaged Interest Rates for Aave Reserves.
353
+ Provides time-weighted averages of deposit and borrow rates for Aave reserves.
334
354
 
335
355
  :param chain: The chain to use.
336
356
  :param token: The symbol of the token..
@@ -420,27 +440,25 @@ class AaveV3(BaseSDK):
420
440
  http_res,
421
441
  )
422
442
 
423
- def reserve_overview(
443
+ def std_rate(
424
444
  self,
425
445
  *,
426
- chain: models.AaveReserveOverviewChain = models.AaveReserveOverviewChain.ARBITRUM_MAINNET,
427
- token: models.AaveReserveOverviewToken = models.AaveReserveOverviewToken.USDC,
446
+ chain: models.AaveStdRateChain = models.AaveStdRateChain.ETHEREUM_MAINNET,
447
+ token: models.AaveStdRateToken = models.AaveStdRateToken.USDC,
448
+ days: int = 7,
428
449
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
429
450
  server_url: Optional[str] = None,
430
451
  timeout_ms: Optional[int] = None,
431
452
  http_headers: Optional[Mapping[str, str]] = None,
432
- ) -> models.AaveReserveOverviewResponse:
433
- r"""Reserve overview
453
+ ) -> models.AaveSTDRateResponse:
454
+ r"""Interest Rates: standard deviation
434
455
 
435
- Returns key metrics for Aave Reserves:
436
- - Total Supplied (TVL) in USD
437
- - Total Borrowed in USD
438
- - Utilization Ratio
439
-
440
- See below for more info:
456
+ Returns the historical standard deviation of lending and borrowing rates for Aave
457
+ reserves, illustrating market volatility.
441
458
 
442
459
  :param chain: The chain to use.
443
- :param token: The symbol of the asset..
460
+ :param token: The symbol of the tokenn..
461
+ :param days: The number of days for which the standard deviation shall be calculated.
444
462
  :param retries: Override the default retry configuration for this method
445
463
  :param server_url: Override the default server URL for this method
446
464
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -456,14 +474,15 @@ class AaveV3(BaseSDK):
456
474
  else:
457
475
  base_url = self._get_url(base_url, url_variables)
458
476
 
459
- request = models.AaveReserveOverviewRequest(
477
+ request = models.AaveStdRateRequest(
460
478
  chain=chain,
461
479
  token=token,
480
+ days=days,
462
481
  )
463
482
 
464
483
  req = self._build_request(
465
484
  method="GET",
466
- path="/v0/aave/reserve_overview/get",
485
+ path="/v0/aave/std_rate/get",
467
486
  base_url=base_url,
468
487
  url_variables=url_variables,
469
488
  request=request,
@@ -488,7 +507,7 @@ class AaveV3(BaseSDK):
488
507
  http_res = self.do_request(
489
508
  hook_ctx=HookContext(
490
509
  base_url=base_url or "",
491
- operation_id="aave_reserve_overview",
510
+ operation_id="aave_std_rate",
492
511
  oauth2_scopes=[],
493
512
  security_source=self.sdk_configuration.security,
494
513
  ),
@@ -499,9 +518,7 @@ class AaveV3(BaseSDK):
499
518
 
500
519
  response_data: Any = None
501
520
  if utils.match_response(http_res, "200", "application/json"):
502
- return utils.unmarshal_json(
503
- http_res.text, models.AaveReserveOverviewResponse
504
- )
521
+ return utils.unmarshal_json(http_res.text, models.AaveSTDRateResponse)
505
522
  if utils.match_response(http_res, "422", "application/json"):
506
523
  response_data = utils.unmarshal_json(
507
524
  http_res.text, errors.HTTPValidationErrorData
@@ -527,27 +544,25 @@ class AaveV3(BaseSDK):
527
544
  http_res,
528
545
  )
529
546
 
530
- async def reserve_overview_async(
547
+ async def std_rate_async(
531
548
  self,
532
549
  *,
533
- chain: models.AaveReserveOverviewChain = models.AaveReserveOverviewChain.ARBITRUM_MAINNET,
534
- token: models.AaveReserveOverviewToken = models.AaveReserveOverviewToken.USDC,
550
+ chain: models.AaveStdRateChain = models.AaveStdRateChain.ETHEREUM_MAINNET,
551
+ token: models.AaveStdRateToken = models.AaveStdRateToken.USDC,
552
+ days: int = 7,
535
553
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
536
554
  server_url: Optional[str] = None,
537
555
  timeout_ms: Optional[int] = None,
538
556
  http_headers: Optional[Mapping[str, str]] = None,
539
- ) -> models.AaveReserveOverviewResponse:
540
- r"""Reserve overview
541
-
542
- Returns key metrics for Aave Reserves:
543
- - Total Supplied (TVL) in USD
544
- - Total Borrowed in USD
545
- - Utilization Ratio
557
+ ) -> models.AaveSTDRateResponse:
558
+ r"""Interest Rates: standard deviation
546
559
 
547
- See below for more info:
560
+ Returns the historical standard deviation of lending and borrowing rates for Aave
561
+ reserves, illustrating market volatility.
548
562
 
549
563
  :param chain: The chain to use.
550
- :param token: The symbol of the asset..
564
+ :param token: The symbol of the tokenn..
565
+ :param days: The number of days for which the standard deviation shall be calculated.
551
566
  :param retries: Override the default retry configuration for this method
552
567
  :param server_url: Override the default server URL for this method
553
568
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -563,14 +578,15 @@ class AaveV3(BaseSDK):
563
578
  else:
564
579
  base_url = self._get_url(base_url, url_variables)
565
580
 
566
- request = models.AaveReserveOverviewRequest(
581
+ request = models.AaveStdRateRequest(
567
582
  chain=chain,
568
583
  token=token,
584
+ days=days,
569
585
  )
570
586
 
571
587
  req = self._build_request_async(
572
588
  method="GET",
573
- path="/v0/aave/reserve_overview/get",
589
+ path="/v0/aave/std_rate/get",
574
590
  base_url=base_url,
575
591
  url_variables=url_variables,
576
592
  request=request,
@@ -595,7 +611,7 @@ class AaveV3(BaseSDK):
595
611
  http_res = await self.do_request_async(
596
612
  hook_ctx=HookContext(
597
613
  base_url=base_url or "",
598
- operation_id="aave_reserve_overview",
614
+ operation_id="aave_std_rate",
599
615
  oauth2_scopes=[],
600
616
  security_source=self.sdk_configuration.security,
601
617
  ),
@@ -606,9 +622,7 @@ class AaveV3(BaseSDK):
606
622
 
607
623
  response_data: Any = None
608
624
  if utils.match_response(http_res, "200", "application/json"):
609
- return utils.unmarshal_json(
610
- http_res.text, models.AaveReserveOverviewResponse
611
- )
625
+ return utils.unmarshal_json(http_res.text, models.AaveSTDRateResponse)
612
626
  if utils.match_response(http_res, "422", "application/json"):
613
627
  response_data = utils.unmarshal_json(
614
628
  http_res.text, errors.HTTPValidationErrorData
@@ -634,35 +648,27 @@ class AaveV3(BaseSDK):
634
648
  http_res,
635
649
  )
636
650
 
637
- def rate(
651
+ def reserve_overview(
638
652
  self,
639
653
  *,
640
- chain: models.AaveRateChain = models.AaveRateChain.ARBITRUM_MAINNET,
641
- token: models.AaveRateToken = models.AaveRateToken.USDC,
654
+ chain: models.AaveReserveOverviewChain = models.AaveReserveOverviewChain.ARBITRUM_MAINNET,
655
+ token: models.AaveReserveOverviewToken = models.AaveReserveOverviewToken.USDC,
642
656
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
643
657
  server_url: Optional[str] = None,
644
658
  timeout_ms: Optional[int] = None,
645
659
  http_headers: Optional[Mapping[str, str]] = None,
646
- ) -> models.AaveRateResponse:
647
- r"""Interest rates
648
-
649
- Returns the latest APY and APR rates for a specified token on Aave, for both
650
- deposits and loans.
651
-
652
- **Annual percentage yield (APY)** is the yearly return/cost after continuous
653
- compounding of the per-second rate stored on-chain. This value is the same value as
654
- seen the on [app.aave.com](
655
- https://app.aave.com/)
656
- but more up-to-date as it is taken directly from the
657
- blockchain every time this endpoint is called.
660
+ ) -> models.AaveReserveOverviewResponse:
661
+ r"""Reserve overview
658
662
 
659
- **Annual percentage rate (APR)** is the yearly simple interest rate (no
660
- compounding).
663
+ Returns key metrics for Aave Reserves:
664
+ - Total Supplied (TVL) in USD
665
+ - Total Borrowed in USD
666
+ - Utilization Ratio
661
667
 
662
- For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
668
+ See below for more info:
663
669
 
664
670
  :param chain: The chain to use.
665
- :param token: The symbol of the asset to fetch the users' position on..
671
+ :param token: The symbol of the asset..
666
672
  :param retries: Override the default retry configuration for this method
667
673
  :param server_url: Override the default server URL for this method
668
674
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -678,14 +684,14 @@ class AaveV3(BaseSDK):
678
684
  else:
679
685
  base_url = self._get_url(base_url, url_variables)
680
686
 
681
- request = models.AaveRateRequest(
687
+ request = models.AaveReserveOverviewRequest(
682
688
  chain=chain,
683
689
  token=token,
684
690
  )
685
691
 
686
692
  req = self._build_request(
687
693
  method="GET",
688
- path="/v0/aave/rate/get",
694
+ path="/v0/aave/reserve_overview/get",
689
695
  base_url=base_url,
690
696
  url_variables=url_variables,
691
697
  request=request,
@@ -710,7 +716,7 @@ class AaveV3(BaseSDK):
710
716
  http_res = self.do_request(
711
717
  hook_ctx=HookContext(
712
718
  base_url=base_url or "",
713
- operation_id="aave_rate",
719
+ operation_id="aave_reserve_overview",
714
720
  oauth2_scopes=[],
715
721
  security_source=self.sdk_configuration.security,
716
722
  ),
@@ -721,7 +727,9 @@ class AaveV3(BaseSDK):
721
727
 
722
728
  response_data: Any = None
723
729
  if utils.match_response(http_res, "200", "application/json"):
724
- return utils.unmarshal_json(http_res.text, models.AaveRateResponse)
730
+ return utils.unmarshal_json(
731
+ http_res.text, models.AaveReserveOverviewResponse
732
+ )
725
733
  if utils.match_response(http_res, "422", "application/json"):
726
734
  response_data = utils.unmarshal_json(
727
735
  http_res.text, errors.HTTPValidationErrorData
@@ -747,35 +755,27 @@ class AaveV3(BaseSDK):
747
755
  http_res,
748
756
  )
749
757
 
750
- async def rate_async(
758
+ async def reserve_overview_async(
751
759
  self,
752
760
  *,
753
- chain: models.AaveRateChain = models.AaveRateChain.ARBITRUM_MAINNET,
754
- token: models.AaveRateToken = models.AaveRateToken.USDC,
761
+ chain: models.AaveReserveOverviewChain = models.AaveReserveOverviewChain.ARBITRUM_MAINNET,
762
+ token: models.AaveReserveOverviewToken = models.AaveReserveOverviewToken.USDC,
755
763
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
756
764
  server_url: Optional[str] = None,
757
765
  timeout_ms: Optional[int] = None,
758
766
  http_headers: Optional[Mapping[str, str]] = None,
759
- ) -> models.AaveRateResponse:
760
- r"""Interest rates
761
-
762
- Returns the latest APY and APR rates for a specified token on Aave, for both
763
- deposits and loans.
764
-
765
- **Annual percentage yield (APY)** is the yearly return/cost after continuous
766
- compounding of the per-second rate stored on-chain. This value is the same value as
767
- seen the on [app.aave.com](
768
- https://app.aave.com/)
769
- but more up-to-date as it is taken directly from the
770
- blockchain every time this endpoint is called.
767
+ ) -> models.AaveReserveOverviewResponse:
768
+ r"""Reserve overview
771
769
 
772
- **Annual percentage rate (APR)** is the yearly simple interest rate (no
773
- compounding).
770
+ Returns key metrics for Aave Reserves:
771
+ - Total Supplied (TVL) in USD
772
+ - Total Borrowed in USD
773
+ - Utilization Ratio
774
774
 
775
- For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
775
+ See below for more info:
776
776
 
777
777
  :param chain: The chain to use.
778
- :param token: The symbol of the asset to fetch the users' position on..
778
+ :param token: The symbol of the asset..
779
779
  :param retries: Override the default retry configuration for this method
780
780
  :param server_url: Override the default server URL for this method
781
781
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -791,14 +791,14 @@ class AaveV3(BaseSDK):
791
791
  else:
792
792
  base_url = self._get_url(base_url, url_variables)
793
793
 
794
- request = models.AaveRateRequest(
794
+ request = models.AaveReserveOverviewRequest(
795
795
  chain=chain,
796
796
  token=token,
797
797
  )
798
798
 
799
799
  req = self._build_request_async(
800
800
  method="GET",
801
- path="/v0/aave/rate/get",
801
+ path="/v0/aave/reserve_overview/get",
802
802
  base_url=base_url,
803
803
  url_variables=url_variables,
804
804
  request=request,
@@ -823,7 +823,7 @@ class AaveV3(BaseSDK):
823
823
  http_res = await self.do_request_async(
824
824
  hook_ctx=HookContext(
825
825
  base_url=base_url or "",
826
- operation_id="aave_rate",
826
+ operation_id="aave_reserve_overview",
827
827
  oauth2_scopes=[],
828
828
  security_source=self.sdk_configuration.security,
829
829
  ),
@@ -834,7 +834,9 @@ class AaveV3(BaseSDK):
834
834
 
835
835
  response_data: Any = None
836
836
  if utils.match_response(http_res, "200", "application/json"):
837
- return utils.unmarshal_json(http_res.text, models.AaveRateResponse)
837
+ return utils.unmarshal_json(
838
+ http_res.text, models.AaveReserveOverviewResponse
839
+ )
838
840
  if utils.match_response(http_res, "422", "application/json"):
839
841
  response_data = utils.unmarshal_json(
840
842
  http_res.text, errors.HTTPValidationErrorData
@@ -11,8 +11,15 @@ from .compass_api_backend_models_morpho_read_response_get_vault_vaultstate impor
11
11
  )
12
12
  from .liquidity import Liquidity, LiquidityTypedDict
13
13
  from .metadata import Metadata, MetadataTypedDict
14
- from compass_api_sdk.types import BaseModel
15
- from typing_extensions import TypedDict
14
+ from compass_api_sdk.types import (
15
+ BaseModel,
16
+ Nullable,
17
+ OptionalNullable,
18
+ UNSET,
19
+ UNSET_SENTINEL,
20
+ )
21
+ from pydantic import model_serializer
22
+ from typing_extensions import NotRequired, TypedDict
16
23
 
17
24
 
18
25
  class MorphoGetVaultResponseTypedDict(TypedDict):
@@ -25,7 +32,8 @@ class MorphoGetVaultResponseTypedDict(TypedDict):
25
32
  state: CompassAPIBackendModelsMorphoReadResponseGetVaultVaultStateTypedDict
26
33
  liquidity: LiquidityTypedDict
27
34
  asset: CompassAPIBackendModelsMorphoReadResponseGetVaultAssetTypedDict
28
- metadata: MetadataTypedDict
35
+ metadata: NotRequired[Nullable[MetadataTypedDict]]
36
+ r"""Metadata of the vault."""
29
37
 
30
38
 
31
39
  class MorphoGetVaultResponse(BaseModel):
@@ -44,4 +52,35 @@ class MorphoGetVaultResponse(BaseModel):
44
52
 
45
53
  asset: CompassAPIBackendModelsMorphoReadResponseGetVaultAsset
46
54
 
47
- metadata: Metadata
55
+ metadata: OptionalNullable[Metadata] = UNSET
56
+ r"""Metadata of the vault."""
57
+
58
+ @model_serializer(mode="wrap")
59
+ def serialize_model(self, handler):
60
+ optional_fields = ["metadata"]
61
+ nullable_fields = ["metadata"]
62
+ null_default_fields = []
63
+
64
+ serialized = handler(self)
65
+
66
+ m = {}
67
+
68
+ for n, f in type(self).model_fields.items():
69
+ k = f.alias or n
70
+ val = serialized.get(k)
71
+ serialized.pop(k, None)
72
+
73
+ optional_nullable = k in optional_fields and k in nullable_fields
74
+ is_set = (
75
+ self.__pydantic_fields_set__.intersection({n})
76
+ or k in null_default_fields
77
+ ) # pylint: disable=no-member
78
+
79
+ if val is not None and val != UNSET_SENTINEL:
80
+ m[k] = val
81
+ elif val != UNSET_SENTINEL and (
82
+ not k in optional_fields or (optional_nullable and is_set)
83
+ ):
84
+ m[k] = val
85
+
86
+ return m
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: compass_api_sdk
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Compass API SDK.
5
5
  Author: royalnine
6
6
  Requires-Python: >=3.9.2
@@ -127,7 +127,7 @@ with CompassAPI(
127
127
  api_key_auth="<YOUR_API_KEY_HERE>",
128
128
  ) as compass_api:
129
129
 
130
- res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
130
+ res = compass_api.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
131
131
 
132
132
  # Handle response
133
133
  print(res)
@@ -147,7 +147,7 @@ async def main():
147
147
  api_key_auth="<YOUR_API_KEY_HERE>",
148
148
  ) as compass_api:
149
149
 
150
- res = await compass_api.aave_v3.std_rate_async(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
150
+ res = await compass_api.aave_v3.rate_async(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
151
151
 
152
152
  # Handle response
153
153
  print(res)
@@ -176,7 +176,7 @@ with CompassAPI(
176
176
  api_key_auth="<YOUR_API_KEY_HERE>",
177
177
  ) as compass_api:
178
178
 
179
- res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
179
+ res = compass_api.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
180
180
 
181
181
  # Handle response
182
182
  print(res)
@@ -192,10 +192,10 @@ with CompassAPI(
192
192
 
193
193
  ### [aave_v3](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md)
194
194
 
195
- * [std_rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#std_rate) - Standard deviation of interest rates
196
- * [avg_rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#avg_rate) - Average interest rates
195
+ * [rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#rate) - Interest Rates: now
196
+ * [avg_rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#avg_rate) - Interest Rates: time average
197
+ * [std_rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#std_rate) - Interest Rates: standard deviation
197
198
  * [reserve_overview](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#reserve_overview) - Reserve overview
198
- * [rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#rate) - Interest rates
199
199
  * [token_price](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#token_price) - Token prices
200
200
  * [liquidity_change](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#liquidity_change) - Liquidity index
201
201
  * [user_position_summary](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#user_position_summary) - Positions - total
@@ -301,7 +301,7 @@ with CompassAPI(
301
301
  api_key_auth="<YOUR_API_KEY_HERE>",
302
302
  ) as compass_api:
303
303
 
304
- res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7,
304
+ res = compass_api.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC,
305
305
  RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
306
306
 
307
307
  # Handle response
@@ -320,7 +320,7 @@ with CompassAPI(
320
320
  api_key_auth="<YOUR_API_KEY_HERE>",
321
321
  ) as compass_api:
322
322
 
323
- res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
323
+ res = compass_api.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
324
324
 
325
325
  # Handle response
326
326
  print(res)
@@ -342,7 +342,7 @@ By default, an API error will raise a errors.APIError exception, which has the f
342
342
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
343
343
  | `.body` | *str* | The response content |
344
344
 
345
- When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `std_rate_async` method may raise the following exceptions:
345
+ When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `rate_async` method may raise the following exceptions:
346
346
 
347
347
  | Error Type | Status Code | Content Type |
348
348
  | -------------------------- | ----------- | ---------------- |
@@ -361,7 +361,7 @@ with CompassAPI(
361
361
  res = None
362
362
  try:
363
363
 
364
- res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
364
+ res = compass_api.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
365
365
 
366
366
  # Handle response
367
367
  print(res)
@@ -390,7 +390,7 @@ with CompassAPI(
390
390
  api_key_auth="<YOUR_API_KEY_HERE>",
391
391
  ) as compass_api:
392
392
 
393
- res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
393
+ res = compass_api.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
394
394
 
395
395
  # Handle response
396
396
  print(res)
@@ -2,8 +2,8 @@ compass_api_sdk/__init__.py,sha256=w2u919V3Tzv4zEPQ-OYJ79gQ_4_SyW7GOFFoHtqXDFA,4
2
2
  compass_api_sdk/_hooks/__init__.py,sha256=p5J13DeYuISQyQWirjJAObHIf2VtIlOtFqnIpvjjVwk,118
3
3
  compass_api_sdk/_hooks/sdkhooks.py,sha256=eVxHB2Q_JG6zZx5xn74i208ij-fpTHqq2jod6fbghRQ,2503
4
4
  compass_api_sdk/_hooks/types.py,sha256=VC7TZz0BiM721MghXneEovG3UkaktRkt1OhMY3iLmZM,2818
5
- compass_api_sdk/_version.py,sha256=sfFn3Zk7ONBiHJSBHG7RJ1upwqjbltdQQY_MD5PQN0k,472
6
- compass_api_sdk/aave_v3.py,sha256=tR5fm96hPluvzDSIgcuB_C8W4gQZsyBR5k9MQjdtoQQ,123098
5
+ compass_api_sdk/_version.py,sha256=4n8LXiyk9iBa_mRMwWJLQdZ1SmN2K6rHK8u73T5nOLY,472
6
+ compass_api_sdk/aave_v3.py,sha256=A6iCHMbBmOLRFobOR-QIkBro81GolKA6cxNAVvXzZEs,123270
7
7
  compass_api_sdk/aerodrome_slipstream.py,sha256=w_Q84q8iIDthqX0myByQ1SE5-B2iZPqZvcNVzSLYBZ0,82785
8
8
  compass_api_sdk/basesdk.py,sha256=29RfgnfgQq_cRx8OHdQEdJuJ2DrgRZlzGIPC-_6-2bM,12136
9
9
  compass_api_sdk/errors/__init__.py,sha256=f8nyj2IhW5h_xtEeg6cfKgByLkqowLv0Fxm0hUofQPs,257
@@ -107,7 +107,7 @@ compass_api_sdk/models/morphodepositparams.py,sha256=dFu3oIu5QpqqHA6UZru0vrSGURe
107
107
  compass_api_sdk/models/morphodepositrequest.py,sha256=CP1x0F-_wkLxZqan2zsoKy2XptvPZAduxSrI9cWsseY,2798
108
108
  compass_api_sdk/models/morphogetmarketresponse.py,sha256=RU80xbW76Qng58E10ixB2RwP0nG07isfOTndMMhO8lg,3151
109
109
  compass_api_sdk/models/morphogetmarketsresponse.py,sha256=Tz4syoRzijBGd4eB8Ly0zg6ozwqfeUI4dyTex9Tkr0w,548
110
- compass_api_sdk/models/morphogetvaultresponse.py,sha256=3lSrN9lFX4F6wJVMqMjJn81BeHJl52m0dXsT20NX8tY,1613
110
+ compass_api_sdk/models/morphogetvaultresponse.py,sha256=iTGUsD3tVi77ZSbj-AJCsCh5oaIUuOKluab7KNS9f_o,2769
111
111
  compass_api_sdk/models/morphogetvaultsresponse.py,sha256=b5LuGh9anPCWX8GJb6N0SQGoXRTNBWheSTewZD_jrrM,537
112
112
  compass_api_sdk/models/morphomarket.py,sha256=APfUKsnjZ6x8KvNY8P1PJ7h-AKgFWTMBeYeGAM58Yac,2850
113
113
  compass_api_sdk/models/morphorepayparams.py,sha256=COqs_VjBfIBwaoNwHcfvT-UoHMVMqNRonKlyAgC6d4Q,2610
@@ -218,6 +218,6 @@ compass_api_sdk/utils/security.py,sha256=ktep3HKwbFs-MLxUYTM8Jd4v-ZBum5_Z0u1PFId
218
218
  compass_api_sdk/utils/serializers.py,sha256=hiHBXM1AY8_N2Z_rvFfNSYwvLBkSQlPGFp8poasdU4s,5986
219
219
  compass_api_sdk/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
220
220
  compass_api_sdk/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
221
- compass_api_sdk-0.4.2.dist-info/METADATA,sha256=tHNtHhbcH3RxRuc3OQeU9XKLlZ-Fnwb7vCQ_jpBB4FY,25294
222
- compass_api_sdk-0.4.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
223
- compass_api_sdk-0.4.2.dist-info/RECORD,,
221
+ compass_api_sdk-0.4.4.dist-info/METADATA,sha256=Wkbp7XeE-lY-W9oScikNZXwgUhr0JC-Oj-jBMLsvWmY,25173
222
+ compass_api_sdk-0.4.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
223
+ compass_api_sdk-0.4.4.dist-info/RECORD,,