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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: compass_api_sdk
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Compass API Python SDK
5
5
  Author: royalnine
6
6
  Requires-Python: >=3.9.2
@@ -134,7 +134,7 @@ with CompassAPISDK(
134
134
  api_key_auth="<YOUR_API_KEY_HERE>",
135
135
  ) as compass_api_sdk:
136
136
 
137
- res = compass_api_sdk.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
137
+ res = compass_api_sdk.aave_v3.avg_rate(chain=models.AaveAvgRateChain.ETHEREUM_MAINNET, token=models.AaveAvgRateToken.USDC, days=7)
138
138
 
139
139
  # Handle response
140
140
  print(res)
@@ -154,7 +154,7 @@ async def main():
154
154
  api_key_auth="<YOUR_API_KEY_HERE>",
155
155
  ) as compass_api_sdk:
156
156
 
157
- res = await compass_api_sdk.aave_v3.reserve_overview_async(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
157
+ res = await compass_api_sdk.aave_v3.avg_rate_async(chain=models.AaveAvgRateChain.ETHEREUM_MAINNET, token=models.AaveAvgRateToken.USDC, days=7)
158
158
 
159
159
  # Handle response
160
160
  print(res)
@@ -183,7 +183,7 @@ with CompassAPISDK(
183
183
  api_key_auth="<YOUR_API_KEY_HERE>",
184
184
  ) as compass_api_sdk:
185
185
 
186
- res = compass_api_sdk.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
186
+ res = compass_api_sdk.aave_v3.avg_rate(chain=models.AaveAvgRateChain.ETHEREUM_MAINNET, token=models.AaveAvgRateToken.USDC, days=7)
187
187
 
188
188
  # Handle response
189
189
  print(res)
@@ -199,6 +199,7 @@ with CompassAPISDK(
199
199
 
200
200
  ### [aave_v3](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md)
201
201
 
202
+ * [avg_rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#avg_rate) - Average interest rates
202
203
  * [reserve_overview](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#reserve_overview) - Reserve overview
203
204
  * [rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#rate) - Interest rates
204
205
  * [token_price](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#token_price) - Token prices
@@ -299,7 +300,7 @@ with CompassAPISDK(
299
300
  api_key_auth="<YOUR_API_KEY_HERE>",
300
301
  ) as compass_api_sdk:
301
302
 
302
- res = compass_api_sdk.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC,
303
+ res = compass_api_sdk.aave_v3.avg_rate(chain=models.AaveAvgRateChain.ETHEREUM_MAINNET, token=models.AaveAvgRateToken.USDC, days=7,
303
304
  RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
304
305
 
305
306
  # Handle response
@@ -318,7 +319,7 @@ with CompassAPISDK(
318
319
  api_key_auth="<YOUR_API_KEY_HERE>",
319
320
  ) as compass_api_sdk:
320
321
 
321
- res = compass_api_sdk.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
322
+ res = compass_api_sdk.aave_v3.avg_rate(chain=models.AaveAvgRateChain.ETHEREUM_MAINNET, token=models.AaveAvgRateToken.USDC, days=7)
322
323
 
323
324
  # Handle response
324
325
  print(res)
@@ -340,7 +341,7 @@ By default, an API error will raise a errors.APIError exception, which has the f
340
341
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
341
342
  | `.body` | *str* | The response content |
342
343
 
343
- 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 `reserve_overview_async` method may raise the following exceptions:
344
+ 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 `avg_rate_async` method may raise the following exceptions:
344
345
 
345
346
  | Error Type | Status Code | Content Type |
346
347
  | -------------------------- | ----------- | ---------------- |
@@ -359,7 +360,7 @@ with CompassAPISDK(
359
360
  res = None
360
361
  try:
361
362
 
362
- res = compass_api_sdk.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
363
+ res = compass_api_sdk.aave_v3.avg_rate(chain=models.AaveAvgRateChain.ETHEREUM_MAINNET, token=models.AaveAvgRateToken.USDC, days=7)
363
364
 
364
365
  # Handle response
365
366
  print(res)
@@ -388,7 +389,7 @@ with CompassAPISDK(
388
389
  api_key_auth="<YOUR_API_KEY_HERE>",
389
390
  ) as compass_api_sdk:
390
391
 
391
- res = compass_api_sdk.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
392
+ res = compass_api_sdk.aave_v3.avg_rate(chain=models.AaveAvgRateChain.ETHEREUM_MAINNET, token=models.AaveAvgRateToken.USDC, days=7)
392
393
 
393
394
  # Handle response
394
395
  print(res)
@@ -2,15 +2,16 @@ compassapisdk/__init__.py,sha256=w2u919V3Tzv4zEPQ-OYJ79gQ_4_SyW7GOFFoHtqXDFA,401
2
2
  compassapisdk/_hooks/__init__.py,sha256=p5J13DeYuISQyQWirjJAObHIf2VtIlOtFqnIpvjjVwk,118
3
3
  compassapisdk/_hooks/sdkhooks.py,sha256=kiWg7ywp9SXriA5uvAnxmFLFcDREJjDWtccd7Fo6LJI,2501
4
4
  compassapisdk/_hooks/types.py,sha256=vkJdvFkHgRiCPz2IDtGma15FzU2YxIlrqxk1zWUDJTM,2816
5
- compassapisdk/_version.py,sha256=gFNU4uumnOHZMGSQ_ZDS0k_mNCai9hi-f3vsU1RL54Q,472
6
- compassapisdk/aave_v3.py,sha256=xxPi6z_3ZahRtNI6rKWU-uH1YMZk1Xdu0tAqOTBtCYw,106740
5
+ compassapisdk/_version.py,sha256=8CspqPwivo1oKdw_6CfnhoZNV5gD8vSro1KRNv66MIk,472
6
+ compassapisdk/aave_v3.py,sha256=K5kwsleV-OH5YP7wD784Bu-FkRF6DszaKq-oGpW9uHw,114984
7
7
  compassapisdk/aerodrome_slipstream.py,sha256=0Vw7syYZGOl8rXOD6pjiZx0PIsZRDkMk6_BxQp1jG5I,82959
8
8
  compassapisdk/basesdk.py,sha256=jeaXGkGBhWBQ288Xjctv30WbB5pxBCYgb42Ezyj6GgU,12130
9
9
  compassapisdk/errors/__init__.py,sha256=f8nyj2IhW5h_xtEeg6cfKgByLkqowLv0Fxm0hUofQPs,257
10
10
  compassapisdk/errors/apierror.py,sha256=9mTyJSyvUAOnSfW_1HWt9dGl8IDlpQ68DebwYsDNdug,528
11
11
  compassapisdk/errors/httpvalidationerror.py,sha256=04VFnAPBDed4UQh3ar7i7PoqLXppLpv57B8Uv8SPRs0,665
12
12
  compassapisdk/httpclient.py,sha256=Eu73urOAiZQtdUIyOUnPccxCiBbWEKrXG-JrRG3SLM4,3946
13
- compassapisdk/models/__init__.py,sha256=khOnM61xQtP9DcwqrAMFtOpxQrPyo2xK3r8tcsZOHHE,48568
13
+ compassapisdk/models/__init__.py,sha256=9pTOZDck3nAkqJCLb9R0JisR23WDHrsdL3WJXSyoySw,48957
14
+ compassapisdk/models/aave_avg_rateop.py,sha256=K4egaYvgCrMRpNGrf4UeYbL39zMgeByxu65C4cZ-T7I,2432
14
15
  compassapisdk/models/aave_historical_transactionsop.py,sha256=pDjCayatpXSc7HzT0xirwowecGTFCUoNMoR0VC8n_m8,1785
15
16
  compassapisdk/models/aave_liquidity_changeop.py,sha256=GMvgWl55yL_VCfOCHTQ4gPIasFEsEYXl5UrJzcMJtSM,2781
16
17
  compassapisdk/models/aave_rateop.py,sha256=mST4ddicQ1D_mblAuh2TSeJOnLYyD7gKAy8yZaMUXio,2149
@@ -18,6 +19,7 @@ compassapisdk/models/aave_reserve_overviewop.py,sha256=23_Vxc-VxplznUlyxS5z3XnPv
18
19
  compassapisdk/models/aave_token_priceop.py,sha256=xj9nMlHOpV52jIn1aXar2k9ToAm3AX6ZNYp0tyFi9bo,2187
19
20
  compassapisdk/models/aave_user_position_per_tokenop.py,sha256=2tXIQaXYdjW-pQl3SslC6f9DykKL8DQ2kJ1ZKafHnpU,2601
20
21
  compassapisdk/models/aave_user_position_summaryop.py,sha256=2mQZSABiymK3DBKZswyAJLGT6lxEm521-g7CIGXIV_o,1154
22
+ compassapisdk/models/aaveavgrateresponse.py,sha256=HvC_7b3qLU29S0NVmewOZlcl4n5LW-T-d0tBafh4hp4,1184
21
23
  compassapisdk/models/aaveborrowparams.py,sha256=xqhJBwkYSOpnAqbeuh4LUp8dyW2GBH18XjdlbCBpq2Q,2868
22
24
  compassapisdk/models/aaveborrowrequest.py,sha256=EDcVWuBUTlse0W_SlLAmlk06iDsqRSGD3a4uND7FS4U,3127
23
25
  compassapisdk/models/aavehistoricaltransactionsresponse.py,sha256=NNbc0_LpuXlL3sJcwvD1Zp2rPZkJ35cP_KuIFCmda_s,2500
@@ -186,6 +188,6 @@ compassapisdk/utils/security.py,sha256=ktep3HKwbFs-MLxUYTM8Jd4v-ZBum5_Z0u1PFIdYB
186
188
  compassapisdk/utils/serializers.py,sha256=hiHBXM1AY8_N2Z_rvFfNSYwvLBkSQlPGFp8poasdU4s,5986
187
189
  compassapisdk/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
188
190
  compassapisdk/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
189
- compass_api_sdk-0.3.2.dist-info/METADATA,sha256=lOguDGeJZHAgMptA0YKFbs9Qpets2AkDNYjMigyk0dQ,24826
190
- compass_api_sdk-0.3.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
191
- compass_api_sdk-0.3.2.dist-info/RECORD,,
191
+ compass_api_sdk-0.3.3.dist-info/METADATA,sha256=wNUGsxgkC0Jcb33b7z1A1zojoG7NssdAkwBli476znM,24829
192
+ compass_api_sdk-0.3.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
193
+ compass_api_sdk-0.3.3.dist-info/RECORD,,
compassapisdk/_version.py CHANGED
@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "compass_api_sdk"
6
- __version__: str = "0.3.2"
6
+ __version__: str = "0.3.3"
7
7
  __openapi_doc_version__: str = "0.0.1"
8
8
  __gen_version__: str = "2.604.2"
9
- __user_agent__: str = "speakeasy-sdk/python 0.3.2 2.604.2 0.0.1 compass_api_sdk"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.3.3 2.604.2 0.0.1 compass_api_sdk"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
compassapisdk/aave_v3.py CHANGED
@@ -8,6 +8,212 @@ from typing import Any, Mapping, Optional, Union
8
8
 
9
9
 
10
10
  class AaveV3(BaseSDK):
11
+ def avg_rate(
12
+ self,
13
+ *,
14
+ chain: models.AaveAvgRateChain = models.AaveAvgRateChain.ETHEREUM_MAINNET,
15
+ token: models.AaveAvgRateToken = models.AaveAvgRateToken.USDC,
16
+ days: int = 7,
17
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
18
+ server_url: Optional[str] = None,
19
+ timeout_ms: Optional[int] = None,
20
+ http_headers: Optional[Mapping[str, str]] = None,
21
+ ) -> models.AaveAvgRateResponse:
22
+ r"""Average interest rates
23
+
24
+ Returns time averaged Interest Rates for Aave Reserves:
25
+
26
+ :param chain: The chain to use.
27
+ :param token: The symbol of the asset to fetch the user's position on..
28
+ :param days: The number of days to fetch the user's position on.
29
+ :param retries: Override the default retry configuration for this method
30
+ :param server_url: Override the default server URL for this method
31
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
32
+ :param http_headers: Additional headers to set or replace on requests.
33
+ """
34
+ base_url = None
35
+ url_variables = None
36
+ if timeout_ms is None:
37
+ timeout_ms = self.sdk_configuration.timeout_ms
38
+
39
+ if server_url is not None:
40
+ base_url = server_url
41
+ else:
42
+ base_url = self._get_url(base_url, url_variables)
43
+
44
+ request = models.AaveAvgRateRequest(
45
+ chain=chain,
46
+ token=token,
47
+ days=days,
48
+ )
49
+
50
+ req = self._build_request(
51
+ method="GET",
52
+ path="/v0/aave/avg_rate/get",
53
+ base_url=base_url,
54
+ url_variables=url_variables,
55
+ request=request,
56
+ request_body_required=False,
57
+ request_has_path_params=False,
58
+ request_has_query_params=True,
59
+ user_agent_header="user-agent",
60
+ accept_header_value="application/json",
61
+ http_headers=http_headers,
62
+ security=self.sdk_configuration.security,
63
+ timeout_ms=timeout_ms,
64
+ )
65
+
66
+ if retries == UNSET:
67
+ if self.sdk_configuration.retry_config is not UNSET:
68
+ retries = self.sdk_configuration.retry_config
69
+
70
+ retry_config = None
71
+ if isinstance(retries, utils.RetryConfig):
72
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
73
+
74
+ http_res = self.do_request(
75
+ hook_ctx=HookContext(
76
+ base_url=base_url or "",
77
+ operation_id="aave_avg_rate",
78
+ oauth2_scopes=[],
79
+ security_source=self.sdk_configuration.security,
80
+ ),
81
+ request=req,
82
+ error_status_codes=["422", "4XX", "5XX"],
83
+ retry_config=retry_config,
84
+ )
85
+
86
+ response_data: Any = None
87
+ if utils.match_response(http_res, "200", "application/json"):
88
+ return utils.unmarshal_json(http_res.text, models.AaveAvgRateResponse)
89
+ if utils.match_response(http_res, "422", "application/json"):
90
+ response_data = utils.unmarshal_json(
91
+ http_res.text, errors.HTTPValidationErrorData
92
+ )
93
+ raise errors.HTTPValidationError(data=response_data)
94
+ if utils.match_response(http_res, "4XX", "*"):
95
+ http_res_text = utils.stream_to_text(http_res)
96
+ raise errors.APIError(
97
+ "API error occurred", http_res.status_code, http_res_text, http_res
98
+ )
99
+ if utils.match_response(http_res, "5XX", "*"):
100
+ http_res_text = utils.stream_to_text(http_res)
101
+ raise errors.APIError(
102
+ "API error occurred", http_res.status_code, http_res_text, http_res
103
+ )
104
+
105
+ content_type = http_res.headers.get("Content-Type")
106
+ http_res_text = utils.stream_to_text(http_res)
107
+ raise errors.APIError(
108
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
109
+ http_res.status_code,
110
+ http_res_text,
111
+ http_res,
112
+ )
113
+
114
+ async def avg_rate_async(
115
+ self,
116
+ *,
117
+ chain: models.AaveAvgRateChain = models.AaveAvgRateChain.ETHEREUM_MAINNET,
118
+ token: models.AaveAvgRateToken = models.AaveAvgRateToken.USDC,
119
+ days: int = 7,
120
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
121
+ server_url: Optional[str] = None,
122
+ timeout_ms: Optional[int] = None,
123
+ http_headers: Optional[Mapping[str, str]] = None,
124
+ ) -> models.AaveAvgRateResponse:
125
+ r"""Average interest rates
126
+
127
+ Returns time averaged Interest Rates for Aave Reserves:
128
+
129
+ :param chain: The chain to use.
130
+ :param token: The symbol of the asset to fetch the user's position on..
131
+ :param days: The number of days to fetch the user's position on.
132
+ :param retries: Override the default retry configuration for this method
133
+ :param server_url: Override the default server URL for this method
134
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
135
+ :param http_headers: Additional headers to set or replace on requests.
136
+ """
137
+ base_url = None
138
+ url_variables = None
139
+ if timeout_ms is None:
140
+ timeout_ms = self.sdk_configuration.timeout_ms
141
+
142
+ if server_url is not None:
143
+ base_url = server_url
144
+ else:
145
+ base_url = self._get_url(base_url, url_variables)
146
+
147
+ request = models.AaveAvgRateRequest(
148
+ chain=chain,
149
+ token=token,
150
+ days=days,
151
+ )
152
+
153
+ req = self._build_request_async(
154
+ method="GET",
155
+ path="/v0/aave/avg_rate/get",
156
+ base_url=base_url,
157
+ url_variables=url_variables,
158
+ request=request,
159
+ request_body_required=False,
160
+ request_has_path_params=False,
161
+ request_has_query_params=True,
162
+ user_agent_header="user-agent",
163
+ accept_header_value="application/json",
164
+ http_headers=http_headers,
165
+ security=self.sdk_configuration.security,
166
+ timeout_ms=timeout_ms,
167
+ )
168
+
169
+ if retries == UNSET:
170
+ if self.sdk_configuration.retry_config is not UNSET:
171
+ retries = self.sdk_configuration.retry_config
172
+
173
+ retry_config = None
174
+ if isinstance(retries, utils.RetryConfig):
175
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
176
+
177
+ http_res = await self.do_request_async(
178
+ hook_ctx=HookContext(
179
+ base_url=base_url or "",
180
+ operation_id="aave_avg_rate",
181
+ oauth2_scopes=[],
182
+ security_source=self.sdk_configuration.security,
183
+ ),
184
+ request=req,
185
+ error_status_codes=["422", "4XX", "5XX"],
186
+ retry_config=retry_config,
187
+ )
188
+
189
+ response_data: Any = None
190
+ if utils.match_response(http_res, "200", "application/json"):
191
+ return utils.unmarshal_json(http_res.text, models.AaveAvgRateResponse)
192
+ if utils.match_response(http_res, "422", "application/json"):
193
+ response_data = utils.unmarshal_json(
194
+ http_res.text, errors.HTTPValidationErrorData
195
+ )
196
+ raise errors.HTTPValidationError(data=response_data)
197
+ if utils.match_response(http_res, "4XX", "*"):
198
+ http_res_text = await utils.stream_to_text_async(http_res)
199
+ raise errors.APIError(
200
+ "API error occurred", http_res.status_code, http_res_text, http_res
201
+ )
202
+ if utils.match_response(http_res, "5XX", "*"):
203
+ http_res_text = await utils.stream_to_text_async(http_res)
204
+ raise errors.APIError(
205
+ "API error occurred", http_res.status_code, http_res_text, http_res
206
+ )
207
+
208
+ content_type = http_res.headers.get("Content-Type")
209
+ http_res_text = await utils.stream_to_text_async(http_res)
210
+ raise errors.APIError(
211
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
212
+ http_res.status_code,
213
+ http_res_text,
214
+ http_res,
215
+ )
216
+
11
217
  def reserve_overview(
12
218
  self,
13
219
  *,
@@ -1,5 +1,11 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
+ from .aave_avg_rateop import (
4
+ AaveAvgRateChain,
5
+ AaveAvgRateRequest,
6
+ AaveAvgRateRequestTypedDict,
7
+ AaveAvgRateToken,
8
+ )
3
9
  from .aave_historical_transactionsop import (
4
10
  AaveHistoricalTransactionsChain,
5
11
  AaveHistoricalTransactionsRequest,
@@ -40,6 +46,7 @@ from .aave_user_position_summaryop import (
40
46
  AaveUserPositionSummaryRequest,
41
47
  AaveUserPositionSummaryRequestTypedDict,
42
48
  )
49
+ from .aaveavgrateresponse import AaveAvgRateResponse, AaveAvgRateResponseTypedDict
43
50
  from .aaveborrowparams import (
44
51
  AaveBorrowParams,
45
52
  AaveBorrowParamsAmount,
@@ -727,6 +734,12 @@ from .wrapethrequest import (
727
734
 
728
735
 
729
736
  __all__ = [
737
+ "AaveAvgRateChain",
738
+ "AaveAvgRateRequest",
739
+ "AaveAvgRateRequestTypedDict",
740
+ "AaveAvgRateResponse",
741
+ "AaveAvgRateResponseTypedDict",
742
+ "AaveAvgRateToken",
730
743
  "AaveBorrowParams",
731
744
  "AaveBorrowParamsAmount",
732
745
  "AaveBorrowParamsAmountTypedDict",
@@ -0,0 +1,96 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from compassapisdk.types import BaseModel
5
+ from compassapisdk.utils import FieldMetadata, QueryParamMetadata
6
+ from enum import Enum
7
+ from typing_extensions import Annotated, TypedDict
8
+
9
+
10
+ class AaveAvgRateChain(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 AaveAvgRateToken(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 AaveAvgRateRequestTypedDict(TypedDict):
72
+ chain: AaveAvgRateChain
73
+ r"""The chain to use."""
74
+ token: AaveAvgRateToken
75
+ r"""The symbol of the asset to fetch the user's position on.."""
76
+ days: int
77
+ r"""The number of days to fetch the user's position on."""
78
+
79
+
80
+ class AaveAvgRateRequest(BaseModel):
81
+ chain: Annotated[
82
+ AaveAvgRateChain,
83
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
84
+ ] = AaveAvgRateChain.ETHEREUM_MAINNET
85
+ r"""The chain to use."""
86
+
87
+ token: Annotated[
88
+ AaveAvgRateToken,
89
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
90
+ ] = AaveAvgRateToken.USDC
91
+ r"""The symbol of the asset to fetch the user's position on.."""
92
+
93
+ days: Annotated[
94
+ int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
95
+ ] = 7
96
+ r"""The number of days to fetch the user's position on."""
@@ -0,0 +1,40 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from compassapisdk.types import BaseModel
5
+ from typing_extensions import TypedDict
6
+
7
+
8
+ class AaveAvgRateResponseTypedDict(TypedDict):
9
+ supply_apy_variable_rate: float
10
+ r"""Variable rate APY for deposits."""
11
+ supply_apr_variable_rate: float
12
+ r"""Variable rate APR for deposits."""
13
+ borrow_apy_variable_rate: float
14
+ r"""Variable rate APY for loans."""
15
+ borrow_apr_variable_rate: float
16
+ r"""Variable rate APR for loans."""
17
+ borrow_apy_fixed_rate: float
18
+ r"""Fixed rate APY for loans."""
19
+ borrow_apr_fixed_rate: float
20
+ r"""Fixed rate APR for loans."""
21
+
22
+
23
+ class AaveAvgRateResponse(BaseModel):
24
+ supply_apy_variable_rate: float
25
+ r"""Variable rate APY for deposits."""
26
+
27
+ supply_apr_variable_rate: float
28
+ r"""Variable rate APR for deposits."""
29
+
30
+ borrow_apy_variable_rate: float
31
+ r"""Variable rate APY for loans."""
32
+
33
+ borrow_apr_variable_rate: float
34
+ r"""Variable rate APR for loans."""
35
+
36
+ borrow_apy_fixed_rate: float
37
+ r"""Fixed rate APY for loans."""
38
+
39
+ borrow_apr_fixed_rate: float
40
+ r"""Fixed rate APR for loans."""