compass_api_sdk 0.9.38__py3-none-any.whl → 0.9.40__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.
- compass_api_sdk/_version.py +3 -3
- compass_api_sdk/erc_4626_vaults.py +6 -2
- compass_api_sdk/models/__init__.py +31 -58
- compass_api_sdk/models/pendle_quoteop.py +128 -0
- compass_api_sdk/models/pendlegetquoteresponse.py +15 -0
- compass_api_sdk/morpho.py +8 -214
- compass_api_sdk/pendle.py +218 -0
- {compass_api_sdk-0.9.38.dist-info → compass_api_sdk-0.9.40.dist-info}/METADATA +2 -2
- {compass_api_sdk-0.9.38.dist-info → compass_api_sdk-0.9.40.dist-info}/RECORD +10 -16
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_asset.py +0 -60
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py +0 -53
- compass_api_sdk/models/curator.py +0 -53
- compass_api_sdk/models/liquidity.py +0 -16
- compass_api_sdk/models/metadata.py +0 -50
- compass_api_sdk/models/morpho_vault_positionop.py +0 -37
- compass_api_sdk/models/morphocheckvaultpositionresponse.py +0 -20
- compass_api_sdk/models/morphogetvaultresponse.py +0 -86
- {compass_api_sdk-0.9.38.dist-info → compass_api_sdk-0.9.40.dist-info}/WHEEL +0 -0
compass_api_sdk/morpho.py
CHANGED
|
@@ -211,17 +211,12 @@ class Morpho(BaseSDK):
|
|
|
211
211
|
server_url: Optional[str] = None,
|
|
212
212
|
timeout_ms: Optional[int] = None,
|
|
213
213
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
214
|
-
) -> models.
|
|
214
|
+
) -> models.VaultGetVaultResponse:
|
|
215
215
|
r"""Get Vault
|
|
216
216
|
|
|
217
|
-
Get data &
|
|
217
|
+
Get Vault data & User Position.
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
- Current, daily, weekly, monthly, yearly APY
|
|
221
|
-
- Underlying asset data
|
|
222
|
-
- Total liquidity
|
|
223
|
-
- Pertinent metadata
|
|
224
|
-
- Whitelist status
|
|
219
|
+
The user position is only included if 'user_address' parameter is included.
|
|
225
220
|
|
|
226
221
|
:param chain: The chain to use.
|
|
227
222
|
:param vault_address: The vault address of the desired vault position.
|
|
@@ -288,9 +283,7 @@ class Morpho(BaseSDK):
|
|
|
288
283
|
|
|
289
284
|
response_data: Any = None
|
|
290
285
|
if utils.match_response(http_res, "200", "application/json"):
|
|
291
|
-
return utils.unmarshal_json_response(
|
|
292
|
-
models.MorphoGetVaultResponse, http_res
|
|
293
|
-
)
|
|
286
|
+
return utils.unmarshal_json_response(models.VaultGetVaultResponse, http_res)
|
|
294
287
|
if utils.match_response(http_res, "422", "application/json"):
|
|
295
288
|
response_data = utils.unmarshal_json_response(
|
|
296
289
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -316,17 +309,12 @@ class Morpho(BaseSDK):
|
|
|
316
309
|
server_url: Optional[str] = None,
|
|
317
310
|
timeout_ms: Optional[int] = None,
|
|
318
311
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
319
|
-
) -> models.
|
|
312
|
+
) -> models.VaultGetVaultResponse:
|
|
320
313
|
r"""Get Vault
|
|
321
314
|
|
|
322
|
-
Get data &
|
|
315
|
+
Get Vault data & User Position.
|
|
323
316
|
|
|
324
|
-
|
|
325
|
-
- Current, daily, weekly, monthly, yearly APY
|
|
326
|
-
- Underlying asset data
|
|
327
|
-
- Total liquidity
|
|
328
|
-
- Pertinent metadata
|
|
329
|
-
- Whitelist status
|
|
317
|
+
The user position is only included if 'user_address' parameter is included.
|
|
330
318
|
|
|
331
319
|
:param chain: The chain to use.
|
|
332
320
|
:param vault_address: The vault address of the desired vault position.
|
|
@@ -393,201 +381,7 @@ class Morpho(BaseSDK):
|
|
|
393
381
|
|
|
394
382
|
response_data: Any = None
|
|
395
383
|
if utils.match_response(http_res, "200", "application/json"):
|
|
396
|
-
return utils.unmarshal_json_response(
|
|
397
|
-
models.MorphoGetVaultResponse, http_res
|
|
398
|
-
)
|
|
399
|
-
if utils.match_response(http_res, "422", "application/json"):
|
|
400
|
-
response_data = utils.unmarshal_json_response(
|
|
401
|
-
errors.HTTPValidationErrorData, http_res
|
|
402
|
-
)
|
|
403
|
-
raise errors.HTTPValidationError(response_data, http_res)
|
|
404
|
-
if utils.match_response(http_res, "4XX", "*"):
|
|
405
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
406
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
407
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
408
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
409
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
410
|
-
|
|
411
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
412
|
-
|
|
413
|
-
def vault_position(
|
|
414
|
-
self,
|
|
415
|
-
*,
|
|
416
|
-
chain: models.MorphoVaultPositionChain = models.MorphoVaultPositionChain.BASE_MAINNET,
|
|
417
|
-
user_address: str = "0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418",
|
|
418
|
-
vault_address: str = "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca",
|
|
419
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
420
|
-
server_url: Optional[str] = None,
|
|
421
|
-
timeout_ms: Optional[int] = None,
|
|
422
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
423
|
-
) -> models.MorphoCheckVaultPositionResponse:
|
|
424
|
-
r"""Check Vault Position
|
|
425
|
-
|
|
426
|
-
Check how many shares you own and the equivalent token amount of a given
|
|
427
|
-
vault.
|
|
428
|
-
|
|
429
|
-
:param chain:
|
|
430
|
-
:param user_address: The user address of the desired vault position.
|
|
431
|
-
:param vault_address: The vault address of the desired vault position.
|
|
432
|
-
:param retries: Override the default retry configuration for this method
|
|
433
|
-
:param server_url: Override the default server URL for this method
|
|
434
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
435
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
436
|
-
"""
|
|
437
|
-
base_url = None
|
|
438
|
-
url_variables = None
|
|
439
|
-
if timeout_ms is None:
|
|
440
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
441
|
-
|
|
442
|
-
if server_url is not None:
|
|
443
|
-
base_url = server_url
|
|
444
|
-
else:
|
|
445
|
-
base_url = self._get_url(base_url, url_variables)
|
|
446
|
-
|
|
447
|
-
request = models.MorphoVaultPositionRequest(
|
|
448
|
-
chain=chain,
|
|
449
|
-
user_address=user_address,
|
|
450
|
-
vault_address=vault_address,
|
|
451
|
-
)
|
|
452
|
-
|
|
453
|
-
req = self._build_request(
|
|
454
|
-
method="GET",
|
|
455
|
-
path="/v0/morpho/vault_position",
|
|
456
|
-
base_url=base_url,
|
|
457
|
-
url_variables=url_variables,
|
|
458
|
-
request=request,
|
|
459
|
-
request_body_required=False,
|
|
460
|
-
request_has_path_params=False,
|
|
461
|
-
request_has_query_params=True,
|
|
462
|
-
user_agent_header="user-agent",
|
|
463
|
-
accept_header_value="application/json",
|
|
464
|
-
http_headers=http_headers,
|
|
465
|
-
security=self.sdk_configuration.security,
|
|
466
|
-
timeout_ms=timeout_ms,
|
|
467
|
-
)
|
|
468
|
-
|
|
469
|
-
if retries == UNSET:
|
|
470
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
471
|
-
retries = self.sdk_configuration.retry_config
|
|
472
|
-
|
|
473
|
-
retry_config = None
|
|
474
|
-
if isinstance(retries, utils.RetryConfig):
|
|
475
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
476
|
-
|
|
477
|
-
http_res = self.do_request(
|
|
478
|
-
hook_ctx=HookContext(
|
|
479
|
-
config=self.sdk_configuration,
|
|
480
|
-
base_url=base_url or "",
|
|
481
|
-
operation_id="morpho_vault_position",
|
|
482
|
-
oauth2_scopes=[],
|
|
483
|
-
security_source=self.sdk_configuration.security,
|
|
484
|
-
),
|
|
485
|
-
request=req,
|
|
486
|
-
error_status_codes=["422", "4XX", "5XX"],
|
|
487
|
-
retry_config=retry_config,
|
|
488
|
-
)
|
|
489
|
-
|
|
490
|
-
response_data: Any = None
|
|
491
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
492
|
-
return utils.unmarshal_json_response(
|
|
493
|
-
models.MorphoCheckVaultPositionResponse, http_res
|
|
494
|
-
)
|
|
495
|
-
if utils.match_response(http_res, "422", "application/json"):
|
|
496
|
-
response_data = utils.unmarshal_json_response(
|
|
497
|
-
errors.HTTPValidationErrorData, http_res
|
|
498
|
-
)
|
|
499
|
-
raise errors.HTTPValidationError(response_data, http_res)
|
|
500
|
-
if utils.match_response(http_res, "4XX", "*"):
|
|
501
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
502
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
503
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
504
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
505
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
506
|
-
|
|
507
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
508
|
-
|
|
509
|
-
async def vault_position_async(
|
|
510
|
-
self,
|
|
511
|
-
*,
|
|
512
|
-
chain: models.MorphoVaultPositionChain = models.MorphoVaultPositionChain.BASE_MAINNET,
|
|
513
|
-
user_address: str = "0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418",
|
|
514
|
-
vault_address: str = "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca",
|
|
515
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
516
|
-
server_url: Optional[str] = None,
|
|
517
|
-
timeout_ms: Optional[int] = None,
|
|
518
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
519
|
-
) -> models.MorphoCheckVaultPositionResponse:
|
|
520
|
-
r"""Check Vault Position
|
|
521
|
-
|
|
522
|
-
Check how many shares you own and the equivalent token amount of a given
|
|
523
|
-
vault.
|
|
524
|
-
|
|
525
|
-
:param chain:
|
|
526
|
-
:param user_address: The user address of the desired vault position.
|
|
527
|
-
:param vault_address: The vault address of the desired vault position.
|
|
528
|
-
:param retries: Override the default retry configuration for this method
|
|
529
|
-
:param server_url: Override the default server URL for this method
|
|
530
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
531
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
532
|
-
"""
|
|
533
|
-
base_url = None
|
|
534
|
-
url_variables = None
|
|
535
|
-
if timeout_ms is None:
|
|
536
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
537
|
-
|
|
538
|
-
if server_url is not None:
|
|
539
|
-
base_url = server_url
|
|
540
|
-
else:
|
|
541
|
-
base_url = self._get_url(base_url, url_variables)
|
|
542
|
-
|
|
543
|
-
request = models.MorphoVaultPositionRequest(
|
|
544
|
-
chain=chain,
|
|
545
|
-
user_address=user_address,
|
|
546
|
-
vault_address=vault_address,
|
|
547
|
-
)
|
|
548
|
-
|
|
549
|
-
req = self._build_request_async(
|
|
550
|
-
method="GET",
|
|
551
|
-
path="/v0/morpho/vault_position",
|
|
552
|
-
base_url=base_url,
|
|
553
|
-
url_variables=url_variables,
|
|
554
|
-
request=request,
|
|
555
|
-
request_body_required=False,
|
|
556
|
-
request_has_path_params=False,
|
|
557
|
-
request_has_query_params=True,
|
|
558
|
-
user_agent_header="user-agent",
|
|
559
|
-
accept_header_value="application/json",
|
|
560
|
-
http_headers=http_headers,
|
|
561
|
-
security=self.sdk_configuration.security,
|
|
562
|
-
timeout_ms=timeout_ms,
|
|
563
|
-
)
|
|
564
|
-
|
|
565
|
-
if retries == UNSET:
|
|
566
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
567
|
-
retries = self.sdk_configuration.retry_config
|
|
568
|
-
|
|
569
|
-
retry_config = None
|
|
570
|
-
if isinstance(retries, utils.RetryConfig):
|
|
571
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
572
|
-
|
|
573
|
-
http_res = await self.do_request_async(
|
|
574
|
-
hook_ctx=HookContext(
|
|
575
|
-
config=self.sdk_configuration,
|
|
576
|
-
base_url=base_url or "",
|
|
577
|
-
operation_id="morpho_vault_position",
|
|
578
|
-
oauth2_scopes=[],
|
|
579
|
-
security_source=self.sdk_configuration.security,
|
|
580
|
-
),
|
|
581
|
-
request=req,
|
|
582
|
-
error_status_codes=["422", "4XX", "5XX"],
|
|
583
|
-
retry_config=retry_config,
|
|
584
|
-
)
|
|
585
|
-
|
|
586
|
-
response_data: Any = None
|
|
587
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
588
|
-
return utils.unmarshal_json_response(
|
|
589
|
-
models.MorphoCheckVaultPositionResponse, http_res
|
|
590
|
-
)
|
|
384
|
+
return utils.unmarshal_json_response(models.VaultGetVaultResponse, http_res)
|
|
591
385
|
if utils.match_response(http_res, "422", "application/json"):
|
|
592
386
|
response_data = utils.unmarshal_json_response(
|
|
593
387
|
errors.HTTPValidationErrorData, http_res
|
compass_api_sdk/pendle.py
CHANGED
|
@@ -756,6 +756,224 @@ class Pendle(BaseSDK):
|
|
|
756
756
|
|
|
757
757
|
raise errors.APIError("Unexpected response received", http_res)
|
|
758
758
|
|
|
759
|
+
def quote(
|
|
760
|
+
self,
|
|
761
|
+
*,
|
|
762
|
+
chain: models.PendleQuoteChain = models.PendleQuoteChain.ARBITRUM_MAINNET,
|
|
763
|
+
market_address: str = "0x46d62a8dede1bf2d0de04f2ed863245cbba5e538",
|
|
764
|
+
amount: Union[models.PendleQuoteAmount, models.PendleQuoteAmountTypedDict],
|
|
765
|
+
token_type: models.TokenType = models.TokenType.PT,
|
|
766
|
+
trade_type: models.TradeType = models.TradeType.BUY,
|
|
767
|
+
block: OptionalNullable[int] = UNSET,
|
|
768
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
769
|
+
server_url: Optional[str] = None,
|
|
770
|
+
timeout_ms: Optional[int] = None,
|
|
771
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
772
|
+
) -> models.PendleGetQuoteResponse:
|
|
773
|
+
r"""Get Quote
|
|
774
|
+
|
|
775
|
+
Retrieve a quote for trading Principal Token (PT), Yield Token (YT), or Liquidity
|
|
776
|
+
Provider Token (LP) on Pendle.
|
|
777
|
+
|
|
778
|
+
For `BUY`, `amount` is the quantity of the Underlying Token to spend, and the quote returns the amount of `token_type` received.
|
|
779
|
+
|
|
780
|
+
For `SELL`, `amount` is the quantity of `token_type` to sell, and the quote returns the amount of Underlying Token received.
|
|
781
|
+
|
|
782
|
+
:param chain: The chain to use.
|
|
783
|
+
:param market_address: The market address of the desired position.
|
|
784
|
+
:param amount: The quantity to trade.
|
|
785
|
+
:param token_type: Specifies the token to quote (`PT`, `YT`, or `LP`)
|
|
786
|
+
:param trade_type: Specifies the trade direction (`BUY` or `SELL`)
|
|
787
|
+
:param block: Optional block number (defaults to latest).
|
|
788
|
+
:param retries: Override the default retry configuration for this method
|
|
789
|
+
:param server_url: Override the default server URL for this method
|
|
790
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
791
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
792
|
+
"""
|
|
793
|
+
base_url = None
|
|
794
|
+
url_variables = None
|
|
795
|
+
if timeout_ms is None:
|
|
796
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
797
|
+
|
|
798
|
+
if server_url is not None:
|
|
799
|
+
base_url = server_url
|
|
800
|
+
else:
|
|
801
|
+
base_url = self._get_url(base_url, url_variables)
|
|
802
|
+
|
|
803
|
+
request = models.PendleQuoteRequest(
|
|
804
|
+
chain=chain,
|
|
805
|
+
block=block,
|
|
806
|
+
market_address=market_address,
|
|
807
|
+
amount=amount,
|
|
808
|
+
token_type=token_type,
|
|
809
|
+
trade_type=trade_type,
|
|
810
|
+
)
|
|
811
|
+
|
|
812
|
+
req = self._build_request(
|
|
813
|
+
method="GET",
|
|
814
|
+
path="/v0/pendle/quote",
|
|
815
|
+
base_url=base_url,
|
|
816
|
+
url_variables=url_variables,
|
|
817
|
+
request=request,
|
|
818
|
+
request_body_required=False,
|
|
819
|
+
request_has_path_params=False,
|
|
820
|
+
request_has_query_params=True,
|
|
821
|
+
user_agent_header="user-agent",
|
|
822
|
+
accept_header_value="application/json",
|
|
823
|
+
http_headers=http_headers,
|
|
824
|
+
security=self.sdk_configuration.security,
|
|
825
|
+
timeout_ms=timeout_ms,
|
|
826
|
+
)
|
|
827
|
+
|
|
828
|
+
if retries == UNSET:
|
|
829
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
830
|
+
retries = self.sdk_configuration.retry_config
|
|
831
|
+
|
|
832
|
+
retry_config = None
|
|
833
|
+
if isinstance(retries, utils.RetryConfig):
|
|
834
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
835
|
+
|
|
836
|
+
http_res = self.do_request(
|
|
837
|
+
hook_ctx=HookContext(
|
|
838
|
+
config=self.sdk_configuration,
|
|
839
|
+
base_url=base_url or "",
|
|
840
|
+
operation_id="pendle_quote",
|
|
841
|
+
oauth2_scopes=[],
|
|
842
|
+
security_source=self.sdk_configuration.security,
|
|
843
|
+
),
|
|
844
|
+
request=req,
|
|
845
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
846
|
+
retry_config=retry_config,
|
|
847
|
+
)
|
|
848
|
+
|
|
849
|
+
response_data: Any = None
|
|
850
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
851
|
+
return utils.unmarshal_json_response(
|
|
852
|
+
models.PendleGetQuoteResponse, http_res
|
|
853
|
+
)
|
|
854
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
855
|
+
response_data = utils.unmarshal_json_response(
|
|
856
|
+
errors.HTTPValidationErrorData, http_res
|
|
857
|
+
)
|
|
858
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
859
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
860
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
861
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
862
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
863
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
864
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
865
|
+
|
|
866
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
867
|
+
|
|
868
|
+
async def quote_async(
|
|
869
|
+
self,
|
|
870
|
+
*,
|
|
871
|
+
chain: models.PendleQuoteChain = models.PendleQuoteChain.ARBITRUM_MAINNET,
|
|
872
|
+
market_address: str = "0x46d62a8dede1bf2d0de04f2ed863245cbba5e538",
|
|
873
|
+
amount: Union[models.PendleQuoteAmount, models.PendleQuoteAmountTypedDict],
|
|
874
|
+
token_type: models.TokenType = models.TokenType.PT,
|
|
875
|
+
trade_type: models.TradeType = models.TradeType.BUY,
|
|
876
|
+
block: OptionalNullable[int] = UNSET,
|
|
877
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
878
|
+
server_url: Optional[str] = None,
|
|
879
|
+
timeout_ms: Optional[int] = None,
|
|
880
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
881
|
+
) -> models.PendleGetQuoteResponse:
|
|
882
|
+
r"""Get Quote
|
|
883
|
+
|
|
884
|
+
Retrieve a quote for trading Principal Token (PT), Yield Token (YT), or Liquidity
|
|
885
|
+
Provider Token (LP) on Pendle.
|
|
886
|
+
|
|
887
|
+
For `BUY`, `amount` is the quantity of the Underlying Token to spend, and the quote returns the amount of `token_type` received.
|
|
888
|
+
|
|
889
|
+
For `SELL`, `amount` is the quantity of `token_type` to sell, and the quote returns the amount of Underlying Token received.
|
|
890
|
+
|
|
891
|
+
:param chain: The chain to use.
|
|
892
|
+
:param market_address: The market address of the desired position.
|
|
893
|
+
:param amount: The quantity to trade.
|
|
894
|
+
:param token_type: Specifies the token to quote (`PT`, `YT`, or `LP`)
|
|
895
|
+
:param trade_type: Specifies the trade direction (`BUY` or `SELL`)
|
|
896
|
+
:param block: Optional block number (defaults to latest).
|
|
897
|
+
:param retries: Override the default retry configuration for this method
|
|
898
|
+
:param server_url: Override the default server URL for this method
|
|
899
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
900
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
901
|
+
"""
|
|
902
|
+
base_url = None
|
|
903
|
+
url_variables = None
|
|
904
|
+
if timeout_ms is None:
|
|
905
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
906
|
+
|
|
907
|
+
if server_url is not None:
|
|
908
|
+
base_url = server_url
|
|
909
|
+
else:
|
|
910
|
+
base_url = self._get_url(base_url, url_variables)
|
|
911
|
+
|
|
912
|
+
request = models.PendleQuoteRequest(
|
|
913
|
+
chain=chain,
|
|
914
|
+
block=block,
|
|
915
|
+
market_address=market_address,
|
|
916
|
+
amount=amount,
|
|
917
|
+
token_type=token_type,
|
|
918
|
+
trade_type=trade_type,
|
|
919
|
+
)
|
|
920
|
+
|
|
921
|
+
req = self._build_request_async(
|
|
922
|
+
method="GET",
|
|
923
|
+
path="/v0/pendle/quote",
|
|
924
|
+
base_url=base_url,
|
|
925
|
+
url_variables=url_variables,
|
|
926
|
+
request=request,
|
|
927
|
+
request_body_required=False,
|
|
928
|
+
request_has_path_params=False,
|
|
929
|
+
request_has_query_params=True,
|
|
930
|
+
user_agent_header="user-agent",
|
|
931
|
+
accept_header_value="application/json",
|
|
932
|
+
http_headers=http_headers,
|
|
933
|
+
security=self.sdk_configuration.security,
|
|
934
|
+
timeout_ms=timeout_ms,
|
|
935
|
+
)
|
|
936
|
+
|
|
937
|
+
if retries == UNSET:
|
|
938
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
939
|
+
retries = self.sdk_configuration.retry_config
|
|
940
|
+
|
|
941
|
+
retry_config = None
|
|
942
|
+
if isinstance(retries, utils.RetryConfig):
|
|
943
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
944
|
+
|
|
945
|
+
http_res = await self.do_request_async(
|
|
946
|
+
hook_ctx=HookContext(
|
|
947
|
+
config=self.sdk_configuration,
|
|
948
|
+
base_url=base_url or "",
|
|
949
|
+
operation_id="pendle_quote",
|
|
950
|
+
oauth2_scopes=[],
|
|
951
|
+
security_source=self.sdk_configuration.security,
|
|
952
|
+
),
|
|
953
|
+
request=req,
|
|
954
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
955
|
+
retry_config=retry_config,
|
|
956
|
+
)
|
|
957
|
+
|
|
958
|
+
response_data: Any = None
|
|
959
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
960
|
+
return utils.unmarshal_json_response(
|
|
961
|
+
models.PendleGetQuoteResponse, http_res
|
|
962
|
+
)
|
|
963
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
964
|
+
response_data = utils.unmarshal_json_response(
|
|
965
|
+
errors.HTTPValidationErrorData, http_res
|
|
966
|
+
)
|
|
967
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
968
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
969
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
970
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
971
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
972
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
973
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
974
|
+
|
|
975
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
976
|
+
|
|
759
977
|
def buy_pt(
|
|
760
978
|
self,
|
|
761
979
|
*,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: compass_api_sdk
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.40
|
|
4
4
|
Summary: Compass API SDK.
|
|
5
5
|
Author: royalnine
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -228,7 +228,6 @@ with CompassAPI(
|
|
|
228
228
|
|
|
229
229
|
* [vaults](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#vaults) - Get Vaults
|
|
230
230
|
* [vault](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#vault) - Get Vault
|
|
231
|
-
* [vault_position](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#vault_position) - Check Vault Position
|
|
232
231
|
* [markets](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#markets) - Get Markets
|
|
233
232
|
* [market](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#market) - Get Market
|
|
234
233
|
* [market_position](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#market_position) - Check Market Position
|
|
@@ -246,6 +245,7 @@ with CompassAPI(
|
|
|
246
245
|
* [positions](https://github.com/CompassLabs/mono/blob/master/docs/sdks/pendle/README.md#positions) - List User's Market Positions
|
|
247
246
|
* [market](https://github.com/CompassLabs/mono/blob/master/docs/sdks/pendle/README.md#market) - Get Market Data
|
|
248
247
|
* [markets](https://github.com/CompassLabs/mono/blob/master/docs/sdks/pendle/README.md#markets) - List Market Data
|
|
248
|
+
* [quote](https://github.com/CompassLabs/mono/blob/master/docs/sdks/pendle/README.md#quote) - Get Quote
|
|
249
249
|
* [buy_pt](https://github.com/CompassLabs/mono/blob/master/docs/sdks/pendle/README.md#buy_pt) - Buy Principal Token (PT)
|
|
250
250
|
* [sell_pt](https://github.com/CompassLabs/mono/blob/master/docs/sdks/pendle/README.md#sell_pt) - Sell Principal Token (PT)
|
|
251
251
|
* [buy_yt](https://github.com/CompassLabs/mono/blob/master/docs/sdks/pendle/README.md#buy_yt) - Buy Yield Token (YT)
|
|
@@ -2,11 +2,11 @@ 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=4qXm6dEntJOC2QeOdTklcc53oFzTU3HBb1xGdZ-kBXY,3059
|
|
5
|
-
compass_api_sdk/_version.py,sha256=
|
|
5
|
+
compass_api_sdk/_version.py,sha256=_DS7PVc3cPc2v8976AnA4jy4Vps51RPWsse7nCAg7oM,474
|
|
6
6
|
compass_api_sdk/aave_v3.py,sha256=HGztClaMj2E00gESokwbsZ9aiNGV1-okkrDzxUIZtJA,117024
|
|
7
7
|
compass_api_sdk/aerodrome_slipstream.py,sha256=_-tqCHmWlvbMfVl2hHvMpJfRKJVHAHEhB30oYwcqEY8,78375
|
|
8
8
|
compass_api_sdk/basesdk.py,sha256=PQNcMD7BiLruZwOuU2TeWIE_zQ0iO--XYUFmIDr5zX0,11844
|
|
9
|
-
compass_api_sdk/erc_4626_vaults.py,sha256=
|
|
9
|
+
compass_api_sdk/erc_4626_vaults.py,sha256=Nb6aJezxUJgh-CuSQyLimvVM80MDMWrLpbSaNPZsw6c,26373
|
|
10
10
|
compass_api_sdk/errors/__init__.py,sha256=UZYQ_CPi1cQkYcHe6n00nfKPIRwbmcufTY-FmMJGmk8,1693
|
|
11
11
|
compass_api_sdk/errors/apierror.py,sha256=y1lf-8zwQhv1JGntxj03ViMUyHN_Uewe0oZoH8MhwSM,1235
|
|
12
12
|
compass_api_sdk/errors/compassapierror.py,sha256=VqVzBWmwoS3OvoKbgBNh2WFFhrM3K5Kbz_5q4bupD7o,717
|
|
@@ -14,7 +14,7 @@ compass_api_sdk/errors/httpvalidationerror.py,sha256=ebdzfILwY0BltW3MqxCpHipluRS
|
|
|
14
14
|
compass_api_sdk/errors/no_response_error.py,sha256=FQG44Lq6uF7uUlzbUYfM3dJon6sbqXzJ0Ri6YrDdsEs,380
|
|
15
15
|
compass_api_sdk/errors/responsevalidationerror.py,sha256=baMAkfmUhcPt_cxzyOCBCGBOzlXAeTHwcn5AUCsAgOw,702
|
|
16
16
|
compass_api_sdk/httpclient.py,sha256=Eu73urOAiZQtdUIyOUnPccxCiBbWEKrXG-JrRG3SLM4,3946
|
|
17
|
-
compass_api_sdk/models/__init__.py,sha256=
|
|
17
|
+
compass_api_sdk/models/__init__.py,sha256=h6GNTaXppmElG7_-dmLtx78CxvwBzGZZC-ZjJk5-XJA,118103
|
|
18
18
|
compass_api_sdk/models/aave_avg_rateop.py,sha256=Qn7IkBwZv5zY_L15V_LONkANzQPTbtmK2Wwhc2iqYz8,3718
|
|
19
19
|
compass_api_sdk/models/aave_historical_transactionsop.py,sha256=oWOjaRhNyjddZPqr5RfhNYf6V4Ye4gOQ0BDIXoqZGSs,1785
|
|
20
20
|
compass_api_sdk/models/aave_liquidity_changeop.py,sha256=o9G4dD2foyhbunziTv_177Qr2AK37KTIQsQfvPxo5Fs,2785
|
|
@@ -74,13 +74,10 @@ compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_marke
|
|
|
74
74
|
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_market_marketstate.py,sha256=DZ5p29aIf1KoeTe1wGc-mYy8fZ7mhsJ4Sov1ewoX42g,2982
|
|
75
75
|
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_asset.py,sha256=pMWAh-oYo4YBmeVpoh2XoPn8PmFWSrvRH0Gg7sPT8xQ,488
|
|
76
76
|
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_marketstate.py,sha256=wour5BGvKGddpI_qfs7WHfDewE5-cLdRjq7L-QTAQLg,2133
|
|
77
|
-
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_asset.py,sha256=bWO0t2sKFS3Cx3j7zUXPgGK9i1QIUcrdnyQksunbNQU,1661
|
|
78
|
-
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py,sha256=PAHNVh5aU1z4t8N63_D4fYixGb_ZlOFZLAh3bVH2WLM,1624
|
|
79
77
|
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_asset.py,sha256=zlxZwigsUocOnYo2Q43JLDSiFL6w26r-jaqcy4Ds2NU,562
|
|
80
78
|
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_vaultstate.py,sha256=WwlaoKcfHa18irpBwR95FIV5TD0_2jVN_hIqo1R55rE,796
|
|
81
79
|
compass_api_sdk/models/compass_api_backend_models_pendle_read_response_positions_tokenbalance.py,sha256=dxEvdDEZmYokpmCAO3RXRQU81kR4Bmiv3eEqMKh0GTU,450
|
|
82
80
|
compass_api_sdk/models/compass_api_backend_models_vaults_read_response_vault_asset.py,sha256=M5ShjhNBdQYc_D4FefCDjDc5hm3KV4u_fJ7ZKyTH-uk,478
|
|
83
|
-
compass_api_sdk/models/curator.py,sha256=FEyFGfhBNu1xFlSACdFPpBK2kGzLNBvLi8KfaEKy0rY,1392
|
|
84
81
|
compass_api_sdk/models/details.py,sha256=3nlDe5Po20HFWWc31iX-6wOfMdveE76JpNf-Kp9AsuQ,1212
|
|
85
82
|
compass_api_sdk/models/ensnameinforesponse.py,sha256=p7y3TYD3lApa8hzHTCKDUEmSpmH2QmJAHG7wzef9rLk,626
|
|
86
83
|
compass_api_sdk/models/erc20data.py,sha256=Pn9h6Ts64VoV3bR5gpbMxTPb2Du8izsK5a6eFxQfRZU,394
|
|
@@ -93,29 +90,24 @@ compass_api_sdk/models/generic_visualize_portfolioop.py,sha256=FGVWUHvzG8GODN2OF
|
|
|
93
90
|
compass_api_sdk/models/image.py,sha256=-qB_S9WX6YZYVKVqTdnB79f57zjrO2G-hYwBxp-KJDQ,355
|
|
94
91
|
compass_api_sdk/models/interestratemode.py,sha256=OmOKBSJD0y9O9LuA0rajVkvxiEuU-xiQAuoiHYFmp5s,341
|
|
95
92
|
compass_api_sdk/models/liquidationcall.py,sha256=-HEwFMuiD2p8x04VQHlnYqlOdvhr0jXrZ6ksmxlffUw,2019
|
|
96
|
-
compass_api_sdk/models/liquidity.py,sha256=WOPaK4SXj2C5TBLZlfoaQbcnzhcmFCEUFz59mOw1KeM,328
|
|
97
93
|
compass_api_sdk/models/lpbalance.py,sha256=8IxmblTajQs3EZgSqZXD1WOd8Adkzib08iJzxqZryVw,464
|
|
98
94
|
compass_api_sdk/models/market.py,sha256=GHeU1pdGnyGNDxyx2aSvMfLeUTW1s_wLEkMY5SqBPRg,368
|
|
99
95
|
compass_api_sdk/models/marketposition.py,sha256=X-qOGEKxLfk-aLWMweaWraTh5G2x_ImBSZCg8_mPUEo,2151
|
|
100
96
|
compass_api_sdk/models/markettokens.py,sha256=fP8EMGaqgZrDg4sRpnqmlESVxz3-ZSotGxZjULAjNfc,1599
|
|
101
|
-
compass_api_sdk/models/metadata.py,sha256=QtYhxd8PZdJOC2T2SkaKmcAwxg8cfRMjVvpj-D4dytg,1496
|
|
102
97
|
compass_api_sdk/models/morpho_market_positionop.py,sha256=1nqzRHREOAZhRCIB277JbOuCqb1s_1G-gKYTL_eRyng,1480
|
|
103
98
|
compass_api_sdk/models/morpho_marketop.py,sha256=mRcswMLi9ggpwJHNMYGwP67YRx_6Bkko728HM7MhDGk,1126
|
|
104
99
|
compass_api_sdk/models/morpho_marketsop.py,sha256=0bt1iUYA5CRB4V59wFCUMzFCt6WXw9uIlbh1jlSi0Tc,2373
|
|
105
100
|
compass_api_sdk/models/morpho_user_positionop.py,sha256=ZI3tLwWXQ7eiSdLrQFszepA8PCW3lHKy8dH9DbtZAlo,1042
|
|
106
|
-
compass_api_sdk/models/morpho_vault_positionop.py,sha256=8fTCRPEBon3eMr4Uc6eTdLwai7w8QyJnrTPeyKryenY,1344
|
|
107
101
|
compass_api_sdk/models/morpho_vaultop.py,sha256=BpoKp0tHGhgzEf7RxxrgB5qloslryVDoW-7FrygIbU4,2989
|
|
108
102
|
compass_api_sdk/models/morpho_vaultsop.py,sha256=Ed-0gPaMEnMvMHs_fN5MwrCOUZGMbnR_PnrX3NAekBs,2082
|
|
109
103
|
compass_api_sdk/models/morphoborrowparams.py,sha256=njOr9MsXmDkD2JTVrTCJKXQuBi6cCagBMgoeGl9X5LM,3167
|
|
110
104
|
compass_api_sdk/models/morphoborrowrequest.py,sha256=tFgzQ7SyuvwzFCc4pVkcPUbAje4MtYsi_EBuiEHQ6dA,3530
|
|
111
105
|
compass_api_sdk/models/morphocheckmarketpositionresponse.py,sha256=Dp_q2q0sDKFTnv1ETp6pp-7TaII8oeZ_hQWtGcGbfHA,1665
|
|
112
106
|
compass_api_sdk/models/morphocheckuserpositionresponse.py,sha256=VZqaTPJs-3tLcGAQnkniZs9XxZzELpRLErId8lg7bC4,1110
|
|
113
|
-
compass_api_sdk/models/morphocheckvaultpositionresponse.py,sha256=TzEyV8bo6p7Qthqk0XhDGbCcuJeFmOOXnb926h_R_6M,604
|
|
114
107
|
compass_api_sdk/models/morphodepositparams.py,sha256=wuBfsYWdfb6EwKf-dNVFlDHPQr2dVxLwWmjObQlg0Ys,2889
|
|
115
108
|
compass_api_sdk/models/morphodepositrequest.py,sha256=UaX5sEVhh6fV8zUXoQKBGof36hibt4M3vLNgzA8YmvI,3249
|
|
116
109
|
compass_api_sdk/models/morphogetmarketresponse.py,sha256=RU80xbW76Qng58E10ixB2RwP0nG07isfOTndMMhO8lg,3151
|
|
117
110
|
compass_api_sdk/models/morphogetmarketsresponse.py,sha256=Tz4syoRzijBGd4eB8Ly0zg6ozwqfeUI4dyTex9Tkr0w,548
|
|
118
|
-
compass_api_sdk/models/morphogetvaultresponse.py,sha256=iTGUsD3tVi77ZSbj-AJCsCh5oaIUuOKluab7KNS9f_o,2769
|
|
119
111
|
compass_api_sdk/models/morphogetvaultsresponse.py,sha256=b5LuGh9anPCWX8GJb6N0SQGoXRTNBWheSTewZD_jrrM,537
|
|
120
112
|
compass_api_sdk/models/morphomarket.py,sha256=APfUKsnjZ6x8KvNY8P1PJ7h-AKgFWTMBeYeGAM58Yac,2850
|
|
121
113
|
compass_api_sdk/models/morphorepayparams.py,sha256=n5VPRyJVcckqXrM92NhfccZuHltoj3xCMpJ7hLzjBzM,3053
|
|
@@ -136,6 +128,7 @@ compass_api_sdk/models/pendle_marketop.py,sha256=LL4aKSGuJM3-iWujEqTLl1F4D89UzlI
|
|
|
136
128
|
compass_api_sdk/models/pendle_marketsop.py,sha256=LHFiQt07oujjdLItscPDEkOCh282rsc_Q2W0jYnkXXM,830
|
|
137
129
|
compass_api_sdk/models/pendle_positionop.py,sha256=UQi58V5JAeDqHeEXWeRgfqeD1zQoYgDaDFgT4aZXi8s,2754
|
|
138
130
|
compass_api_sdk/models/pendle_positionsop.py,sha256=TVqsZ_DuXi9Osl8vtETb33BrSc4tEMccLnqevU30avk,1134
|
|
131
|
+
compass_api_sdk/models/pendle_quoteop.py,sha256=924Xt5q0tkmB1thM5Y6wELh7EZ4y8uEFyfBoCj8F26o,3787
|
|
139
132
|
compass_api_sdk/models/pendleaddliquidityparams.py,sha256=03Jo5eLXbA-78187BU1LolAsE9pjKQ9VizwmlHYwkxM,2056
|
|
140
133
|
compass_api_sdk/models/pendleaddliquidityrequest.py,sha256=7N0XoGFfFvlqSqenjRMaRxt5TJrnNhGvCkj5W__plEQ,2315
|
|
141
134
|
compass_api_sdk/models/pendlebuyptparams.py,sha256=Y_3zGoBomfP1EFK1Gl6DKAOv7C3vSEsKw40xMTsVshk,1950
|
|
@@ -143,6 +136,7 @@ compass_api_sdk/models/pendlebuyptrequest.py,sha256=NQkaQ2HqjGeVx8yNwFz6a_r0ZrMm
|
|
|
143
136
|
compass_api_sdk/models/pendlebuyytparams.py,sha256=KNPS0zRlcr9R44jARza_nDoZNinHc4j34EuReii8JvI,1926
|
|
144
137
|
compass_api_sdk/models/pendlebuyytrequest.py,sha256=EzpfmTGzWLCuG2C6tFMeHXxdP5L7R6XzWEbMJDOy1Tk,2185
|
|
145
138
|
compass_api_sdk/models/pendlegetmarketresponse.py,sha256=zUnoLIjfGt-39sByJHW72l8N0GhcZe18JfV9UgXpuzI,899
|
|
139
|
+
compass_api_sdk/models/pendlegetquoteresponse.py,sha256=v-xQTnffKHix-tYuGnxCSiFU1HHs1cag492rB6B_1X4,591
|
|
146
140
|
compass_api_sdk/models/pendlegetuserpositionresponse.py,sha256=lGYK1LRI6osNYz5043uGO2aBYojDzXKK4cVnyvaFdmA,1913
|
|
147
141
|
compass_api_sdk/models/pendlelistmarketsresponse.py,sha256=-DlImGBzAP-yc0B1F9Cfer1ruFHLUEsRv2F1MQt2-hE,570
|
|
148
142
|
compass_api_sdk/models/pendlelistuserpositionsresponse.py,sha256=7QQ5xeGxlPo1mPrzR9LRwSlx7veUN3u2qnZDi6iVWj0,572
|
|
@@ -229,8 +223,8 @@ compass_api_sdk/models/weeklyapys.py,sha256=AaGjDD4NeGsZQBwdRW1G09Pmx17pLPe2oUA9
|
|
|
229
223
|
compass_api_sdk/models/wrapethparams.py,sha256=nw1fZiDrj5wZnI25Vmg0DcNI01k-uhot68lG1_H7xrY,1223
|
|
230
224
|
compass_api_sdk/models/wrapethrequest.py,sha256=pjo0BZtzdOZKuwgnc05LsCWO1A6ZAGLwFixLuXQNKDg,1476
|
|
231
225
|
compass_api_sdk/models/yieldrange.py,sha256=WEpZR24JddnCS1_13y2P1CdD0lBi6dPktysCNu3TUic,324
|
|
232
|
-
compass_api_sdk/morpho.py,sha256=
|
|
233
|
-
compass_api_sdk/pendle.py,sha256=
|
|
226
|
+
compass_api_sdk/morpho.py,sha256=UPBNlW0DQDEDNOH0n2OJw1rHyw1KyigWB_Qr-Zw4NYA,108156
|
|
227
|
+
compass_api_sdk/pendle.py,sha256=W5GwVAK79VNVf0ASYXmmpuVLaL0vLYjyoT2kdfAR1P4,101746
|
|
234
228
|
compass_api_sdk/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
235
229
|
compass_api_sdk/sdk.py,sha256=rQ3ANGf0BxHoZc9hCQvsxkNc9qOW3DbGAuOz_sy3o7g,7865
|
|
236
230
|
compass_api_sdk/sdkconfiguration.py,sha256=5nec4ViMLCsNWBd3DyEv8zWqU5Z77YZfzwX69jkdSnM,1607
|
|
@@ -258,6 +252,6 @@ compass_api_sdk/utils/security.py,sha256=ktep3HKwbFs-MLxUYTM8Jd4v-ZBum5_Z0u1PFId
|
|
|
258
252
|
compass_api_sdk/utils/serializers.py,sha256=_I2LpPIXnaN9LFxgBFUKj5w38Dd9TcOhNYL_sH6bIo8,6439
|
|
259
253
|
compass_api_sdk/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
|
260
254
|
compass_api_sdk/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
261
|
-
compass_api_sdk-0.9.
|
|
262
|
-
compass_api_sdk-0.9.
|
|
263
|
-
compass_api_sdk-0.9.
|
|
255
|
+
compass_api_sdk-0.9.40.dist-info/METADATA,sha256=qvnyab2QV51PQBWqPRxGv2gyydFoBQ0jB2zjVAKLcq0,28625
|
|
256
|
+
compass_api_sdk-0.9.40.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
257
|
+
compass_api_sdk-0.9.40.dist-info/RECORD,,
|
|
@@ -1,60 +0,0 @@
|
|
|
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, Nullable, UNSET_SENTINEL
|
|
5
|
-
import pydantic
|
|
6
|
-
from pydantic import model_serializer
|
|
7
|
-
from typing_extensions import Annotated, TypedDict
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class CompassAPIBackendModelsMorphoReadResponseGetVaultAssetTypedDict(TypedDict):
|
|
11
|
-
address: str
|
|
12
|
-
symbol: str
|
|
13
|
-
name: str
|
|
14
|
-
decimals: int
|
|
15
|
-
price_usd: str
|
|
16
|
-
logo_uri: Nullable[str]
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class CompassAPIBackendModelsMorphoReadResponseGetVaultAsset(BaseModel):
|
|
20
|
-
address: str
|
|
21
|
-
|
|
22
|
-
symbol: str
|
|
23
|
-
|
|
24
|
-
name: str
|
|
25
|
-
|
|
26
|
-
decimals: int
|
|
27
|
-
|
|
28
|
-
price_usd: Annotated[str, pydantic.Field(alias="priceUsd")]
|
|
29
|
-
|
|
30
|
-
logo_uri: Annotated[Nullable[str], pydantic.Field(alias="logoURI")]
|
|
31
|
-
|
|
32
|
-
@model_serializer(mode="wrap")
|
|
33
|
-
def serialize_model(self, handler):
|
|
34
|
-
optional_fields = []
|
|
35
|
-
nullable_fields = ["logoURI"]
|
|
36
|
-
null_default_fields = []
|
|
37
|
-
|
|
38
|
-
serialized = handler(self)
|
|
39
|
-
|
|
40
|
-
m = {}
|
|
41
|
-
|
|
42
|
-
for n, f in type(self).model_fields.items():
|
|
43
|
-
k = f.alias or n
|
|
44
|
-
val = serialized.get(k)
|
|
45
|
-
serialized.pop(k, None)
|
|
46
|
-
|
|
47
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
|
48
|
-
is_set = (
|
|
49
|
-
self.__pydantic_fields_set__.intersection({n})
|
|
50
|
-
or k in null_default_fields
|
|
51
|
-
) # pylint: disable=no-member
|
|
52
|
-
|
|
53
|
-
if val is not None and val != UNSET_SENTINEL:
|
|
54
|
-
m[k] = val
|
|
55
|
-
elif val != UNSET_SENTINEL and (
|
|
56
|
-
not k in optional_fields or (optional_nullable and is_set)
|
|
57
|
-
):
|
|
58
|
-
m[k] = val
|
|
59
|
-
|
|
60
|
-
return m
|