compass_api_sdk 0.1.13__py3-none-any.whl → 0.2.0__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.

@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: compass_api_sdk
3
- Version: 0.1.13
3
+ Version: 0.2.0
4
4
  Summary: Compass API Python SDK
5
5
  Author: royalnine
6
- Requires-Python: >=3.9
6
+ Requires-Python: >=3.9.2
7
7
  Classifier: Programming Language :: Python :: 3
8
- Classifier: Programming Language :: Python :: 3.9
9
8
  Classifier: Programming Language :: Python :: 3.10
10
9
  Classifier: Programming Language :: Python :: 3.11
11
10
  Classifier: Programming Language :: Python :: 3.12
@@ -135,7 +134,7 @@ with CompassAPISDK(
135
134
  api_key_auth="<YOUR_API_KEY_HERE>",
136
135
  ) as cas_client:
137
136
 
138
- res = cas_client.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
137
+ res = cas_client.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
139
138
 
140
139
  # Handle response
141
140
  print(res)
@@ -155,7 +154,7 @@ async def main():
155
154
  api_key_auth="<YOUR_API_KEY_HERE>",
156
155
  ) as cas_client:
157
156
 
158
- res = await cas_client.aave_v3.rate_async(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
157
+ res = await cas_client.aave_v3.reserve_overview_async(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
159
158
 
160
159
  # Handle response
161
160
  print(res)
@@ -184,7 +183,7 @@ with CompassAPISDK(
184
183
  api_key_auth="<YOUR_API_KEY_HERE>",
185
184
  ) as cas_client:
186
185
 
187
- res = cas_client.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
186
+ res = cas_client.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
188
187
 
189
188
  # Handle response
190
189
  print(res)
@@ -200,6 +199,7 @@ with CompassAPISDK(
200
199
 
201
200
  ### [aave_v3](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md)
202
201
 
202
+ * [reserve_overview](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#reserve_overview) - Reserve overview
203
203
  * [rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#rate) - Interest rates
204
204
  * [token_price](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#token_price) - Token prices
205
205
  * [liquidity_change](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#liquidity_change) - Liquidity index
@@ -298,7 +298,7 @@ with CompassAPISDK(
298
298
  api_key_auth="<YOUR_API_KEY_HERE>",
299
299
  ) as cas_client:
300
300
 
301
- res = cas_client.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC,
301
+ res = cas_client.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC,
302
302
  RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
303
303
 
304
304
  # Handle response
@@ -317,7 +317,7 @@ with CompassAPISDK(
317
317
  api_key_auth="<YOUR_API_KEY_HERE>",
318
318
  ) as cas_client:
319
319
 
320
- res = cas_client.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
320
+ res = cas_client.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
321
321
 
322
322
  # Handle response
323
323
  print(res)
@@ -339,7 +339,7 @@ By default, an API error will raise a errors.APIError exception, which has the f
339
339
  | `.raw_response` | *httpx.Response* | The raw HTTP response |
340
340
  | `.body` | *str* | The response content |
341
341
 
342
- When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `rate_async` method may raise the following exceptions:
342
+ When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `reserve_overview_async` method may raise the following exceptions:
343
343
 
344
344
  | Error Type | Status Code | Content Type |
345
345
  | -------------------------- | ----------- | ---------------- |
@@ -358,7 +358,7 @@ with CompassAPISDK(
358
358
  res = None
359
359
  try:
360
360
 
361
- res = cas_client.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
361
+ res = cas_client.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
362
362
 
363
363
  # Handle response
364
364
  print(res)
@@ -387,7 +387,7 @@ with CompassAPISDK(
387
387
  api_key_auth="<YOUR_API_KEY_HERE>",
388
388
  ) as cas_client:
389
389
 
390
- res = cas_client.aave_v3.rate(chain=models.AaveRateChain.ARBITRUM_MAINNET, token=models.AaveRateToken.USDC)
390
+ res = cas_client.aave_v3.reserve_overview(chain=models.AaveReserveOverviewChain.ARBITRUM_MAINNET, token=models.AaveReserveOverviewToken.USDC)
391
391
 
392
392
  # Handle response
393
393
  print(res)
@@ -3,18 +3,19 @@ compass_api_sdk/_hooks/__init__.py,sha256=p5J13DeYuISQyQWirjJAObHIf2VtIlOtFqnIpv
3
3
  compass_api_sdk/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
4
4
  compass_api_sdk/_hooks/sdkhooks.py,sha256=eVxHB2Q_JG6zZx5xn74i208ij-fpTHqq2jod6fbghRQ,2503
5
5
  compass_api_sdk/_hooks/types.py,sha256=VC7TZz0BiM721MghXneEovG3UkaktRkt1OhMY3iLmZM,2818
6
- compass_api_sdk/_version.py,sha256=WvDA7Vm-Y9MoB3iMv_0mKQuYLrnopGBHtqfcXa05yIc,476
7
- compass_api_sdk/aave_v3.py,sha256=NvBRCg7v6ldYV5MAB3k541Bikh3xESC5-eVU8HJXZEE,98662
6
+ compass_api_sdk/_version.py,sha256=RSaF-sLYssj-T2rkuB7Ui-Pa-OFrtfBK8mOrcc66xCk,472
7
+ compass_api_sdk/aave_v3.py,sha256=JoHxEHy1c9ofvvCzTxp6S7qNz51_eW9clpVfMQI1xSo,107332
8
8
  compass_api_sdk/aerodrome_slipstream.py,sha256=iZLOFguQiZD8eMNIxV_4h8JSr9P-V4gISxNCXisVYN8,83389
9
9
  compass_api_sdk/basesdk.py,sha256=29RfgnfgQq_cRx8OHdQEdJuJ2DrgRZlzGIPC-_6-2bM,12136
10
10
  compass_api_sdk/errors/__init__.py,sha256=f8nyj2IhW5h_xtEeg6cfKgByLkqowLv0Fxm0hUofQPs,257
11
11
  compass_api_sdk/errors/apierror.py,sha256=9mTyJSyvUAOnSfW_1HWt9dGl8IDlpQ68DebwYsDNdug,528
12
12
  compass_api_sdk/errors/httpvalidationerror.py,sha256=KBdpK3fYQoeMB-3m9dLKiMYimFN7B9VLma6YqMKX5k0,671
13
13
  compass_api_sdk/httpclient.py,sha256=xAUX3nxG-fwYAE9lfv9uaspYKMFRJf5NM79mV2HKb1I,5486
14
- compass_api_sdk/models/__init__.py,sha256=v0AGM-1xbY8Mcq3LTXhms_5RAkfa_xyh8UroFr1aWC4,49793
14
+ compass_api_sdk/models/__init__.py,sha256=yPhnHmybEDkljowXnzLkYSuXq1bk3dJiU5v9l3lEEGY,45060
15
15
  compass_api_sdk/models/aave_historical_transactionsop.py,sha256=ruwlHogJUn6HGWtoRNwEmoA6kXdu8rbDrxzJo-e9UmA,1461
16
16
  compass_api_sdk/models/aave_liquidity_changeop.py,sha256=tR_nsySpTiXHxIreoDJ-Bk07wZgTLGLM05oWxsfpbrM,2801
17
17
  compass_api_sdk/models/aave_rateop.py,sha256=kJgtnlxry6YRxLZvCNV4kKhHOT2Y5duKt-ADyh2NrNg,2405
18
+ compass_api_sdk/models/aave_reserve_overviewop.py,sha256=9Lfch89ugS8mXZKTQ-YBJqVxRkCHx_UFNlKgTHwTDvo,2515
18
19
  compass_api_sdk/models/aave_token_priceop.py,sha256=RsaN0gHPtm8o5fdE_1T_ZZjvXADapfZR8YLjEGE_1VA,2465
19
20
  compass_api_sdk/models/aave_user_position_per_tokenop.py,sha256=MF_eaxTQkK4sC7ONiVHOcb0PJJBnrAh1j1_XredC3aU,2735
20
21
  compass_api_sdk/models/aave_user_position_summaryop.py,sha256=IreTBDQ92L3CVsTQD_Bc50yt6m5ZM2yuUEYMFhrFkJQ,1060
@@ -26,6 +27,7 @@ compass_api_sdk/models/aaveliquiditychangeresponse.py,sha256=G_fjNFMMAViJVXUejTd
26
27
  compass_api_sdk/models/aaverateresponse.py,sha256=7Ra_FKYbGrm7ZqzNi8-1T0v2xDAGyZf6Iw5Juh1bXBI,1156
27
28
  compass_api_sdk/models/aaverepayparams.py,sha256=ZQLgjGCZUK20dZ7UgrT3j4c6jn2Sq41M15riWbYh-ss,2858
28
29
  compass_api_sdk/models/aaverepayrequest.py,sha256=ZIvYL0pamDkJDJjCRrLZ5Q6e2vQp-wptob9wGCAQS0g,3117
30
+ compass_api_sdk/models/aavereserveoverviewresponse.py,sha256=PaGkkZK3alCnkd4ss2-LR4dKGzKX0P8Fkj_cz3U61ko,1213
29
31
  compass_api_sdk/models/aavesupplyparams.py,sha256=0ZntRNtspIaXs09S1ckA8jL3xKbBL-SApMZNkuE76Ks,2564
30
32
  compass_api_sdk/models/aavesupplyrequest.py,sha256=KyQ995EhhSTAkA7OWKftzyzaQ3cJviBg-RzlR8AnTCA,2823
31
33
  compass_api_sdk/models/aavetokenpriceresponse.py,sha256=LZTNIuSn_PHY5Im9e6ZF9CWnFM6O01kHBwHjTiQypqI,401
@@ -36,12 +38,8 @@ compass_api_sdk/models/aavewithdrawrequest.py,sha256=gl9qAknwFkrHB6HwecaZrjV4z92
36
38
  compass_api_sdk/models/action.py,sha256=LxhxMxM1if4CGM_GJF-mGYwBnQOlkCaczSuGCp3oGTs,391
37
39
  compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py,sha256=4at6KH--Cw5G6QasipHEuBBbNdPSaO4PCaVS22Krujw,1267
38
40
  compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py,sha256=6n7rv1pcMve_3chQvgLT1vBKeimp-XPNK7-mCfv9Dwc,4578
39
- compass_api_sdk/models/aerodromeaddliquidityethparams.py,sha256=1taXq92sPvxjDNRKQFXiFrrYcg7CKUnTH4s4nJc5Z04,5366
40
- compass_api_sdk/models/aerodromeaddliquidityparams.py,sha256=XkLS-48fubuAl8-uWl1IyUlSeciMX1iw9qZ9Z8Q9Ccs,5621
41
41
  compass_api_sdk/models/aerodromelppositionsresponse.py,sha256=FpFiz78711CsO1r3lLo-YaPldHL6UTVruNxhWlXkhOY,861
42
42
  compass_api_sdk/models/aerodromeposition.py,sha256=I-SHEmis8d5lGu37mauJPomjQKJs4_lvgtCYER5Fn3o,1695
43
- compass_api_sdk/models/aerodromeremoveliquidityethrequest.py,sha256=aMREQj87xMsZ7bF-bg9ifJS1AtQ8iiL4l6Jaw8jK9Ck,4977
44
- compass_api_sdk/models/aerodromeremoveliquidityrequest.py,sha256=s8FfX_bhf3wYgr1xn891YPQZS4QwCh3i3OpKDrZs3W0,5330
45
43
  compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py,sha256=ylpVCckGjwfTHQFG5msi6avuYcYN6XePLAQLLpoSZ3I,2815
46
44
  compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py,sha256=fjIMtPl1bJ_RwzjkYoosKPvP_TtiCXrnfTG1DSi71Lo,3074
47
45
  compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionparams.py,sha256=qOJLwV1Y270Lm9F0cwdD3_5QeTdiBBi6QyQ8y1_kV1Y,4221
@@ -53,9 +51,6 @@ compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py,sha256=_SXemwKeWh
53
51
  compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py,sha256=PO94biGABjm6lkTQQk-Kx436fi89-zOncK7ekoanB2U,3231
54
52
  compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionparams.py,sha256=DQKPJCyd66mFq6irFqMh7wvAQyF_HniRxoASPmmsvcQ,2265
55
53
  compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py,sha256=DXbQqFH6qRyrnqQ61y8O7regkqgu_kqY0yY1AamZXTs,1738
56
- compass_api_sdk/models/aerodromeswapethfortokenparams.py,sha256=9Bm5QT080bk92ubF6FQ52TeNuL6U4kgl0ZVl26tH5OE,4051
57
- compass_api_sdk/models/aerodromeswaptokenforethparams.py,sha256=1VJmGnBNwiFf0Sf8HwIG-E9fOYj9HZualuzROrdeIlI,4053
58
- compass_api_sdk/models/aerodromeswaptokensparams.py,sha256=6ZWbvh3DZ7L76nLR85KKXXjiGyETI6WOm3kGwxLXoMY,4454
59
54
  compass_api_sdk/models/allowanceinforesponse.py,sha256=OIvJVxMrRNBay8DIeqlwGBFQ1fbaGVWlaGsOZpo40fY,1393
60
55
  compass_api_sdk/models/borrow.py,sha256=Yq3HrMPlvcqKN41vdrJpDuW6AeZ9vkVfvLKbmvWM4NE,928
61
56
  compass_api_sdk/models/chain.py,sha256=TzxP0Ujy0L-o3__gggsKeJIWMaflQTNnNSEaXBnSlGU,304
@@ -95,8 +90,8 @@ compass_api_sdk/models/morphosupplycollateralrequest.py,sha256=gfP9uKLTNquyWvPcK
95
90
  compass_api_sdk/models/morphovault.py,sha256=hlBsWy_9G7dtwBooeSEVhz-OVTjyzl1SSqarqRq1ph8,1337
96
91
  compass_api_sdk/models/morphowithdrawcollateralrequest.py,sha256=TVfxhB8eSgu8xeO3eL7XAiCB54gopvpZpb3dgNfVNXs,3111
97
92
  compass_api_sdk/models/morphowithdrawrequest.py,sha256=PCrsA5Tg8zI8LiraHqniLvj6mhbvMZUCn6gKmUvj-pM,2309
98
- compass_api_sdk/models/multicallaction.py,sha256=ll0DjVAsG3xDNBmUCgSw82C-hcU7vl1iTQYbSrqdXMU,6070
99
- compass_api_sdk/models/multicallactiontype.py,sha256=sh0DRth1Ka4K1K-sDfPB_E4UkcpxHqCni2pwrUjOeFg,1686
93
+ compass_api_sdk/models/multicallaction.py,sha256=l3HyRN2OIiBWGSVexXZCdce8IOvdbwisUwydvoP3UeM,4559
94
+ compass_api_sdk/models/multicallactiontype.py,sha256=8vkak6f6uslIgD8DG8UnynCI9GhU69sIxk6Fm9pLT-4,1168
100
95
  compass_api_sdk/models/multicallauthorizationrequest.py,sha256=h5-2acLlhV9assgIIHyVIgTak1IJathqa-viS-PkvMA,1155
101
96
  compass_api_sdk/models/multicallauthorizationresponse.py,sha256=3jjdz9Mz-tKjhBzZbVaJW51no58HSqcxfHJwuZsgnhg,914
102
97
  compass_api_sdk/models/multicallexecuterequest.py,sha256=ST9BeTeptLKi6UO7lWH4-mYiYuG7t5scF1CLnb4Sbd0,1105
@@ -184,6 +179,6 @@ compass_api_sdk/utils/security.py,sha256=ktep3HKwbFs-MLxUYTM8Jd4v-ZBum5_Z0u1PFId
184
179
  compass_api_sdk/utils/serializers.py,sha256=hiHBXM1AY8_N2Z_rvFfNSYwvLBkSQlPGFp8poasdU4s,5986
185
180
  compass_api_sdk/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
186
181
  compass_api_sdk/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
187
- compass_api_sdk-0.1.13.dist-info/METADATA,sha256=FK7flUkBzsfprHCkbbztMi5G9nqaha_C748MvCUysxU,24302
188
- compass_api_sdk-0.1.13.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
189
- compass_api_sdk-0.1.13.dist-info/RECORD,,
182
+ compass_api_sdk-0.2.0.dist-info/METADATA,sha256=8reiOKriq33lVUKQtU5DAw5uDRf1tvI3Vsl8ILlfc14,24636
183
+ compass_api_sdk-0.2.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
184
+ compass_api_sdk-0.2.0.dist-info/RECORD,,
@@ -1,153 +0,0 @@
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 (
6
- BaseModel,
7
- Nullable,
8
- OptionalNullable,
9
- UNSET,
10
- UNSET_SENTINEL,
11
- )
12
- from pydantic import model_serializer
13
- from typing import Union
14
- from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
-
16
-
17
- AmountTokenDesiredTypedDict = TypeAliasType(
18
- "AmountTokenDesiredTypedDict", Union[float, str]
19
- )
20
- r"""The amount of token you want to provide"""
21
-
22
-
23
- AmountTokenDesired = TypeAliasType("AmountTokenDesired", Union[float, str])
24
- r"""The amount of token you want to provide"""
25
-
26
-
27
- AmountEthDesiredTypedDict = TypeAliasType(
28
- "AmountEthDesiredTypedDict", Union[float, str]
29
- )
30
- r"""The amount of WETH you want to provide"""
31
-
32
-
33
- AmountEthDesired = TypeAliasType("AmountEthDesired", Union[float, str])
34
- r"""The amount of WETH you want to provide"""
35
-
36
-
37
- AerodromeAddLiquidityEthParamsAmountTokenMinTypedDict = TypeAliasType(
38
- "AerodromeAddLiquidityEthParamsAmountTokenMinTypedDict", Union[float, str]
39
- )
40
- r"""The minimal amount of token you are willing to provide"""
41
-
42
-
43
- AerodromeAddLiquidityEthParamsAmountTokenMin = TypeAliasType(
44
- "AerodromeAddLiquidityEthParamsAmountTokenMin", Union[float, str]
45
- )
46
- r"""The minimal amount of token you are willing to provide"""
47
-
48
-
49
- AerodromeAddLiquidityEthParamsAmountEthMinTypedDict = TypeAliasType(
50
- "AerodromeAddLiquidityEthParamsAmountEthMinTypedDict", Union[float, str]
51
- )
52
- r"""The minimal amount of WETH you are willing to provide"""
53
-
54
-
55
- AerodromeAddLiquidityEthParamsAmountEthMin = TypeAliasType(
56
- "AerodromeAddLiquidityEthParamsAmountEthMin", Union[float, str]
57
- )
58
- r"""The minimal amount of WETH you are willing to provide"""
59
-
60
-
61
- class AerodromeAddLiquidityEthParamsTypedDict(TypedDict):
62
- r"""Endpoint parameters for adding ETH liquidity on Aerodrome Basic.
63
-
64
- This action is performed on the Aerodrome Basic Router to add liquidity to a pool
65
- with ETH as one of the tokens.
66
- """
67
-
68
- token: TokenEnum
69
- r"""A class representing the token.
70
-
71
- This class is used to represent the token in the system. Notice individual
72
- endpoints' documentation where per chain tokens are presented.
73
- """
74
- stable: bool
75
- r"""If true, try to provide liquidity on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to provide liquidity on a volatile pool with a bonding curve of K=xy"""
76
- amount_token_desired: AmountTokenDesiredTypedDict
77
- r"""The amount of token you want to provide"""
78
- amount_eth_desired: AmountEthDesiredTypedDict
79
- r"""The amount of WETH you want to provide"""
80
- amount_token_min: AerodromeAddLiquidityEthParamsAmountTokenMinTypedDict
81
- r"""The minimal amount of token you are willing to provide"""
82
- amount_eth_min: AerodromeAddLiquidityEthParamsAmountEthMinTypedDict
83
- r"""The minimal amount of WETH you are willing to provide"""
84
- deadline: Nullable[int]
85
- r"""The deadline for this transaction in seconds since epoch"""
86
- to: NotRequired[Nullable[str]]
87
- r"""The receiver of the LP tokens from this trade, default to sender"""
88
-
89
-
90
- class AerodromeAddLiquidityEthParams(BaseModel):
91
- r"""Endpoint parameters for adding ETH liquidity on Aerodrome Basic.
92
-
93
- This action is performed on the Aerodrome Basic Router to add liquidity to a pool
94
- with ETH as one of the tokens.
95
- """
96
-
97
- token: TokenEnum
98
- r"""A class representing the token.
99
-
100
- This class is used to represent the token in the system. Notice individual
101
- endpoints' documentation where per chain tokens are presented.
102
- """
103
-
104
- stable: bool
105
- r"""If true, try to provide liquidity on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to provide liquidity on a volatile pool with a bonding curve of K=xy"""
106
-
107
- amount_token_desired: AmountTokenDesired
108
- r"""The amount of token you want to provide"""
109
-
110
- amount_eth_desired: AmountEthDesired
111
- r"""The amount of WETH you want to provide"""
112
-
113
- amount_token_min: AerodromeAddLiquidityEthParamsAmountTokenMin
114
- r"""The minimal amount of token you are willing to provide"""
115
-
116
- amount_eth_min: AerodromeAddLiquidityEthParamsAmountEthMin
117
- r"""The minimal amount of WETH you are willing to provide"""
118
-
119
- deadline: Nullable[int]
120
- r"""The deadline for this transaction in seconds since epoch"""
121
-
122
- to: OptionalNullable[str] = UNSET
123
- r"""The receiver of the LP tokens from this trade, default to sender"""
124
-
125
- @model_serializer(mode="wrap")
126
- def serialize_model(self, handler):
127
- optional_fields = ["to"]
128
- nullable_fields = ["to", "deadline"]
129
- null_default_fields = []
130
-
131
- serialized = handler(self)
132
-
133
- m = {}
134
-
135
- for n, f in type(self).model_fields.items():
136
- k = f.alias or n
137
- val = serialized.get(k)
138
- serialized.pop(k, None)
139
-
140
- optional_nullable = k in optional_fields and k in nullable_fields
141
- is_set = (
142
- self.__pydantic_fields_set__.intersection({n})
143
- or k in null_default_fields
144
- ) # pylint: disable=no-member
145
-
146
- if val is not None and val != UNSET_SENTINEL:
147
- m[k] = val
148
- elif val != UNSET_SENTINEL and (
149
- not k in optional_fields or (optional_nullable and is_set)
150
- ):
151
- m[k] = val
152
-
153
- return m
@@ -1,160 +0,0 @@
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 (
6
- BaseModel,
7
- Nullable,
8
- OptionalNullable,
9
- UNSET,
10
- UNSET_SENTINEL,
11
- )
12
- from pydantic import model_serializer
13
- from typing import Union
14
- from typing_extensions import NotRequired, TypeAliasType, TypedDict
15
-
16
-
17
- AmountADesiredTypedDict = TypeAliasType("AmountADesiredTypedDict", Union[float, str])
18
- r"""The amount of token A you want to provide"""
19
-
20
-
21
- AmountADesired = TypeAliasType("AmountADesired", Union[float, str])
22
- r"""The amount of token A you want to provide"""
23
-
24
-
25
- AmountBDesiredTypedDict = TypeAliasType("AmountBDesiredTypedDict", Union[float, str])
26
- r"""The amount of token B you want to provide"""
27
-
28
-
29
- AmountBDesired = TypeAliasType("AmountBDesired", Union[float, str])
30
- r"""The amount of token B you want to provide"""
31
-
32
-
33
- AerodromeAddLiquidityParamsAmountAMinTypedDict = TypeAliasType(
34
- "AerodromeAddLiquidityParamsAmountAMinTypedDict", Union[float, str]
35
- )
36
- r"""The minimal amount of token A you are willing to provide"""
37
-
38
-
39
- AerodromeAddLiquidityParamsAmountAMin = TypeAliasType(
40
- "AerodromeAddLiquidityParamsAmountAMin", Union[float, str]
41
- )
42
- r"""The minimal amount of token A you are willing to provide"""
43
-
44
-
45
- AerodromeAddLiquidityParamsAmountBMinTypedDict = TypeAliasType(
46
- "AerodromeAddLiquidityParamsAmountBMinTypedDict", Union[float, str]
47
- )
48
- r"""The minimal amount of token B you are willing to provide"""
49
-
50
-
51
- AerodromeAddLiquidityParamsAmountBMin = TypeAliasType(
52
- "AerodromeAddLiquidityParamsAmountBMin", Union[float, str]
53
- )
54
- r"""The minimal amount of token B you are willing to provide"""
55
-
56
-
57
- class AerodromeAddLiquidityParamsTypedDict(TypedDict):
58
- r"""Endpoint parameters for adding liquidity on Aerodrome Basic.
59
-
60
- This action is performed on the Aerodrome Basic Router to add liquidity to a pool.
61
- """
62
-
63
- token_a: TokenEnum
64
- r"""A class representing the token.
65
-
66
- This class is used to represent the token in the system. Notice individual
67
- endpoints' documentation where per chain tokens are presented.
68
- """
69
- token_b: TokenEnum
70
- r"""A class representing the token.
71
-
72
- This class is used to represent the token in the system. Notice individual
73
- endpoints' documentation where per chain tokens are presented.
74
- """
75
- stable: bool
76
- r"""If true, try to provide liquidity on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to provide liquidity on a volatile pool with a bonding curve of K=xy"""
77
- amount_a_desired: AmountADesiredTypedDict
78
- r"""The amount of token A you want to provide"""
79
- amount_b_desired: AmountBDesiredTypedDict
80
- r"""The amount of token B you want to provide"""
81
- amount_a_min: AerodromeAddLiquidityParamsAmountAMinTypedDict
82
- r"""The minimal amount of token A you are willing to provide"""
83
- amount_b_min: AerodromeAddLiquidityParamsAmountBMinTypedDict
84
- r"""The minimal amount of token B you are willing to provide"""
85
- deadline: Nullable[int]
86
- r"""The deadline for this transaction in seconds since epoch"""
87
- to: NotRequired[Nullable[str]]
88
- r"""The receiver of the LP tokens from this trade, default to sender"""
89
-
90
-
91
- class AerodromeAddLiquidityParams(BaseModel):
92
- r"""Endpoint parameters for adding liquidity on Aerodrome Basic.
93
-
94
- This action is performed on the Aerodrome Basic Router to add liquidity to a pool.
95
- """
96
-
97
- token_a: TokenEnum
98
- r"""A class representing the token.
99
-
100
- This class is used to represent the token in the system. Notice individual
101
- endpoints' documentation where per chain tokens are presented.
102
- """
103
-
104
- token_b: TokenEnum
105
- r"""A class representing the token.
106
-
107
- This class is used to represent the token in the system. Notice individual
108
- endpoints' documentation where per chain tokens are presented.
109
- """
110
-
111
- stable: bool
112
- r"""If true, try to provide liquidity on a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to provide liquidity on a volatile pool with a bonding curve of K=xy"""
113
-
114
- amount_a_desired: AmountADesired
115
- r"""The amount of token A you want to provide"""
116
-
117
- amount_b_desired: AmountBDesired
118
- r"""The amount of token B you want to provide"""
119
-
120
- amount_a_min: AerodromeAddLiquidityParamsAmountAMin
121
- r"""The minimal amount of token A you are willing to provide"""
122
-
123
- amount_b_min: AerodromeAddLiquidityParamsAmountBMin
124
- r"""The minimal amount of token B you are willing to provide"""
125
-
126
- deadline: Nullable[int]
127
- r"""The deadline for this transaction in seconds since epoch"""
128
-
129
- to: OptionalNullable[str] = UNSET
130
- r"""The receiver of the LP tokens from this trade, default to sender"""
131
-
132
- @model_serializer(mode="wrap")
133
- def serialize_model(self, handler):
134
- optional_fields = ["to"]
135
- nullable_fields = ["to", "deadline"]
136
- null_default_fields = []
137
-
138
- serialized = handler(self)
139
-
140
- m = {}
141
-
142
- for n, f in type(self).model_fields.items():
143
- k = f.alias or n
144
- val = serialized.get(k)
145
- serialized.pop(k, None)
146
-
147
- optional_nullable = k in optional_fields and k in nullable_fields
148
- is_set = (
149
- self.__pydantic_fields_set__.intersection({n})
150
- or k in null_default_fields
151
- ) # pylint: disable=no-member
152
-
153
- if val is not None and val != UNSET_SENTINEL:
154
- m[k] = val
155
- elif val != UNSET_SENTINEL and (
156
- not k in optional_fields or (optional_nullable and is_set)
157
- ):
158
- m[k] = val
159
-
160
- return m
@@ -1,139 +0,0 @@
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
- AerodromeRemoveLiquidityEthRequestLiquidityTypedDict = TypeAliasType(
19
- "AerodromeRemoveLiquidityEthRequestLiquidityTypedDict", Union[float, str]
20
- )
21
- r"""The amount of liquidity you want to remove"""
22
-
23
-
24
- AerodromeRemoveLiquidityEthRequestLiquidity = TypeAliasType(
25
- "AerodromeRemoveLiquidityEthRequestLiquidity", Union[float, str]
26
- )
27
- r"""The amount of liquidity you want to remove"""
28
-
29
-
30
- AerodromeRemoveLiquidityEthRequestAmountTokenMinTypedDict = TypeAliasType(
31
- "AerodromeRemoveLiquidityEthRequestAmountTokenMinTypedDict", Union[float, str]
32
- )
33
- r"""The minimal amount of token you are willing to receive"""
34
-
35
-
36
- AerodromeRemoveLiquidityEthRequestAmountTokenMin = TypeAliasType(
37
- "AerodromeRemoveLiquidityEthRequestAmountTokenMin", Union[float, str]
38
- )
39
- r"""The minimal amount of token you are willing to receive"""
40
-
41
-
42
- AerodromeRemoveLiquidityEthRequestAmountEthMinTypedDict = TypeAliasType(
43
- "AerodromeRemoveLiquidityEthRequestAmountEthMinTypedDict", Union[float, str]
44
- )
45
- r"""The minimal amount of WETH you are willing to receive"""
46
-
47
-
48
- AerodromeRemoveLiquidityEthRequestAmountEthMin = TypeAliasType(
49
- "AerodromeRemoveLiquidityEthRequestAmountEthMin", Union[float, str]
50
- )
51
- r"""The minimal amount of WETH you are willing to receive"""
52
-
53
-
54
- class AerodromeRemoveLiquidityEthRequestTypedDict(TypedDict):
55
- chain: Chain
56
- r"""The chain to use."""
57
- sender: str
58
- r"""The address of the transaction sender."""
59
- token: TokenEnum
60
- r"""A class representing the token.
61
-
62
- This class is used to represent the token in the system. Notice individual
63
- endpoints' documentation where per chain tokens are presented.
64
- """
65
- stable: bool
66
- r"""If true, try to remove liquidity from a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to remove liquidity from a volatile pool with a bonding curve of K=xy"""
67
- liquidity: AerodromeRemoveLiquidityEthRequestLiquidityTypedDict
68
- r"""The amount of liquidity you want to remove"""
69
- amount_token_min: AerodromeRemoveLiquidityEthRequestAmountTokenMinTypedDict
70
- r"""The minimal amount of token you are willing to receive"""
71
- amount_eth_min: AerodromeRemoveLiquidityEthRequestAmountEthMinTypedDict
72
- r"""The minimal amount of WETH you are willing to receive"""
73
- deadline: Nullable[int]
74
- r"""The deadline for this transaction in seconds since epoch"""
75
- to: NotRequired[Nullable[str]]
76
- r"""The receiver of the tokens from this liquidity removal, default to sender"""
77
-
78
-
79
- class AerodromeRemoveLiquidityEthRequest(BaseModel):
80
- chain: Chain
81
- r"""The chain to use."""
82
-
83
- sender: str
84
- r"""The address of the transaction sender."""
85
-
86
- token: TokenEnum
87
- r"""A class representing the token.
88
-
89
- This class is used to represent the token in the system. Notice individual
90
- endpoints' documentation where per chain tokens are presented.
91
- """
92
-
93
- stable: bool
94
- r"""If true, try to remove liquidity from a stable pool with a bonding curve of K=x^3y+y^3x. If false, try to remove liquidity from a volatile pool with a bonding curve of K=xy"""
95
-
96
- liquidity: AerodromeRemoveLiquidityEthRequestLiquidity
97
- r"""The amount of liquidity you want to remove"""
98
-
99
- amount_token_min: AerodromeRemoveLiquidityEthRequestAmountTokenMin
100
- r"""The minimal amount of token you are willing to receive"""
101
-
102
- amount_eth_min: AerodromeRemoveLiquidityEthRequestAmountEthMin
103
- r"""The minimal amount of WETH you are willing to receive"""
104
-
105
- deadline: Nullable[int]
106
- r"""The deadline for this transaction in seconds since epoch"""
107
-
108
- to: OptionalNullable[str] = UNSET
109
- r"""The receiver of the tokens from this liquidity removal, default to sender"""
110
-
111
- @model_serializer(mode="wrap")
112
- def serialize_model(self, handler):
113
- optional_fields = ["to"]
114
- nullable_fields = ["to", "deadline"]
115
- null_default_fields = []
116
-
117
- serialized = handler(self)
118
-
119
- m = {}
120
-
121
- for n, f in type(self).model_fields.items():
122
- k = f.alias or n
123
- val = serialized.get(k)
124
- serialized.pop(k, None)
125
-
126
- optional_nullable = k in optional_fields and k in nullable_fields
127
- is_set = (
128
- self.__pydantic_fields_set__.intersection({n})
129
- or k in null_default_fields
130
- ) # pylint: disable=no-member
131
-
132
- if val is not None and val != UNSET_SENTINEL:
133
- m[k] = val
134
- elif val != UNSET_SENTINEL and (
135
- not k in optional_fields or (optional_nullable and is_set)
136
- ):
137
- m[k] = val
138
-
139
- return m