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/_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.9.
|
|
6
|
+
__version__: str = "0.9.40"
|
|
7
7
|
__openapi_doc_version__: str = "0.0.1"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.9.
|
|
8
|
+
__gen_version__: str = "2.648.7"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.9.40 2.648.7 0.0.1 compass_api_sdk"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
|
@@ -22,7 +22,9 @@ class ERC4626Vaults(BaseSDK):
|
|
|
22
22
|
) -> models.VaultGetVaultResponse:
|
|
23
23
|
r"""Get Vault & User Position
|
|
24
24
|
|
|
25
|
-
Get Vault & User Position.
|
|
25
|
+
Get Vault data & User Position.
|
|
26
|
+
|
|
27
|
+
The user position is only included if 'user_address' parameter is included.
|
|
26
28
|
|
|
27
29
|
:param chain: The chain to use.
|
|
28
30
|
:param vault_address: The vault address of the desired vault position.
|
|
@@ -118,7 +120,9 @@ class ERC4626Vaults(BaseSDK):
|
|
|
118
120
|
) -> models.VaultGetVaultResponse:
|
|
119
121
|
r"""Get Vault & User Position
|
|
120
122
|
|
|
121
|
-
Get Vault & User Position.
|
|
123
|
+
Get Vault data & User Position.
|
|
124
|
+
|
|
125
|
+
The user position is only included if 'user_address' parameter is included.
|
|
122
126
|
|
|
123
127
|
:param chain: The chain to use.
|
|
124
128
|
:param vault_address: The vault address of the desired vault position.
|
|
@@ -314,14 +314,6 @@ if TYPE_CHECKING:
|
|
|
314
314
|
CompassAPIBackendModelsMorphoReadResponseGetMarketsMarketState,
|
|
315
315
|
CompassAPIBackendModelsMorphoReadResponseGetMarketsMarketStateTypedDict,
|
|
316
316
|
)
|
|
317
|
-
from .compass_api_backend_models_morpho_read_response_get_vault_asset import (
|
|
318
|
-
CompassAPIBackendModelsMorphoReadResponseGetVaultAsset,
|
|
319
|
-
CompassAPIBackendModelsMorphoReadResponseGetVaultAssetTypedDict,
|
|
320
|
-
)
|
|
321
|
-
from .compass_api_backend_models_morpho_read_response_get_vault_vaultstate import (
|
|
322
|
-
CompassAPIBackendModelsMorphoReadResponseGetVaultVaultState,
|
|
323
|
-
CompassAPIBackendModelsMorphoReadResponseGetVaultVaultStateTypedDict,
|
|
324
|
-
)
|
|
325
317
|
from .compass_api_backend_models_morpho_read_response_get_vaults_asset import (
|
|
326
318
|
CompassAPIBackendModelsMorphoReadResponseGetVaultsAsset,
|
|
327
319
|
CompassAPIBackendModelsMorphoReadResponseGetVaultsAssetTypedDict,
|
|
@@ -338,7 +330,6 @@ if TYPE_CHECKING:
|
|
|
338
330
|
CompassAPIBackendModelsVaultsReadResponseVaultAsset,
|
|
339
331
|
CompassAPIBackendModelsVaultsReadResponseVaultAssetTypedDict,
|
|
340
332
|
)
|
|
341
|
-
from .curator import Curator, CuratorTypedDict
|
|
342
333
|
from .details import Details, DetailsTypedDict
|
|
343
334
|
from .ensnameinforesponse import EnsNameInfoResponse, EnsNameInfoResponseTypedDict
|
|
344
335
|
from .erc20data import Erc20Data, Erc20DataTypedDict
|
|
@@ -376,12 +367,10 @@ if TYPE_CHECKING:
|
|
|
376
367
|
from .image import Image, ImageTypedDict
|
|
377
368
|
from .interestratemode import InterestRateMode
|
|
378
369
|
from .liquidationcall import LiquidationCall, LiquidationCallTypedDict
|
|
379
|
-
from .liquidity import Liquidity, LiquidityTypedDict
|
|
380
370
|
from .lpbalance import LpBalance, LpBalanceTypedDict
|
|
381
371
|
from .market import Market, MarketTypedDict
|
|
382
372
|
from .marketposition import MarketPosition, MarketPositionTypedDict
|
|
383
373
|
from .markettokens import MarketTokens, MarketTokensTypedDict
|
|
384
|
-
from .metadata import Metadata, MetadataTypedDict
|
|
385
374
|
from .morpho_market_positionop import (
|
|
386
375
|
MorphoMarketPositionChain,
|
|
387
376
|
MorphoMarketPositionRequest,
|
|
@@ -402,11 +391,6 @@ if TYPE_CHECKING:
|
|
|
402
391
|
MorphoUserPositionRequest,
|
|
403
392
|
MorphoUserPositionRequestTypedDict,
|
|
404
393
|
)
|
|
405
|
-
from .morpho_vault_positionop import (
|
|
406
|
-
MorphoVaultPositionChain,
|
|
407
|
-
MorphoVaultPositionRequest,
|
|
408
|
-
MorphoVaultPositionRequestTypedDict,
|
|
409
|
-
)
|
|
410
394
|
from .morpho_vaultop import (
|
|
411
395
|
MorphoVaultChain,
|
|
412
396
|
MorphoVaultRequest,
|
|
@@ -438,10 +422,6 @@ if TYPE_CHECKING:
|
|
|
438
422
|
MorphoCheckUserPositionResponse,
|
|
439
423
|
MorphoCheckUserPositionResponseTypedDict,
|
|
440
424
|
)
|
|
441
|
-
from .morphocheckvaultpositionresponse import (
|
|
442
|
-
MorphoCheckVaultPositionResponse,
|
|
443
|
-
MorphoCheckVaultPositionResponseTypedDict,
|
|
444
|
-
)
|
|
445
425
|
from .morphodepositparams import (
|
|
446
426
|
MorphoDepositParams,
|
|
447
427
|
MorphoDepositParamsAmount,
|
|
@@ -463,10 +443,6 @@ if TYPE_CHECKING:
|
|
|
463
443
|
MorphoGetMarketsResponse,
|
|
464
444
|
MorphoGetMarketsResponseTypedDict,
|
|
465
445
|
)
|
|
466
|
-
from .morphogetvaultresponse import (
|
|
467
|
-
MorphoGetVaultResponse,
|
|
468
|
-
MorphoGetVaultResponseTypedDict,
|
|
469
|
-
)
|
|
470
446
|
from .morphogetvaultsresponse import (
|
|
471
447
|
MorphoGetVaultsResponse,
|
|
472
448
|
MorphoGetVaultsResponseTypedDict,
|
|
@@ -548,6 +524,15 @@ if TYPE_CHECKING:
|
|
|
548
524
|
PendlePositionsRequest,
|
|
549
525
|
PendlePositionsRequestTypedDict,
|
|
550
526
|
)
|
|
527
|
+
from .pendle_quoteop import (
|
|
528
|
+
PendleQuoteAmount,
|
|
529
|
+
PendleQuoteAmountTypedDict,
|
|
530
|
+
PendleQuoteChain,
|
|
531
|
+
PendleQuoteRequest,
|
|
532
|
+
PendleQuoteRequestTypedDict,
|
|
533
|
+
TokenType,
|
|
534
|
+
TradeType,
|
|
535
|
+
)
|
|
551
536
|
from .pendleaddliquidityparams import (
|
|
552
537
|
PendleAddLiquidityParams,
|
|
553
538
|
PendleAddLiquidityParamsAmount,
|
|
@@ -588,6 +573,10 @@ if TYPE_CHECKING:
|
|
|
588
573
|
PendleGetMarketResponse,
|
|
589
574
|
PendleGetMarketResponseTypedDict,
|
|
590
575
|
)
|
|
576
|
+
from .pendlegetquoteresponse import (
|
|
577
|
+
PendleGetQuoteResponse,
|
|
578
|
+
PendleGetQuoteResponseTypedDict,
|
|
579
|
+
)
|
|
591
580
|
from .pendlegetuserpositionresponse import (
|
|
592
581
|
PendleGetUserPositionResponse,
|
|
593
582
|
PendleGetUserPositionResponseTypedDict,
|
|
@@ -1205,10 +1194,6 @@ __all__ = [
|
|
|
1205
1194
|
"CompassAPIBackendModelsMorphoReadResponseGetMarketsAssetTypedDict",
|
|
1206
1195
|
"CompassAPIBackendModelsMorphoReadResponseGetMarketsMarketState",
|
|
1207
1196
|
"CompassAPIBackendModelsMorphoReadResponseGetMarketsMarketStateTypedDict",
|
|
1208
|
-
"CompassAPIBackendModelsMorphoReadResponseGetVaultAsset",
|
|
1209
|
-
"CompassAPIBackendModelsMorphoReadResponseGetVaultAssetTypedDict",
|
|
1210
|
-
"CompassAPIBackendModelsMorphoReadResponseGetVaultVaultState",
|
|
1211
|
-
"CompassAPIBackendModelsMorphoReadResponseGetVaultVaultStateTypedDict",
|
|
1212
1197
|
"CompassAPIBackendModelsMorphoReadResponseGetVaultsAsset",
|
|
1213
1198
|
"CompassAPIBackendModelsMorphoReadResponseGetVaultsAssetTypedDict",
|
|
1214
1199
|
"CompassAPIBackendModelsMorphoReadResponseGetVaultsVaultState",
|
|
@@ -1217,8 +1202,6 @@ __all__ = [
|
|
|
1217
1202
|
"CompassAPIBackendModelsPendleReadResponsePositionsTokenBalanceTypedDict",
|
|
1218
1203
|
"CompassAPIBackendModelsVaultsReadResponseVaultAsset",
|
|
1219
1204
|
"CompassAPIBackendModelsVaultsReadResponseVaultAssetTypedDict",
|
|
1220
|
-
"Curator",
|
|
1221
|
-
"CuratorTypedDict",
|
|
1222
1205
|
"Details",
|
|
1223
1206
|
"DetailsTypedDict",
|
|
1224
1207
|
"EnsNameInfoResponse",
|
|
@@ -1253,8 +1236,6 @@ __all__ = [
|
|
|
1253
1236
|
"InterestRateMode",
|
|
1254
1237
|
"LiquidationCall",
|
|
1255
1238
|
"LiquidationCallTypedDict",
|
|
1256
|
-
"Liquidity",
|
|
1257
|
-
"LiquidityTypedDict",
|
|
1258
1239
|
"LoanToValue",
|
|
1259
1240
|
"LoanToValueTypedDict",
|
|
1260
1241
|
"Loc",
|
|
@@ -1269,8 +1250,6 @@ __all__ = [
|
|
|
1269
1250
|
"MarketTypedDict",
|
|
1270
1251
|
"MaxSlippagePercent",
|
|
1271
1252
|
"MaxSlippagePercentTypedDict",
|
|
1272
|
-
"Metadata",
|
|
1273
|
-
"MetadataTypedDict",
|
|
1274
1253
|
"MorphoBorrowParams",
|
|
1275
1254
|
"MorphoBorrowParamsAmount",
|
|
1276
1255
|
"MorphoBorrowParamsAmountTypedDict",
|
|
@@ -1284,8 +1263,6 @@ __all__ = [
|
|
|
1284
1263
|
"MorphoCheckMarketPositionResponseTypedDict",
|
|
1285
1264
|
"MorphoCheckUserPositionResponse",
|
|
1286
1265
|
"MorphoCheckUserPositionResponseTypedDict",
|
|
1287
|
-
"MorphoCheckVaultPositionResponse",
|
|
1288
|
-
"MorphoCheckVaultPositionResponseTypedDict",
|
|
1289
1266
|
"MorphoDepositParams",
|
|
1290
1267
|
"MorphoDepositParamsAmount",
|
|
1291
1268
|
"MorphoDepositParamsAmountTypedDict",
|
|
@@ -1299,8 +1276,6 @@ __all__ = [
|
|
|
1299
1276
|
"MorphoGetMarketResponseTypedDict",
|
|
1300
1277
|
"MorphoGetMarketsResponse",
|
|
1301
1278
|
"MorphoGetMarketsResponseTypedDict",
|
|
1302
|
-
"MorphoGetVaultResponse",
|
|
1303
|
-
"MorphoGetVaultResponseTypedDict",
|
|
1304
1279
|
"MorphoGetVaultsResponse",
|
|
1305
1280
|
"MorphoGetVaultsResponseTypedDict",
|
|
1306
1281
|
"MorphoMarket",
|
|
@@ -1333,9 +1308,6 @@ __all__ = [
|
|
|
1333
1308
|
"MorphoUserPositionRequestTypedDict",
|
|
1334
1309
|
"MorphoVault",
|
|
1335
1310
|
"MorphoVaultChain",
|
|
1336
|
-
"MorphoVaultPositionChain",
|
|
1337
|
-
"MorphoVaultPositionRequest",
|
|
1338
|
-
"MorphoVaultPositionRequestTypedDict",
|
|
1339
1311
|
"MorphoVaultRequest",
|
|
1340
1312
|
"MorphoVaultRequestTypedDict",
|
|
1341
1313
|
"MorphoVaultTypedDict",
|
|
@@ -1394,6 +1366,8 @@ __all__ = [
|
|
|
1394
1366
|
"PendleBuyYtRequestTypedDict",
|
|
1395
1367
|
"PendleGetMarketResponse",
|
|
1396
1368
|
"PendleGetMarketResponseTypedDict",
|
|
1369
|
+
"PendleGetQuoteResponse",
|
|
1370
|
+
"PendleGetQuoteResponseTypedDict",
|
|
1397
1371
|
"PendleGetUserPositionResponse",
|
|
1398
1372
|
"PendleGetUserPositionResponseTypedDict",
|
|
1399
1373
|
"PendleListMarketsResponse",
|
|
@@ -1414,6 +1388,11 @@ __all__ = [
|
|
|
1414
1388
|
"PendlePositionsChain",
|
|
1415
1389
|
"PendlePositionsRequest",
|
|
1416
1390
|
"PendlePositionsRequestTypedDict",
|
|
1391
|
+
"PendleQuoteAmount",
|
|
1392
|
+
"PendleQuoteAmountTypedDict",
|
|
1393
|
+
"PendleQuoteChain",
|
|
1394
|
+
"PendleQuoteRequest",
|
|
1395
|
+
"PendleQuoteRequestTypedDict",
|
|
1417
1396
|
"PendleRedeemYieldParams",
|
|
1418
1397
|
"PendleRedeemYieldParamsTypedDict",
|
|
1419
1398
|
"PendleRedeemYieldRequest",
|
|
@@ -1554,6 +1533,8 @@ __all__ = [
|
|
|
1554
1533
|
"TokenTransferRequestToken",
|
|
1555
1534
|
"TokenTransferRequestTokenTypedDict",
|
|
1556
1535
|
"TokenTransferRequestTypedDict",
|
|
1536
|
+
"TokenType",
|
|
1537
|
+
"TradeType",
|
|
1557
1538
|
"Transaction",
|
|
1558
1539
|
"TransactionTypedDict",
|
|
1559
1540
|
"TxResponse",
|
|
@@ -1932,10 +1913,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1932
1913
|
"CompassAPIBackendModelsMorphoReadResponseGetMarketsAssetTypedDict": ".compass_api_backend_models_morpho_read_response_get_markets_asset",
|
|
1933
1914
|
"CompassAPIBackendModelsMorphoReadResponseGetMarketsMarketState": ".compass_api_backend_models_morpho_read_response_get_markets_marketstate",
|
|
1934
1915
|
"CompassAPIBackendModelsMorphoReadResponseGetMarketsMarketStateTypedDict": ".compass_api_backend_models_morpho_read_response_get_markets_marketstate",
|
|
1935
|
-
"CompassAPIBackendModelsMorphoReadResponseGetVaultAsset": ".compass_api_backend_models_morpho_read_response_get_vault_asset",
|
|
1936
|
-
"CompassAPIBackendModelsMorphoReadResponseGetVaultAssetTypedDict": ".compass_api_backend_models_morpho_read_response_get_vault_asset",
|
|
1937
|
-
"CompassAPIBackendModelsMorphoReadResponseGetVaultVaultState": ".compass_api_backend_models_morpho_read_response_get_vault_vaultstate",
|
|
1938
|
-
"CompassAPIBackendModelsMorphoReadResponseGetVaultVaultStateTypedDict": ".compass_api_backend_models_morpho_read_response_get_vault_vaultstate",
|
|
1939
1916
|
"CompassAPIBackendModelsMorphoReadResponseGetVaultsAsset": ".compass_api_backend_models_morpho_read_response_get_vaults_asset",
|
|
1940
1917
|
"CompassAPIBackendModelsMorphoReadResponseGetVaultsAssetTypedDict": ".compass_api_backend_models_morpho_read_response_get_vaults_asset",
|
|
1941
1918
|
"CompassAPIBackendModelsMorphoReadResponseGetVaultsVaultState": ".compass_api_backend_models_morpho_read_response_get_vaults_vaultstate",
|
|
@@ -1944,8 +1921,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1944
1921
|
"CompassAPIBackendModelsPendleReadResponsePositionsTokenBalanceTypedDict": ".compass_api_backend_models_pendle_read_response_positions_tokenbalance",
|
|
1945
1922
|
"CompassAPIBackendModelsVaultsReadResponseVaultAsset": ".compass_api_backend_models_vaults_read_response_vault_asset",
|
|
1946
1923
|
"CompassAPIBackendModelsVaultsReadResponseVaultAssetTypedDict": ".compass_api_backend_models_vaults_read_response_vault_asset",
|
|
1947
|
-
"Curator": ".curator",
|
|
1948
|
-
"CuratorTypedDict": ".curator",
|
|
1949
1924
|
"Details": ".details",
|
|
1950
1925
|
"DetailsTypedDict": ".details",
|
|
1951
1926
|
"EnsNameInfoResponse": ".ensnameinforesponse",
|
|
@@ -1978,8 +1953,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1978
1953
|
"InterestRateMode": ".interestratemode",
|
|
1979
1954
|
"LiquidationCall": ".liquidationcall",
|
|
1980
1955
|
"LiquidationCallTypedDict": ".liquidationcall",
|
|
1981
|
-
"Liquidity": ".liquidity",
|
|
1982
|
-
"LiquidityTypedDict": ".liquidity",
|
|
1983
1956
|
"LpBalance": ".lpbalance",
|
|
1984
1957
|
"LpBalanceTypedDict": ".lpbalance",
|
|
1985
1958
|
"Market": ".market",
|
|
@@ -1988,8 +1961,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
1988
1961
|
"MarketPositionTypedDict": ".marketposition",
|
|
1989
1962
|
"MarketTokens": ".markettokens",
|
|
1990
1963
|
"MarketTokensTypedDict": ".markettokens",
|
|
1991
|
-
"Metadata": ".metadata",
|
|
1992
|
-
"MetadataTypedDict": ".metadata",
|
|
1993
1964
|
"MorphoMarketPositionChain": ".morpho_market_positionop",
|
|
1994
1965
|
"MorphoMarketPositionRequest": ".morpho_market_positionop",
|
|
1995
1966
|
"MorphoMarketPositionRequestTypedDict": ".morpho_market_positionop",
|
|
@@ -2002,9 +1973,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
2002
1973
|
"MorphoUserPositionChain": ".morpho_user_positionop",
|
|
2003
1974
|
"MorphoUserPositionRequest": ".morpho_user_positionop",
|
|
2004
1975
|
"MorphoUserPositionRequestTypedDict": ".morpho_user_positionop",
|
|
2005
|
-
"MorphoVaultPositionChain": ".morpho_vault_positionop",
|
|
2006
|
-
"MorphoVaultPositionRequest": ".morpho_vault_positionop",
|
|
2007
|
-
"MorphoVaultPositionRequestTypedDict": ".morpho_vault_positionop",
|
|
2008
1976
|
"MorphoVaultChain": ".morpho_vaultop",
|
|
2009
1977
|
"MorphoVaultRequest": ".morpho_vaultop",
|
|
2010
1978
|
"MorphoVaultRequestTypedDict": ".morpho_vaultop",
|
|
@@ -2024,8 +1992,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
2024
1992
|
"MorphoCheckMarketPositionResponseTypedDict": ".morphocheckmarketpositionresponse",
|
|
2025
1993
|
"MorphoCheckUserPositionResponse": ".morphocheckuserpositionresponse",
|
|
2026
1994
|
"MorphoCheckUserPositionResponseTypedDict": ".morphocheckuserpositionresponse",
|
|
2027
|
-
"MorphoCheckVaultPositionResponse": ".morphocheckvaultpositionresponse",
|
|
2028
|
-
"MorphoCheckVaultPositionResponseTypedDict": ".morphocheckvaultpositionresponse",
|
|
2029
1995
|
"MorphoDepositParams": ".morphodepositparams",
|
|
2030
1996
|
"MorphoDepositParamsAmount": ".morphodepositparams",
|
|
2031
1997
|
"MorphoDepositParamsAmountTypedDict": ".morphodepositparams",
|
|
@@ -2039,8 +2005,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
2039
2005
|
"MorphoGetMarketResponseTypedDict": ".morphogetmarketresponse",
|
|
2040
2006
|
"MorphoGetMarketsResponse": ".morphogetmarketsresponse",
|
|
2041
2007
|
"MorphoGetMarketsResponseTypedDict": ".morphogetmarketsresponse",
|
|
2042
|
-
"MorphoGetVaultResponse": ".morphogetvaultresponse",
|
|
2043
|
-
"MorphoGetVaultResponseTypedDict": ".morphogetvaultresponse",
|
|
2044
2008
|
"MorphoGetVaultsResponse": ".morphogetvaultsresponse",
|
|
2045
2009
|
"MorphoGetVaultsResponseTypedDict": ".morphogetvaultsresponse",
|
|
2046
2010
|
"MorphoMarket": ".morphomarket",
|
|
@@ -2097,6 +2061,13 @@ _dynamic_imports: dict[str, str] = {
|
|
|
2097
2061
|
"PendlePositionsChain": ".pendle_positionsop",
|
|
2098
2062
|
"PendlePositionsRequest": ".pendle_positionsop",
|
|
2099
2063
|
"PendlePositionsRequestTypedDict": ".pendle_positionsop",
|
|
2064
|
+
"PendleQuoteAmount": ".pendle_quoteop",
|
|
2065
|
+
"PendleQuoteAmountTypedDict": ".pendle_quoteop",
|
|
2066
|
+
"PendleQuoteChain": ".pendle_quoteop",
|
|
2067
|
+
"PendleQuoteRequest": ".pendle_quoteop",
|
|
2068
|
+
"PendleQuoteRequestTypedDict": ".pendle_quoteop",
|
|
2069
|
+
"TokenType": ".pendle_quoteop",
|
|
2070
|
+
"TradeType": ".pendle_quoteop",
|
|
2100
2071
|
"PendleAddLiquidityParams": ".pendleaddliquidityparams",
|
|
2101
2072
|
"PendleAddLiquidityParamsAmount": ".pendleaddliquidityparams",
|
|
2102
2073
|
"PendleAddLiquidityParamsAmountTypedDict": ".pendleaddliquidityparams",
|
|
@@ -2123,6 +2094,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
2123
2094
|
"PendleBuyYtRequestTypedDict": ".pendlebuyytrequest",
|
|
2124
2095
|
"PendleGetMarketResponse": ".pendlegetmarketresponse",
|
|
2125
2096
|
"PendleGetMarketResponseTypedDict": ".pendlegetmarketresponse",
|
|
2097
|
+
"PendleGetQuoteResponse": ".pendlegetquoteresponse",
|
|
2098
|
+
"PendleGetQuoteResponseTypedDict": ".pendlegetquoteresponse",
|
|
2126
2099
|
"PendleGetUserPositionResponse": ".pendlegetuserpositionresponse",
|
|
2127
2100
|
"PendleGetUserPositionResponseTypedDict": ".pendlegetuserpositionresponse",
|
|
2128
2101
|
"PendleListMarketsResponse": ".pendlelistmarketsresponse",
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
12
|
+
from enum import Enum
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from typing import Union
|
|
15
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class PendleQuoteChain(str, Enum):
|
|
19
|
+
r"""The chain to use."""
|
|
20
|
+
|
|
21
|
+
BASE_MAINNET = "base:mainnet"
|
|
22
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
23
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
PendleQuoteAmountTypedDict = TypeAliasType(
|
|
27
|
+
"PendleQuoteAmountTypedDict", Union[float, str]
|
|
28
|
+
)
|
|
29
|
+
r"""The quantity to trade."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
PendleQuoteAmount = TypeAliasType("PendleQuoteAmount", Union[float, str])
|
|
33
|
+
r"""The quantity to trade."""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class TokenType(str, Enum):
|
|
37
|
+
r"""Specifies the token to quote (`PT`, `YT`, or `LP`)"""
|
|
38
|
+
|
|
39
|
+
PT = "PT"
|
|
40
|
+
YT = "YT"
|
|
41
|
+
LP = "LP"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class TradeType(str, Enum):
|
|
45
|
+
r"""Specifies the trade direction (`BUY` or `SELL`)"""
|
|
46
|
+
|
|
47
|
+
BUY = "BUY"
|
|
48
|
+
SELL = "SELL"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class PendleQuoteRequestTypedDict(TypedDict):
|
|
52
|
+
amount: PendleQuoteAmountTypedDict
|
|
53
|
+
r"""The quantity to trade."""
|
|
54
|
+
chain: PendleQuoteChain
|
|
55
|
+
r"""The chain to use."""
|
|
56
|
+
block: NotRequired[Nullable[int]]
|
|
57
|
+
r"""Optional block number (defaults to latest)."""
|
|
58
|
+
market_address: str
|
|
59
|
+
r"""The market address of the desired position."""
|
|
60
|
+
token_type: TokenType
|
|
61
|
+
r"""Specifies the token to quote (`PT`, `YT`, or `LP`)"""
|
|
62
|
+
trade_type: TradeType
|
|
63
|
+
r"""Specifies the trade direction (`BUY` or `SELL`)"""
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class PendleQuoteRequest(BaseModel):
|
|
67
|
+
amount: Annotated[
|
|
68
|
+
PendleQuoteAmount,
|
|
69
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
70
|
+
]
|
|
71
|
+
r"""The quantity to trade."""
|
|
72
|
+
|
|
73
|
+
chain: Annotated[
|
|
74
|
+
PendleQuoteChain,
|
|
75
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
76
|
+
] = PendleQuoteChain.ARBITRUM_MAINNET
|
|
77
|
+
r"""The chain to use."""
|
|
78
|
+
|
|
79
|
+
block: Annotated[
|
|
80
|
+
OptionalNullable[int],
|
|
81
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
82
|
+
] = UNSET
|
|
83
|
+
r"""Optional block number (defaults to latest)."""
|
|
84
|
+
|
|
85
|
+
market_address: Annotated[
|
|
86
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
87
|
+
] = "0x46d62a8dede1bf2d0de04f2ed863245cbba5e538"
|
|
88
|
+
r"""The market address of the desired position."""
|
|
89
|
+
|
|
90
|
+
token_type: Annotated[
|
|
91
|
+
TokenType, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
92
|
+
] = TokenType.PT
|
|
93
|
+
r"""Specifies the token to quote (`PT`, `YT`, or `LP`)"""
|
|
94
|
+
|
|
95
|
+
trade_type: Annotated[
|
|
96
|
+
TradeType, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
97
|
+
] = TradeType.BUY
|
|
98
|
+
r"""Specifies the trade direction (`BUY` or `SELL`)"""
|
|
99
|
+
|
|
100
|
+
@model_serializer(mode="wrap")
|
|
101
|
+
def serialize_model(self, handler):
|
|
102
|
+
optional_fields = ["block"]
|
|
103
|
+
nullable_fields = ["block"]
|
|
104
|
+
null_default_fields = []
|
|
105
|
+
|
|
106
|
+
serialized = handler(self)
|
|
107
|
+
|
|
108
|
+
m = {}
|
|
109
|
+
|
|
110
|
+
for n, f in type(self).model_fields.items():
|
|
111
|
+
k = f.alias or n
|
|
112
|
+
val = serialized.get(k)
|
|
113
|
+
serialized.pop(k, None)
|
|
114
|
+
|
|
115
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
116
|
+
is_set = (
|
|
117
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
118
|
+
or k in null_default_fields
|
|
119
|
+
) # pylint: disable=no-member
|
|
120
|
+
|
|
121
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
122
|
+
m[k] = val
|
|
123
|
+
elif val != UNSET_SENTINEL and (
|
|
124
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
125
|
+
):
|
|
126
|
+
m[k] = val
|
|
127
|
+
|
|
128
|
+
return m
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PendleGetQuoteResponseTypedDict(TypedDict):
|
|
9
|
+
quote: str
|
|
10
|
+
r"""A quote for the specified trade, detailing the expected amount of tokens received based on the `trade_type` and `token_type`."""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PendleGetQuoteResponse(BaseModel):
|
|
14
|
+
quote: str
|
|
15
|
+
r"""A quote for the specified trade, detailing the expected amount of tokens received based on the `trade_type` and `token_type`."""
|