compass_api_sdk 0.9.7__py3-none-any.whl → 0.9.9__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 (51) hide show
  1. compass_api_sdk/_version.py +3 -3
  2. compass_api_sdk/aave_v3.py +2 -14
  3. compass_api_sdk/aerodrome_slipstream.py +0 -12
  4. compass_api_sdk/models/__init__.py +68 -6
  5. compass_api_sdk/models/aave_avg_rateop.py +1 -1
  6. compass_api_sdk/models/aave_historical_transactionsop.py +1 -46
  7. compass_api_sdk/models/aave_liquidity_changeop.py +2 -47
  8. compass_api_sdk/models/aavelooprequest.py +17 -9
  9. compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +1 -46
  10. compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +1 -46
  11. compass_api_sdk/models/generic_allowanceop.py +1 -46
  12. compass_api_sdk/models/generic_ensop.py +1 -46
  13. compass_api_sdk/models/generic_portfolioop.py +1 -46
  14. compass_api_sdk/models/generic_supported_tokensop.py +2 -47
  15. compass_api_sdk/models/generic_visualize_portfolioop.py +1 -46
  16. compass_api_sdk/models/morpho_market_positionop.py +2 -47
  17. compass_api_sdk/models/morpho_marketop.py +2 -47
  18. compass_api_sdk/models/morpho_marketsop.py +2 -10
  19. compass_api_sdk/models/morpho_user_positionop.py +2 -47
  20. compass_api_sdk/models/morpho_vault_positionop.py +2 -47
  21. compass_api_sdk/models/morpho_vaultop.py +2 -47
  22. compass_api_sdk/models/morpho_vaultsop.py +2 -10
  23. compass_api_sdk/models/pendle_marketop.py +2 -47
  24. compass_api_sdk/models/pendle_marketsop.py +2 -47
  25. compass_api_sdk/models/pendle_positionop.py +2 -47
  26. compass_api_sdk/models/pendle_positionsop.py +2 -47
  27. compass_api_sdk/models/pendleaddliquidityparams.py +45 -0
  28. compass_api_sdk/models/pendleaddliquidityrequest.py +56 -0
  29. compass_api_sdk/models/pendlegetmarketresponse.py +5 -0
  30. compass_api_sdk/models/pendlegetuserpositionresponse.py +5 -0
  31. compass_api_sdk/models/pendleremoveliquidityparams.py +45 -0
  32. compass_api_sdk/models/pendleremoveliquidityrequest.py +56 -0
  33. compass_api_sdk/models/sky_positionop.py +2 -47
  34. compass_api_sdk/models/token_addressop.py +2 -47
  35. compass_api_sdk/models/token_balanceop.py +2 -47
  36. compass_api_sdk/models/uniswap_liquidity_provision_in_rangeop.py +2 -47
  37. compass_api_sdk/models/uniswap_liquidity_provision_positionsop.py +1 -46
  38. compass_api_sdk/models/uniswap_pool_priceop.py +2 -47
  39. compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +2 -47
  40. compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +2 -47
  41. compass_api_sdk/models/useroperation.py +25 -13
  42. compass_api_sdk/morpho.py +0 -42
  43. compass_api_sdk/pendle.py +508 -66
  44. compass_api_sdk/sky.py +0 -6
  45. compass_api_sdk/token_sdk.py +0 -12
  46. compass_api_sdk/transaction_batching.py +14 -14
  47. compass_api_sdk/uniswap_v3.py +0 -30
  48. compass_api_sdk/universal.py +6 -34
  49. {compass_api_sdk-0.9.7.dist-info → compass_api_sdk-0.9.9.dist-info}/METADATA +5 -3
  50. {compass_api_sdk-0.9.7.dist-info → compass_api_sdk-0.9.9.dist-info}/RECORD +51 -47
  51. {compass_api_sdk-0.9.7.dist-info → compass_api_sdk-0.9.9.dist-info}/WHEEL +0 -0
@@ -1,17 +1,10 @@
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
11
5
  from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
12
6
  from enum import Enum
13
- from pydantic import model_serializer
14
- from typing_extensions import Annotated, NotRequired, TypedDict
7
+ from typing_extensions import Annotated, TypedDict
15
8
 
16
9
 
17
10
  class MorphoVaultPositionChain(str, Enum):
@@ -21,8 +14,6 @@ class MorphoVaultPositionChain(str, Enum):
21
14
 
22
15
  class MorphoVaultPositionRequestTypedDict(TypedDict):
23
16
  chain: MorphoVaultPositionChain
24
- block: NotRequired[Nullable[int]]
25
- r"""Optional block number (defaults to latest)."""
26
17
  user_address: str
27
18
  r"""The user address of the desired vault position."""
28
19
  vault_address: str
@@ -35,12 +26,6 @@ class MorphoVaultPositionRequest(BaseModel):
35
26
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
36
27
  ] = MorphoVaultPositionChain.ETHEREUM_MAINNET
37
28
 
38
- block: Annotated[
39
- OptionalNullable[int],
40
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
41
- ] = UNSET
42
- r"""Optional block number (defaults to latest)."""
43
-
44
29
  user_address: Annotated[
45
30
  str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
46
31
  ] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
@@ -50,33 +35,3 @@ class MorphoVaultPositionRequest(BaseModel):
50
35
  str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
51
36
  ] = "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa"
52
37
  r"""The vault address of the desired vault position."""
53
-
54
- @model_serializer(mode="wrap")
55
- def serialize_model(self, handler):
56
- optional_fields = ["block"]
57
- nullable_fields = ["block"]
58
- null_default_fields = []
59
-
60
- serialized = handler(self)
61
-
62
- m = {}
63
-
64
- for n, f in type(self).model_fields.items():
65
- k = f.alias or n
66
- val = serialized.get(k)
67
- serialized.pop(k, None)
68
-
69
- optional_nullable = k in optional_fields and k in nullable_fields
70
- is_set = (
71
- self.__pydantic_fields_set__.intersection({n})
72
- or k in null_default_fields
73
- ) # pylint: disable=no-member
74
-
75
- if val is not None and val != UNSET_SENTINEL:
76
- m[k] = val
77
- elif val != UNSET_SENTINEL and (
78
- not k in optional_fields or (optional_nullable and is_set)
79
- ):
80
- m[k] = val
81
-
82
- return m
@@ -1,17 +1,10 @@
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
11
5
  from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
12
6
  from enum import Enum
13
- from pydantic import model_serializer
14
- from typing_extensions import Annotated, NotRequired, TypedDict
7
+ from typing_extensions import Annotated, TypedDict
15
8
 
16
9
 
17
10
  class MorphoVaultChain(str, Enum):
@@ -21,8 +14,6 @@ class MorphoVaultChain(str, Enum):
21
14
 
22
15
  class MorphoVaultRequestTypedDict(TypedDict):
23
16
  chain: MorphoVaultChain
24
- block: NotRequired[Nullable[int]]
25
- r"""Optional block number (defaults to latest)."""
26
17
  vault_address: str
27
18
  r"""The vault address of the desired vault data & metrics."""
28
19
 
@@ -33,43 +24,7 @@ class MorphoVaultRequest(BaseModel):
33
24
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
34
25
  ] = MorphoVaultChain.ETHEREUM_MAINNET
35
26
 
36
- block: Annotated[
37
- OptionalNullable[int],
38
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
39
- ] = UNSET
40
- r"""Optional block number (defaults to latest)."""
41
-
42
27
  vault_address: Annotated[
43
28
  str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
44
29
  ] = "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa"
45
30
  r"""The vault address of the desired vault data & metrics."""
46
-
47
- @model_serializer(mode="wrap")
48
- def serialize_model(self, handler):
49
- optional_fields = ["block"]
50
- nullable_fields = ["block"]
51
- null_default_fields = []
52
-
53
- serialized = handler(self)
54
-
55
- m = {}
56
-
57
- for n, f in type(self).model_fields.items():
58
- k = f.alias or n
59
- val = serialized.get(k)
60
- serialized.pop(k, None)
61
-
62
- optional_nullable = k in optional_fields and k in nullable_fields
63
- is_set = (
64
- self.__pydantic_fields_set__.intersection({n})
65
- or k in null_default_fields
66
- ) # pylint: disable=no-member
67
-
68
- if val is not None and val != UNSET_SENTINEL:
69
- m[k] = val
70
- elif val != UNSET_SENTINEL and (
71
- not k in optional_fields or (optional_nullable and is_set)
72
- ):
73
- m[k] = val
74
-
75
- return m
@@ -21,8 +21,6 @@ class MorphoVaultsChain(str, Enum):
21
21
 
22
22
  class MorphoVaultsRequestTypedDict(TypedDict):
23
23
  chain: MorphoVaultsChain
24
- block: NotRequired[Nullable[int]]
25
- r"""Optional block number (defaults to latest)."""
26
24
  deposit_token: NotRequired[Nullable[str]]
27
25
  r"""Token address that will filter vaults by this deposit token."""
28
26
 
@@ -33,12 +31,6 @@ class MorphoVaultsRequest(BaseModel):
33
31
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
34
32
  ] = MorphoVaultsChain.ETHEREUM_MAINNET
35
33
 
36
- block: Annotated[
37
- OptionalNullable[int],
38
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
39
- ] = UNSET
40
- r"""Optional block number (defaults to latest)."""
41
-
42
34
  deposit_token: Annotated[
43
35
  OptionalNullable[str],
44
36
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
@@ -47,8 +39,8 @@ class MorphoVaultsRequest(BaseModel):
47
39
 
48
40
  @model_serializer(mode="wrap")
49
41
  def serialize_model(self, handler):
50
- optional_fields = ["block", "deposit_token"]
51
- nullable_fields = ["block", "deposit_token"]
42
+ optional_fields = ["deposit_token"]
43
+ nullable_fields = ["deposit_token"]
52
44
  null_default_fields = []
53
45
 
54
46
  serialized = handler(self)
@@ -1,17 +1,10 @@
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
11
5
  from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
12
6
  from enum import Enum
13
- from pydantic import model_serializer
14
- from typing_extensions import Annotated, NotRequired, TypedDict
7
+ from typing_extensions import Annotated, TypedDict
15
8
 
16
9
 
17
10
  class PendleMarketChain(str, Enum):
@@ -25,8 +18,6 @@ class PendleMarketChain(str, Enum):
25
18
  class PendleMarketRequestTypedDict(TypedDict):
26
19
  chain: PendleMarketChain
27
20
  r"""The chain to use."""
28
- block: NotRequired[Nullable[int]]
29
- r"""Optional block number (defaults to latest)."""
30
21
  market_address: str
31
22
  r"""The market address of the desired position."""
32
23
 
@@ -38,43 +29,7 @@ class PendleMarketRequest(BaseModel):
38
29
  ] = PendleMarketChain.ETHEREUM_MAINNET
39
30
  r"""The chain to use."""
40
31
 
41
- block: Annotated[
42
- OptionalNullable[int],
43
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
44
- ] = UNSET
45
- r"""Optional block number (defaults to latest)."""
46
-
47
32
  market_address: Annotated[
48
33
  str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
49
34
  ] = "0xc374f7ec85f8c7de3207a10bb1978ba104bda3b2"
50
35
  r"""The market address of the desired position."""
51
-
52
- @model_serializer(mode="wrap")
53
- def serialize_model(self, handler):
54
- optional_fields = ["block"]
55
- nullable_fields = ["block"]
56
- null_default_fields = []
57
-
58
- serialized = handler(self)
59
-
60
- m = {}
61
-
62
- for n, f in type(self).model_fields.items():
63
- k = f.alias or n
64
- val = serialized.get(k)
65
- serialized.pop(k, None)
66
-
67
- optional_nullable = k in optional_fields and k in nullable_fields
68
- is_set = (
69
- self.__pydantic_fields_set__.intersection({n})
70
- or k in null_default_fields
71
- ) # pylint: disable=no-member
72
-
73
- if val is not None and val != UNSET_SENTINEL:
74
- m[k] = val
75
- elif val != UNSET_SENTINEL and (
76
- not k in optional_fields or (optional_nullable and is_set)
77
- ):
78
- m[k] = val
79
-
80
- return m
@@ -1,17 +1,10 @@
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
11
5
  from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
12
6
  from enum import Enum
13
- from pydantic import model_serializer
14
- from typing_extensions import Annotated, NotRequired, TypedDict
7
+ from typing_extensions import Annotated, TypedDict
15
8
 
16
9
 
17
10
  class PendleMarketsChain(str, Enum):
@@ -25,8 +18,6 @@ class PendleMarketsChain(str, Enum):
25
18
  class PendleMarketsRequestTypedDict(TypedDict):
26
19
  chain: PendleMarketsChain
27
20
  r"""The chain to use."""
28
- block: NotRequired[Nullable[int]]
29
- r"""Optional block number (defaults to latest)."""
30
21
 
31
22
 
32
23
  class PendleMarketsRequest(BaseModel):
@@ -35,39 +26,3 @@ class PendleMarketsRequest(BaseModel):
35
26
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
36
27
  ] = PendleMarketsChain.ETHEREUM_MAINNET
37
28
  r"""The chain to use."""
38
-
39
- block: Annotated[
40
- OptionalNullable[int],
41
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
42
- ] = UNSET
43
- r"""Optional block number (defaults to latest)."""
44
-
45
- @model_serializer(mode="wrap")
46
- def serialize_model(self, handler):
47
- optional_fields = ["block"]
48
- nullable_fields = ["block"]
49
- null_default_fields = []
50
-
51
- serialized = handler(self)
52
-
53
- m = {}
54
-
55
- for n, f in type(self).model_fields.items():
56
- k = f.alias or n
57
- val = serialized.get(k)
58
- serialized.pop(k, None)
59
-
60
- optional_nullable = k in optional_fields and k in nullable_fields
61
- is_set = (
62
- self.__pydantic_fields_set__.intersection({n})
63
- or k in null_default_fields
64
- ) # pylint: disable=no-member
65
-
66
- if val is not None and val != UNSET_SENTINEL:
67
- m[k] = val
68
- elif val != UNSET_SENTINEL and (
69
- not k in optional_fields or (optional_nullable and is_set)
70
- ):
71
- m[k] = val
72
-
73
- return m
@@ -1,17 +1,10 @@
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
11
5
  from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
12
6
  from enum import Enum
13
- from pydantic import model_serializer
14
- from typing_extensions import Annotated, NotRequired, TypedDict
7
+ from typing_extensions import Annotated, TypedDict
15
8
 
16
9
 
17
10
  class PendlePositionChain(str, Enum):
@@ -25,8 +18,6 @@ class PendlePositionChain(str, Enum):
25
18
  class PendlePositionRequestTypedDict(TypedDict):
26
19
  chain: PendlePositionChain
27
20
  r"""The chain to use."""
28
- block: NotRequired[Nullable[int]]
29
- r"""Optional block number (defaults to latest)."""
30
21
  user_address: str
31
22
  r"""The user address of the desired position."""
32
23
  market_address: str
@@ -40,12 +31,6 @@ class PendlePositionRequest(BaseModel):
40
31
  ] = PendlePositionChain.ETHEREUM_MAINNET
41
32
  r"""The chain to use."""
42
33
 
43
- block: Annotated[
44
- OptionalNullable[int],
45
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
46
- ] = UNSET
47
- r"""Optional block number (defaults to latest)."""
48
-
49
34
  user_address: Annotated[
50
35
  str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
51
36
  ] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
@@ -55,33 +40,3 @@ class PendlePositionRequest(BaseModel):
55
40
  str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
56
41
  ] = "0xc374f7ec85f8c7de3207a10bb1978ba104bda3b2"
57
42
  r"""The market address of the desired position."""
58
-
59
- @model_serializer(mode="wrap")
60
- def serialize_model(self, handler):
61
- optional_fields = ["block"]
62
- nullable_fields = ["block"]
63
- null_default_fields = []
64
-
65
- serialized = handler(self)
66
-
67
- m = {}
68
-
69
- for n, f in type(self).model_fields.items():
70
- k = f.alias or n
71
- val = serialized.get(k)
72
- serialized.pop(k, None)
73
-
74
- optional_nullable = k in optional_fields and k in nullable_fields
75
- is_set = (
76
- self.__pydantic_fields_set__.intersection({n})
77
- or k in null_default_fields
78
- ) # pylint: disable=no-member
79
-
80
- if val is not None and val != UNSET_SENTINEL:
81
- m[k] = val
82
- elif val != UNSET_SENTINEL and (
83
- not k in optional_fields or (optional_nullable and is_set)
84
- ):
85
- m[k] = val
86
-
87
- return m
@@ -1,17 +1,10 @@
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
11
5
  from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
12
6
  from enum import Enum
13
- from pydantic import model_serializer
14
- from typing_extensions import Annotated, NotRequired, TypedDict
7
+ from typing_extensions import Annotated, TypedDict
15
8
 
16
9
 
17
10
  class PendlePositionsChain(str, Enum):
@@ -25,8 +18,6 @@ class PendlePositionsChain(str, Enum):
25
18
  class PendlePositionsRequestTypedDict(TypedDict):
26
19
  chain: PendlePositionsChain
27
20
  r"""The chain to use."""
28
- block: NotRequired[Nullable[int]]
29
- r"""Optional block number (defaults to latest)."""
30
21
  user_address: str
31
22
  r"""The user address of the desired position."""
32
23
 
@@ -38,43 +29,7 @@ class PendlePositionsRequest(BaseModel):
38
29
  ] = PendlePositionsChain.ETHEREUM_MAINNET
39
30
  r"""The chain to use."""
40
31
 
41
- block: Annotated[
42
- OptionalNullable[int],
43
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
44
- ] = UNSET
45
- r"""Optional block number (defaults to latest)."""
46
-
47
32
  user_address: Annotated[
48
33
  str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
49
34
  ] = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B"
50
35
  r"""The user address of the desired position."""
51
-
52
- @model_serializer(mode="wrap")
53
- def serialize_model(self, handler):
54
- optional_fields = ["block"]
55
- nullable_fields = ["block"]
56
- null_default_fields = []
57
-
58
- serialized = handler(self)
59
-
60
- m = {}
61
-
62
- for n, f in type(self).model_fields.items():
63
- k = f.alias or n
64
- val = serialized.get(k)
65
- serialized.pop(k, None)
66
-
67
- optional_nullable = k in optional_fields and k in nullable_fields
68
- is_set = (
69
- self.__pydantic_fields_set__.intersection({n})
70
- or k in null_default_fields
71
- ) # pylint: disable=no-member
72
-
73
- if val is not None and val != UNSET_SENTINEL:
74
- m[k] = val
75
- elif val != UNSET_SENTINEL and (
76
- not k in optional_fields or (optional_nullable and is_set)
77
- ):
78
- m[k] = val
79
-
80
- return m
@@ -0,0 +1,45 @@
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 validate_const
6
+ import pydantic
7
+ from pydantic.functional_validators import AfterValidator
8
+ from typing import Literal, Optional, Union
9
+ from typing_extensions import Annotated, TypeAliasType, TypedDict
10
+
11
+
12
+ PendleAddLiquidityParamsAmountTypedDict = TypeAliasType(
13
+ "PendleAddLiquidityParamsAmountTypedDict", Union[float, str]
14
+ )
15
+ r"""The amount of liquidity you would like to add to the market denominated in the market's Underlying Token."""
16
+
17
+
18
+ PendleAddLiquidityParamsAmount = TypeAliasType(
19
+ "PendleAddLiquidityParamsAmount", Union[float, str]
20
+ )
21
+ r"""The amount of liquidity you would like to add to the market denominated in the market's Underlying Token."""
22
+
23
+
24
+ class PendleAddLiquidityParamsTypedDict(TypedDict):
25
+ market_address: str
26
+ r"""The address identifying which Pendle Market you would like to add liquidity to."""
27
+ amount: PendleAddLiquidityParamsAmountTypedDict
28
+ r"""The amount of liquidity you would like to add to the market denominated in the market's Underlying Token."""
29
+ action_type: Literal["PENDLE_ADD_LIQUIDITY"]
30
+
31
+
32
+ class PendleAddLiquidityParams(BaseModel):
33
+ market_address: str
34
+ r"""The address identifying which Pendle Market you would like to add liquidity to."""
35
+
36
+ amount: PendleAddLiquidityParamsAmount
37
+ r"""The amount of liquidity you would like to add to the market denominated in the market's Underlying Token."""
38
+
39
+ ACTION_TYPE: Annotated[
40
+ Annotated[
41
+ Optional[Literal["PENDLE_ADD_LIQUIDITY"]],
42
+ AfterValidator(validate_const("PENDLE_ADD_LIQUIDITY")),
43
+ ],
44
+ pydantic.Field(alias="action_type"),
45
+ ] = "PENDLE_ADD_LIQUIDITY"
@@ -0,0 +1,56 @@
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 compass_api_sdk.utils import validate_const
7
+ import pydantic
8
+ from pydantic.functional_validators import AfterValidator
9
+ from typing import Literal, Optional, Union
10
+ from typing_extensions import Annotated, TypeAliasType, TypedDict
11
+
12
+
13
+ PendleAddLiquidityRequestAmountTypedDict = TypeAliasType(
14
+ "PendleAddLiquidityRequestAmountTypedDict", Union[float, str]
15
+ )
16
+ r"""The amount of liquidity you would like to add to the market denominated in the market's Underlying Token."""
17
+
18
+
19
+ PendleAddLiquidityRequestAmount = TypeAliasType(
20
+ "PendleAddLiquidityRequestAmount", Union[float, str]
21
+ )
22
+ r"""The amount of liquidity you would like to add to the market denominated in the market's Underlying Token."""
23
+
24
+
25
+ class PendleAddLiquidityRequestTypedDict(TypedDict):
26
+ market_address: str
27
+ r"""The address identifying which Pendle Market you would like to add liquidity to."""
28
+ amount: PendleAddLiquidityRequestAmountTypedDict
29
+ r"""The amount of liquidity you would like to add to the market denominated in the market's Underlying Token."""
30
+ chain: Chain
31
+ r"""The chain to use."""
32
+ sender: str
33
+ r"""The address of the transaction sender."""
34
+ action_type: Literal["PENDLE_ADD_LIQUIDITY"]
35
+
36
+
37
+ class PendleAddLiquidityRequest(BaseModel):
38
+ market_address: str
39
+ r"""The address identifying which Pendle Market you would like to add liquidity to."""
40
+
41
+ amount: PendleAddLiquidityRequestAmount
42
+ r"""The amount of liquidity you would like to add to the market denominated in the market's Underlying Token."""
43
+
44
+ chain: Chain
45
+ r"""The chain to use."""
46
+
47
+ sender: str
48
+ r"""The address of the transaction sender."""
49
+
50
+ ACTION_TYPE: Annotated[
51
+ Annotated[
52
+ Optional[Literal["PENDLE_ADD_LIQUIDITY"]],
53
+ AfterValidator(validate_const("PENDLE_ADD_LIQUIDITY")),
54
+ ],
55
+ pydantic.Field(alias="action_type"),
56
+ ] = "PENDLE_ADD_LIQUIDITY"
@@ -12,6 +12,8 @@ class PendleGetMarketResponseTypedDict(TypedDict):
12
12
  r"""The implied APY of the market."""
13
13
  maturity_date: datetime
14
14
  r"""The maturity date of the market. ISO 8601 format. UTC timezone."""
15
+ market_address: str
16
+ r"""The address of the market."""
15
17
  underlying_token: Erc20DataTypedDict
16
18
  sy: Erc20DataTypedDict
17
19
  pt: Erc20DataTypedDict
@@ -25,6 +27,9 @@ class PendleGetMarketResponse(BaseModel):
25
27
  maturity_date: datetime
26
28
  r"""The maturity date of the market. ISO 8601 format. UTC timezone."""
27
29
 
30
+ market_address: str
31
+ r"""The address of the market."""
32
+
28
33
  underlying_token: Erc20Data
29
34
 
30
35
  sy: Erc20Data
@@ -15,6 +15,8 @@ class PendleGetUserPositionResponseTypedDict(TypedDict):
15
15
  r"""The amount of PT tokens the user currently holds."""
16
16
  yt_balance: str
17
17
  r"""The amount of YT tokens the user currently holds."""
18
+ lp_balance: str
19
+ r"""The amount of LP tokens the user currently holds."""
18
20
  underlying_token_balance: str
19
21
  r"""The amount of underlying tokens the user currently holds."""
20
22
  underlying_token_name: str
@@ -38,6 +40,9 @@ class PendleGetUserPositionResponse(BaseModel):
38
40
  yt_balance: str
39
41
  r"""The amount of YT tokens the user currently holds."""
40
42
 
43
+ lp_balance: str
44
+ r"""The amount of LP tokens the user currently holds."""
45
+
41
46
  underlying_token_balance: str
42
47
  r"""The amount of underlying tokens the user currently holds."""
43
48
 
@@ -0,0 +1,45 @@
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 validate_const
6
+ import pydantic
7
+ from pydantic.functional_validators import AfterValidator
8
+ from typing import Literal, Optional, Union
9
+ from typing_extensions import Annotated, TypeAliasType, TypedDict
10
+
11
+
12
+ PendleRemoveLiquidityParamsAmountTypedDict = TypeAliasType(
13
+ "PendleRemoveLiquidityParamsAmountTypedDict", Union[float, str]
14
+ )
15
+ r"""The amount of liquidity you would like to remove from the market denominated in the market's Liquidity Provider Token (LP)."""
16
+
17
+
18
+ PendleRemoveLiquidityParamsAmount = TypeAliasType(
19
+ "PendleRemoveLiquidityParamsAmount", Union[float, str]
20
+ )
21
+ r"""The amount of liquidity you would like to remove from the market denominated in the market's Liquidity Provider Token (LP)."""
22
+
23
+
24
+ class PendleRemoveLiquidityParamsTypedDict(TypedDict):
25
+ market_address: str
26
+ r"""The address identifying which Pendle Market you would like to remove liquidity from."""
27
+ amount: PendleRemoveLiquidityParamsAmountTypedDict
28
+ r"""The amount of liquidity you would like to remove from the market denominated in the market's Liquidity Provider Token (LP)."""
29
+ action_type: Literal["PENDLE_REMOVE_LIQUIDITY"]
30
+
31
+
32
+ class PendleRemoveLiquidityParams(BaseModel):
33
+ market_address: str
34
+ r"""The address identifying which Pendle Market you would like to remove liquidity from."""
35
+
36
+ amount: PendleRemoveLiquidityParamsAmount
37
+ r"""The amount of liquidity you would like to remove from the market denominated in the market's Liquidity Provider Token (LP)."""
38
+
39
+ ACTION_TYPE: Annotated[
40
+ Annotated[
41
+ Optional[Literal["PENDLE_REMOVE_LIQUIDITY"]],
42
+ AfterValidator(validate_const("PENDLE_REMOVE_LIQUIDITY")),
43
+ ],
44
+ pydantic.Field(alias="action_type"),
45
+ ] = "PENDLE_REMOVE_LIQUIDITY"