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,108 @@
|
|
|
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 AaveLiquidityChangeChain(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 AaveLiquidityChangeToken(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 AaveLiquidityChangeRequestTypedDict(TypedDict):
|
|
73
|
+
chain: NotRequired[AaveLiquidityChangeChain]
|
|
74
|
+
r"""The chain to use."""
|
|
75
|
+
token: NotRequired[AaveLiquidityChangeToken]
|
|
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
|
+
start_block: int
|
|
82
|
+
end_block: int
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class AaveLiquidityChangeRequest(BaseModel):
|
|
86
|
+
chain: Annotated[
|
|
87
|
+
Optional[AaveLiquidityChangeChain],
|
|
88
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
89
|
+
] = AaveLiquidityChangeChain.ARBITRUM_MAINNET
|
|
90
|
+
r"""The chain to use."""
|
|
91
|
+
|
|
92
|
+
token: Annotated[
|
|
93
|
+
Optional[AaveLiquidityChangeToken],
|
|
94
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
95
|
+
] = AaveLiquidityChangeToken.USDC
|
|
96
|
+
r"""A class representing the token.
|
|
97
|
+
|
|
98
|
+
This class is used to represent the token in the system. Notice individual
|
|
99
|
+
endpoints' documentation where per chain tokens are presented.
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
start_block: Annotated[
|
|
103
|
+
int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
104
|
+
] = 0
|
|
105
|
+
|
|
106
|
+
end_block: Annotated[
|
|
107
|
+
int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
108
|
+
] = 319407231
|
|
@@ -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 AaveTokenPriceChain(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 AaveTokenPriceToken(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 AaveTokenPriceRequestTypedDict(TypedDict):
|
|
73
|
+
chain: NotRequired[AaveTokenPriceChain]
|
|
74
|
+
r"""The chain to use."""
|
|
75
|
+
token: NotRequired[AaveTokenPriceToken]
|
|
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 AaveTokenPriceRequest(BaseModel):
|
|
84
|
+
chain: Annotated[
|
|
85
|
+
Optional[AaveTokenPriceChain],
|
|
86
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
87
|
+
] = AaveTokenPriceChain.ARBITRUM_MAINNET
|
|
88
|
+
r"""The chain to use."""
|
|
89
|
+
|
|
90
|
+
token: Annotated[
|
|
91
|
+
Optional[AaveTokenPriceToken],
|
|
92
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
93
|
+
] = AaveTokenPriceToken.USDC
|
|
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,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 AaveUserPositionPerTokenChain(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 AaveUserPositionPerTokenToken(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 AaveUserPositionPerTokenRequestTypedDict(TypedDict):
|
|
73
|
+
chain: NotRequired[AaveUserPositionPerTokenChain]
|
|
74
|
+
r"""The chain to use."""
|
|
75
|
+
user: NotRequired[str]
|
|
76
|
+
token: NotRequired[AaveUserPositionPerTokenToken]
|
|
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 AaveUserPositionPerTokenRequest(BaseModel):
|
|
85
|
+
chain: Annotated[
|
|
86
|
+
Optional[AaveUserPositionPerTokenChain],
|
|
87
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
88
|
+
] = AaveUserPositionPerTokenChain.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[AaveUserPositionPerTokenToken],
|
|
98
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
99
|
+
] = AaveUserPositionPerTokenToken.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 AaveUserPositionSummaryChain(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 AaveUserPositionSummaryRequestTypedDict(TypedDict):
|
|
20
|
+
chain: NotRequired[AaveUserPositionSummaryChain]
|
|
21
|
+
r"""The chain to use."""
|
|
22
|
+
user: NotRequired[str]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class AaveUserPositionSummaryRequest(BaseModel):
|
|
26
|
+
chain: Annotated[
|
|
27
|
+
Optional[AaveUserPositionSummaryChain],
|
|
28
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
29
|
+
] = AaveUserPositionSummaryChain.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,105 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from .interestratemode import InterestRateMode
|
|
6
|
+
from .token_enum import TokenEnum
|
|
7
|
+
from compass_api_sdk.types import (
|
|
8
|
+
BaseModel,
|
|
9
|
+
Nullable,
|
|
10
|
+
OptionalNullable,
|
|
11
|
+
UNSET,
|
|
12
|
+
UNSET_SENTINEL,
|
|
13
|
+
)
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from typing import Union
|
|
16
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
AaveBorrowRequestAmountTypedDict = TypeAliasType(
|
|
20
|
+
"AaveBorrowRequestAmountTypedDict", Union[float, str]
|
|
21
|
+
)
|
|
22
|
+
r"""The amount of the asset to borrow"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
AaveBorrowRequestAmount = TypeAliasType("AaveBorrowRequestAmount", Union[float, str])
|
|
26
|
+
r"""The amount of the asset to borrow"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class AaveBorrowRequestTypedDict(TypedDict):
|
|
30
|
+
token: TokenEnum
|
|
31
|
+
r"""A class representing the token.
|
|
32
|
+
|
|
33
|
+
This class is used to represent the token in the system. Notice individual
|
|
34
|
+
endpoints' documentation where per chain tokens are presented.
|
|
35
|
+
"""
|
|
36
|
+
amount: AaveBorrowRequestAmountTypedDict
|
|
37
|
+
r"""The amount of the asset to borrow"""
|
|
38
|
+
interest_rate_mode: InterestRateMode
|
|
39
|
+
r"""On AAVE there are 2 different interest modes.
|
|
40
|
+
|
|
41
|
+
A stable (but typically higher rate), or a variable rate.
|
|
42
|
+
"""
|
|
43
|
+
chain: Chain
|
|
44
|
+
r"""The chain to use."""
|
|
45
|
+
sender: str
|
|
46
|
+
r"""The address of the transaction sender."""
|
|
47
|
+
on_behalf_of: NotRequired[Nullable[str]]
|
|
48
|
+
r"""The address on behalf of whom the supply is made"""
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class AaveBorrowRequest(BaseModel):
|
|
52
|
+
token: TokenEnum
|
|
53
|
+
r"""A class representing the token.
|
|
54
|
+
|
|
55
|
+
This class is used to represent the token in the system. Notice individual
|
|
56
|
+
endpoints' documentation where per chain tokens are presented.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
amount: AaveBorrowRequestAmount
|
|
60
|
+
r"""The amount of the asset to borrow"""
|
|
61
|
+
|
|
62
|
+
interest_rate_mode: InterestRateMode
|
|
63
|
+
r"""On AAVE there are 2 different interest modes.
|
|
64
|
+
|
|
65
|
+
A stable (but typically higher rate), or a variable rate.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
chain: Chain
|
|
69
|
+
r"""The chain to use."""
|
|
70
|
+
|
|
71
|
+
sender: str
|
|
72
|
+
r"""The address of the transaction sender."""
|
|
73
|
+
|
|
74
|
+
on_behalf_of: OptionalNullable[str] = UNSET
|
|
75
|
+
r"""The address on behalf of whom the supply is made"""
|
|
76
|
+
|
|
77
|
+
@model_serializer(mode="wrap")
|
|
78
|
+
def serialize_model(self, handler):
|
|
79
|
+
optional_fields = ["on_behalf_of"]
|
|
80
|
+
nullable_fields = ["on_behalf_of"]
|
|
81
|
+
null_default_fields = []
|
|
82
|
+
|
|
83
|
+
serialized = handler(self)
|
|
84
|
+
|
|
85
|
+
m = {}
|
|
86
|
+
|
|
87
|
+
for n, f in type(self).model_fields.items():
|
|
88
|
+
k = f.alias or n
|
|
89
|
+
val = serialized.get(k)
|
|
90
|
+
serialized.pop(k, None)
|
|
91
|
+
|
|
92
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
93
|
+
is_set = (
|
|
94
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
95
|
+
or k in null_default_fields
|
|
96
|
+
) # pylint: disable=no-member
|
|
97
|
+
|
|
98
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
99
|
+
m[k] = val
|
|
100
|
+
elif val != UNSET_SENTINEL and (
|
|
101
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
102
|
+
):
|
|
103
|
+
m[k] = val
|
|
104
|
+
|
|
105
|
+
return m
|
|
@@ -0,0 +1,26 @@
|
|
|
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 datetime import datetime
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AaveLiquidityChangeResponseTypedDict(TypedDict):
|
|
10
|
+
liquidity_change: str
|
|
11
|
+
r"""The change in the liquidity index between the two times, expressed as a percentage."""
|
|
12
|
+
start_time: datetime
|
|
13
|
+
r"""Dateime of starting block"""
|
|
14
|
+
end_time: datetime
|
|
15
|
+
r"""Dateime of ending block"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class AaveLiquidityChangeResponse(BaseModel):
|
|
19
|
+
liquidity_change: str
|
|
20
|
+
r"""The change in the liquidity index between the two times, expressed as a percentage."""
|
|
21
|
+
|
|
22
|
+
start_time: datetime
|
|
23
|
+
r"""Dateime of starting block"""
|
|
24
|
+
|
|
25
|
+
end_time: datetime
|
|
26
|
+
r"""Dateime of ending block"""
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .chain import Chain
|
|
5
|
+
from .interestratemode import InterestRateMode
|
|
6
|
+
from .token_enum import TokenEnum
|
|
7
|
+
from compass_api_sdk.types import (
|
|
8
|
+
BaseModel,
|
|
9
|
+
Nullable,
|
|
10
|
+
OptionalNullable,
|
|
11
|
+
UNSET,
|
|
12
|
+
UNSET_SENTINEL,
|
|
13
|
+
)
|
|
14
|
+
from pydantic import model_serializer
|
|
15
|
+
from typing import Union
|
|
16
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
AaveRepayRequestAmountTypedDict = TypeAliasType(
|
|
20
|
+
"AaveRepayRequestAmountTypedDict", Union[float, str]
|
|
21
|
+
)
|
|
22
|
+
r"""The amount of the asset to repay"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
AaveRepayRequestAmount = TypeAliasType("AaveRepayRequestAmount", Union[float, str])
|
|
26
|
+
r"""The amount of the asset to repay"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class AaveRepayRequestTypedDict(TypedDict):
|
|
30
|
+
token: TokenEnum
|
|
31
|
+
r"""A class representing the token.
|
|
32
|
+
|
|
33
|
+
This class is used to represent the token in the system. Notice individual
|
|
34
|
+
endpoints' documentation where per chain tokens are presented.
|
|
35
|
+
"""
|
|
36
|
+
amount: AaveRepayRequestAmountTypedDict
|
|
37
|
+
r"""The amount of the asset to repay"""
|
|
38
|
+
interest_rate_mode: InterestRateMode
|
|
39
|
+
r"""On AAVE there are 2 different interest modes.
|
|
40
|
+
|
|
41
|
+
A stable (but typically higher rate), or a variable rate.
|
|
42
|
+
"""
|
|
43
|
+
chain: Chain
|
|
44
|
+
r"""The chain to use."""
|
|
45
|
+
sender: str
|
|
46
|
+
r"""The address of the transaction sender."""
|
|
47
|
+
on_behalf_of: NotRequired[Nullable[str]]
|
|
48
|
+
r"""The address on behalf of whom the supply is made"""
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class AaveRepayRequest(BaseModel):
|
|
52
|
+
token: TokenEnum
|
|
53
|
+
r"""A class representing the token.
|
|
54
|
+
|
|
55
|
+
This class is used to represent the token in the system. Notice individual
|
|
56
|
+
endpoints' documentation where per chain tokens are presented.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
amount: AaveRepayRequestAmount
|
|
60
|
+
r"""The amount of the asset to repay"""
|
|
61
|
+
|
|
62
|
+
interest_rate_mode: InterestRateMode
|
|
63
|
+
r"""On AAVE there are 2 different interest modes.
|
|
64
|
+
|
|
65
|
+
A stable (but typically higher rate), or a variable rate.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
chain: Chain
|
|
69
|
+
r"""The chain to use."""
|
|
70
|
+
|
|
71
|
+
sender: str
|
|
72
|
+
r"""The address of the transaction sender."""
|
|
73
|
+
|
|
74
|
+
on_behalf_of: OptionalNullable[str] = UNSET
|
|
75
|
+
r"""The address on behalf of whom the supply is made"""
|
|
76
|
+
|
|
77
|
+
@model_serializer(mode="wrap")
|
|
78
|
+
def serialize_model(self, handler):
|
|
79
|
+
optional_fields = ["on_behalf_of"]
|
|
80
|
+
nullable_fields = ["on_behalf_of"]
|
|
81
|
+
null_default_fields = []
|
|
82
|
+
|
|
83
|
+
serialized = handler(self)
|
|
84
|
+
|
|
85
|
+
m = {}
|
|
86
|
+
|
|
87
|
+
for n, f in type(self).model_fields.items():
|
|
88
|
+
k = f.alias or n
|
|
89
|
+
val = serialized.get(k)
|
|
90
|
+
serialized.pop(k, None)
|
|
91
|
+
|
|
92
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
93
|
+
is_set = (
|
|
94
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
95
|
+
or k in null_default_fields
|
|
96
|
+
) # pylint: disable=no-member
|
|
97
|
+
|
|
98
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
99
|
+
m[k] = val
|
|
100
|
+
elif val != UNSET_SENTINEL and (
|
|
101
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
102
|
+
):
|
|
103
|
+
m[k] = val
|
|
104
|
+
|
|
105
|
+
return m
|
|
@@ -0,0 +1,93 @@
|
|
|
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 (
|
|
7
|
+
BaseModel,
|
|
8
|
+
Nullable,
|
|
9
|
+
OptionalNullable,
|
|
10
|
+
UNSET,
|
|
11
|
+
UNSET_SENTINEL,
|
|
12
|
+
)
|
|
13
|
+
from pydantic import model_serializer
|
|
14
|
+
from typing import Union
|
|
15
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
AaveSupplyRequestAmountTypedDict = TypeAliasType(
|
|
19
|
+
"AaveSupplyRequestAmountTypedDict", Union[float, str]
|
|
20
|
+
)
|
|
21
|
+
r"""The amount of the asset to supply"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
AaveSupplyRequestAmount = TypeAliasType("AaveSupplyRequestAmount", Union[float, str])
|
|
25
|
+
r"""The amount of the asset to supply"""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class AaveSupplyRequestTypedDict(TypedDict):
|
|
29
|
+
token: TokenEnum
|
|
30
|
+
r"""A class representing the token.
|
|
31
|
+
|
|
32
|
+
This class is used to represent the token in the system. Notice individual
|
|
33
|
+
endpoints' documentation where per chain tokens are presented.
|
|
34
|
+
"""
|
|
35
|
+
amount: AaveSupplyRequestAmountTypedDict
|
|
36
|
+
r"""The amount of the asset to supply"""
|
|
37
|
+
chain: Chain
|
|
38
|
+
r"""The chain to use."""
|
|
39
|
+
sender: str
|
|
40
|
+
r"""The address of the transaction sender."""
|
|
41
|
+
on_behalf_of: NotRequired[Nullable[str]]
|
|
42
|
+
r"""The address on behalf of whom the supply is made. Defaults to the transaction sender."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class AaveSupplyRequest(BaseModel):
|
|
46
|
+
token: TokenEnum
|
|
47
|
+
r"""A class representing the token.
|
|
48
|
+
|
|
49
|
+
This class is used to represent the token in the system. Notice individual
|
|
50
|
+
endpoints' documentation where per chain tokens are presented.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
amount: AaveSupplyRequestAmount
|
|
54
|
+
r"""The amount of the asset to supply"""
|
|
55
|
+
|
|
56
|
+
chain: Chain
|
|
57
|
+
r"""The chain to use."""
|
|
58
|
+
|
|
59
|
+
sender: str
|
|
60
|
+
r"""The address of the transaction sender."""
|
|
61
|
+
|
|
62
|
+
on_behalf_of: OptionalNullable[str] = UNSET
|
|
63
|
+
r"""The address on behalf of whom the supply is made. Defaults to the transaction sender."""
|
|
64
|
+
|
|
65
|
+
@model_serializer(mode="wrap")
|
|
66
|
+
def serialize_model(self, handler):
|
|
67
|
+
optional_fields = ["on_behalf_of"]
|
|
68
|
+
nullable_fields = ["on_behalf_of"]
|
|
69
|
+
null_default_fields = []
|
|
70
|
+
|
|
71
|
+
serialized = handler(self)
|
|
72
|
+
|
|
73
|
+
m = {}
|
|
74
|
+
|
|
75
|
+
for n, f in type(self).model_fields.items():
|
|
76
|
+
k = f.alias or n
|
|
77
|
+
val = serialized.get(k)
|
|
78
|
+
serialized.pop(k, None)
|
|
79
|
+
|
|
80
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
81
|
+
is_set = (
|
|
82
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
83
|
+
or k in null_default_fields
|
|
84
|
+
) # pylint: disable=no-member
|
|
85
|
+
|
|
86
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
87
|
+
m[k] = val
|
|
88
|
+
elif val != UNSET_SENTINEL and (
|
|
89
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
90
|
+
):
|
|
91
|
+
m[k] = val
|
|
92
|
+
|
|
93
|
+
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 AaveTokenPriceResponseTypedDict(TypedDict):
|
|
9
|
+
price: str
|
|
10
|
+
r"""The price of the asset in USD."""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AaveTokenPriceResponse(BaseModel):
|
|
14
|
+
price: str
|
|
15
|
+
r"""The price of the asset in USD."""
|