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.

Files changed (137) hide show
  1. compass_api_sdk/__init__.py +17 -0
  2. compass_api_sdk/_hooks/__init__.py +5 -0
  3. compass_api_sdk/_hooks/registration.py +13 -0
  4. compass_api_sdk/_hooks/sdkhooks.py +76 -0
  5. compass_api_sdk/_hooks/types.py +106 -0
  6. compass_api_sdk/_version.py +15 -0
  7. compass_api_sdk/aave_v3.py +1903 -0
  8. compass_api_sdk/aerodrome_slipstream.py +1875 -0
  9. compass_api_sdk/basesdk.py +362 -0
  10. compass_api_sdk/errors/__init__.py +7 -0
  11. compass_api_sdk/errors/apierror.py +22 -0
  12. compass_api_sdk/errors/httpvalidationerror.py +21 -0
  13. compass_api_sdk/httpclient.py +136 -0
  14. compass_api_sdk/models/__init__.py +777 -0
  15. compass_api_sdk/models/aave_liquidity_changeop.py +108 -0
  16. compass_api_sdk/models/aave_token_priceop.py +98 -0
  17. compass_api_sdk/models/aave_user_position_per_tokenop.py +104 -0
  18. compass_api_sdk/models/aave_user_position_summaryop.py +35 -0
  19. compass_api_sdk/models/aaveborrowrequest.py +105 -0
  20. compass_api_sdk/models/aaveliquiditychangeresponse.py +26 -0
  21. compass_api_sdk/models/aaverepayrequest.py +105 -0
  22. compass_api_sdk/models/aavesupplyrequest.py +93 -0
  23. compass_api_sdk/models/aavetokenpriceresponse.py +15 -0
  24. compass_api_sdk/models/aaveuserpositionpertokenresponse.py +73 -0
  25. compass_api_sdk/models/aaveuserpositionsummaryresponse.py +50 -0
  26. compass_api_sdk/models/aavewithdrawrequest.py +58 -0
  27. compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +35 -0
  28. compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +173 -0
  29. compass_api_sdk/models/aerodromelppositionsresponse.py +21 -0
  30. compass_api_sdk/models/aerodromeposition.py +70 -0
  31. compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +92 -0
  32. compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +109 -0
  33. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +186 -0
  34. compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +57 -0
  35. compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +96 -0
  36. compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +50 -0
  37. compass_api_sdk/models/allowanceinforesponse.py +48 -0
  38. compass_api_sdk/models/balanceinforesponse.py +43 -0
  39. compass_api_sdk/models/chain.py +12 -0
  40. compass_api_sdk/models/chaininfo.py +53 -0
  41. compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_asset.py +22 -0
  42. compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_asset.py +23 -0
  43. compass_api_sdk/models/ensnameinforesponse.py +24 -0
  44. compass_api_sdk/models/feeenum.py +16 -0
  45. compass_api_sdk/models/generic_allowanceop.py +121 -0
  46. compass_api_sdk/models/generic_balanceop.py +104 -0
  47. compass_api_sdk/models/generic_ensop.py +35 -0
  48. compass_api_sdk/models/generic_portfolioop.py +35 -0
  49. compass_api_sdk/models/generic_price_usdop.py +98 -0
  50. compass_api_sdk/models/generic_supported_tokensop.py +29 -0
  51. compass_api_sdk/models/generic_visualize_portfolioop.py +35 -0
  52. compass_api_sdk/models/image.py +15 -0
  53. compass_api_sdk/models/increaseallowancerequest.py +77 -0
  54. compass_api_sdk/models/interestratemode.py +14 -0
  55. compass_api_sdk/models/marketstate.py +35 -0
  56. compass_api_sdk/models/morpho_market_positionop.py +39 -0
  57. compass_api_sdk/models/morpho_marketsop.py +78 -0
  58. compass_api_sdk/models/morpho_vault_positionop.py +39 -0
  59. compass_api_sdk/models/morpho_vaultsop.py +72 -0
  60. compass_api_sdk/models/morphoborrowrequest.py +91 -0
  61. compass_api_sdk/models/morphocheckmarketpositionresponse.py +23 -0
  62. compass_api_sdk/models/morphocheckvaultpositionresponse.py +20 -0
  63. compass_api_sdk/models/morphodepositrequest.py +86 -0
  64. compass_api_sdk/models/morphogetmarketsresponse.py +17 -0
  65. compass_api_sdk/models/morphogetvaultsresponse.py +17 -0
  66. compass_api_sdk/models/morphomarket.py +80 -0
  67. compass_api_sdk/models/morphorepayrequest.py +79 -0
  68. compass_api_sdk/models/morphosetvaultallowancerequest.py +44 -0
  69. compass_api_sdk/models/morphosupplycollateralrequest.py +91 -0
  70. compass_api_sdk/models/morphovault.py +47 -0
  71. compass_api_sdk/models/morphowithdrawcollateralrequest.py +91 -0
  72. compass_api_sdk/models/morphowithdrawrequest.py +74 -0
  73. compass_api_sdk/models/portfolio.py +22 -0
  74. compass_api_sdk/models/priceresponse.py +15 -0
  75. compass_api_sdk/models/security.py +24 -0
  76. compass_api_sdk/models/token_addressop.py +98 -0
  77. compass_api_sdk/models/token_balanceop.py +49 -0
  78. compass_api_sdk/models/token_enum.py +57 -0
  79. compass_api_sdk/models/token_priceop.py +97 -0
  80. compass_api_sdk/models/tokenaddressresponse.py +15 -0
  81. compass_api_sdk/models/tokenbalance.py +49 -0
  82. compass_api_sdk/models/tokenbalanceresponse.py +44 -0
  83. compass_api_sdk/models/tokeninfo.py +17 -0
  84. compass_api_sdk/models/tokenpriceresponse.py +15 -0
  85. compass_api_sdk/models/tokentransferrequest.py +66 -0
  86. compass_api_sdk/models/transfererc20request.py +62 -0
  87. compass_api_sdk/models/transferethrequest.py +46 -0
  88. compass_api_sdk/models/uniswap_liquidity_provision_in_rangeop.py +34 -0
  89. compass_api_sdk/models/uniswap_liquidity_provision_positionsop.py +35 -0
  90. compass_api_sdk/models/uniswap_pool_priceop.py +193 -0
  91. compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +209 -0
  92. compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +209 -0
  93. compass_api_sdk/models/uniswapbuyexactlyrequest.py +104 -0
  94. compass_api_sdk/models/uniswapbuyquoteinforesponse.py +20 -0
  95. compass_api_sdk/models/uniswapcheckinrangeresponse.py +15 -0
  96. compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +99 -0
  97. compass_api_sdk/models/uniswaplppositionsinforesponse.py +24 -0
  98. compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +185 -0
  99. compass_api_sdk/models/uniswappoolpriceresponse.py +47 -0
  100. compass_api_sdk/models/uniswappositionssolidityresponse.py +46 -0
  101. compass_api_sdk/models/uniswapsellexactlyrequest.py +104 -0
  102. compass_api_sdk/models/uniswapsellquoteinforesponse.py +20 -0
  103. compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +51 -0
  104. compass_api_sdk/models/unsignedtransaction.py +58 -0
  105. compass_api_sdk/models/unwrapwethrequest.py +41 -0
  106. compass_api_sdk/models/validationerror.py +26 -0
  107. compass_api_sdk/models/vaultstate.py +32 -0
  108. compass_api_sdk/models/weeklyapys.py +23 -0
  109. compass_api_sdk/models/wrapethrequest.py +41 -0
  110. compass_api_sdk/morpho.py +2577 -0
  111. compass_api_sdk/py.typed +1 -0
  112. compass_api_sdk/sdk.py +155 -0
  113. compass_api_sdk/sdkconfiguration.py +56 -0
  114. compass_api_sdk/token_sdk.py +861 -0
  115. compass_api_sdk/types/__init__.py +21 -0
  116. compass_api_sdk/types/basemodel.py +39 -0
  117. compass_api_sdk/uniswap_v3.py +2551 -0
  118. compass_api_sdk/universal.py +2625 -0
  119. compass_api_sdk/utils/__init__.py +100 -0
  120. compass_api_sdk/utils/annotations.py +55 -0
  121. compass_api_sdk/utils/datetimes.py +23 -0
  122. compass_api_sdk/utils/enums.py +74 -0
  123. compass_api_sdk/utils/eventstreaming.py +238 -0
  124. compass_api_sdk/utils/forms.py +202 -0
  125. compass_api_sdk/utils/headers.py +136 -0
  126. compass_api_sdk/utils/logger.py +22 -0
  127. compass_api_sdk/utils/metadata.py +118 -0
  128. compass_api_sdk/utils/queryparams.py +205 -0
  129. compass_api_sdk/utils/requestbodies.py +66 -0
  130. compass_api_sdk/utils/retries.py +217 -0
  131. compass_api_sdk/utils/security.py +174 -0
  132. compass_api_sdk/utils/serializers.py +248 -0
  133. compass_api_sdk/utils/url.py +155 -0
  134. compass_api_sdk/utils/values.py +137 -0
  135. compass_api_sdk-0.0.1.dist-info/METADATA +534 -0
  136. compass_api_sdk-0.0.1.dist-info/RECORD +137 -0
  137. compass_api_sdk-0.0.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,49 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .token_enum import TokenEnum
5
+ from compass_api_sdk.types import BaseModel
6
+ from typing_extensions import TypedDict
7
+
8
+
9
+ class TokenBalanceTypedDict(TypedDict):
10
+ amount: str
11
+ r"""Amount of tokens a particular address holds"""
12
+ decimals: int
13
+ r"""Number of decimals of the token"""
14
+ token_symbol: TokenEnum
15
+ r"""A class representing the token.
16
+
17
+ This class is used to represent the token in the system. Notice individual
18
+ endpoints' documentation where per chain tokens are presented.
19
+ """
20
+ token_address: str
21
+ r"""Address of the token"""
22
+ price: str
23
+ r"""Price of the token in USD"""
24
+ token_value_in_usd: str
25
+ r"""Value of the token balance in USD"""
26
+
27
+
28
+ class TokenBalance(BaseModel):
29
+ amount: str
30
+ r"""Amount of tokens a particular address holds"""
31
+
32
+ decimals: int
33
+ r"""Number of decimals of the token"""
34
+
35
+ token_symbol: TokenEnum
36
+ r"""A class representing the token.
37
+
38
+ This class is used to represent the token in the system. Notice individual
39
+ endpoints' documentation where per chain tokens are presented.
40
+ """
41
+
42
+ token_address: str
43
+ r"""Address of the token"""
44
+
45
+ price: str
46
+ r"""Price of the token in USD"""
47
+
48
+ token_value_in_usd: str
49
+ r"""Value of the token balance in USD"""
@@ -0,0 +1,44 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .token_enum import TokenEnum
5
+ from compass_api_sdk.types import BaseModel
6
+ from typing import Union
7
+ from typing_extensions import TypeAliasType, TypedDict
8
+
9
+
10
+ TokenSymbolTypedDict = TypeAliasType("TokenSymbolTypedDict", Union[TokenEnum, str])
11
+ r"""Symbol of the token."""
12
+
13
+
14
+ TokenSymbol = TypeAliasType("TokenSymbol", Union[TokenEnum, str])
15
+ r"""Symbol of the token."""
16
+
17
+
18
+ class TokenBalanceResponseTypedDict(TypedDict):
19
+ r"""Response model for token balance information."""
20
+
21
+ amount: str
22
+ r"""Amount of tokens a particular address holds"""
23
+ decimals: int
24
+ r"""Number of decimals of the token"""
25
+ token_symbol: TokenSymbolTypedDict
26
+ r"""Symbol of the token."""
27
+ token_address: str
28
+ r"""Address of the token"""
29
+
30
+
31
+ class TokenBalanceResponse(BaseModel):
32
+ r"""Response model for token balance information."""
33
+
34
+ amount: str
35
+ r"""Amount of tokens a particular address holds"""
36
+
37
+ decimals: int
38
+ r"""Number of decimals of the token"""
39
+
40
+ token_symbol: TokenSymbol
41
+ r"""Symbol of the token."""
42
+
43
+ token_address: str
44
+ r"""Address of the token"""
@@ -0,0 +1,17 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .token_enum import TokenEnum
5
+ from compass_api_sdk.types import BaseModel
6
+ from typing import List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class TokenInfoTypedDict(TypedDict):
11
+ tokens: List[TokenEnum]
12
+ r"""List of supported tokens for a given chain"""
13
+
14
+
15
+ class TokenInfo(BaseModel):
16
+ tokens: List[TokenEnum]
17
+ r"""List of supported tokens for a given chain"""
@@ -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 TokenPriceResponseTypedDict(TypedDict):
9
+ price: str
10
+ r"""Price of the token in USD"""
11
+
12
+
13
+ class TokenPriceResponse(BaseModel):
14
+ price: str
15
+ r"""Price of the token in USD"""
@@ -0,0 +1,66 @@
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 typing import Union
8
+ from typing_extensions import TypeAliasType, TypedDict
9
+
10
+
11
+ TokenTransferRequestAmountTypedDict = TypeAliasType(
12
+ "TokenTransferRequestAmountTypedDict", Union[float, str]
13
+ )
14
+ r"""Amount of token to transfer"""
15
+
16
+
17
+ TokenTransferRequestAmount = TypeAliasType(
18
+ "TokenTransferRequestAmount", Union[float, str]
19
+ )
20
+ r"""Amount of token to transfer"""
21
+
22
+
23
+ TokenTransferRequestTokenTypedDict = TypeAliasType(
24
+ "TokenTransferRequestTokenTypedDict", Union[TokenEnum, str]
25
+ )
26
+ r"""The symbol of the token to transfer.."""
27
+
28
+
29
+ TokenTransferRequestToken = TypeAliasType(
30
+ "TokenTransferRequestToken", Union[TokenEnum, str]
31
+ )
32
+ r"""The symbol of the token to transfer.."""
33
+
34
+
35
+ class TokenTransferRequestTypedDict(TypedDict):
36
+ r"""Request model for transferring ETH or ERC20 tokens."""
37
+
38
+ amount: TokenTransferRequestAmountTypedDict
39
+ r"""Amount of token to transfer"""
40
+ token: TokenTransferRequestTokenTypedDict
41
+ r"""The symbol of the token to transfer.."""
42
+ to: str
43
+ r"""The recipient of the tokens."""
44
+ chain: Chain
45
+ r"""The chain to use."""
46
+ sender: str
47
+ r"""The address of the transaction sender."""
48
+
49
+
50
+ class TokenTransferRequest(BaseModel):
51
+ r"""Request model for transferring ETH or ERC20 tokens."""
52
+
53
+ amount: TokenTransferRequestAmount
54
+ r"""Amount of token to transfer"""
55
+
56
+ token: TokenTransferRequestToken
57
+ r"""The symbol of the token to transfer.."""
58
+
59
+ to: str
60
+ r"""The recipient of the tokens."""
61
+
62
+ chain: Chain
63
+ r"""The chain to use."""
64
+
65
+ sender: str
66
+ r"""The address of the transaction sender."""
@@ -0,0 +1,62 @@
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 typing import Union
8
+ from typing_extensions import TypeAliasType, TypedDict
9
+
10
+
11
+ TransferErc20RequestAmountTypedDict = TypeAliasType(
12
+ "TransferErc20RequestAmountTypedDict", Union[float, str]
13
+ )
14
+ r"""Amount of token to transfer"""
15
+
16
+
17
+ TransferErc20RequestAmount = TypeAliasType(
18
+ "TransferErc20RequestAmount", Union[float, str]
19
+ )
20
+ r"""Amount of token to transfer"""
21
+
22
+
23
+ class TransferErc20RequestTypedDict(TypedDict):
24
+ r"""Request model for transferring ERC20 tokens."""
25
+
26
+ amount: TransferErc20RequestAmountTypedDict
27
+ r"""Amount of token to transfer"""
28
+ token: TokenEnum
29
+ r"""A class representing the token.
30
+
31
+ This class is used to represent the token in the system. Notice individual
32
+ endpoints' documentation where per chain tokens are presented.
33
+ """
34
+ to: str
35
+ r"""The recipient of the tokens."""
36
+ chain: Chain
37
+ r"""The chain to use."""
38
+ sender: str
39
+ r"""The address of the transaction sender."""
40
+
41
+
42
+ class TransferErc20Request(BaseModel):
43
+ r"""Request model for transferring ERC20 tokens."""
44
+
45
+ amount: TransferErc20RequestAmount
46
+ r"""Amount of token to transfer"""
47
+
48
+ token: TokenEnum
49
+ r"""A class representing the token.
50
+
51
+ This class is used to represent the token in the system. Notice individual
52
+ endpoints' documentation where per chain tokens are presented.
53
+ """
54
+
55
+ to: str
56
+ r"""The recipient of the tokens."""
57
+
58
+ chain: Chain
59
+ r"""The chain to use."""
60
+
61
+ sender: str
62
+ r"""The address of the transaction sender."""
@@ -0,0 +1,46 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .chain import Chain
5
+ from compass_api_sdk.types import BaseModel
6
+ from typing import Union
7
+ from typing_extensions import TypeAliasType, TypedDict
8
+
9
+
10
+ TransferEthRequestAmountTypedDict = TypeAliasType(
11
+ "TransferEthRequestAmountTypedDict", Union[float, str]
12
+ )
13
+ r"""Amount of ETH to transfer"""
14
+
15
+
16
+ TransferEthRequestAmount = TypeAliasType("TransferEthRequestAmount", Union[float, str])
17
+ r"""Amount of ETH to transfer"""
18
+
19
+
20
+ class TransferEthRequestTypedDict(TypedDict):
21
+ r"""Request model for transferring native ETH."""
22
+
23
+ amount: TransferEthRequestAmountTypedDict
24
+ r"""Amount of ETH to transfer"""
25
+ to: str
26
+ r"""The recipient of the ETH."""
27
+ chain: Chain
28
+ r"""The chain to use."""
29
+ sender: str
30
+ r"""The address of the transaction sender."""
31
+
32
+
33
+ class TransferEthRequest(BaseModel):
34
+ r"""Request model for transferring native ETH."""
35
+
36
+ amount: TransferEthRequestAmount
37
+ r"""Amount of ETH to transfer"""
38
+
39
+ to: str
40
+ r"""The recipient of the ETH."""
41
+
42
+ chain: Chain
43
+ r"""The chain to use."""
44
+
45
+ sender: str
46
+ r"""The address of the transaction sender."""
@@ -0,0 +1,34 @@
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 UniswapLiquidityProvisionInRangeChain(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 UniswapLiquidityProvisionInRangeRequestTypedDict(TypedDict):
20
+ chain: NotRequired[UniswapLiquidityProvisionInRangeChain]
21
+ r"""The chain to use."""
22
+ token_id: int
23
+
24
+
25
+ class UniswapLiquidityProvisionInRangeRequest(BaseModel):
26
+ chain: Annotated[
27
+ Optional[UniswapLiquidityProvisionInRangeChain],
28
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
29
+ ] = UniswapLiquidityProvisionInRangeChain.ARBITRUM_MAINNET
30
+ r"""The chain to use."""
31
+
32
+ token_id: Annotated[
33
+ int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
34
+ ] = 4318185
@@ -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 UniswapLiquidityProvisionPositionsChain(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 UniswapLiquidityProvisionPositionsRequestTypedDict(TypedDict):
20
+ chain: NotRequired[UniswapLiquidityProvisionPositionsChain]
21
+ r"""The chain to use."""
22
+ user: NotRequired[str]
23
+
24
+
25
+ class UniswapLiquidityProvisionPositionsRequest(BaseModel):
26
+ chain: Annotated[
27
+ Optional[UniswapLiquidityProvisionPositionsChain],
28
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
29
+ ] = UniswapLiquidityProvisionPositionsChain.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,193 @@
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 UniswapPoolPriceChain(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 UniswapPoolPriceTokenInToken(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 UniswapPoolPriceTokenOutToken(str, Enum):
73
+ r"""A class representing the token.
74
+
75
+ This class is used to represent the token in the system. Notice individual
76
+ endpoints' documentation where per chain tokens are presented.
77
+ """
78
+
79
+ ONE_INCH = "1INCH"
80
+ AAVE = "AAVE"
81
+ BAL = "BAL"
82
+ CB_BTC = "cbBTC"
83
+ CB_ETH = "cbETH"
84
+ CRV = "CRV"
85
+ CRV_USD = "crvUSD"
86
+ DAI = "DAI"
87
+ ENS = "ENS"
88
+ ET_HX = "ETHx"
89
+ FRAX = "FRAX"
90
+ FXS = "FXS"
91
+ GHO = "GHO"
92
+ KNC = "KNC"
93
+ LDO = "LDO"
94
+ LINK = "LINK"
95
+ LUSD = "LUSD"
96
+ MKR = "MKR"
97
+ OS_ETH = "osETH"
98
+ PYUSD = "PYUSD"
99
+ R_ETH = "rETH"
100
+ RPL = "RPL"
101
+ RS_ETH = "rsETH"
102
+ S_DAI = "sDAI"
103
+ SNX = "SNX"
104
+ STG = "STG"
105
+ S_US_DE = "sUSDe"
106
+ T_BTC = "tBTC"
107
+ UNI = "UNI"
108
+ USDC = "USDC"
109
+ US_DE = "USDe"
110
+ USDS = "USDS"
111
+ USDT = "USDT"
112
+ WBTC = "WBTC"
113
+ WE_ETH = "weETH"
114
+ WETH = "WETH"
115
+ WST_ETH = "wstETH"
116
+ ARB = "ARB"
117
+ EURS = "EURS"
118
+ MAI = "MAI"
119
+ USD_CE = "USDCe"
120
+ AERO = "AERO"
121
+ EUR = "EUR"
122
+ VIRTUAL = "VIRTUAL"
123
+
124
+
125
+ class UniswapPoolPriceFeeEnum(str, Enum):
126
+ r"""The transaction fee of a Uniswap pool in bips.
127
+
128
+ Uniswap supports 4 different fee levels.
129
+ """
130
+
131
+ ZERO_DOT_01 = "0.01"
132
+ ZERO_DOT_05 = "0.05"
133
+ ZERO_DOT_3 = "0.3"
134
+ ONE_DOT_0 = "1.0"
135
+
136
+
137
+ class UniswapPoolPriceRequestTypedDict(TypedDict):
138
+ chain: NotRequired[UniswapPoolPriceChain]
139
+ r"""The chain to use."""
140
+ token_in: UniswapPoolPriceTokenInToken
141
+ r"""A class representing the token.
142
+
143
+ This class is used to represent the token in the system. Notice individual
144
+ endpoints' documentation where per chain tokens are presented.
145
+ """
146
+ token_out: UniswapPoolPriceTokenOutToken
147
+ r"""A class representing the token.
148
+
149
+ This class is used to represent the token in the system. Notice individual
150
+ endpoints' documentation where per chain tokens are presented.
151
+ """
152
+ fee: UniswapPoolPriceFeeEnum
153
+ r"""The transaction fee of a Uniswap pool in bips.
154
+
155
+ Uniswap supports 4 different fee levels.
156
+ """
157
+
158
+
159
+ class UniswapPoolPriceRequest(BaseModel):
160
+ chain: Annotated[
161
+ Optional[UniswapPoolPriceChain],
162
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
163
+ ] = UniswapPoolPriceChain.ARBITRUM_MAINNET
164
+ r"""The chain to use."""
165
+
166
+ token_in: Annotated[
167
+ UniswapPoolPriceTokenInToken,
168
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
169
+ ] = UniswapPoolPriceTokenInToken.USDC
170
+ r"""A class representing the token.
171
+
172
+ This class is used to represent the token in the system. Notice individual
173
+ endpoints' documentation where per chain tokens are presented.
174
+ """
175
+
176
+ token_out: Annotated[
177
+ UniswapPoolPriceTokenOutToken,
178
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
179
+ ] = UniswapPoolPriceTokenOutToken.USDT
180
+ r"""A class representing the token.
181
+
182
+ This class is used to represent the token in the system. Notice individual
183
+ endpoints' documentation where per chain tokens are presented.
184
+ """
185
+
186
+ fee: Annotated[
187
+ UniswapPoolPriceFeeEnum,
188
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
189
+ ] = UniswapPoolPriceFeeEnum.ZERO_DOT_01
190
+ r"""The transaction fee of a Uniswap pool in bips.
191
+
192
+ Uniswap supports 4 different fee levels.
193
+ """