compass_api_sdk 0.3.5__py3-none-any.whl → 0.3.8__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.
- {compassapisdk → compass_api_sdk}/_hooks/sdkhooks.py +1 -1
- {compassapisdk → compass_api_sdk}/_hooks/types.py +1 -1
- {compassapisdk → compass_api_sdk}/_version.py +3 -3
- {compassapisdk → compass_api_sdk}/aave_v3.py +15 -15
- {compassapisdk → compass_api_sdk}/aerodrome_slipstream.py +3 -3
- {compassapisdk → compass_api_sdk}/basesdk.py +3 -3
- {compassapisdk → compass_api_sdk}/errors/httpvalidationerror.py +3 -3
- {compassapisdk → compass_api_sdk}/models/__init__.py +132 -6
- {compassapisdk → compass_api_sdk}/models/aave_avg_rateop.py +6 -6
- {compassapisdk → compass_api_sdk}/models/aave_historical_transactionsop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_liquidity_changeop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_rateop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_reserve_overviewop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_std_rateop.py +6 -6
- {compassapisdk → compass_api_sdk}/models/aave_token_priceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_user_position_per_tokenop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_user_position_summaryop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aaveavgrateresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaveborrowparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaveborrowrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavehistoricaltransactionsresponse.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aaveliquiditychangeresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavelooprequest.py +3 -3
- {compassapisdk → compass_api_sdk}/models/aaverateresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaverepayparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaverepayrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavereserveoverviewresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavestdrateresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavesupplyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavesupplyrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavetokenpriceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaveuserpositionpertokenresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaveuserpositionsummaryresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavewithdrawparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavewithdrawrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodrome_slipstream_liquidity_provision_positionsop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aerodrome_slipstream_pool_priceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aerodromelppositionsresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeposition.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreambuyexactlyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreambuyexactlyrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamincreaseliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreammintliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreammintliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreampoolpriceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamsellexactlyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamsellexactlyrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamwithdrawliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/allowanceinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/borrow.py +2 -2
- {compassapisdk → compass_api_sdk}/models/chaininfo.py +1 -1
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_apydata.py +19 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_asset.py +62 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_marketstate.py +40 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_vaultstate.py +25 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_market_apydata.py +23 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_market_asset.py +60 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_market_marketstate.py +38 -0
- {compassapisdk → compass_api_sdk}/models/compass_api_backend_models_morpho_read_response_get_markets_asset.py +1 -1
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_marketstate.py +72 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_asset.py +60 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py +53 -0
- {compassapisdk → compass_api_sdk}/models/compass_api_backend_models_morpho_read_response_get_vaults_asset.py +1 -1
- compassapisdk/models/vaultstate.py → compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_vaultstate.py +3 -3
- compass_api_sdk/models/curator.py +53 -0
- {compassapisdk → compass_api_sdk}/models/ensnameinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/generic_allowanceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/generic_ensop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/generic_portfolioop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/generic_supported_tokensop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/generic_visualize_portfolioop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/image.py +1 -1
- {compassapisdk → compass_api_sdk}/models/increaseallowanceanyparams.py +3 -7
- {compassapisdk → compass_api_sdk}/models/increaseallowanceparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/increaseallowancerequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/liquidationcall.py +2 -2
- compass_api_sdk/models/liquidity.py +16 -0
- compass_api_sdk/models/market.py +14 -0
- compass_api_sdk/models/marketposition.py +63 -0
- compass_api_sdk/models/metadata.py +56 -0
- {compassapisdk → compass_api_sdk}/models/morpho_market_positionop.py +2 -2
- compass_api_sdk/models/morpho_marketop.py +30 -0
- {compassapisdk → compass_api_sdk}/models/morpho_marketsop.py +22 -16
- compass_api_sdk/models/morpho_user_positionop.py +30 -0
- {compassapisdk → compass_api_sdk}/models/morpho_vault_positionop.py +2 -2
- compass_api_sdk/models/morpho_vaultop.py +30 -0
- {compassapisdk → compass_api_sdk}/models/morpho_vaultsop.py +18 -12
- {compassapisdk → compass_api_sdk}/models/morphoborrowparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphoborrowrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphocheckmarketpositionresponse.py +1 -1
- compass_api_sdk/models/morphocheckuserpositionresponse.py +32 -0
- {compassapisdk → compass_api_sdk}/models/morphocheckvaultpositionresponse.py +3 -3
- {compassapisdk → compass_api_sdk}/models/morphodepositparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphodepositrequest.py +1 -1
- compass_api_sdk/models/morphogetmarketresponse.py +78 -0
- {compassapisdk → compass_api_sdk}/models/morphogetmarketsresponse.py +1 -1
- compass_api_sdk/models/morphogetvaultresponse.py +47 -0
- {compassapisdk → compass_api_sdk}/models/morphogetvaultsresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphomarket.py +7 -4
- {compassapisdk → compass_api_sdk}/models/morphorepayparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphorepayrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphosetvaultallowanceparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphosetvaultallowancerequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphosupplycollateralparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphosupplycollateralrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphovault.py +7 -4
- {compassapisdk → compass_api_sdk}/models/morphowithdrawcollateralparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphowithdrawcollateralrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphowithdrawparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphowithdrawrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/multicallaction.py +1 -1
- {compassapisdk → compass_api_sdk}/models/multicallauthorizationrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/multicallauthorizationresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/multicallexecuterequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/portfolio.py +1 -1
- {compassapisdk → compass_api_sdk}/models/redeemunderlying.py +1 -1
- {compassapisdk → compass_api_sdk}/models/repay.py +2 -2
- {compassapisdk → compass_api_sdk}/models/reserve.py +1 -1
- {compassapisdk → compass_api_sdk}/models/security.py +2 -2
- {compassapisdk → compass_api_sdk}/models/signedauthorization.py +1 -1
- {compassapisdk → compass_api_sdk}/models/sky_positionop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/skybuyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skybuyrequest.py +2 -2
- {compassapisdk → compass_api_sdk}/models/skycheckpositionresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skydepositparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skydepositrequest.py +2 -2
- {compassapisdk → compass_api_sdk}/models/skysellparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skysellrequest.py +2 -2
- {compassapisdk → compass_api_sdk}/models/skywithdrawparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skywithdrawrequest.py +2 -2
- {compassapisdk → compass_api_sdk}/models/supply.py +2 -2
- {compassapisdk → compass_api_sdk}/models/swapborrowrate.py +2 -2
- {compassapisdk → compass_api_sdk}/models/token_addressop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/token_balanceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/token_priceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/tokenaddressresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokenbalance.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokenbalanceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokeninfo.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokenpriceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokentransfererc20params.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokentransferrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswap_liquidity_provision_in_rangeop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswap_liquidity_provision_positionsop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswap_pool_priceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswap_quote_buy_exactlyop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswap_quote_sell_exactlyop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswapbuyexactlyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapbuyexactlyrequest.py +3 -3
- {compassapisdk → compass_api_sdk}/models/uniswapbuyquoteinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapcheckinrangeresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapincreaseliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapincreaseliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswaplppositionsinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapmintliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapmintliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswappoolpriceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswappositionssolidityresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapsellexactlyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapsellexactlyrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapsellquoteinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapwithdrawliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapwithdrawliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/unsignedmulticalltransaction.py +1 -1
- {compassapisdk → compass_api_sdk}/models/unsignedtransaction.py +1 -1
- {compassapisdk → compass_api_sdk}/models/unwrapwethparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/unwrapwethrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/usageascollateral.py +2 -2
- compass_api_sdk/models/userstate.py +33 -0
- {compassapisdk → compass_api_sdk}/models/validationerror.py +1 -1
- compass_api_sdk/models/vault.py +58 -0
- compass_api_sdk/models/vaultposition.py +24 -0
- {compassapisdk → compass_api_sdk}/models/weeklyapys.py +1 -1
- {compassapisdk → compass_api_sdk}/models/wrapethparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/wrapethrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/morpho.py +646 -42
- {compassapisdk → compass_api_sdk}/sdk.py +12 -12
- {compassapisdk → compass_api_sdk}/sdkconfiguration.py +2 -2
- {compassapisdk → compass_api_sdk}/sky.py +3 -7
- {compassapisdk → compass_api_sdk}/token_sdk.py +5 -5
- {compassapisdk → compass_api_sdk}/transaction_batching.py +3 -3
- {compassapisdk → compass_api_sdk}/uniswap_v3.py +3 -3
- {compassapisdk → compass_api_sdk}/universal.py +5 -5
- {compass_api_sdk-0.3.5.dist-info → compass_api_sdk-0.3.8.dist-info}/METADATA +53 -57
- compass_api_sdk-0.3.8.dist-info/RECORD +218 -0
- compass_api_sdk-0.3.5.dist-info/RECORD +0 -195
- compassapisdk/models/marketstate.py +0 -35
- {compassapisdk → compass_api_sdk}/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/_hooks/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/errors/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/errors/apierror.py +0 -0
- {compassapisdk → compass_api_sdk}/httpclient.py +0 -0
- {compassapisdk → compass_api_sdk}/models/chain.py +0 -0
- {compassapisdk → compass_api_sdk}/models/contractname.py +0 -0
- {compassapisdk → compass_api_sdk}/models/feeenum.py +0 -0
- {compassapisdk → compass_api_sdk}/models/interestratemode.py +0 -0
- {compassapisdk → compass_api_sdk}/models/multicallactiontype.py +0 -0
- {compassapisdk → compass_api_sdk}/models/token_enum.py +0 -0
- {compassapisdk → compass_api_sdk}/py.typed +0 -0
- {compassapisdk → compass_api_sdk}/types/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/types/basemodel.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/annotations.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/datetimes.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/enums.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/eventstreaming.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/forms.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/headers.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/logger.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/metadata.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/queryparams.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/requestbodies.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/retries.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/security.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/serializers.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/url.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/values.py +0 -0
- {compass_api_sdk-0.3.5.dist-info → compass_api_sdk-0.3.8.dist-info}/WHEEL +0 -0
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_marketstate.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
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 CompassAPIBackendModelsMorphoReadResponseGetMarketsMarketStateTypedDict(
|
|
11
|
+
TypedDict
|
|
12
|
+
):
|
|
13
|
+
borrow_apy: float
|
|
14
|
+
borrow_assets: int
|
|
15
|
+
borrow_assets_usd: Nullable[float]
|
|
16
|
+
supply_apy: float
|
|
17
|
+
supply_assets: int
|
|
18
|
+
supply_assets_usd: Nullable[float]
|
|
19
|
+
fee: float
|
|
20
|
+
utilization: float
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CompassAPIBackendModelsMorphoReadResponseGetMarketsMarketState(BaseModel):
|
|
24
|
+
borrow_apy: Annotated[float, pydantic.Field(alias="borrowApy")]
|
|
25
|
+
|
|
26
|
+
borrow_assets: Annotated[int, pydantic.Field(alias="borrowAssets")]
|
|
27
|
+
|
|
28
|
+
borrow_assets_usd: Annotated[
|
|
29
|
+
Nullable[float], pydantic.Field(alias="borrowAssetsUsd")
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
supply_apy: Annotated[float, pydantic.Field(alias="supplyApy")]
|
|
33
|
+
|
|
34
|
+
supply_assets: Annotated[int, pydantic.Field(alias="supplyAssets")]
|
|
35
|
+
|
|
36
|
+
supply_assets_usd: Annotated[
|
|
37
|
+
Nullable[float], pydantic.Field(alias="supplyAssetsUsd")
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
fee: float
|
|
41
|
+
|
|
42
|
+
utilization: float
|
|
43
|
+
|
|
44
|
+
@model_serializer(mode="wrap")
|
|
45
|
+
def serialize_model(self, handler):
|
|
46
|
+
optional_fields = []
|
|
47
|
+
nullable_fields = ["borrowAssetsUsd", "supplyAssetsUsd"]
|
|
48
|
+
null_default_fields = []
|
|
49
|
+
|
|
50
|
+
serialized = handler(self)
|
|
51
|
+
|
|
52
|
+
m = {}
|
|
53
|
+
|
|
54
|
+
for n, f in type(self).model_fields.items():
|
|
55
|
+
k = f.alias or n
|
|
56
|
+
val = serialized.get(k)
|
|
57
|
+
serialized.pop(k, None)
|
|
58
|
+
|
|
59
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
60
|
+
is_set = (
|
|
61
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
62
|
+
or k in null_default_fields
|
|
63
|
+
) # pylint: disable=no-member
|
|
64
|
+
|
|
65
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
66
|
+
m[k] = val
|
|
67
|
+
elif val != UNSET_SENTINEL and (
|
|
68
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
69
|
+
):
|
|
70
|
+
m[k] = val
|
|
71
|
+
|
|
72
|
+
return m
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
import pydantic
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CompassAPIBackendModelsMorphoReadResponseGetVaultVaultStateTypedDict(TypedDict):
|
|
10
|
+
apy: str
|
|
11
|
+
net_apy: str
|
|
12
|
+
daily_apy: str
|
|
13
|
+
daily_net_apy: str
|
|
14
|
+
weekly_apy: str
|
|
15
|
+
weekly_net_apy: str
|
|
16
|
+
monthly_apy: str
|
|
17
|
+
monthly_net_apy: str
|
|
18
|
+
yearly_apy: str
|
|
19
|
+
yearly_net_apy: str
|
|
20
|
+
all_time_apy: str
|
|
21
|
+
all_time_net_apy: str
|
|
22
|
+
total_assets: str
|
|
23
|
+
total_assets_usd: str
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class CompassAPIBackendModelsMorphoReadResponseGetVaultVaultState(BaseModel):
|
|
27
|
+
apy: str
|
|
28
|
+
|
|
29
|
+
net_apy: Annotated[str, pydantic.Field(alias="netApy")]
|
|
30
|
+
|
|
31
|
+
daily_apy: Annotated[str, pydantic.Field(alias="dailyApy")]
|
|
32
|
+
|
|
33
|
+
daily_net_apy: Annotated[str, pydantic.Field(alias="dailyNetApy")]
|
|
34
|
+
|
|
35
|
+
weekly_apy: Annotated[str, pydantic.Field(alias="weeklyApy")]
|
|
36
|
+
|
|
37
|
+
weekly_net_apy: Annotated[str, pydantic.Field(alias="weeklyNetApy")]
|
|
38
|
+
|
|
39
|
+
monthly_apy: Annotated[str, pydantic.Field(alias="monthlyApy")]
|
|
40
|
+
|
|
41
|
+
monthly_net_apy: Annotated[str, pydantic.Field(alias="monthlyNetApy")]
|
|
42
|
+
|
|
43
|
+
yearly_apy: Annotated[str, pydantic.Field(alias="yearlyApy")]
|
|
44
|
+
|
|
45
|
+
yearly_net_apy: Annotated[str, pydantic.Field(alias="yearlyNetApy")]
|
|
46
|
+
|
|
47
|
+
all_time_apy: Annotated[str, pydantic.Field(alias="allTimeApy")]
|
|
48
|
+
|
|
49
|
+
all_time_net_apy: Annotated[str, pydantic.Field(alias="allTimeNetApy")]
|
|
50
|
+
|
|
51
|
+
total_assets: Annotated[str, pydantic.Field(alias="totalAssets")]
|
|
52
|
+
|
|
53
|
+
total_assets_usd: Annotated[str, pydantic.Field(alias="totalAssetsUsd")]
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
5
|
import pydantic
|
|
6
6
|
from typing_extensions import Annotated, TypedDict
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class CompassAPIBackendModelsMorphoReadResponseGetVaultsVaultStateTypedDict(TypedDict):
|
|
10
10
|
id: str
|
|
11
11
|
apy: float
|
|
12
12
|
net_apy: float
|
|
@@ -16,7 +16,7 @@ class VaultStateTypedDict(TypedDict):
|
|
|
16
16
|
timelock: int
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class
|
|
19
|
+
class CompassAPIBackendModelsMorphoReadResponseGetVaultsVaultState(BaseModel):
|
|
20
20
|
id: str
|
|
21
21
|
|
|
22
22
|
apy: float
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
from pydantic import model_serializer
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CuratorTypedDict(TypedDict):
|
|
10
|
+
name: str
|
|
11
|
+
verified: bool
|
|
12
|
+
url: Nullable[str]
|
|
13
|
+
image: Nullable[str]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Curator(BaseModel):
|
|
17
|
+
name: str
|
|
18
|
+
|
|
19
|
+
verified: bool
|
|
20
|
+
|
|
21
|
+
url: Nullable[str]
|
|
22
|
+
|
|
23
|
+
image: Nullable[str]
|
|
24
|
+
|
|
25
|
+
@model_serializer(mode="wrap")
|
|
26
|
+
def serialize_model(self, handler):
|
|
27
|
+
optional_fields = []
|
|
28
|
+
nullable_fields = ["url", "image"]
|
|
29
|
+
null_default_fields = []
|
|
30
|
+
|
|
31
|
+
serialized = handler(self)
|
|
32
|
+
|
|
33
|
+
m = {}
|
|
34
|
+
|
|
35
|
+
for n, f in type(self).model_fields.items():
|
|
36
|
+
k = f.alias or n
|
|
37
|
+
val = serialized.get(k)
|
|
38
|
+
serialized.pop(k, None)
|
|
39
|
+
|
|
40
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
41
|
+
is_set = (
|
|
42
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
43
|
+
or k in null_default_fields
|
|
44
|
+
) # pylint: disable=no-member
|
|
45
|
+
|
|
46
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
47
|
+
m[k] = val
|
|
48
|
+
elif val != UNSET_SENTINEL and (
|
|
49
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
50
|
+
):
|
|
51
|
+
m[k] = val
|
|
52
|
+
|
|
53
|
+
return m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from typing import Optional
|
|
8
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from typing import Optional
|
|
8
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from typing import Optional
|
|
8
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from typing_extensions import Annotated, TypedDict
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from typing import Optional
|
|
8
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .contractname import ContractName
|
|
5
5
|
from .token_enum import TokenEnum
|
|
6
|
-
from
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
7
|
from typing import Union
|
|
8
8
|
from typing_extensions import TypeAliasType, TypedDict
|
|
9
9
|
|
|
@@ -21,9 +21,7 @@ r"""The amount of tokens to increase the allowance by."""
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
class IncreaseAllowanceAnyParamsTypedDict(TypedDict):
|
|
24
|
-
r"""Parameters model for increasing allowance for any arbitrary ERC20
|
|
25
|
-
address.
|
|
26
|
-
"""
|
|
24
|
+
r"""Parameters model for increasing allowance for any arbitrary ERC20 address."""
|
|
27
25
|
|
|
28
26
|
token: TokenEnum
|
|
29
27
|
r"""A class representing the token.
|
|
@@ -41,9 +39,7 @@ class IncreaseAllowanceAnyParamsTypedDict(TypedDict):
|
|
|
41
39
|
|
|
42
40
|
|
|
43
41
|
class IncreaseAllowanceAnyParams(BaseModel):
|
|
44
|
-
r"""Parameters model for increasing allowance for any arbitrary ERC20
|
|
45
|
-
address.
|
|
46
|
-
"""
|
|
42
|
+
r"""Parameters model for increasing allowance for any arbitrary ERC20 address."""
|
|
47
43
|
|
|
48
44
|
token: TokenEnum
|
|
49
45
|
r"""A class representing the token.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .token_enum import TokenEnum
|
|
5
|
-
from
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from typing import Union
|
|
8
8
|
from typing_extensions import TypeAliasType, TypedDict
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .chain import Chain
|
|
5
5
|
from .token_enum import TokenEnum
|
|
6
|
-
from
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
7
|
from enum import Enum
|
|
8
8
|
from typing import Union
|
|
9
9
|
from typing_extensions import TypeAliasType, TypedDict
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .reserve import Reserve, ReserveTypedDict
|
|
5
|
-
from
|
|
6
|
-
from
|
|
5
|
+
from compass_api_sdk.types import BaseModel
|
|
6
|
+
from compass_api_sdk.utils import validate_const
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal
|
|
@@ -0,0 +1,16 @@
|
|
|
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 LiquidityTypedDict(TypedDict):
|
|
9
|
+
underlying: str
|
|
10
|
+
usd: str
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Liquidity(BaseModel):
|
|
14
|
+
underlying: str
|
|
15
|
+
|
|
16
|
+
usd: str
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
import pydantic
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class MarketTypedDict(TypedDict):
|
|
10
|
+
unique_key: str
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Market(BaseModel):
|
|
14
|
+
unique_key: Annotated[str, pydantic.Field(alias="uniqueKey")]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .compass_api_backend_models_morpho_read_response_check_user_position_marketstate import (
|
|
5
|
+
CompassAPIBackendModelsMorphoReadResponseCheckUserPositionMarketState,
|
|
6
|
+
CompassAPIBackendModelsMorphoReadResponseCheckUserPositionMarketStateTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from .market import Market, MarketTypedDict
|
|
9
|
+
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
10
|
+
import pydantic
|
|
11
|
+
from pydantic import model_serializer
|
|
12
|
+
from typing_extensions import Annotated, TypedDict
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class MarketPositionTypedDict(TypedDict):
|
|
16
|
+
market: MarketTypedDict
|
|
17
|
+
health_factor: Nullable[str]
|
|
18
|
+
price_variation_to_liquidation_price: Nullable[str]
|
|
19
|
+
state: (
|
|
20
|
+
CompassAPIBackendModelsMorphoReadResponseCheckUserPositionMarketStateTypedDict
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class MarketPosition(BaseModel):
|
|
25
|
+
market: Market
|
|
26
|
+
|
|
27
|
+
health_factor: Annotated[Nullable[str], pydantic.Field(alias="healthFactor")]
|
|
28
|
+
|
|
29
|
+
price_variation_to_liquidation_price: Annotated[
|
|
30
|
+
Nullable[str], pydantic.Field(alias="priceVariationToLiquidationPrice")
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
state: CompassAPIBackendModelsMorphoReadResponseCheckUserPositionMarketState
|
|
34
|
+
|
|
35
|
+
@model_serializer(mode="wrap")
|
|
36
|
+
def serialize_model(self, handler):
|
|
37
|
+
optional_fields = []
|
|
38
|
+
nullable_fields = ["healthFactor", "priceVariationToLiquidationPrice"]
|
|
39
|
+
null_default_fields = []
|
|
40
|
+
|
|
41
|
+
serialized = handler(self)
|
|
42
|
+
|
|
43
|
+
m = {}
|
|
44
|
+
|
|
45
|
+
for n, f in type(self).model_fields.items():
|
|
46
|
+
k = f.alias or n
|
|
47
|
+
val = serialized.get(k)
|
|
48
|
+
serialized.pop(k, None)
|
|
49
|
+
|
|
50
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
51
|
+
is_set = (
|
|
52
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
53
|
+
or k in null_default_fields
|
|
54
|
+
) # pylint: disable=no-member
|
|
55
|
+
|
|
56
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
57
|
+
m[k] = val
|
|
58
|
+
elif val != UNSET_SENTINEL and (
|
|
59
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
60
|
+
):
|
|
61
|
+
m[k] = val
|
|
62
|
+
|
|
63
|
+
return m
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .curator import Curator, CuratorTypedDict
|
|
5
|
+
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic import model_serializer
|
|
8
|
+
from typing import List
|
|
9
|
+
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class MetadataTypedDict(TypedDict):
|
|
13
|
+
description: Nullable[str]
|
|
14
|
+
image: Nullable[str]
|
|
15
|
+
forum_link: Nullable[str]
|
|
16
|
+
curators: List[CuratorTypedDict]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Metadata(BaseModel):
|
|
20
|
+
description: Nullable[str]
|
|
21
|
+
|
|
22
|
+
image: Nullable[str]
|
|
23
|
+
|
|
24
|
+
forum_link: Annotated[Nullable[str], pydantic.Field(alias="forumLink")]
|
|
25
|
+
|
|
26
|
+
curators: List[Curator]
|
|
27
|
+
|
|
28
|
+
@model_serializer(mode="wrap")
|
|
29
|
+
def serialize_model(self, handler):
|
|
30
|
+
optional_fields = []
|
|
31
|
+
nullable_fields = ["description", "image", "forumLink"]
|
|
32
|
+
null_default_fields = []
|
|
33
|
+
|
|
34
|
+
serialized = handler(self)
|
|
35
|
+
|
|
36
|
+
m = {}
|
|
37
|
+
|
|
38
|
+
for n, f in type(self).model_fields.items():
|
|
39
|
+
k = f.alias or n
|
|
40
|
+
val = serialized.get(k)
|
|
41
|
+
serialized.pop(k, None)
|
|
42
|
+
|
|
43
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
44
|
+
is_set = (
|
|
45
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
46
|
+
or k in null_default_fields
|
|
47
|
+
) # pylint: disable=no-member
|
|
48
|
+
|
|
49
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
50
|
+
m[k] = val
|
|
51
|
+
elif val != UNSET_SENTINEL and (
|
|
52
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
53
|
+
):
|
|
54
|
+
m[k] = val
|
|
55
|
+
|
|
56
|
+
return m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from typing_extensions import Annotated, TypedDict
|
|
8
8
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
|
+
from enum import Enum
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MorphoMarketChain(str, Enum):
|
|
11
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
12
|
+
BASE_MAINNET = "base:mainnet"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class MorphoMarketRequestTypedDict(TypedDict):
|
|
16
|
+
chain: MorphoMarketChain
|
|
17
|
+
unique_market_key: str
|
|
18
|
+
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class MorphoMarketRequest(BaseModel):
|
|
22
|
+
chain: Annotated[
|
|
23
|
+
MorphoMarketChain,
|
|
24
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
25
|
+
] = MorphoMarketChain.ETHEREUM_MAINNET
|
|
26
|
+
|
|
27
|
+
unique_market_key: Annotated[
|
|
28
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
29
|
+
] = "0x83b7ad16905809ea36482f4fbf6cfee9c9f316d128de9a5da1952607d5e4df5e"
|
|
30
|
+
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|