compass_api_sdk 0.0.1__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/__init__.py +17 -0
- compass_api_sdk/_hooks/__init__.py +5 -0
- compass_api_sdk/_hooks/registration.py +13 -0
- compass_api_sdk/_hooks/sdkhooks.py +76 -0
- compass_api_sdk/_hooks/types.py +106 -0
- compass_api_sdk/_version.py +15 -0
- compass_api_sdk/aave_v3.py +1903 -0
- compass_api_sdk/aerodrome_slipstream.py +1875 -0
- compass_api_sdk/basesdk.py +362 -0
- compass_api_sdk/errors/__init__.py +7 -0
- compass_api_sdk/errors/apierror.py +22 -0
- compass_api_sdk/errors/httpvalidationerror.py +21 -0
- compass_api_sdk/httpclient.py +136 -0
- compass_api_sdk/models/__init__.py +777 -0
- compass_api_sdk/models/aave_liquidity_changeop.py +108 -0
- compass_api_sdk/models/aave_token_priceop.py +98 -0
- compass_api_sdk/models/aave_user_position_per_tokenop.py +104 -0
- compass_api_sdk/models/aave_user_position_summaryop.py +35 -0
- compass_api_sdk/models/aaveborrowrequest.py +105 -0
- compass_api_sdk/models/aaveliquiditychangeresponse.py +26 -0
- compass_api_sdk/models/aaverepayrequest.py +105 -0
- compass_api_sdk/models/aavesupplyrequest.py +93 -0
- compass_api_sdk/models/aavetokenpriceresponse.py +15 -0
- compass_api_sdk/models/aaveuserpositionpertokenresponse.py +73 -0
- compass_api_sdk/models/aaveuserpositionsummaryresponse.py +50 -0
- compass_api_sdk/models/aavewithdrawrequest.py +58 -0
- compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +35 -0
- compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +173 -0
- compass_api_sdk/models/aerodromelppositionsresponse.py +21 -0
- compass_api_sdk/models/aerodromeposition.py +70 -0
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +92 -0
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +109 -0
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +186 -0
- compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +57 -0
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +96 -0
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +50 -0
- compass_api_sdk/models/allowanceinforesponse.py +48 -0
- compass_api_sdk/models/balanceinforesponse.py +43 -0
- compass_api_sdk/models/chain.py +12 -0
- compass_api_sdk/models/chaininfo.py +53 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_asset.py +22 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_asset.py +23 -0
- compass_api_sdk/models/ensnameinforesponse.py +24 -0
- compass_api_sdk/models/feeenum.py +16 -0
- compass_api_sdk/models/generic_allowanceop.py +121 -0
- compass_api_sdk/models/generic_balanceop.py +104 -0
- compass_api_sdk/models/generic_ensop.py +35 -0
- compass_api_sdk/models/generic_portfolioop.py +35 -0
- compass_api_sdk/models/generic_price_usdop.py +98 -0
- compass_api_sdk/models/generic_supported_tokensop.py +29 -0
- compass_api_sdk/models/generic_visualize_portfolioop.py +35 -0
- compass_api_sdk/models/image.py +15 -0
- compass_api_sdk/models/increaseallowancerequest.py +77 -0
- compass_api_sdk/models/interestratemode.py +14 -0
- compass_api_sdk/models/marketstate.py +35 -0
- compass_api_sdk/models/morpho_market_positionop.py +39 -0
- compass_api_sdk/models/morpho_marketsop.py +78 -0
- compass_api_sdk/models/morpho_vault_positionop.py +39 -0
- compass_api_sdk/models/morpho_vaultsop.py +72 -0
- compass_api_sdk/models/morphoborrowrequest.py +91 -0
- compass_api_sdk/models/morphocheckmarketpositionresponse.py +23 -0
- compass_api_sdk/models/morphocheckvaultpositionresponse.py +20 -0
- compass_api_sdk/models/morphodepositrequest.py +86 -0
- compass_api_sdk/models/morphogetmarketsresponse.py +17 -0
- compass_api_sdk/models/morphogetvaultsresponse.py +17 -0
- compass_api_sdk/models/morphomarket.py +80 -0
- compass_api_sdk/models/morphorepayrequest.py +79 -0
- compass_api_sdk/models/morphosetvaultallowancerequest.py +44 -0
- compass_api_sdk/models/morphosupplycollateralrequest.py +91 -0
- compass_api_sdk/models/morphovault.py +47 -0
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +91 -0
- compass_api_sdk/models/morphowithdrawrequest.py +74 -0
- compass_api_sdk/models/portfolio.py +22 -0
- compass_api_sdk/models/priceresponse.py +15 -0
- compass_api_sdk/models/security.py +24 -0
- compass_api_sdk/models/token_addressop.py +98 -0
- compass_api_sdk/models/token_balanceop.py +49 -0
- compass_api_sdk/models/token_enum.py +57 -0
- compass_api_sdk/models/token_priceop.py +97 -0
- compass_api_sdk/models/tokenaddressresponse.py +15 -0
- compass_api_sdk/models/tokenbalance.py +49 -0
- compass_api_sdk/models/tokenbalanceresponse.py +44 -0
- compass_api_sdk/models/tokeninfo.py +17 -0
- compass_api_sdk/models/tokenpriceresponse.py +15 -0
- compass_api_sdk/models/tokentransferrequest.py +66 -0
- compass_api_sdk/models/transfererc20request.py +62 -0
- compass_api_sdk/models/transferethrequest.py +46 -0
- compass_api_sdk/models/uniswap_liquidity_provision_in_rangeop.py +34 -0
- compass_api_sdk/models/uniswap_liquidity_provision_positionsop.py +35 -0
- compass_api_sdk/models/uniswap_pool_priceop.py +193 -0
- compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +209 -0
- compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +209 -0
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +104 -0
- compass_api_sdk/models/uniswapbuyquoteinforesponse.py +20 -0
- compass_api_sdk/models/uniswapcheckinrangeresponse.py +15 -0
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +99 -0
- compass_api_sdk/models/uniswaplppositionsinforesponse.py +24 -0
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +185 -0
- compass_api_sdk/models/uniswappoolpriceresponse.py +47 -0
- compass_api_sdk/models/uniswappositionssolidityresponse.py +46 -0
- compass_api_sdk/models/uniswapsellexactlyrequest.py +104 -0
- compass_api_sdk/models/uniswapsellquoteinforesponse.py +20 -0
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +51 -0
- compass_api_sdk/models/unsignedtransaction.py +58 -0
- compass_api_sdk/models/unwrapwethrequest.py +41 -0
- compass_api_sdk/models/validationerror.py +26 -0
- compass_api_sdk/models/vaultstate.py +32 -0
- compass_api_sdk/models/weeklyapys.py +23 -0
- compass_api_sdk/models/wrapethrequest.py +41 -0
- compass_api_sdk/morpho.py +2577 -0
- compass_api_sdk/py.typed +1 -0
- compass_api_sdk/sdk.py +155 -0
- compass_api_sdk/sdkconfiguration.py +56 -0
- compass_api_sdk/token_sdk.py +861 -0
- compass_api_sdk/types/__init__.py +21 -0
- compass_api_sdk/types/basemodel.py +39 -0
- compass_api_sdk/uniswap_v3.py +2551 -0
- compass_api_sdk/universal.py +2625 -0
- compass_api_sdk/utils/__init__.py +100 -0
- compass_api_sdk/utils/annotations.py +55 -0
- compass_api_sdk/utils/datetimes.py +23 -0
- compass_api_sdk/utils/enums.py +74 -0
- compass_api_sdk/utils/eventstreaming.py +238 -0
- compass_api_sdk/utils/forms.py +202 -0
- compass_api_sdk/utils/headers.py +136 -0
- compass_api_sdk/utils/logger.py +22 -0
- compass_api_sdk/utils/metadata.py +118 -0
- compass_api_sdk/utils/queryparams.py +205 -0
- compass_api_sdk/utils/requestbodies.py +66 -0
- compass_api_sdk/utils/retries.py +217 -0
- compass_api_sdk/utils/security.py +174 -0
- compass_api_sdk/utils/serializers.py +248 -0
- compass_api_sdk/utils/url.py +155 -0
- compass_api_sdk/utils/values.py +137 -0
- compass_api_sdk-0.0.1.dist-info/METADATA +534 -0
- compass_api_sdk-0.0.1.dist-info/RECORD +137 -0
- compass_api_sdk-0.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,121 @@
|
|
|
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 import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GenericAllowanceChain(str, Enum):
|
|
12
|
+
r"""The chain to use."""
|
|
13
|
+
|
|
14
|
+
BASE_MAINNET = "base:mainnet"
|
|
15
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
16
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GenericAllowanceToken(str, Enum):
|
|
20
|
+
r"""A class representing the token.
|
|
21
|
+
|
|
22
|
+
This class is used to represent the token in the system. Notice individual
|
|
23
|
+
endpoints' documentation where per chain tokens are presented.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
ONE_INCH = "1INCH"
|
|
27
|
+
AAVE = "AAVE"
|
|
28
|
+
BAL = "BAL"
|
|
29
|
+
CB_BTC = "cbBTC"
|
|
30
|
+
CB_ETH = "cbETH"
|
|
31
|
+
CRV = "CRV"
|
|
32
|
+
CRV_USD = "crvUSD"
|
|
33
|
+
DAI = "DAI"
|
|
34
|
+
ENS = "ENS"
|
|
35
|
+
ET_HX = "ETHx"
|
|
36
|
+
FRAX = "FRAX"
|
|
37
|
+
FXS = "FXS"
|
|
38
|
+
GHO = "GHO"
|
|
39
|
+
KNC = "KNC"
|
|
40
|
+
LDO = "LDO"
|
|
41
|
+
LINK = "LINK"
|
|
42
|
+
LUSD = "LUSD"
|
|
43
|
+
MKR = "MKR"
|
|
44
|
+
OS_ETH = "osETH"
|
|
45
|
+
PYUSD = "PYUSD"
|
|
46
|
+
R_ETH = "rETH"
|
|
47
|
+
RPL = "RPL"
|
|
48
|
+
RS_ETH = "rsETH"
|
|
49
|
+
S_DAI = "sDAI"
|
|
50
|
+
SNX = "SNX"
|
|
51
|
+
STG = "STG"
|
|
52
|
+
S_US_DE = "sUSDe"
|
|
53
|
+
T_BTC = "tBTC"
|
|
54
|
+
UNI = "UNI"
|
|
55
|
+
USDC = "USDC"
|
|
56
|
+
US_DE = "USDe"
|
|
57
|
+
USDS = "USDS"
|
|
58
|
+
USDT = "USDT"
|
|
59
|
+
WBTC = "WBTC"
|
|
60
|
+
WE_ETH = "weETH"
|
|
61
|
+
WETH = "WETH"
|
|
62
|
+
WST_ETH = "wstETH"
|
|
63
|
+
ARB = "ARB"
|
|
64
|
+
EURS = "EURS"
|
|
65
|
+
MAI = "MAI"
|
|
66
|
+
USD_CE = "USDCe"
|
|
67
|
+
AERO = "AERO"
|
|
68
|
+
EUR = "EUR"
|
|
69
|
+
VIRTUAL = "VIRTUAL"
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class GenericAllowanceContractName(str, Enum):
|
|
73
|
+
AAVE_V3_POOL = "AaveV3Pool"
|
|
74
|
+
AERODROME_BASIC_ROUTER = "AerodromeBasicRouter"
|
|
75
|
+
AERODROME_SLIPSTREAM_ROUTER = "AerodromeSlipstreamRouter"
|
|
76
|
+
AERODROME_SLIPSTREAM_NONFUNGIBLE_POSITION_MANAGER = (
|
|
77
|
+
"AerodromeSlipstreamNonfungiblePositionManager"
|
|
78
|
+
)
|
|
79
|
+
UNISWAP_V3_ROUTER = "UniswapV3Router"
|
|
80
|
+
UNISWAP_V3_NFT_POSITION_MANAGER = "UniswapV3NFTPositionManager"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class GenericAllowanceRequestTypedDict(TypedDict):
|
|
84
|
+
chain: NotRequired[GenericAllowanceChain]
|
|
85
|
+
r"""The chain to use."""
|
|
86
|
+
user: NotRequired[str]
|
|
87
|
+
token: NotRequired[GenericAllowanceToken]
|
|
88
|
+
r"""A class representing the token.
|
|
89
|
+
|
|
90
|
+
This class is used to represent the token in the system. Notice individual
|
|
91
|
+
endpoints' documentation where per chain tokens are presented.
|
|
92
|
+
"""
|
|
93
|
+
contract_name: GenericAllowanceContractName
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class GenericAllowanceRequest(BaseModel):
|
|
97
|
+
chain: Annotated[
|
|
98
|
+
Optional[GenericAllowanceChain],
|
|
99
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
100
|
+
] = GenericAllowanceChain.ARBITRUM_MAINNET
|
|
101
|
+
r"""The chain to use."""
|
|
102
|
+
|
|
103
|
+
user: Annotated[
|
|
104
|
+
Optional[str],
|
|
105
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
106
|
+
] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"
|
|
107
|
+
|
|
108
|
+
token: Annotated[
|
|
109
|
+
Optional[GenericAllowanceToken],
|
|
110
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
111
|
+
] = GenericAllowanceToken.USDC
|
|
112
|
+
r"""A class representing the token.
|
|
113
|
+
|
|
114
|
+
This class is used to represent the token in the system. Notice individual
|
|
115
|
+
endpoints' documentation where per chain tokens are presented.
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
contract_name: Annotated[
|
|
119
|
+
GenericAllowanceContractName,
|
|
120
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
121
|
+
] = GenericAllowanceContractName.AAVE_V3_POOL
|
|
@@ -0,0 +1,104 @@
|
|
|
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 import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GenericBalanceChain(str, Enum):
|
|
12
|
+
r"""The chain to use."""
|
|
13
|
+
|
|
14
|
+
BASE_MAINNET = "base:mainnet"
|
|
15
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
16
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GenericBalanceToken(str, Enum):
|
|
20
|
+
r"""A class representing the token.
|
|
21
|
+
|
|
22
|
+
This class is used to represent the token in the system. Notice individual
|
|
23
|
+
endpoints' documentation where per chain tokens are presented.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
ONE_INCH = "1INCH"
|
|
27
|
+
AAVE = "AAVE"
|
|
28
|
+
BAL = "BAL"
|
|
29
|
+
CB_BTC = "cbBTC"
|
|
30
|
+
CB_ETH = "cbETH"
|
|
31
|
+
CRV = "CRV"
|
|
32
|
+
CRV_USD = "crvUSD"
|
|
33
|
+
DAI = "DAI"
|
|
34
|
+
ENS = "ENS"
|
|
35
|
+
ET_HX = "ETHx"
|
|
36
|
+
FRAX = "FRAX"
|
|
37
|
+
FXS = "FXS"
|
|
38
|
+
GHO = "GHO"
|
|
39
|
+
KNC = "KNC"
|
|
40
|
+
LDO = "LDO"
|
|
41
|
+
LINK = "LINK"
|
|
42
|
+
LUSD = "LUSD"
|
|
43
|
+
MKR = "MKR"
|
|
44
|
+
OS_ETH = "osETH"
|
|
45
|
+
PYUSD = "PYUSD"
|
|
46
|
+
R_ETH = "rETH"
|
|
47
|
+
RPL = "RPL"
|
|
48
|
+
RS_ETH = "rsETH"
|
|
49
|
+
S_DAI = "sDAI"
|
|
50
|
+
SNX = "SNX"
|
|
51
|
+
STG = "STG"
|
|
52
|
+
S_US_DE = "sUSDe"
|
|
53
|
+
T_BTC = "tBTC"
|
|
54
|
+
UNI = "UNI"
|
|
55
|
+
USDC = "USDC"
|
|
56
|
+
US_DE = "USDe"
|
|
57
|
+
USDS = "USDS"
|
|
58
|
+
USDT = "USDT"
|
|
59
|
+
WBTC = "WBTC"
|
|
60
|
+
WE_ETH = "weETH"
|
|
61
|
+
WETH = "WETH"
|
|
62
|
+
WST_ETH = "wstETH"
|
|
63
|
+
ARB = "ARB"
|
|
64
|
+
EURS = "EURS"
|
|
65
|
+
MAI = "MAI"
|
|
66
|
+
USD_CE = "USDCe"
|
|
67
|
+
AERO = "AERO"
|
|
68
|
+
EUR = "EUR"
|
|
69
|
+
VIRTUAL = "VIRTUAL"
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class GenericBalanceRequestTypedDict(TypedDict):
|
|
73
|
+
chain: NotRequired[GenericBalanceChain]
|
|
74
|
+
r"""The chain to use."""
|
|
75
|
+
user: NotRequired[str]
|
|
76
|
+
token: NotRequired[GenericBalanceToken]
|
|
77
|
+
r"""A class representing the token.
|
|
78
|
+
|
|
79
|
+
This class is used to represent the token in the system. Notice individual
|
|
80
|
+
endpoints' documentation where per chain tokens are presented.
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class GenericBalanceRequest(BaseModel):
|
|
85
|
+
chain: Annotated[
|
|
86
|
+
Optional[GenericBalanceChain],
|
|
87
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
88
|
+
] = GenericBalanceChain.ARBITRUM_MAINNET
|
|
89
|
+
r"""The chain to use."""
|
|
90
|
+
|
|
91
|
+
user: Annotated[
|
|
92
|
+
Optional[str],
|
|
93
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
94
|
+
] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"
|
|
95
|
+
|
|
96
|
+
token: Annotated[
|
|
97
|
+
Optional[GenericBalanceToken],
|
|
98
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
99
|
+
] = GenericBalanceToken.USDC
|
|
100
|
+
r"""A class representing the token.
|
|
101
|
+
|
|
102
|
+
This class is used to represent the token in the system. Notice individual
|
|
103
|
+
endpoints' documentation where per chain tokens are presented.
|
|
104
|
+
"""
|
|
@@ -0,0 +1,35 @@
|
|
|
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 import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GenericEnsChain(str, Enum):
|
|
12
|
+
r"""The chain to use."""
|
|
13
|
+
|
|
14
|
+
BASE_MAINNET = "base:mainnet"
|
|
15
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
16
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GenericEnsRequestTypedDict(TypedDict):
|
|
20
|
+
chain: NotRequired[GenericEnsChain]
|
|
21
|
+
r"""The chain to use."""
|
|
22
|
+
ens_name: NotRequired[str]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class GenericEnsRequest(BaseModel):
|
|
26
|
+
chain: Annotated[
|
|
27
|
+
Optional[GenericEnsChain],
|
|
28
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
29
|
+
] = GenericEnsChain.ETHEREUM_MAINNET
|
|
30
|
+
r"""The chain to use."""
|
|
31
|
+
|
|
32
|
+
ens_name: Annotated[
|
|
33
|
+
Optional[str],
|
|
34
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
35
|
+
] = "vitalik.eth"
|
|
@@ -0,0 +1,35 @@
|
|
|
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 import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GenericPortfolioChain(str, Enum):
|
|
12
|
+
r"""The chain to use."""
|
|
13
|
+
|
|
14
|
+
BASE_MAINNET = "base:mainnet"
|
|
15
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
16
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GenericPortfolioRequestTypedDict(TypedDict):
|
|
20
|
+
chain: NotRequired[GenericPortfolioChain]
|
|
21
|
+
r"""The chain to use."""
|
|
22
|
+
user: NotRequired[str]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class GenericPortfolioRequest(BaseModel):
|
|
26
|
+
chain: Annotated[
|
|
27
|
+
Optional[GenericPortfolioChain],
|
|
28
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
29
|
+
] = GenericPortfolioChain.ARBITRUM_MAINNET
|
|
30
|
+
r"""The chain to use."""
|
|
31
|
+
|
|
32
|
+
user: Annotated[
|
|
33
|
+
Optional[str],
|
|
34
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
35
|
+
] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"
|
|
@@ -0,0 +1,98 @@
|
|
|
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 import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GenericPriceUsdChain(str, Enum):
|
|
12
|
+
r"""The chain to use."""
|
|
13
|
+
|
|
14
|
+
BASE_MAINNET = "base:mainnet"
|
|
15
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
16
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GenericPriceUsdToken(str, Enum):
|
|
20
|
+
r"""A class representing the token.
|
|
21
|
+
|
|
22
|
+
This class is used to represent the token in the system. Notice individual
|
|
23
|
+
endpoints' documentation where per chain tokens are presented.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
ONE_INCH = "1INCH"
|
|
27
|
+
AAVE = "AAVE"
|
|
28
|
+
BAL = "BAL"
|
|
29
|
+
CB_BTC = "cbBTC"
|
|
30
|
+
CB_ETH = "cbETH"
|
|
31
|
+
CRV = "CRV"
|
|
32
|
+
CRV_USD = "crvUSD"
|
|
33
|
+
DAI = "DAI"
|
|
34
|
+
ENS = "ENS"
|
|
35
|
+
ET_HX = "ETHx"
|
|
36
|
+
FRAX = "FRAX"
|
|
37
|
+
FXS = "FXS"
|
|
38
|
+
GHO = "GHO"
|
|
39
|
+
KNC = "KNC"
|
|
40
|
+
LDO = "LDO"
|
|
41
|
+
LINK = "LINK"
|
|
42
|
+
LUSD = "LUSD"
|
|
43
|
+
MKR = "MKR"
|
|
44
|
+
OS_ETH = "osETH"
|
|
45
|
+
PYUSD = "PYUSD"
|
|
46
|
+
R_ETH = "rETH"
|
|
47
|
+
RPL = "RPL"
|
|
48
|
+
RS_ETH = "rsETH"
|
|
49
|
+
S_DAI = "sDAI"
|
|
50
|
+
SNX = "SNX"
|
|
51
|
+
STG = "STG"
|
|
52
|
+
S_US_DE = "sUSDe"
|
|
53
|
+
T_BTC = "tBTC"
|
|
54
|
+
UNI = "UNI"
|
|
55
|
+
USDC = "USDC"
|
|
56
|
+
US_DE = "USDe"
|
|
57
|
+
USDS = "USDS"
|
|
58
|
+
USDT = "USDT"
|
|
59
|
+
WBTC = "WBTC"
|
|
60
|
+
WE_ETH = "weETH"
|
|
61
|
+
WETH = "WETH"
|
|
62
|
+
WST_ETH = "wstETH"
|
|
63
|
+
ARB = "ARB"
|
|
64
|
+
EURS = "EURS"
|
|
65
|
+
MAI = "MAI"
|
|
66
|
+
USD_CE = "USDCe"
|
|
67
|
+
AERO = "AERO"
|
|
68
|
+
EUR = "EUR"
|
|
69
|
+
VIRTUAL = "VIRTUAL"
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class GenericPriceUsdRequestTypedDict(TypedDict):
|
|
73
|
+
chain: NotRequired[GenericPriceUsdChain]
|
|
74
|
+
r"""The chain to use."""
|
|
75
|
+
token: NotRequired[GenericPriceUsdToken]
|
|
76
|
+
r"""A class representing the token.
|
|
77
|
+
|
|
78
|
+
This class is used to represent the token in the system. Notice individual
|
|
79
|
+
endpoints' documentation where per chain tokens are presented.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class GenericPriceUsdRequest(BaseModel):
|
|
84
|
+
chain: Annotated[
|
|
85
|
+
Optional[GenericPriceUsdChain],
|
|
86
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
87
|
+
] = GenericPriceUsdChain.ARBITRUM_MAINNET
|
|
88
|
+
r"""The chain to use."""
|
|
89
|
+
|
|
90
|
+
token: Annotated[
|
|
91
|
+
Optional[GenericPriceUsdToken],
|
|
92
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
93
|
+
] = GenericPriceUsdToken.WBTC
|
|
94
|
+
r"""A class representing the token.
|
|
95
|
+
|
|
96
|
+
This class is used to represent the token in the system. Notice individual
|
|
97
|
+
endpoints' documentation where per chain tokens are presented.
|
|
98
|
+
"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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 import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GenericSupportedTokensChain(str, Enum):
|
|
12
|
+
r"""The chain to use."""
|
|
13
|
+
|
|
14
|
+
BASE_MAINNET = "base:mainnet"
|
|
15
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
16
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GenericSupportedTokensRequestTypedDict(TypedDict):
|
|
20
|
+
chain: NotRequired[GenericSupportedTokensChain]
|
|
21
|
+
r"""The chain to use."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class GenericSupportedTokensRequest(BaseModel):
|
|
25
|
+
chain: Annotated[
|
|
26
|
+
Optional[GenericSupportedTokensChain],
|
|
27
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
28
|
+
] = GenericSupportedTokensChain.ARBITRUM_MAINNET
|
|
29
|
+
r"""The chain to use."""
|
|
@@ -0,0 +1,35 @@
|
|
|
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 import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GenericVisualizePortfolioChain(str, Enum):
|
|
12
|
+
r"""The chain to use."""
|
|
13
|
+
|
|
14
|
+
BASE_MAINNET = "base:mainnet"
|
|
15
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
16
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GenericVisualizePortfolioRequestTypedDict(TypedDict):
|
|
20
|
+
chain: NotRequired[GenericVisualizePortfolioChain]
|
|
21
|
+
r"""The chain to use."""
|
|
22
|
+
user: NotRequired[str]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class GenericVisualizePortfolioRequest(BaseModel):
|
|
26
|
+
chain: Annotated[
|
|
27
|
+
Optional[GenericVisualizePortfolioChain],
|
|
28
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
29
|
+
] = GenericVisualizePortfolioChain.ARBITRUM_MAINNET
|
|
30
|
+
r"""The chain to use."""
|
|
31
|
+
|
|
32
|
+
user: Annotated[
|
|
33
|
+
Optional[str],
|
|
34
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
35
|
+
] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"
|
|
@@ -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 ImageTypedDict(TypedDict):
|
|
9
|
+
image: str
|
|
10
|
+
r"""Base64 encoded SVG image"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Image(BaseModel):
|
|
14
|
+
image: str
|
|
15
|
+
r"""Base64 encoded SVG image"""
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from .token_enum import TokenEnum
|
|
6
|
+
from compass_api_sdk.types import BaseModel
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Union
|
|
9
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ContractName(str, Enum):
|
|
13
|
+
r"""The name of the contract to increase allowance for."""
|
|
14
|
+
|
|
15
|
+
AAVE_V3_POOL = "AaveV3Pool"
|
|
16
|
+
AERODROME_BASIC_ROUTER = "AerodromeBasicRouter"
|
|
17
|
+
AERODROME_SLIPSTREAM_ROUTER = "AerodromeSlipstreamRouter"
|
|
18
|
+
AERODROME_SLIPSTREAM_NONFUNGIBLE_POSITION_MANAGER = (
|
|
19
|
+
"AerodromeSlipstreamNonfungiblePositionManager"
|
|
20
|
+
)
|
|
21
|
+
UNISWAP_V3_ROUTER = "UniswapV3Router"
|
|
22
|
+
UNISWAP_V3_NFT_POSITION_MANAGER = "UniswapV3NFTPositionManager"
|
|
23
|
+
MORPHO = "Morpho"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
IncreaseAllowanceRequestAmountTypedDict = TypeAliasType(
|
|
27
|
+
"IncreaseAllowanceRequestAmountTypedDict", Union[float, str]
|
|
28
|
+
)
|
|
29
|
+
r"""The amount of tokens to increase the allowance by."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
IncreaseAllowanceRequestAmount = TypeAliasType(
|
|
33
|
+
"IncreaseAllowanceRequestAmount", Union[float, str]
|
|
34
|
+
)
|
|
35
|
+
r"""The amount of tokens to increase the allowance by."""
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class IncreaseAllowanceRequestTypedDict(TypedDict):
|
|
39
|
+
r"""Request model for increasing token allowance for a contract."""
|
|
40
|
+
|
|
41
|
+
token: TokenEnum
|
|
42
|
+
r"""A class representing the token.
|
|
43
|
+
|
|
44
|
+
This class is used to represent the token in the system. Notice individual
|
|
45
|
+
endpoints' documentation where per chain tokens are presented.
|
|
46
|
+
"""
|
|
47
|
+
contract_name: ContractName
|
|
48
|
+
r"""The name of the contract to increase allowance for."""
|
|
49
|
+
amount: IncreaseAllowanceRequestAmountTypedDict
|
|
50
|
+
r"""The amount of tokens to increase the allowance by."""
|
|
51
|
+
chain: Chain
|
|
52
|
+
r"""The chain to use."""
|
|
53
|
+
sender: str
|
|
54
|
+
r"""The address of the transaction sender."""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class IncreaseAllowanceRequest(BaseModel):
|
|
58
|
+
r"""Request model for increasing token allowance for a contract."""
|
|
59
|
+
|
|
60
|
+
token: TokenEnum
|
|
61
|
+
r"""A class representing the token.
|
|
62
|
+
|
|
63
|
+
This class is used to represent the token in the system. Notice individual
|
|
64
|
+
endpoints' documentation where per chain tokens are presented.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
contract_name: ContractName
|
|
68
|
+
r"""The name of the contract to increase allowance for."""
|
|
69
|
+
|
|
70
|
+
amount: IncreaseAllowanceRequestAmount
|
|
71
|
+
r"""The amount of tokens to increase the allowance by."""
|
|
72
|
+
|
|
73
|
+
chain: Chain
|
|
74
|
+
r"""The chain to use."""
|
|
75
|
+
|
|
76
|
+
sender: str
|
|
77
|
+
r"""The address of the transaction sender."""
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from enum import Enum
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class InterestRateMode(str, Enum):
|
|
8
|
+
r"""On AAVE there are 2 different interest modes.
|
|
9
|
+
|
|
10
|
+
A stable (but typically higher rate), or a variable rate.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
STABLE = "stable"
|
|
14
|
+
VARIABLE = "variable"
|
|
@@ -0,0 +1,35 @@
|
|
|
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 MarketStateTypedDict(TypedDict):
|
|
10
|
+
borrow_apy: float
|
|
11
|
+
borrow_assets: int
|
|
12
|
+
borrow_assets_usd: float
|
|
13
|
+
supply_apy: float
|
|
14
|
+
supply_assets: int
|
|
15
|
+
supply_assets_usd: float
|
|
16
|
+
fee: float
|
|
17
|
+
utilization: float
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class MarketState(BaseModel):
|
|
21
|
+
borrow_apy: Annotated[float, pydantic.Field(alias="borrowApy")]
|
|
22
|
+
|
|
23
|
+
borrow_assets: Annotated[int, pydantic.Field(alias="borrowAssets")]
|
|
24
|
+
|
|
25
|
+
borrow_assets_usd: Annotated[float, pydantic.Field(alias="borrowAssetsUsd")]
|
|
26
|
+
|
|
27
|
+
supply_apy: Annotated[float, pydantic.Field(alias="supplyApy")]
|
|
28
|
+
|
|
29
|
+
supply_assets: Annotated[int, pydantic.Field(alias="supplyAssets")]
|
|
30
|
+
|
|
31
|
+
supply_assets_usd: Annotated[float, pydantic.Field(alias="supplyAssetsUsd")]
|
|
32
|
+
|
|
33
|
+
fee: float
|
|
34
|
+
|
|
35
|
+
utilization: float
|
|
@@ -0,0 +1,39 @@
|
|
|
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 import Optional
|
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MorphoMarketPositionChain(str, Enum):
|
|
12
|
+
r"""The chain to use."""
|
|
13
|
+
|
|
14
|
+
BASE_MAINNET = "base:mainnet"
|
|
15
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
16
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class MorphoMarketPositionRequestTypedDict(TypedDict):
|
|
20
|
+
chain: NotRequired[MorphoMarketPositionChain]
|
|
21
|
+
r"""The chain to use."""
|
|
22
|
+
user_address: str
|
|
23
|
+
unique_market_key: str
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class MorphoMarketPositionRequest(BaseModel):
|
|
27
|
+
chain: Annotated[
|
|
28
|
+
Optional[MorphoMarketPositionChain],
|
|
29
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
30
|
+
] = MorphoMarketPositionChain.ETHEREUM_MAINNET
|
|
31
|
+
r"""The chain to use."""
|
|
32
|
+
|
|
33
|
+
user_address: Annotated[
|
|
34
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
35
|
+
] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
|
|
36
|
+
|
|
37
|
+
unique_market_key: Annotated[
|
|
38
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
39
|
+
] = "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4"
|