compass_api_sdk 0.0.1__py3-none-any.whl → 0.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of compass_api_sdk might be problematic. Click here for more details.
- compass_api_sdk/_version.py +2 -2
- compass_api_sdk/aave_v3.py +20 -44
- compass_api_sdk/aerodrome_slipstream.py +8 -24
- compass_api_sdk/models/aave_liquidity_changeop.py +5 -6
- compass_api_sdk/models/aave_token_priceop.py +5 -6
- compass_api_sdk/models/aave_user_position_per_tokenop.py +4 -4
- compass_api_sdk/models/aave_user_position_summaryop.py +2 -2
- compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +2 -2
- compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +6 -6
- compass_api_sdk/models/generic_allowanceop.py +5 -4
- compass_api_sdk/models/generic_balanceop.py +4 -4
- compass_api_sdk/models/generic_ensop.py +2 -2
- compass_api_sdk/models/generic_portfolioop.py +2 -2
- compass_api_sdk/models/generic_price_usdop.py +5 -6
- compass_api_sdk/models/generic_supported_tokensop.py +3 -4
- compass_api_sdk/models/generic_visualize_portfolioop.py +2 -2
- compass_api_sdk/models/morpho_market_positionop.py +3 -4
- compass_api_sdk/models/morpho_marketsop.py +3 -4
- compass_api_sdk/models/morpho_vault_positionop.py +3 -4
- compass_api_sdk/models/morpho_vaultsop.py +11 -18
- compass_api_sdk/models/morphocheckmarketpositionresponse.py +10 -0
- compass_api_sdk/models/morphomarket.py +2 -2
- compass_api_sdk/models/token_addressop.py +5 -6
- compass_api_sdk/models/uniswap_liquidity_provision_in_rangeop.py +3 -4
- compass_api_sdk/models/uniswap_liquidity_provision_positionsop.py +2 -2
- compass_api_sdk/models/uniswap_pool_priceop.py +3 -4
- compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +8 -8
- compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +8 -8
- compass_api_sdk/morpho.py +15 -31
- compass_api_sdk/token_sdk.py +4 -8
- compass_api_sdk/uniswap_v3.py +30 -66
- compass_api_sdk/universal.py +26 -58
- {compass_api_sdk-0.0.1.dist-info → compass_api_sdk-0.0.3.dist-info}/METADATA +104 -107
- {compass_api_sdk-0.0.1.dist-info → compass_api_sdk-0.0.3.dist-info}/RECORD +35 -35
- {compass_api_sdk-0.0.1.dist-info → compass_api_sdk-0.0.3.dist-info}/WHEEL +0 -0
|
@@ -11,7 +11,6 @@ from compass_api_sdk.types import (
|
|
|
11
11
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
12
12
|
from enum import Enum
|
|
13
13
|
from pydantic import model_serializer
|
|
14
|
-
from typing import Optional
|
|
15
14
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
16
15
|
|
|
17
16
|
|
|
@@ -24,7 +23,7 @@ class MorphoMarketsChain(str, Enum):
|
|
|
24
23
|
|
|
25
24
|
|
|
26
25
|
class MorphoMarketsRequestTypedDict(TypedDict):
|
|
27
|
-
chain:
|
|
26
|
+
chain: MorphoMarketsChain
|
|
28
27
|
r"""The chain to use."""
|
|
29
28
|
collateral_token: NotRequired[Nullable[str]]
|
|
30
29
|
loan_token: NotRequired[Nullable[str]]
|
|
@@ -32,7 +31,7 @@ class MorphoMarketsRequestTypedDict(TypedDict):
|
|
|
32
31
|
|
|
33
32
|
class MorphoMarketsRequest(BaseModel):
|
|
34
33
|
chain: Annotated[
|
|
35
|
-
|
|
34
|
+
MorphoMarketsChain,
|
|
36
35
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
37
36
|
] = MorphoMarketsChain.ETHEREUM_MAINNET
|
|
38
37
|
r"""The chain to use."""
|
|
@@ -49,7 +48,7 @@ class MorphoMarketsRequest(BaseModel):
|
|
|
49
48
|
|
|
50
49
|
@model_serializer(mode="wrap")
|
|
51
50
|
def serialize_model(self, handler):
|
|
52
|
-
optional_fields = ["
|
|
51
|
+
optional_fields = ["collateral_token", "loan_token"]
|
|
53
52
|
nullable_fields = ["collateral_token", "loan_token"]
|
|
54
53
|
null_default_fields = []
|
|
55
54
|
|
|
@@ -4,8 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
8
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class MorphoVaultPositionChain(str, Enum):
|
|
@@ -17,7 +16,7 @@ class MorphoVaultPositionChain(str, Enum):
|
|
|
17
16
|
|
|
18
17
|
|
|
19
18
|
class MorphoVaultPositionRequestTypedDict(TypedDict):
|
|
20
|
-
chain:
|
|
19
|
+
chain: MorphoVaultPositionChain
|
|
21
20
|
r"""The chain to use."""
|
|
22
21
|
user_address: str
|
|
23
22
|
vault_address: str
|
|
@@ -25,7 +24,7 @@ class MorphoVaultPositionRequestTypedDict(TypedDict):
|
|
|
25
24
|
|
|
26
25
|
class MorphoVaultPositionRequest(BaseModel):
|
|
27
26
|
chain: Annotated[
|
|
28
|
-
|
|
27
|
+
MorphoVaultPositionChain,
|
|
29
28
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
30
29
|
] = MorphoVaultPositionChain.ETHEREUM_MAINNET
|
|
31
30
|
r"""The chain to use."""
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from compass_api_sdk.types import
|
|
5
|
-
BaseModel,
|
|
6
|
-
Nullable,
|
|
7
|
-
OptionalNullable,
|
|
8
|
-
UNSET,
|
|
9
|
-
UNSET_SENTINEL,
|
|
10
|
-
)
|
|
4
|
+
from compass_api_sdk.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
11
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
12
6
|
from enum import Enum
|
|
13
7
|
from pydantic import model_serializer
|
|
14
|
-
from
|
|
15
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
|
+
from typing_extensions import Annotated, TypedDict
|
|
16
9
|
|
|
17
10
|
|
|
18
11
|
class MorphoVaultsChain(str, Enum):
|
|
@@ -24,26 +17,26 @@ class MorphoVaultsChain(str, Enum):
|
|
|
24
17
|
|
|
25
18
|
|
|
26
19
|
class MorphoVaultsRequestTypedDict(TypedDict):
|
|
27
|
-
|
|
20
|
+
deposit_token: Nullable[str]
|
|
21
|
+
chain: MorphoVaultsChain
|
|
28
22
|
r"""The chain to use."""
|
|
29
|
-
deposit_token: NotRequired[Nullable[str]]
|
|
30
23
|
|
|
31
24
|
|
|
32
25
|
class MorphoVaultsRequest(BaseModel):
|
|
26
|
+
deposit_token: Annotated[
|
|
27
|
+
Nullable[str],
|
|
28
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
29
|
+
]
|
|
30
|
+
|
|
33
31
|
chain: Annotated[
|
|
34
|
-
|
|
32
|
+
MorphoVaultsChain,
|
|
35
33
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
36
34
|
] = MorphoVaultsChain.ETHEREUM_MAINNET
|
|
37
35
|
r"""The chain to use."""
|
|
38
36
|
|
|
39
|
-
deposit_token: Annotated[
|
|
40
|
-
OptionalNullable[str],
|
|
41
|
-
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
42
|
-
] = UNSET
|
|
43
|
-
|
|
44
37
|
@model_serializer(mode="wrap")
|
|
45
38
|
def serialize_model(self, handler):
|
|
46
|
-
optional_fields = [
|
|
39
|
+
optional_fields = []
|
|
47
40
|
nullable_fields = ["deposit_token"]
|
|
48
41
|
null_default_fields = []
|
|
49
42
|
|
|
@@ -11,6 +11,10 @@ class MorphoCheckMarketPositionResponseTypedDict(TypedDict):
|
|
|
11
11
|
r"""The amount of the loan token borrowed."""
|
|
12
12
|
collateral_amount: str
|
|
13
13
|
r"""The amount of the collateral token supplied."""
|
|
14
|
+
current_loan_to_value: str
|
|
15
|
+
r"""The Loan-To-Value ratio measures the proportion of debt relative to collateral value. If this ratio exceeds the 'liquidation_loan_to_value_threshold', the position is liquidatable."""
|
|
16
|
+
liquidation_loan_to_value_threshold: str
|
|
17
|
+
r"""Maximum borrowing percentage before liquidation risk. E.g: LLTV of 80% means for a collateral value equivalent of $100, the maximum one can borrow in value is $80. If above like $80.0001, the position is liquidatable."""
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
class MorphoCheckMarketPositionResponse(BaseModel):
|
|
@@ -21,3 +25,9 @@ class MorphoCheckMarketPositionResponse(BaseModel):
|
|
|
21
25
|
|
|
22
26
|
collateral_amount: str
|
|
23
27
|
r"""The amount of the collateral token supplied."""
|
|
28
|
+
|
|
29
|
+
current_loan_to_value: str
|
|
30
|
+
r"""The Loan-To-Value ratio measures the proportion of debt relative to collateral value. If this ratio exceeds the 'liquidation_loan_to_value_threshold', the position is liquidatable."""
|
|
31
|
+
|
|
32
|
+
liquidation_loan_to_value_threshold: str
|
|
33
|
+
r"""Maximum borrowing percentage before liquidation risk. E.g: LLTV of 80% means for a collateral value equivalent of $100, the maximum one can borrow in value is $80. If above like $80.0001, the position is liquidatable."""
|
|
@@ -15,7 +15,7 @@ from typing_extensions import Annotated, TypedDict
|
|
|
15
15
|
|
|
16
16
|
class MorphoMarketTypedDict(TypedDict):
|
|
17
17
|
unique_key: str
|
|
18
|
-
lltv:
|
|
18
|
+
lltv: int
|
|
19
19
|
oracle_address: str
|
|
20
20
|
irm_address: str
|
|
21
21
|
state: MarketStateTypedDict
|
|
@@ -29,7 +29,7 @@ class MorphoMarketTypedDict(TypedDict):
|
|
|
29
29
|
class MorphoMarket(BaseModel):
|
|
30
30
|
unique_key: Annotated[str, pydantic.Field(alias="uniqueKey")]
|
|
31
31
|
|
|
32
|
-
lltv:
|
|
32
|
+
lltv: int
|
|
33
33
|
|
|
34
34
|
oracle_address: Annotated[str, pydantic.Field(alias="oracleAddress")]
|
|
35
35
|
|
|
@@ -4,8 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
8
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class TokenAddressChain(str, Enum):
|
|
@@ -70,9 +69,9 @@ class TokenAddressToken(str, Enum):
|
|
|
70
69
|
|
|
71
70
|
|
|
72
71
|
class TokenAddressRequestTypedDict(TypedDict):
|
|
73
|
-
chain:
|
|
72
|
+
chain: TokenAddressChain
|
|
74
73
|
r"""The chain to use."""
|
|
75
|
-
token:
|
|
74
|
+
token: TokenAddressToken
|
|
76
75
|
r"""A class representing the token.
|
|
77
76
|
|
|
78
77
|
This class is used to represent the token in the system. Notice individual
|
|
@@ -82,13 +81,13 @@ class TokenAddressRequestTypedDict(TypedDict):
|
|
|
82
81
|
|
|
83
82
|
class TokenAddressRequest(BaseModel):
|
|
84
83
|
chain: Annotated[
|
|
85
|
-
|
|
84
|
+
TokenAddressChain,
|
|
86
85
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
87
86
|
] = TokenAddressChain.ARBITRUM_MAINNET
|
|
88
87
|
r"""The chain to use."""
|
|
89
88
|
|
|
90
89
|
token: Annotated[
|
|
91
|
-
|
|
90
|
+
TokenAddressToken,
|
|
92
91
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
93
92
|
] = TokenAddressToken.WETH
|
|
94
93
|
r"""A class representing the token.
|
|
@@ -4,8 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
8
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class UniswapLiquidityProvisionInRangeChain(str, Enum):
|
|
@@ -17,14 +16,14 @@ class UniswapLiquidityProvisionInRangeChain(str, Enum):
|
|
|
17
16
|
|
|
18
17
|
|
|
19
18
|
class UniswapLiquidityProvisionInRangeRequestTypedDict(TypedDict):
|
|
20
|
-
chain:
|
|
19
|
+
chain: UniswapLiquidityProvisionInRangeChain
|
|
21
20
|
r"""The chain to use."""
|
|
22
21
|
token_id: int
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
class UniswapLiquidityProvisionInRangeRequest(BaseModel):
|
|
26
25
|
chain: Annotated[
|
|
27
|
-
|
|
26
|
+
UniswapLiquidityProvisionInRangeChain,
|
|
28
27
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
29
28
|
] = UniswapLiquidityProvisionInRangeChain.ARBITRUM_MAINNET
|
|
30
29
|
r"""The chain to use."""
|
|
@@ -17,14 +17,14 @@ class UniswapLiquidityProvisionPositionsChain(str, Enum):
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class UniswapLiquidityProvisionPositionsRequestTypedDict(TypedDict):
|
|
20
|
-
chain:
|
|
20
|
+
chain: UniswapLiquidityProvisionPositionsChain
|
|
21
21
|
r"""The chain to use."""
|
|
22
22
|
user: NotRequired[str]
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class UniswapLiquidityProvisionPositionsRequest(BaseModel):
|
|
26
26
|
chain: Annotated[
|
|
27
|
-
|
|
27
|
+
UniswapLiquidityProvisionPositionsChain,
|
|
28
28
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
29
29
|
] = UniswapLiquidityProvisionPositionsChain.ARBITRUM_MAINNET
|
|
30
30
|
r"""The chain to use."""
|
|
@@ -4,8 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from
|
|
8
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class UniswapPoolPriceChain(str, Enum):
|
|
@@ -135,7 +134,7 @@ class UniswapPoolPriceFeeEnum(str, Enum):
|
|
|
135
134
|
|
|
136
135
|
|
|
137
136
|
class UniswapPoolPriceRequestTypedDict(TypedDict):
|
|
138
|
-
chain:
|
|
137
|
+
chain: UniswapPoolPriceChain
|
|
139
138
|
r"""The chain to use."""
|
|
140
139
|
token_in: UniswapPoolPriceTokenInToken
|
|
141
140
|
r"""A class representing the token.
|
|
@@ -158,7 +157,7 @@ class UniswapPoolPriceRequestTypedDict(TypedDict):
|
|
|
158
157
|
|
|
159
158
|
class UniswapPoolPriceRequest(BaseModel):
|
|
160
159
|
chain: Annotated[
|
|
161
|
-
|
|
160
|
+
UniswapPoolPriceChain,
|
|
162
161
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
163
162
|
] = UniswapPoolPriceChain.ARBITRUM_MAINNET
|
|
164
163
|
r"""The chain to use."""
|
|
@@ -4,8 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from typing import
|
|
8
|
-
from typing_extensions import Annotated,
|
|
7
|
+
from typing import Union
|
|
8
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class UniswapQuoteBuyExactlyChain(str, Enum):
|
|
@@ -146,15 +146,15 @@ UniswapQuoteBuyExactlyAmountOut = TypeAliasType(
|
|
|
146
146
|
|
|
147
147
|
class UniswapQuoteBuyExactlyRequestTypedDict(TypedDict):
|
|
148
148
|
amount_out: UniswapQuoteBuyExactlyAmountOutTypedDict
|
|
149
|
-
chain:
|
|
149
|
+
chain: UniswapQuoteBuyExactlyChain
|
|
150
150
|
r"""The chain to use."""
|
|
151
|
-
token_in:
|
|
151
|
+
token_in: UniswapQuoteBuyExactlyTokenInToken
|
|
152
152
|
r"""A class representing the token.
|
|
153
153
|
|
|
154
154
|
This class is used to represent the token in the system. Notice individual
|
|
155
155
|
endpoints' documentation where per chain tokens are presented.
|
|
156
156
|
"""
|
|
157
|
-
token_out:
|
|
157
|
+
token_out: UniswapQuoteBuyExactlyTokenOutToken
|
|
158
158
|
r"""A class representing the token.
|
|
159
159
|
|
|
160
160
|
This class is used to represent the token in the system. Notice individual
|
|
@@ -174,13 +174,13 @@ class UniswapQuoteBuyExactlyRequest(BaseModel):
|
|
|
174
174
|
]
|
|
175
175
|
|
|
176
176
|
chain: Annotated[
|
|
177
|
-
|
|
177
|
+
UniswapQuoteBuyExactlyChain,
|
|
178
178
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
179
179
|
] = UniswapQuoteBuyExactlyChain.ARBITRUM_MAINNET
|
|
180
180
|
r"""The chain to use."""
|
|
181
181
|
|
|
182
182
|
token_in: Annotated[
|
|
183
|
-
|
|
183
|
+
UniswapQuoteBuyExactlyTokenInToken,
|
|
184
184
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
185
185
|
] = UniswapQuoteBuyExactlyTokenInToken.USDC
|
|
186
186
|
r"""A class representing the token.
|
|
@@ -190,7 +190,7 @@ class UniswapQuoteBuyExactlyRequest(BaseModel):
|
|
|
190
190
|
"""
|
|
191
191
|
|
|
192
192
|
token_out: Annotated[
|
|
193
|
-
|
|
193
|
+
UniswapQuoteBuyExactlyTokenOutToken,
|
|
194
194
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
195
195
|
] = UniswapQuoteBuyExactlyTokenOutToken.USDT
|
|
196
196
|
r"""A class representing the token.
|
|
@@ -4,8 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from compass_api_sdk.types import BaseModel
|
|
5
5
|
from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from typing import
|
|
8
|
-
from typing_extensions import Annotated,
|
|
7
|
+
from typing import Union
|
|
8
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class UniswapQuoteSellExactlyChain(str, Enum):
|
|
@@ -146,15 +146,15 @@ UniswapQuoteSellExactlyAmountIn = TypeAliasType(
|
|
|
146
146
|
|
|
147
147
|
class UniswapQuoteSellExactlyRequestTypedDict(TypedDict):
|
|
148
148
|
amount_in: UniswapQuoteSellExactlyAmountInTypedDict
|
|
149
|
-
chain:
|
|
149
|
+
chain: UniswapQuoteSellExactlyChain
|
|
150
150
|
r"""The chain to use."""
|
|
151
|
-
token_in:
|
|
151
|
+
token_in: UniswapQuoteSellExactlyTokenInToken
|
|
152
152
|
r"""A class representing the token.
|
|
153
153
|
|
|
154
154
|
This class is used to represent the token in the system. Notice individual
|
|
155
155
|
endpoints' documentation where per chain tokens are presented.
|
|
156
156
|
"""
|
|
157
|
-
token_out:
|
|
157
|
+
token_out: UniswapQuoteSellExactlyTokenOutToken
|
|
158
158
|
r"""A class representing the token.
|
|
159
159
|
|
|
160
160
|
This class is used to represent the token in the system. Notice individual
|
|
@@ -174,13 +174,13 @@ class UniswapQuoteSellExactlyRequest(BaseModel):
|
|
|
174
174
|
]
|
|
175
175
|
|
|
176
176
|
chain: Annotated[
|
|
177
|
-
|
|
177
|
+
UniswapQuoteSellExactlyChain,
|
|
178
178
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
179
179
|
] = UniswapQuoteSellExactlyChain.ARBITRUM_MAINNET
|
|
180
180
|
r"""The chain to use."""
|
|
181
181
|
|
|
182
182
|
token_in: Annotated[
|
|
183
|
-
|
|
183
|
+
UniswapQuoteSellExactlyTokenInToken,
|
|
184
184
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
185
185
|
] = UniswapQuoteSellExactlyTokenInToken.USDC
|
|
186
186
|
r"""A class representing the token.
|
|
@@ -190,7 +190,7 @@ class UniswapQuoteSellExactlyRequest(BaseModel):
|
|
|
190
190
|
"""
|
|
191
191
|
|
|
192
192
|
token_out: Annotated[
|
|
193
|
-
|
|
193
|
+
UniswapQuoteSellExactlyTokenOutToken,
|
|
194
194
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
195
195
|
] = UniswapQuoteSellExactlyTokenOutToken.USDT
|
|
196
196
|
r"""A class representing the token.
|
compass_api_sdk/morpho.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
4
|
from compass_api_sdk import errors, models, utils
|
|
5
5
|
from compass_api_sdk._hooks import HookContext
|
|
6
|
-
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
6
|
+
from compass_api_sdk.types import Nullable, OptionalNullable, UNSET
|
|
7
7
|
from typing import Any, Mapping, Optional, Union
|
|
8
8
|
|
|
9
9
|
|
|
@@ -11,10 +11,8 @@ class Morpho(BaseSDK):
|
|
|
11
11
|
def vaults(
|
|
12
12
|
self,
|
|
13
13
|
*,
|
|
14
|
-
chain:
|
|
15
|
-
|
|
16
|
-
] = models.MorphoVaultsChain.ETHEREUM_MAINNET,
|
|
17
|
-
deposit_token: OptionalNullable[str] = UNSET,
|
|
14
|
+
chain: models.MorphoVaultsChain = models.MorphoVaultsChain.ETHEREUM_MAINNET,
|
|
15
|
+
deposit_token: Nullable[str],
|
|
18
16
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
19
17
|
server_url: Optional[str] = None,
|
|
20
18
|
timeout_ms: Optional[int] = None,
|
|
@@ -117,10 +115,8 @@ class Morpho(BaseSDK):
|
|
|
117
115
|
async def vaults_async(
|
|
118
116
|
self,
|
|
119
117
|
*,
|
|
120
|
-
chain:
|
|
121
|
-
|
|
122
|
-
] = models.MorphoVaultsChain.ETHEREUM_MAINNET,
|
|
123
|
-
deposit_token: OptionalNullable[str] = UNSET,
|
|
118
|
+
chain: models.MorphoVaultsChain = models.MorphoVaultsChain.ETHEREUM_MAINNET,
|
|
119
|
+
deposit_token: Nullable[str],
|
|
124
120
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
125
121
|
server_url: Optional[str] = None,
|
|
126
122
|
timeout_ms: Optional[int] = None,
|
|
@@ -223,11 +219,9 @@ class Morpho(BaseSDK):
|
|
|
223
219
|
def vault_position(
|
|
224
220
|
self,
|
|
225
221
|
*,
|
|
222
|
+
chain: models.MorphoVaultPositionChain = models.MorphoVaultPositionChain.ETHEREUM_MAINNET,
|
|
226
223
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
227
224
|
vault_address: str = "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
|
|
228
|
-
chain: Optional[
|
|
229
|
-
models.MorphoVaultPositionChain
|
|
230
|
-
] = models.MorphoVaultPositionChain.ETHEREUM_MAINNET,
|
|
231
225
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
232
226
|
server_url: Optional[str] = None,
|
|
233
227
|
timeout_ms: Optional[int] = None,
|
|
@@ -238,9 +232,9 @@ class Morpho(BaseSDK):
|
|
|
238
232
|
Check how many shares you own and the equivalent token amount of a given
|
|
239
233
|
vault.
|
|
240
234
|
|
|
235
|
+
:param chain: The chain to use.
|
|
241
236
|
:param user_address:
|
|
242
237
|
:param vault_address:
|
|
243
|
-
:param chain: The chain to use.
|
|
244
238
|
:param retries: Override the default retry configuration for this method
|
|
245
239
|
:param server_url: Override the default server URL for this method
|
|
246
240
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -331,11 +325,9 @@ class Morpho(BaseSDK):
|
|
|
331
325
|
async def vault_position_async(
|
|
332
326
|
self,
|
|
333
327
|
*,
|
|
328
|
+
chain: models.MorphoVaultPositionChain = models.MorphoVaultPositionChain.ETHEREUM_MAINNET,
|
|
334
329
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
335
330
|
vault_address: str = "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
|
|
336
|
-
chain: Optional[
|
|
337
|
-
models.MorphoVaultPositionChain
|
|
338
|
-
] = models.MorphoVaultPositionChain.ETHEREUM_MAINNET,
|
|
339
331
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
340
332
|
server_url: Optional[str] = None,
|
|
341
333
|
timeout_ms: Optional[int] = None,
|
|
@@ -346,9 +338,9 @@ class Morpho(BaseSDK):
|
|
|
346
338
|
Check how many shares you own and the equivalent token amount of a given
|
|
347
339
|
vault.
|
|
348
340
|
|
|
341
|
+
:param chain: The chain to use.
|
|
349
342
|
:param user_address:
|
|
350
343
|
:param vault_address:
|
|
351
|
-
:param chain: The chain to use.
|
|
352
344
|
:param retries: Override the default retry configuration for this method
|
|
353
345
|
:param server_url: Override the default server URL for this method
|
|
354
346
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -439,9 +431,7 @@ class Morpho(BaseSDK):
|
|
|
439
431
|
def markets(
|
|
440
432
|
self,
|
|
441
433
|
*,
|
|
442
|
-
chain:
|
|
443
|
-
models.MorphoMarketsChain
|
|
444
|
-
] = models.MorphoMarketsChain.ETHEREUM_MAINNET,
|
|
434
|
+
chain: models.MorphoMarketsChain = models.MorphoMarketsChain.ETHEREUM_MAINNET,
|
|
445
435
|
collateral_token: OptionalNullable[str] = UNSET,
|
|
446
436
|
loan_token: OptionalNullable[str] = UNSET,
|
|
447
437
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -547,9 +537,7 @@ class Morpho(BaseSDK):
|
|
|
547
537
|
async def markets_async(
|
|
548
538
|
self,
|
|
549
539
|
*,
|
|
550
|
-
chain:
|
|
551
|
-
models.MorphoMarketsChain
|
|
552
|
-
] = models.MorphoMarketsChain.ETHEREUM_MAINNET,
|
|
540
|
+
chain: models.MorphoMarketsChain = models.MorphoMarketsChain.ETHEREUM_MAINNET,
|
|
553
541
|
collateral_token: OptionalNullable[str] = UNSET,
|
|
554
542
|
loan_token: OptionalNullable[str] = UNSET,
|
|
555
543
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
@@ -655,11 +643,9 @@ class Morpho(BaseSDK):
|
|
|
655
643
|
def market_position(
|
|
656
644
|
self,
|
|
657
645
|
*,
|
|
646
|
+
chain: models.MorphoMarketPositionChain = models.MorphoMarketPositionChain.ETHEREUM_MAINNET,
|
|
658
647
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
659
648
|
unique_market_key: str = "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
|
|
660
|
-
chain: Optional[
|
|
661
|
-
models.MorphoMarketPositionChain
|
|
662
|
-
] = models.MorphoMarketPositionChain.ETHEREUM_MAINNET,
|
|
663
649
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
664
650
|
server_url: Optional[str] = None,
|
|
665
651
|
timeout_ms: Optional[int] = None,
|
|
@@ -670,9 +656,9 @@ class Morpho(BaseSDK):
|
|
|
670
656
|
Check how many shares you've borrowed and the equivalent token amount of a given
|
|
671
657
|
market.
|
|
672
658
|
|
|
659
|
+
:param chain: The chain to use.
|
|
673
660
|
:param user_address:
|
|
674
661
|
:param unique_market_key:
|
|
675
|
-
:param chain: The chain to use.
|
|
676
662
|
:param retries: Override the default retry configuration for this method
|
|
677
663
|
:param server_url: Override the default server URL for this method
|
|
678
664
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -763,11 +749,9 @@ class Morpho(BaseSDK):
|
|
|
763
749
|
async def market_position_async(
|
|
764
750
|
self,
|
|
765
751
|
*,
|
|
752
|
+
chain: models.MorphoMarketPositionChain = models.MorphoMarketPositionChain.ETHEREUM_MAINNET,
|
|
766
753
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
767
754
|
unique_market_key: str = "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
|
|
768
|
-
chain: Optional[
|
|
769
|
-
models.MorphoMarketPositionChain
|
|
770
|
-
] = models.MorphoMarketPositionChain.ETHEREUM_MAINNET,
|
|
771
755
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
772
756
|
server_url: Optional[str] = None,
|
|
773
757
|
timeout_ms: Optional[int] = None,
|
|
@@ -778,9 +762,9 @@ class Morpho(BaseSDK):
|
|
|
778
762
|
Check how many shares you've borrowed and the equivalent token amount of a given
|
|
779
763
|
market.
|
|
780
764
|
|
|
765
|
+
:param chain: The chain to use.
|
|
781
766
|
:param user_address:
|
|
782
767
|
:param unique_market_key:
|
|
783
|
-
:param chain: The chain to use.
|
|
784
768
|
:param retries: Override the default retry configuration for this method
|
|
785
769
|
:param server_url: Override the default server URL for this method
|
|
786
770
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
compass_api_sdk/token_sdk.py
CHANGED
|
@@ -11,10 +11,8 @@ class TokenSDK(BaseSDK):
|
|
|
11
11
|
def address(
|
|
12
12
|
self,
|
|
13
13
|
*,
|
|
14
|
-
chain:
|
|
15
|
-
|
|
16
|
-
] = models.TokenAddressChain.ARBITRUM_MAINNET,
|
|
17
|
-
token: Optional[models.TokenAddressToken] = models.TokenAddressToken.WETH,
|
|
14
|
+
chain: models.TokenAddressChain = models.TokenAddressChain.ARBITRUM_MAINNET,
|
|
15
|
+
token: models.TokenAddressToken = models.TokenAddressToken.WETH,
|
|
18
16
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
19
17
|
server_url: Optional[str] = None,
|
|
20
18
|
timeout_ms: Optional[int] = None,
|
|
@@ -113,10 +111,8 @@ class TokenSDK(BaseSDK):
|
|
|
113
111
|
async def address_async(
|
|
114
112
|
self,
|
|
115
113
|
*,
|
|
116
|
-
chain:
|
|
117
|
-
|
|
118
|
-
] = models.TokenAddressChain.ARBITRUM_MAINNET,
|
|
119
|
-
token: Optional[models.TokenAddressToken] = models.TokenAddressToken.WETH,
|
|
114
|
+
chain: models.TokenAddressChain = models.TokenAddressChain.ARBITRUM_MAINNET,
|
|
115
|
+
token: models.TokenAddressToken = models.TokenAddressToken.WETH,
|
|
120
116
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
121
117
|
server_url: Optional[str] = None,
|
|
122
118
|
timeout_ms: Optional[int] = None,
|