compass_api_sdk 0.9.51__py3-none-any.whl → 1.0.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.
- compass_api_sdk/_version.py +3 -3
- compass_api_sdk/aave_v3.py +198 -198
- compass_api_sdk/aerodrome_slipstream.py +108 -108
- compass_api_sdk/erc_4626_vaults.py +44 -44
- compass_api_sdk/errors/__init__.py +3 -2
- compass_api_sdk/models/__init__.py +900 -746
- compass_api_sdk/models/aaveborrowrequest.py +9 -5
- compass_api_sdk/models/aavehistoricaltransactionsresponse.py +5 -5
- compass_api_sdk/models/aavelooprequest.py +59 -11
- compass_api_sdk/models/aaverepayrequest.py +9 -5
- compass_api_sdk/models/aavereserveoverviewresponse.py +34 -3
- compass_api_sdk/models/aavesupplyrequest.py +9 -5
- compass_api_sdk/models/aavewithdrawrequest.py +9 -5
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +7 -5
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +7 -5
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +7 -5
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +7 -5
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +7 -5
- compass_api_sdk/models/batcheduseroperationsrequest.py +9 -5
- compass_api_sdk/models/chain.py +3 -3
- compass_api_sdk/models/details.py +44 -7
- compass_api_sdk/models/morphoborrowrequest.py +3 -2
- compass_api_sdk/models/morphodepositrequest.py +3 -2
- compass_api_sdk/models/morphorepayrequest.py +3 -2
- compass_api_sdk/models/morphosupplycollateralrequest.py +3 -2
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +3 -2
- compass_api_sdk/models/morphowithdrawrequest.py +3 -2
- compass_api_sdk/models/movement10percent.py +65 -10
- compass_api_sdk/models/multicallauthorizationrequest.py +9 -5
- compass_api_sdk/models/multicallexecuterequest.py +53 -10
- compass_api_sdk/models/odosswaprequest.py +9 -5
- compass_api_sdk/models/pendlemanageliquidityparams.py +81 -0
- compass_api_sdk/models/pendlemanageliquidityrequest.py +95 -0
- compass_api_sdk/models/pendleredeemyieldrequest.py +9 -5
- compass_api_sdk/models/pendletradeptparams.py +81 -0
- compass_api_sdk/models/pendletradeptrequest.py +95 -0
- compass_api_sdk/models/pendletradeytparams.py +81 -0
- compass_api_sdk/models/pendletradeytrequest.py +95 -0
- compass_api_sdk/models/pendletxresponse.py +45 -0
- compass_api_sdk/models/setallowancerequest.py +8 -5
- compass_api_sdk/models/skybuyrequest.py +7 -9
- compass_api_sdk/models/skydepositrequest.py +7 -8
- compass_api_sdk/models/skysellrequest.py +7 -9
- compass_api_sdk/models/skywithdrawrequest.py +7 -8
- compass_api_sdk/models/token_enum.py +17 -0
- compass_api_sdk/models/tokentransferparams.py +67 -0
- compass_api_sdk/models/tokentransferrequest.py +9 -5
- compass_api_sdk/models/transactionresponse.py +40 -0
- compass_api_sdk/models/uniswapbuyexactlyparams.py +19 -24
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +28 -29
- compass_api_sdk/models/uniswapbuyexactlytransactionresponse.py +45 -0
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +9 -5
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +9 -5
- compass_api_sdk/models/uniswapsellexactlyparams.py +43 -40
- compass_api_sdk/models/uniswapsellexactlyrequest.py +52 -45
- compass_api_sdk/models/uniswapsellexactlytransactionresponse.py +45 -0
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +9 -5
- compass_api_sdk/models/unwrapwethrequest.py +9 -5
- compass_api_sdk/models/useroperation.py +34 -40
- compass_api_sdk/models/{aave_aave_supported_tokensop.py → v1_aave_aave_supported_tokensop.py} +9 -13
- compass_api_sdk/models/{aave_avg_rateop.py → v1_aave_avg_rateop.py} +32 -19
- compass_api_sdk/models/{aave_historical_transactionsop.py → v1_aave_historical_transactionsop.py} +9 -13
- compass_api_sdk/models/{aave_liquidity_changeop.py → v1_aave_liquidity_changeop.py} +30 -17
- compass_api_sdk/models/{aave_rateop.py → v1_aave_rateop.py} +32 -19
- compass_api_sdk/models/{aave_reserve_overviewop.py → v1_aave_reserve_overviewop.py} +32 -19
- compass_api_sdk/models/{aave_std_rateop.py → v1_aave_std_rateop.py} +32 -19
- compass_api_sdk/models/{aave_token_priceop.py → v1_aave_token_priceop.py} +32 -19
- compass_api_sdk/models/{aave_user_position_per_tokenop.py → v1_aave_user_position_per_tokenop.py} +32 -19
- compass_api_sdk/models/{aave_user_position_summaryop.py → v1_aave_user_position_summaryop.py} +9 -13
- compass_api_sdk/models/{uniswap_liquidity_provision_positionsop.py → v1_aerodrome_slipstream_liquidity_provision_positionsop.py} +7 -13
- compass_api_sdk/models/{aerodrome_slipstream_pool_priceop.py → v1_aerodrome_slipstream_pool_priceop.py} +53 -25
- compass_api_sdk/models/{generic_allowanceop.py → v1_generic_allowanceop.py} +24 -25
- compass_api_sdk/models/{generic_ensop.py → v1_generic_ensop.py} +7 -13
- compass_api_sdk/models/{generic_portfolioop.py → v1_generic_portfolioop.py} +9 -13
- compass_api_sdk/models/{generic_supported_chainsop.py → v1_generic_supported_chainsop.py} +2 -2
- compass_api_sdk/models/v1_generic_supported_tokensop.py +24 -0
- compass_api_sdk/models/{morpho_market_positionop.py → v1_morpho_market_positionop.py} +9 -8
- compass_api_sdk/models/{morpho_marketop.py → v1_morpho_marketop.py} +9 -8
- compass_api_sdk/models/{morpho_marketsop.py → v1_morpho_marketsop.py} +9 -8
- compass_api_sdk/models/{morpho_user_positionop.py → v1_morpho_user_positionop.py} +9 -8
- compass_api_sdk/models/{morpho_vaultop.py → v1_morpho_vaultop.py} +9 -13
- compass_api_sdk/models/{morpho_vaultsop.py → v1_morpho_vaultsop.py} +9 -8
- compass_api_sdk/models/{pendle_marketop.py → v1_pendle_marketop.py} +9 -13
- compass_api_sdk/models/v1_pendle_marketsop.py +24 -0
- compass_api_sdk/models/{pendle_positionsop.py → v1_pendle_positionsop.py} +10 -14
- compass_api_sdk/models/{sky_positionop.py → v1_sky_positionop.py} +14 -15
- compass_api_sdk/models/{token_addressop.py → v1_token_addressop.py} +30 -17
- compass_api_sdk/models/{token_balanceop.py → v1_token_balanceop.py} +14 -18
- compass_api_sdk/models/{token_priceop.py → v1_token_priceop.py} +14 -18
- compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +24 -0
- compass_api_sdk/models/{uniswap_liquidity_provision_in_rangeop.py → v1_uniswap_liquidity_provision_in_rangeop.py} +9 -13
- compass_api_sdk/models/{aerodrome_slipstream_liquidity_provision_positionsop.py → v1_uniswap_liquidity_provision_positionsop.py} +9 -13
- compass_api_sdk/models/{uniswap_pool_priceop.py → v1_uniswap_pool_priceop.py} +59 -29
- compass_api_sdk/models/{uniswap_quote_buy_exactlyop.py → v1_uniswap_quote_buy_exactlyop.py} +65 -35
- compass_api_sdk/models/{uniswap_quote_sell_exactlyop.py → v1_uniswap_quote_sell_exactlyop.py} +65 -35
- compass_api_sdk/models/{vaults_vaultop.py → v1_vaults_vaultop.py} +9 -13
- compass_api_sdk/models/vaultdepositparams.py +85 -0
- compass_api_sdk/models/vaultdepositrequest.py +9 -5
- compass_api_sdk/models/vaultwithdrawparams.py +75 -0
- compass_api_sdk/models/vaultwithdrawrequest.py +9 -5
- compass_api_sdk/models/wrapethrequest.py +9 -5
- compass_api_sdk/morpho.py +140 -140
- compass_api_sdk/pendle.py +254 -1066
- compass_api_sdk/sky.py +98 -56
- compass_api_sdk/smart_account.py +10 -10
- compass_api_sdk/swap.py +16 -16
- compass_api_sdk/token_sdk.py +56 -56
- compass_api_sdk/transaction_bundler.py +64 -62
- compass_api_sdk/uniswap_v3.py +222 -214
- compass_api_sdk/universal.py +104 -292
- compass_api_sdk/utils/__init__.py +3 -2
- {compass_api_sdk-0.9.51.dist-info → compass_api_sdk-1.0.0.dist-info}/METADATA +83 -88
- {compass_api_sdk-0.9.51.dist-info → compass_api_sdk-1.0.0.dist-info}/RECORD +114 -117
- compass_api_sdk/models/generic_supported_tokensop.py +0 -28
- compass_api_sdk/models/generic_visualize_portfolioop.py +0 -37
- compass_api_sdk/models/image.py +0 -15
- compass_api_sdk/models/pendle_marketsop.py +0 -28
- compass_api_sdk/models/pendle_quoteop.py +0 -128
- compass_api_sdk/models/pendleaddliquidityparams.py +0 -50
- compass_api_sdk/models/pendleaddliquidityrequest.py +0 -61
- compass_api_sdk/models/pendlebuyptparams.py +0 -48
- compass_api_sdk/models/pendlebuyptrequest.py +0 -59
- compass_api_sdk/models/pendlebuyytparams.py +0 -48
- compass_api_sdk/models/pendlebuyytrequest.py +0 -59
- compass_api_sdk/models/pendlegetquoteresponse.py +0 -15
- compass_api_sdk/models/pendleremoveliquidityparams.py +0 -50
- compass_api_sdk/models/pendleremoveliquidityrequest.py +0 -61
- compass_api_sdk/models/pendlesellptparams.py +0 -48
- compass_api_sdk/models/pendlesellptrequest.py +0 -61
- compass_api_sdk/models/pendlesellytparams.py +0 -48
- compass_api_sdk/models/pendlesellytrequest.py +0 -61
- compass_api_sdk/models/txresponse.py +0 -27
- {compass_api_sdk-0.9.51.dist-info → compass_api_sdk-1.0.0.dist-info}/WHEEL +0 -0
compass_api_sdk/uniswap_v3.py
CHANGED
|
@@ -9,16 +9,16 @@ from typing import Any, Mapping, Optional, Union
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class UniswapV3(BaseSDK):
|
|
12
|
-
def
|
|
12
|
+
def uniswap_quote_buy_exactly(
|
|
13
13
|
self,
|
|
14
14
|
*,
|
|
15
|
-
chain: models.
|
|
16
|
-
token_in: models.
|
|
17
|
-
token_out: models.
|
|
18
|
-
fee: models.
|
|
15
|
+
chain: models.V1UniswapQuoteBuyExactlyChain = models.V1UniswapQuoteBuyExactlyChain.ARBITRUM,
|
|
16
|
+
token_in: models.V1UniswapQuoteBuyExactlyTokenInToken = models.V1UniswapQuoteBuyExactlyTokenInToken.USDC,
|
|
17
|
+
token_out: models.V1UniswapQuoteBuyExactlyTokenOutToken = models.V1UniswapQuoteBuyExactlyTokenOutToken.USDT,
|
|
18
|
+
fee: models.V1UniswapQuoteBuyExactlyFeeEnum = models.V1UniswapQuoteBuyExactlyFeeEnum.ZERO_DOT_01,
|
|
19
19
|
amount_out: Union[
|
|
20
|
-
models.
|
|
21
|
-
models.
|
|
20
|
+
models.V1UniswapQuoteBuyExactlyAmountOut,
|
|
21
|
+
models.V1UniswapQuoteBuyExactlyAmountOutTypedDict,
|
|
22
22
|
],
|
|
23
23
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
24
24
|
server_url: Optional[str] = None,
|
|
@@ -33,7 +33,7 @@ class UniswapV3(BaseSDK):
|
|
|
33
33
|
It also provides the resulting price after the transaction. The calculation takes
|
|
34
34
|
into account the current pool state and the specified fee tier.
|
|
35
35
|
|
|
36
|
-
:param chain:
|
|
36
|
+
:param chain:
|
|
37
37
|
:param token_in: The symbol of the token to swap from.
|
|
38
38
|
:param token_out: The symbol of the token to swap to.
|
|
39
39
|
:param fee: The fee to pay for the swap
|
|
@@ -53,7 +53,7 @@ class UniswapV3(BaseSDK):
|
|
|
53
53
|
else:
|
|
54
54
|
base_url = self._get_url(base_url, url_variables)
|
|
55
55
|
|
|
56
|
-
request = models.
|
|
56
|
+
request = models.V1UniswapQuoteBuyExactlyRequest(
|
|
57
57
|
chain=chain,
|
|
58
58
|
token_in=token_in,
|
|
59
59
|
token_out=token_out,
|
|
@@ -63,7 +63,7 @@ class UniswapV3(BaseSDK):
|
|
|
63
63
|
|
|
64
64
|
req = self._build_request(
|
|
65
65
|
method="GET",
|
|
66
|
-
path="/
|
|
66
|
+
path="/v1/uniswap/quote/buy_exactly",
|
|
67
67
|
base_url=base_url,
|
|
68
68
|
url_variables=url_variables,
|
|
69
69
|
request=request,
|
|
@@ -89,7 +89,7 @@ class UniswapV3(BaseSDK):
|
|
|
89
89
|
hook_ctx=HookContext(
|
|
90
90
|
config=self.sdk_configuration,
|
|
91
91
|
base_url=base_url or "",
|
|
92
|
-
operation_id="
|
|
92
|
+
operation_id="v1_uniswap_quote_buy_exactly",
|
|
93
93
|
oauth2_scopes=[],
|
|
94
94
|
security_source=self.sdk_configuration.security,
|
|
95
95
|
),
|
|
@@ -115,16 +115,16 @@ class UniswapV3(BaseSDK):
|
|
|
115
115
|
|
|
116
116
|
raise errors.APIError("Unexpected response received", http_res)
|
|
117
117
|
|
|
118
|
-
async def
|
|
118
|
+
async def uniswap_quote_buy_exactly_async(
|
|
119
119
|
self,
|
|
120
120
|
*,
|
|
121
|
-
chain: models.
|
|
122
|
-
token_in: models.
|
|
123
|
-
token_out: models.
|
|
124
|
-
fee: models.
|
|
121
|
+
chain: models.V1UniswapQuoteBuyExactlyChain = models.V1UniswapQuoteBuyExactlyChain.ARBITRUM,
|
|
122
|
+
token_in: models.V1UniswapQuoteBuyExactlyTokenInToken = models.V1UniswapQuoteBuyExactlyTokenInToken.USDC,
|
|
123
|
+
token_out: models.V1UniswapQuoteBuyExactlyTokenOutToken = models.V1UniswapQuoteBuyExactlyTokenOutToken.USDT,
|
|
124
|
+
fee: models.V1UniswapQuoteBuyExactlyFeeEnum = models.V1UniswapQuoteBuyExactlyFeeEnum.ZERO_DOT_01,
|
|
125
125
|
amount_out: Union[
|
|
126
|
-
models.
|
|
127
|
-
models.
|
|
126
|
+
models.V1UniswapQuoteBuyExactlyAmountOut,
|
|
127
|
+
models.V1UniswapQuoteBuyExactlyAmountOutTypedDict,
|
|
128
128
|
],
|
|
129
129
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
130
130
|
server_url: Optional[str] = None,
|
|
@@ -139,7 +139,7 @@ class UniswapV3(BaseSDK):
|
|
|
139
139
|
It also provides the resulting price after the transaction. The calculation takes
|
|
140
140
|
into account the current pool state and the specified fee tier.
|
|
141
141
|
|
|
142
|
-
:param chain:
|
|
142
|
+
:param chain:
|
|
143
143
|
:param token_in: The symbol of the token to swap from.
|
|
144
144
|
:param token_out: The symbol of the token to swap to.
|
|
145
145
|
:param fee: The fee to pay for the swap
|
|
@@ -159,7 +159,7 @@ class UniswapV3(BaseSDK):
|
|
|
159
159
|
else:
|
|
160
160
|
base_url = self._get_url(base_url, url_variables)
|
|
161
161
|
|
|
162
|
-
request = models.
|
|
162
|
+
request = models.V1UniswapQuoteBuyExactlyRequest(
|
|
163
163
|
chain=chain,
|
|
164
164
|
token_in=token_in,
|
|
165
165
|
token_out=token_out,
|
|
@@ -169,7 +169,7 @@ class UniswapV3(BaseSDK):
|
|
|
169
169
|
|
|
170
170
|
req = self._build_request_async(
|
|
171
171
|
method="GET",
|
|
172
|
-
path="/
|
|
172
|
+
path="/v1/uniswap/quote/buy_exactly",
|
|
173
173
|
base_url=base_url,
|
|
174
174
|
url_variables=url_variables,
|
|
175
175
|
request=request,
|
|
@@ -195,7 +195,7 @@ class UniswapV3(BaseSDK):
|
|
|
195
195
|
hook_ctx=HookContext(
|
|
196
196
|
config=self.sdk_configuration,
|
|
197
197
|
base_url=base_url or "",
|
|
198
|
-
operation_id="
|
|
198
|
+
operation_id="v1_uniswap_quote_buy_exactly",
|
|
199
199
|
oauth2_scopes=[],
|
|
200
200
|
security_source=self.sdk_configuration.security,
|
|
201
201
|
),
|
|
@@ -221,16 +221,16 @@ class UniswapV3(BaseSDK):
|
|
|
221
221
|
|
|
222
222
|
raise errors.APIError("Unexpected response received", http_res)
|
|
223
223
|
|
|
224
|
-
def
|
|
224
|
+
def uniswap_quote_sell_exactly(
|
|
225
225
|
self,
|
|
226
226
|
*,
|
|
227
|
-
chain: models.
|
|
228
|
-
token_in: models.
|
|
229
|
-
token_out: models.
|
|
230
|
-
fee: models.
|
|
227
|
+
chain: models.V1UniswapQuoteSellExactlyChain = models.V1UniswapQuoteSellExactlyChain.ARBITRUM,
|
|
228
|
+
token_in: models.V1UniswapQuoteSellExactlyTokenInToken = models.V1UniswapQuoteSellExactlyTokenInToken.USDC,
|
|
229
|
+
token_out: models.V1UniswapQuoteSellExactlyTokenOutToken = models.V1UniswapQuoteSellExactlyTokenOutToken.USDT,
|
|
230
|
+
fee: models.V1UniswapQuoteSellExactlyFeeEnum = models.V1UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01,
|
|
231
231
|
amount_in: Union[
|
|
232
|
-
models.
|
|
233
|
-
models.
|
|
232
|
+
models.V1UniswapQuoteSellExactlyAmountIn,
|
|
233
|
+
models.V1UniswapQuoteSellExactlyAmountInTypedDict,
|
|
234
234
|
],
|
|
235
235
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
236
236
|
server_url: Optional[str] = None,
|
|
@@ -245,7 +245,7 @@ class UniswapV3(BaseSDK):
|
|
|
245
245
|
It also provides the resulting price after the transaction. The calculation takes
|
|
246
246
|
into account the current pool state and the specified fee tier.
|
|
247
247
|
|
|
248
|
-
:param chain:
|
|
248
|
+
:param chain:
|
|
249
249
|
:param token_in: The symbol of the token to swap from.
|
|
250
250
|
:param token_out: The symbol of the token to swap to.
|
|
251
251
|
:param fee: The fee to pay for the swap
|
|
@@ -265,7 +265,7 @@ class UniswapV3(BaseSDK):
|
|
|
265
265
|
else:
|
|
266
266
|
base_url = self._get_url(base_url, url_variables)
|
|
267
267
|
|
|
268
|
-
request = models.
|
|
268
|
+
request = models.V1UniswapQuoteSellExactlyRequest(
|
|
269
269
|
chain=chain,
|
|
270
270
|
token_in=token_in,
|
|
271
271
|
token_out=token_out,
|
|
@@ -275,7 +275,7 @@ class UniswapV3(BaseSDK):
|
|
|
275
275
|
|
|
276
276
|
req = self._build_request(
|
|
277
277
|
method="GET",
|
|
278
|
-
path="/
|
|
278
|
+
path="/v1/uniswap/quote/sell_exactly",
|
|
279
279
|
base_url=base_url,
|
|
280
280
|
url_variables=url_variables,
|
|
281
281
|
request=request,
|
|
@@ -301,7 +301,7 @@ class UniswapV3(BaseSDK):
|
|
|
301
301
|
hook_ctx=HookContext(
|
|
302
302
|
config=self.sdk_configuration,
|
|
303
303
|
base_url=base_url or "",
|
|
304
|
-
operation_id="
|
|
304
|
+
operation_id="v1_uniswap_quote_sell_exactly",
|
|
305
305
|
oauth2_scopes=[],
|
|
306
306
|
security_source=self.sdk_configuration.security,
|
|
307
307
|
),
|
|
@@ -329,16 +329,16 @@ class UniswapV3(BaseSDK):
|
|
|
329
329
|
|
|
330
330
|
raise errors.APIError("Unexpected response received", http_res)
|
|
331
331
|
|
|
332
|
-
async def
|
|
332
|
+
async def uniswap_quote_sell_exactly_async(
|
|
333
333
|
self,
|
|
334
334
|
*,
|
|
335
|
-
chain: models.
|
|
336
|
-
token_in: models.
|
|
337
|
-
token_out: models.
|
|
338
|
-
fee: models.
|
|
335
|
+
chain: models.V1UniswapQuoteSellExactlyChain = models.V1UniswapQuoteSellExactlyChain.ARBITRUM,
|
|
336
|
+
token_in: models.V1UniswapQuoteSellExactlyTokenInToken = models.V1UniswapQuoteSellExactlyTokenInToken.USDC,
|
|
337
|
+
token_out: models.V1UniswapQuoteSellExactlyTokenOutToken = models.V1UniswapQuoteSellExactlyTokenOutToken.USDT,
|
|
338
|
+
fee: models.V1UniswapQuoteSellExactlyFeeEnum = models.V1UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01,
|
|
339
339
|
amount_in: Union[
|
|
340
|
-
models.
|
|
341
|
-
models.
|
|
340
|
+
models.V1UniswapQuoteSellExactlyAmountIn,
|
|
341
|
+
models.V1UniswapQuoteSellExactlyAmountInTypedDict,
|
|
342
342
|
],
|
|
343
343
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
344
344
|
server_url: Optional[str] = None,
|
|
@@ -353,7 +353,7 @@ class UniswapV3(BaseSDK):
|
|
|
353
353
|
It also provides the resulting price after the transaction. The calculation takes
|
|
354
354
|
into account the current pool state and the specified fee tier.
|
|
355
355
|
|
|
356
|
-
:param chain:
|
|
356
|
+
:param chain:
|
|
357
357
|
:param token_in: The symbol of the token to swap from.
|
|
358
358
|
:param token_out: The symbol of the token to swap to.
|
|
359
359
|
:param fee: The fee to pay for the swap
|
|
@@ -373,7 +373,7 @@ class UniswapV3(BaseSDK):
|
|
|
373
373
|
else:
|
|
374
374
|
base_url = self._get_url(base_url, url_variables)
|
|
375
375
|
|
|
376
|
-
request = models.
|
|
376
|
+
request = models.V1UniswapQuoteSellExactlyRequest(
|
|
377
377
|
chain=chain,
|
|
378
378
|
token_in=token_in,
|
|
379
379
|
token_out=token_out,
|
|
@@ -383,7 +383,7 @@ class UniswapV3(BaseSDK):
|
|
|
383
383
|
|
|
384
384
|
req = self._build_request_async(
|
|
385
385
|
method="GET",
|
|
386
|
-
path="/
|
|
386
|
+
path="/v1/uniswap/quote/sell_exactly",
|
|
387
387
|
base_url=base_url,
|
|
388
388
|
url_variables=url_variables,
|
|
389
389
|
request=request,
|
|
@@ -409,7 +409,7 @@ class UniswapV3(BaseSDK):
|
|
|
409
409
|
hook_ctx=HookContext(
|
|
410
410
|
config=self.sdk_configuration,
|
|
411
411
|
base_url=base_url or "",
|
|
412
|
-
operation_id="
|
|
412
|
+
operation_id="v1_uniswap_quote_sell_exactly",
|
|
413
413
|
oauth2_scopes=[],
|
|
414
414
|
security_source=self.sdk_configuration.security,
|
|
415
415
|
),
|
|
@@ -437,13 +437,13 @@ class UniswapV3(BaseSDK):
|
|
|
437
437
|
|
|
438
438
|
raise errors.APIError("Unexpected response received", http_res)
|
|
439
439
|
|
|
440
|
-
def
|
|
440
|
+
def uniswap_pool_price(
|
|
441
441
|
self,
|
|
442
442
|
*,
|
|
443
|
-
chain: models.
|
|
444
|
-
token_in: models.
|
|
445
|
-
token_out: models.
|
|
446
|
-
fee: models.
|
|
443
|
+
chain: models.V1UniswapPoolPriceChain = models.V1UniswapPoolPriceChain.ARBITRUM,
|
|
444
|
+
token_in: models.V1UniswapPoolPriceTokenInToken = models.V1UniswapPoolPriceTokenInToken.USDC,
|
|
445
|
+
token_out: models.V1UniswapPoolPriceTokenOutToken = models.V1UniswapPoolPriceTokenOutToken.USDT,
|
|
446
|
+
fee: models.V1UniswapPoolPriceFeeEnum = models.V1UniswapPoolPriceFeeEnum.ZERO_DOT_01,
|
|
447
447
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
448
448
|
server_url: Optional[str] = None,
|
|
449
449
|
timeout_ms: Optional[int] = None,
|
|
@@ -455,7 +455,7 @@ class UniswapV3(BaseSDK):
|
|
|
455
455
|
|
|
456
456
|
The price is calculated based on the current pool state and the specified fee tier.
|
|
457
457
|
|
|
458
|
-
:param chain:
|
|
458
|
+
:param chain:
|
|
459
459
|
:param token_in: The symbol of a token in the pool
|
|
460
460
|
:param token_out: The symbol of a token in the pool
|
|
461
461
|
:param fee: The fee of the pool
|
|
@@ -474,7 +474,7 @@ class UniswapV3(BaseSDK):
|
|
|
474
474
|
else:
|
|
475
475
|
base_url = self._get_url(base_url, url_variables)
|
|
476
476
|
|
|
477
|
-
request = models.
|
|
477
|
+
request = models.V1UniswapPoolPriceRequest(
|
|
478
478
|
chain=chain,
|
|
479
479
|
token_in=token_in,
|
|
480
480
|
token_out=token_out,
|
|
@@ -483,7 +483,7 @@ class UniswapV3(BaseSDK):
|
|
|
483
483
|
|
|
484
484
|
req = self._build_request(
|
|
485
485
|
method="GET",
|
|
486
|
-
path="/
|
|
486
|
+
path="/v1/uniswap/pool_price",
|
|
487
487
|
base_url=base_url,
|
|
488
488
|
url_variables=url_variables,
|
|
489
489
|
request=request,
|
|
@@ -509,7 +509,7 @@ class UniswapV3(BaseSDK):
|
|
|
509
509
|
hook_ctx=HookContext(
|
|
510
510
|
config=self.sdk_configuration,
|
|
511
511
|
base_url=base_url or "",
|
|
512
|
-
operation_id="
|
|
512
|
+
operation_id="v1_uniswap_pool_price",
|
|
513
513
|
oauth2_scopes=[],
|
|
514
514
|
security_source=self.sdk_configuration.security,
|
|
515
515
|
),
|
|
@@ -535,13 +535,13 @@ class UniswapV3(BaseSDK):
|
|
|
535
535
|
|
|
536
536
|
raise errors.APIError("Unexpected response received", http_res)
|
|
537
537
|
|
|
538
|
-
async def
|
|
538
|
+
async def uniswap_pool_price_async(
|
|
539
539
|
self,
|
|
540
540
|
*,
|
|
541
|
-
chain: models.
|
|
542
|
-
token_in: models.
|
|
543
|
-
token_out: models.
|
|
544
|
-
fee: models.
|
|
541
|
+
chain: models.V1UniswapPoolPriceChain = models.V1UniswapPoolPriceChain.ARBITRUM,
|
|
542
|
+
token_in: models.V1UniswapPoolPriceTokenInToken = models.V1UniswapPoolPriceTokenInToken.USDC,
|
|
543
|
+
token_out: models.V1UniswapPoolPriceTokenOutToken = models.V1UniswapPoolPriceTokenOutToken.USDT,
|
|
544
|
+
fee: models.V1UniswapPoolPriceFeeEnum = models.V1UniswapPoolPriceFeeEnum.ZERO_DOT_01,
|
|
545
545
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
546
546
|
server_url: Optional[str] = None,
|
|
547
547
|
timeout_ms: Optional[int] = None,
|
|
@@ -553,7 +553,7 @@ class UniswapV3(BaseSDK):
|
|
|
553
553
|
|
|
554
554
|
The price is calculated based on the current pool state and the specified fee tier.
|
|
555
555
|
|
|
556
|
-
:param chain:
|
|
556
|
+
:param chain:
|
|
557
557
|
:param token_in: The symbol of a token in the pool
|
|
558
558
|
:param token_out: The symbol of a token in the pool
|
|
559
559
|
:param fee: The fee of the pool
|
|
@@ -572,7 +572,7 @@ class UniswapV3(BaseSDK):
|
|
|
572
572
|
else:
|
|
573
573
|
base_url = self._get_url(base_url, url_variables)
|
|
574
574
|
|
|
575
|
-
request = models.
|
|
575
|
+
request = models.V1UniswapPoolPriceRequest(
|
|
576
576
|
chain=chain,
|
|
577
577
|
token_in=token_in,
|
|
578
578
|
token_out=token_out,
|
|
@@ -581,7 +581,7 @@ class UniswapV3(BaseSDK):
|
|
|
581
581
|
|
|
582
582
|
req = self._build_request_async(
|
|
583
583
|
method="GET",
|
|
584
|
-
path="/
|
|
584
|
+
path="/v1/uniswap/pool_price",
|
|
585
585
|
base_url=base_url,
|
|
586
586
|
url_variables=url_variables,
|
|
587
587
|
request=request,
|
|
@@ -607,7 +607,7 @@ class UniswapV3(BaseSDK):
|
|
|
607
607
|
hook_ctx=HookContext(
|
|
608
608
|
config=self.sdk_configuration,
|
|
609
609
|
base_url=base_url or "",
|
|
610
|
-
operation_id="
|
|
610
|
+
operation_id="v1_uniswap_pool_price",
|
|
611
611
|
oauth2_scopes=[],
|
|
612
612
|
security_source=self.sdk_configuration.security,
|
|
613
613
|
),
|
|
@@ -633,10 +633,10 @@ class UniswapV3(BaseSDK):
|
|
|
633
633
|
|
|
634
634
|
raise errors.APIError("Unexpected response received", http_res)
|
|
635
635
|
|
|
636
|
-
def
|
|
636
|
+
def uniswap_liquidity_provision_in_range(
|
|
637
637
|
self,
|
|
638
638
|
*,
|
|
639
|
-
chain: models.
|
|
639
|
+
chain: models.V1UniswapLiquidityProvisionInRangeChain = models.V1UniswapLiquidityProvisionInRangeChain.ARBITRUM,
|
|
640
640
|
token_id: int = 4318185,
|
|
641
641
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
642
642
|
server_url: Optional[str] = None,
|
|
@@ -654,7 +654,7 @@ class UniswapV3(BaseSDK):
|
|
|
654
654
|
they are actively participating in the trading activities within the liquidity pool
|
|
655
655
|
and earning trading fees.
|
|
656
656
|
|
|
657
|
-
:param chain:
|
|
657
|
+
:param chain:
|
|
658
658
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
659
659
|
:param retries: Override the default retry configuration for this method
|
|
660
660
|
:param server_url: Override the default server URL for this method
|
|
@@ -671,14 +671,14 @@ class UniswapV3(BaseSDK):
|
|
|
671
671
|
else:
|
|
672
672
|
base_url = self._get_url(base_url, url_variables)
|
|
673
673
|
|
|
674
|
-
request = models.
|
|
674
|
+
request = models.V1UniswapLiquidityProvisionInRangeRequest(
|
|
675
675
|
chain=chain,
|
|
676
676
|
token_id=token_id,
|
|
677
677
|
)
|
|
678
678
|
|
|
679
679
|
req = self._build_request(
|
|
680
680
|
method="GET",
|
|
681
|
-
path="/
|
|
681
|
+
path="/v1/uniswap/liquidity_provision/in_range",
|
|
682
682
|
base_url=base_url,
|
|
683
683
|
url_variables=url_variables,
|
|
684
684
|
request=request,
|
|
@@ -704,7 +704,7 @@ class UniswapV3(BaseSDK):
|
|
|
704
704
|
hook_ctx=HookContext(
|
|
705
705
|
config=self.sdk_configuration,
|
|
706
706
|
base_url=base_url or "",
|
|
707
|
-
operation_id="
|
|
707
|
+
operation_id="v1_uniswap_liquidity_provision_in_range",
|
|
708
708
|
oauth2_scopes=[],
|
|
709
709
|
security_source=self.sdk_configuration.security,
|
|
710
710
|
),
|
|
@@ -730,10 +730,10 @@ class UniswapV3(BaseSDK):
|
|
|
730
730
|
|
|
731
731
|
raise errors.APIError("Unexpected response received", http_res)
|
|
732
732
|
|
|
733
|
-
async def
|
|
733
|
+
async def uniswap_liquidity_provision_in_range_async(
|
|
734
734
|
self,
|
|
735
735
|
*,
|
|
736
|
-
chain: models.
|
|
736
|
+
chain: models.V1UniswapLiquidityProvisionInRangeChain = models.V1UniswapLiquidityProvisionInRangeChain.ARBITRUM,
|
|
737
737
|
token_id: int = 4318185,
|
|
738
738
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
739
739
|
server_url: Optional[str] = None,
|
|
@@ -751,7 +751,7 @@ class UniswapV3(BaseSDK):
|
|
|
751
751
|
they are actively participating in the trading activities within the liquidity pool
|
|
752
752
|
and earning trading fees.
|
|
753
753
|
|
|
754
|
-
:param chain:
|
|
754
|
+
:param chain:
|
|
755
755
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
756
756
|
:param retries: Override the default retry configuration for this method
|
|
757
757
|
:param server_url: Override the default server URL for this method
|
|
@@ -768,14 +768,14 @@ class UniswapV3(BaseSDK):
|
|
|
768
768
|
else:
|
|
769
769
|
base_url = self._get_url(base_url, url_variables)
|
|
770
770
|
|
|
771
|
-
request = models.
|
|
771
|
+
request = models.V1UniswapLiquidityProvisionInRangeRequest(
|
|
772
772
|
chain=chain,
|
|
773
773
|
token_id=token_id,
|
|
774
774
|
)
|
|
775
775
|
|
|
776
776
|
req = self._build_request_async(
|
|
777
777
|
method="GET",
|
|
778
|
-
path="/
|
|
778
|
+
path="/v1/uniswap/liquidity_provision/in_range",
|
|
779
779
|
base_url=base_url,
|
|
780
780
|
url_variables=url_variables,
|
|
781
781
|
request=request,
|
|
@@ -801,7 +801,7 @@ class UniswapV3(BaseSDK):
|
|
|
801
801
|
hook_ctx=HookContext(
|
|
802
802
|
config=self.sdk_configuration,
|
|
803
803
|
base_url=base_url or "",
|
|
804
|
-
operation_id="
|
|
804
|
+
operation_id="v1_uniswap_liquidity_provision_in_range",
|
|
805
805
|
oauth2_scopes=[],
|
|
806
806
|
security_source=self.sdk_configuration.security,
|
|
807
807
|
),
|
|
@@ -827,10 +827,10 @@ class UniswapV3(BaseSDK):
|
|
|
827
827
|
|
|
828
828
|
raise errors.APIError("Unexpected response received", http_res)
|
|
829
829
|
|
|
830
|
-
def
|
|
830
|
+
def uniswap_liquidity_provision_positions(
|
|
831
831
|
self,
|
|
832
832
|
*,
|
|
833
|
-
chain: models.
|
|
833
|
+
chain: models.V1UniswapLiquidityProvisionPositionsChain = models.V1UniswapLiquidityProvisionPositionsChain.ARBITRUM,
|
|
834
834
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
835
835
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
836
836
|
server_url: Optional[str] = None,
|
|
@@ -847,7 +847,7 @@ class UniswapV3(BaseSDK):
|
|
|
847
847
|
information is crucial for users to manage and analyze their liquidity provision
|
|
848
848
|
activities effectively.
|
|
849
849
|
|
|
850
|
-
:param chain:
|
|
850
|
+
:param chain:
|
|
851
851
|
:param user: The user to get positions for.
|
|
852
852
|
:param retries: Override the default retry configuration for this method
|
|
853
853
|
:param server_url: Override the default server URL for this method
|
|
@@ -864,14 +864,14 @@ class UniswapV3(BaseSDK):
|
|
|
864
864
|
else:
|
|
865
865
|
base_url = self._get_url(base_url, url_variables)
|
|
866
866
|
|
|
867
|
-
request = models.
|
|
867
|
+
request = models.V1UniswapLiquidityProvisionPositionsRequest(
|
|
868
868
|
chain=chain,
|
|
869
869
|
user=user,
|
|
870
870
|
)
|
|
871
871
|
|
|
872
872
|
req = self._build_request(
|
|
873
873
|
method="GET",
|
|
874
|
-
path="/
|
|
874
|
+
path="/v1/uniswap/liquidity_provision/positions",
|
|
875
875
|
base_url=base_url,
|
|
876
876
|
url_variables=url_variables,
|
|
877
877
|
request=request,
|
|
@@ -897,7 +897,7 @@ class UniswapV3(BaseSDK):
|
|
|
897
897
|
hook_ctx=HookContext(
|
|
898
898
|
config=self.sdk_configuration,
|
|
899
899
|
base_url=base_url or "",
|
|
900
|
-
operation_id="
|
|
900
|
+
operation_id="v1_uniswap_liquidity_provision_positions",
|
|
901
901
|
oauth2_scopes=[],
|
|
902
902
|
security_source=self.sdk_configuration.security,
|
|
903
903
|
),
|
|
@@ -925,10 +925,10 @@ class UniswapV3(BaseSDK):
|
|
|
925
925
|
|
|
926
926
|
raise errors.APIError("Unexpected response received", http_res)
|
|
927
927
|
|
|
928
|
-
async def
|
|
928
|
+
async def uniswap_liquidity_provision_positions_async(
|
|
929
929
|
self,
|
|
930
930
|
*,
|
|
931
|
-
chain: models.
|
|
931
|
+
chain: models.V1UniswapLiquidityProvisionPositionsChain = models.V1UniswapLiquidityProvisionPositionsChain.ARBITRUM,
|
|
932
932
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
933
933
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
934
934
|
server_url: Optional[str] = None,
|
|
@@ -945,7 +945,7 @@ class UniswapV3(BaseSDK):
|
|
|
945
945
|
information is crucial for users to manage and analyze their liquidity provision
|
|
946
946
|
activities effectively.
|
|
947
947
|
|
|
948
|
-
:param chain:
|
|
948
|
+
:param chain:
|
|
949
949
|
:param user: The user to get positions for.
|
|
950
950
|
:param retries: Override the default retry configuration for this method
|
|
951
951
|
:param server_url: Override the default server URL for this method
|
|
@@ -962,14 +962,14 @@ class UniswapV3(BaseSDK):
|
|
|
962
962
|
else:
|
|
963
963
|
base_url = self._get_url(base_url, url_variables)
|
|
964
964
|
|
|
965
|
-
request = models.
|
|
965
|
+
request = models.V1UniswapLiquidityProvisionPositionsRequest(
|
|
966
966
|
chain=chain,
|
|
967
967
|
user=user,
|
|
968
968
|
)
|
|
969
969
|
|
|
970
970
|
req = self._build_request_async(
|
|
971
971
|
method="GET",
|
|
972
|
-
path="/
|
|
972
|
+
path="/v1/uniswap/liquidity_provision/positions",
|
|
973
973
|
base_url=base_url,
|
|
974
974
|
url_variables=url_variables,
|
|
975
975
|
request=request,
|
|
@@ -995,7 +995,7 @@ class UniswapV3(BaseSDK):
|
|
|
995
995
|
hook_ctx=HookContext(
|
|
996
996
|
config=self.sdk_configuration,
|
|
997
997
|
base_url=base_url or "",
|
|
998
|
-
operation_id="
|
|
998
|
+
operation_id="v1_uniswap_liquidity_provision_positions",
|
|
999
999
|
oauth2_scopes=[],
|
|
1000
1000
|
security_source=self.sdk_configuration.security,
|
|
1001
1001
|
),
|
|
@@ -1023,7 +1023,7 @@ class UniswapV3(BaseSDK):
|
|
|
1023
1023
|
|
|
1024
1024
|
raise errors.APIError("Unexpected response received", http_res)
|
|
1025
1025
|
|
|
1026
|
-
def
|
|
1026
|
+
def uniswap_swap_buy_exactly(
|
|
1027
1027
|
self,
|
|
1028
1028
|
*,
|
|
1029
1029
|
token_in: Union[
|
|
@@ -1035,19 +1035,18 @@ class UniswapV3(BaseSDK):
|
|
|
1035
1035
|
models.UniswapBuyExactlyRequestTokenOutTypedDict,
|
|
1036
1036
|
],
|
|
1037
1037
|
fee: models.FeeEnum,
|
|
1038
|
-
|
|
1039
|
-
models.
|
|
1040
|
-
models.
|
|
1038
|
+
amount_out: Union[
|
|
1039
|
+
models.UniswapBuyExactlyRequestAmountOut,
|
|
1040
|
+
models.UniswapBuyExactlyRequestAmountOutTypedDict,
|
|
1041
1041
|
],
|
|
1042
1042
|
max_slippage_percent: float,
|
|
1043
|
-
chain: models.
|
|
1043
|
+
chain: models.UniswapBuyExactlyRequestChain,
|
|
1044
1044
|
sender: str,
|
|
1045
|
-
wrap_eth: Optional[bool] = False,
|
|
1046
1045
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1047
1046
|
server_url: Optional[str] = None,
|
|
1048
1047
|
timeout_ms: Optional[int] = None,
|
|
1049
1048
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1050
|
-
) -> models.
|
|
1049
|
+
) -> models.UniswapBuyExactlyTransactionResponse:
|
|
1051
1050
|
r"""Buy exact amount
|
|
1052
1051
|
|
|
1053
1052
|
This endpoint allows users to trade a variable amount of one token to receive an
|
|
@@ -1055,25 +1054,24 @@ class UniswapV3(BaseSDK):
|
|
|
1055
1054
|
|
|
1056
1055
|
The transaction is executed on the specified blockchain network, and the user must
|
|
1057
1056
|
provide the necessary transaction details, including the token to buy, the token to
|
|
1058
|
-
pay with, and the exact amount to receive. If the token being paid with is
|
|
1057
|
+
pay with, and the exact amount to receive. If the token being paid with is ETH and
|
|
1059
1058
|
needs to be wrapped, the appropriate amount will be wrapped automatically.
|
|
1060
1059
|
<Info>
|
|
1061
1060
|
**Required Allowances**
|
|
1062
1061
|
|
|
1063
|
-
In order to make this transaction, token allowances need to be set
|
|
1062
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1064
1063
|
|
|
1065
1064
|
- `UniswapV3Router`
|
|
1066
1065
|
</Info>
|
|
1067
1066
|
|
|
1068
1067
|
|
|
1069
|
-
:param token_in: The symbol of the token to swap from.
|
|
1070
|
-
:param token_out: The symbol of the token to swap to.
|
|
1068
|
+
:param token_in: The symbol or address of the token to swap from.
|
|
1069
|
+
:param token_out: The symbol or address of the token to swap to.
|
|
1071
1070
|
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
1072
|
-
:param
|
|
1071
|
+
:param amount_out: The amount of 'token_out' to buy.
|
|
1073
1072
|
:param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed.
|
|
1074
|
-
:param chain:
|
|
1073
|
+
:param chain:
|
|
1075
1074
|
:param sender: The address of the transaction sender.
|
|
1076
|
-
:param wrap_eth: Whether to wrap ETH to WETH, only use when swapping WETH into something
|
|
1077
1075
|
:param retries: Override the default retry configuration for this method
|
|
1078
1076
|
:param server_url: Override the default server URL for this method
|
|
1079
1077
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1093,16 +1091,15 @@ class UniswapV3(BaseSDK):
|
|
|
1093
1091
|
token_in=token_in,
|
|
1094
1092
|
token_out=token_out,
|
|
1095
1093
|
fee=fee,
|
|
1096
|
-
|
|
1094
|
+
amount_out=amount_out,
|
|
1097
1095
|
max_slippage_percent=max_slippage_percent,
|
|
1098
|
-
wrap_eth=wrap_eth,
|
|
1099
1096
|
chain=chain,
|
|
1100
1097
|
sender=sender,
|
|
1101
1098
|
)
|
|
1102
1099
|
|
|
1103
1100
|
req = self._build_request(
|
|
1104
1101
|
method="POST",
|
|
1105
|
-
path="/
|
|
1102
|
+
path="/v1/uniswap/swap/buy_exactly",
|
|
1106
1103
|
base_url=base_url,
|
|
1107
1104
|
url_variables=url_variables,
|
|
1108
1105
|
request=request,
|
|
@@ -1131,7 +1128,7 @@ class UniswapV3(BaseSDK):
|
|
|
1131
1128
|
hook_ctx=HookContext(
|
|
1132
1129
|
config=self.sdk_configuration,
|
|
1133
1130
|
base_url=base_url or "",
|
|
1134
|
-
operation_id="
|
|
1131
|
+
operation_id="v1_uniswap_swap_buy_exactly",
|
|
1135
1132
|
oauth2_scopes=[],
|
|
1136
1133
|
security_source=self.sdk_configuration.security,
|
|
1137
1134
|
),
|
|
@@ -1142,7 +1139,9 @@ class UniswapV3(BaseSDK):
|
|
|
1142
1139
|
|
|
1143
1140
|
response_data: Any = None
|
|
1144
1141
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1145
|
-
return unmarshal_json_response(
|
|
1142
|
+
return unmarshal_json_response(
|
|
1143
|
+
models.UniswapBuyExactlyTransactionResponse, http_res
|
|
1144
|
+
)
|
|
1146
1145
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1147
1146
|
response_data = unmarshal_json_response(
|
|
1148
1147
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -1157,7 +1156,7 @@ class UniswapV3(BaseSDK):
|
|
|
1157
1156
|
|
|
1158
1157
|
raise errors.APIError("Unexpected response received", http_res)
|
|
1159
1158
|
|
|
1160
|
-
async def
|
|
1159
|
+
async def uniswap_swap_buy_exactly_async(
|
|
1161
1160
|
self,
|
|
1162
1161
|
*,
|
|
1163
1162
|
token_in: Union[
|
|
@@ -1169,19 +1168,18 @@ class UniswapV3(BaseSDK):
|
|
|
1169
1168
|
models.UniswapBuyExactlyRequestTokenOutTypedDict,
|
|
1170
1169
|
],
|
|
1171
1170
|
fee: models.FeeEnum,
|
|
1172
|
-
|
|
1173
|
-
models.
|
|
1174
|
-
models.
|
|
1171
|
+
amount_out: Union[
|
|
1172
|
+
models.UniswapBuyExactlyRequestAmountOut,
|
|
1173
|
+
models.UniswapBuyExactlyRequestAmountOutTypedDict,
|
|
1175
1174
|
],
|
|
1176
1175
|
max_slippage_percent: float,
|
|
1177
|
-
chain: models.
|
|
1176
|
+
chain: models.UniswapBuyExactlyRequestChain,
|
|
1178
1177
|
sender: str,
|
|
1179
|
-
wrap_eth: Optional[bool] = False,
|
|
1180
1178
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1181
1179
|
server_url: Optional[str] = None,
|
|
1182
1180
|
timeout_ms: Optional[int] = None,
|
|
1183
1181
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1184
|
-
) -> models.
|
|
1182
|
+
) -> models.UniswapBuyExactlyTransactionResponse:
|
|
1185
1183
|
r"""Buy exact amount
|
|
1186
1184
|
|
|
1187
1185
|
This endpoint allows users to trade a variable amount of one token to receive an
|
|
@@ -1189,25 +1187,24 @@ class UniswapV3(BaseSDK):
|
|
|
1189
1187
|
|
|
1190
1188
|
The transaction is executed on the specified blockchain network, and the user must
|
|
1191
1189
|
provide the necessary transaction details, including the token to buy, the token to
|
|
1192
|
-
pay with, and the exact amount to receive. If the token being paid with is
|
|
1190
|
+
pay with, and the exact amount to receive. If the token being paid with is ETH and
|
|
1193
1191
|
needs to be wrapped, the appropriate amount will be wrapped automatically.
|
|
1194
1192
|
<Info>
|
|
1195
1193
|
**Required Allowances**
|
|
1196
1194
|
|
|
1197
|
-
In order to make this transaction, token allowances need to be set
|
|
1195
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1198
1196
|
|
|
1199
1197
|
- `UniswapV3Router`
|
|
1200
1198
|
</Info>
|
|
1201
1199
|
|
|
1202
1200
|
|
|
1203
|
-
:param token_in: The symbol of the token to swap from.
|
|
1204
|
-
:param token_out: The symbol of the token to swap to.
|
|
1201
|
+
:param token_in: The symbol or address of the token to swap from.
|
|
1202
|
+
:param token_out: The symbol or address of the token to swap to.
|
|
1205
1203
|
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
1206
|
-
:param
|
|
1204
|
+
:param amount_out: The amount of 'token_out' to buy.
|
|
1207
1205
|
:param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed.
|
|
1208
|
-
:param chain:
|
|
1206
|
+
:param chain:
|
|
1209
1207
|
:param sender: The address of the transaction sender.
|
|
1210
|
-
:param wrap_eth: Whether to wrap ETH to WETH, only use when swapping WETH into something
|
|
1211
1208
|
:param retries: Override the default retry configuration for this method
|
|
1212
1209
|
:param server_url: Override the default server URL for this method
|
|
1213
1210
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1227,16 +1224,15 @@ class UniswapV3(BaseSDK):
|
|
|
1227
1224
|
token_in=token_in,
|
|
1228
1225
|
token_out=token_out,
|
|
1229
1226
|
fee=fee,
|
|
1230
|
-
|
|
1227
|
+
amount_out=amount_out,
|
|
1231
1228
|
max_slippage_percent=max_slippage_percent,
|
|
1232
|
-
wrap_eth=wrap_eth,
|
|
1233
1229
|
chain=chain,
|
|
1234
1230
|
sender=sender,
|
|
1235
1231
|
)
|
|
1236
1232
|
|
|
1237
1233
|
req = self._build_request_async(
|
|
1238
1234
|
method="POST",
|
|
1239
|
-
path="/
|
|
1235
|
+
path="/v1/uniswap/swap/buy_exactly",
|
|
1240
1236
|
base_url=base_url,
|
|
1241
1237
|
url_variables=url_variables,
|
|
1242
1238
|
request=request,
|
|
@@ -1265,7 +1261,7 @@ class UniswapV3(BaseSDK):
|
|
|
1265
1261
|
hook_ctx=HookContext(
|
|
1266
1262
|
config=self.sdk_configuration,
|
|
1267
1263
|
base_url=base_url or "",
|
|
1268
|
-
operation_id="
|
|
1264
|
+
operation_id="v1_uniswap_swap_buy_exactly",
|
|
1269
1265
|
oauth2_scopes=[],
|
|
1270
1266
|
security_source=self.sdk_configuration.security,
|
|
1271
1267
|
),
|
|
@@ -1276,7 +1272,9 @@ class UniswapV3(BaseSDK):
|
|
|
1276
1272
|
|
|
1277
1273
|
response_data: Any = None
|
|
1278
1274
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1279
|
-
return unmarshal_json_response(
|
|
1275
|
+
return unmarshal_json_response(
|
|
1276
|
+
models.UniswapBuyExactlyTransactionResponse, http_res
|
|
1277
|
+
)
|
|
1280
1278
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1281
1279
|
response_data = unmarshal_json_response(
|
|
1282
1280
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -1291,25 +1289,30 @@ class UniswapV3(BaseSDK):
|
|
|
1291
1289
|
|
|
1292
1290
|
raise errors.APIError("Unexpected response received", http_res)
|
|
1293
1291
|
|
|
1294
|
-
def
|
|
1292
|
+
def uniswap_swap_sell_exactly(
|
|
1295
1293
|
self,
|
|
1296
1294
|
*,
|
|
1297
|
-
token_in:
|
|
1298
|
-
|
|
1295
|
+
token_in: Union[
|
|
1296
|
+
models.UniswapSellExactlyRequestTokenIn,
|
|
1297
|
+
models.UniswapSellExactlyRequestTokenInTypedDict,
|
|
1298
|
+
],
|
|
1299
|
+
token_out: Union[
|
|
1300
|
+
models.UniswapSellExactlyRequestTokenOut,
|
|
1301
|
+
models.UniswapSellExactlyRequestTokenOutTypedDict,
|
|
1302
|
+
],
|
|
1299
1303
|
fee: models.FeeEnum,
|
|
1300
|
-
|
|
1301
|
-
models.
|
|
1302
|
-
models.
|
|
1304
|
+
amount_in: Union[
|
|
1305
|
+
models.UniswapSellExactlyRequestAmountIn,
|
|
1306
|
+
models.UniswapSellExactlyRequestAmountInTypedDict,
|
|
1303
1307
|
],
|
|
1304
1308
|
max_slippage_percent: float,
|
|
1305
|
-
chain: models.
|
|
1309
|
+
chain: models.UniswapSellExactlyRequestChain,
|
|
1306
1310
|
sender: str,
|
|
1307
|
-
wrap_eth: Optional[bool] = False,
|
|
1308
1311
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1309
1312
|
server_url: Optional[str] = None,
|
|
1310
1313
|
timeout_ms: Optional[int] = None,
|
|
1311
1314
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1312
|
-
) -> models.
|
|
1315
|
+
) -> models.UniswapSellExactlyTransactionResponse:
|
|
1313
1316
|
r"""Sell exact amount
|
|
1314
1317
|
|
|
1315
1318
|
This endpoint allows users to trade a specific amount of one token into another
|
|
@@ -1317,25 +1320,24 @@ class UniswapV3(BaseSDK):
|
|
|
1317
1320
|
|
|
1318
1321
|
The transaction is executed on the specified blockchain network, and the user must
|
|
1319
1322
|
provide the necessary transaction details, including the token to sell, the token to
|
|
1320
|
-
receive, and the amount to sell. If the token being sold is
|
|
1323
|
+
receive, and the amount to sell. If the token being sold is ETH and needs to be
|
|
1321
1324
|
wrapped, the appropriate amount will be wrapped automatically.
|
|
1322
1325
|
<Info>
|
|
1323
1326
|
**Required Allowances**
|
|
1324
1327
|
|
|
1325
|
-
In order to make this transaction, token allowances need to be set
|
|
1328
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1326
1329
|
|
|
1327
1330
|
- `UniswapV3Router`
|
|
1328
1331
|
</Info>
|
|
1329
1332
|
|
|
1330
1333
|
|
|
1331
|
-
:param token_in:
|
|
1332
|
-
:param token_out:
|
|
1334
|
+
:param token_in: The symbol or address of the token to sell..
|
|
1335
|
+
:param token_out: The symbol or address of the token to buy..
|
|
1333
1336
|
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
1334
|
-
:param
|
|
1337
|
+
:param amount_in: The amount of the `token_in` to sell
|
|
1335
1338
|
:param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed.
|
|
1336
|
-
:param chain:
|
|
1339
|
+
:param chain:
|
|
1337
1340
|
:param sender: The address of the transaction sender.
|
|
1338
|
-
:param wrap_eth: Whether to wrap ETH to WETH, only use when swapping WETH into something
|
|
1339
1341
|
:param retries: Override the default retry configuration for this method
|
|
1340
1342
|
:param server_url: Override the default server URL for this method
|
|
1341
1343
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1355,16 +1357,15 @@ class UniswapV3(BaseSDK):
|
|
|
1355
1357
|
token_in=token_in,
|
|
1356
1358
|
token_out=token_out,
|
|
1357
1359
|
fee=fee,
|
|
1358
|
-
|
|
1360
|
+
amount_in=amount_in,
|
|
1359
1361
|
max_slippage_percent=max_slippage_percent,
|
|
1360
|
-
wrap_eth=wrap_eth,
|
|
1361
1362
|
chain=chain,
|
|
1362
1363
|
sender=sender,
|
|
1363
1364
|
)
|
|
1364
1365
|
|
|
1365
1366
|
req = self._build_request(
|
|
1366
1367
|
method="POST",
|
|
1367
|
-
path="/
|
|
1368
|
+
path="/v1/uniswap/swap/sell_exactly",
|
|
1368
1369
|
base_url=base_url,
|
|
1369
1370
|
url_variables=url_variables,
|
|
1370
1371
|
request=request,
|
|
@@ -1393,7 +1394,7 @@ class UniswapV3(BaseSDK):
|
|
|
1393
1394
|
hook_ctx=HookContext(
|
|
1394
1395
|
config=self.sdk_configuration,
|
|
1395
1396
|
base_url=base_url or "",
|
|
1396
|
-
operation_id="
|
|
1397
|
+
operation_id="v1_uniswap_swap_sell_exactly",
|
|
1397
1398
|
oauth2_scopes=[],
|
|
1398
1399
|
security_source=self.sdk_configuration.security,
|
|
1399
1400
|
),
|
|
@@ -1404,7 +1405,9 @@ class UniswapV3(BaseSDK):
|
|
|
1404
1405
|
|
|
1405
1406
|
response_data: Any = None
|
|
1406
1407
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1407
|
-
return unmarshal_json_response(
|
|
1408
|
+
return unmarshal_json_response(
|
|
1409
|
+
models.UniswapSellExactlyTransactionResponse, http_res
|
|
1410
|
+
)
|
|
1408
1411
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1409
1412
|
response_data = unmarshal_json_response(
|
|
1410
1413
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -1419,25 +1422,30 @@ class UniswapV3(BaseSDK):
|
|
|
1419
1422
|
|
|
1420
1423
|
raise errors.APIError("Unexpected response received", http_res)
|
|
1421
1424
|
|
|
1422
|
-
async def
|
|
1425
|
+
async def uniswap_swap_sell_exactly_async(
|
|
1423
1426
|
self,
|
|
1424
1427
|
*,
|
|
1425
|
-
token_in:
|
|
1426
|
-
|
|
1428
|
+
token_in: Union[
|
|
1429
|
+
models.UniswapSellExactlyRequestTokenIn,
|
|
1430
|
+
models.UniswapSellExactlyRequestTokenInTypedDict,
|
|
1431
|
+
],
|
|
1432
|
+
token_out: Union[
|
|
1433
|
+
models.UniswapSellExactlyRequestTokenOut,
|
|
1434
|
+
models.UniswapSellExactlyRequestTokenOutTypedDict,
|
|
1435
|
+
],
|
|
1427
1436
|
fee: models.FeeEnum,
|
|
1428
|
-
|
|
1429
|
-
models.
|
|
1430
|
-
models.
|
|
1437
|
+
amount_in: Union[
|
|
1438
|
+
models.UniswapSellExactlyRequestAmountIn,
|
|
1439
|
+
models.UniswapSellExactlyRequestAmountInTypedDict,
|
|
1431
1440
|
],
|
|
1432
1441
|
max_slippage_percent: float,
|
|
1433
|
-
chain: models.
|
|
1442
|
+
chain: models.UniswapSellExactlyRequestChain,
|
|
1434
1443
|
sender: str,
|
|
1435
|
-
wrap_eth: Optional[bool] = False,
|
|
1436
1444
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1437
1445
|
server_url: Optional[str] = None,
|
|
1438
1446
|
timeout_ms: Optional[int] = None,
|
|
1439
1447
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1440
|
-
) -> models.
|
|
1448
|
+
) -> models.UniswapSellExactlyTransactionResponse:
|
|
1441
1449
|
r"""Sell exact amount
|
|
1442
1450
|
|
|
1443
1451
|
This endpoint allows users to trade a specific amount of one token into another
|
|
@@ -1445,25 +1453,24 @@ class UniswapV3(BaseSDK):
|
|
|
1445
1453
|
|
|
1446
1454
|
The transaction is executed on the specified blockchain network, and the user must
|
|
1447
1455
|
provide the necessary transaction details, including the token to sell, the token to
|
|
1448
|
-
receive, and the amount to sell. If the token being sold is
|
|
1456
|
+
receive, and the amount to sell. If the token being sold is ETH and needs to be
|
|
1449
1457
|
wrapped, the appropriate amount will be wrapped automatically.
|
|
1450
1458
|
<Info>
|
|
1451
1459
|
**Required Allowances**
|
|
1452
1460
|
|
|
1453
|
-
In order to make this transaction, token allowances need to be set
|
|
1461
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1454
1462
|
|
|
1455
1463
|
- `UniswapV3Router`
|
|
1456
1464
|
</Info>
|
|
1457
1465
|
|
|
1458
1466
|
|
|
1459
|
-
:param token_in:
|
|
1460
|
-
:param token_out:
|
|
1467
|
+
:param token_in: The symbol or address of the token to sell..
|
|
1468
|
+
:param token_out: The symbol or address of the token to buy..
|
|
1461
1469
|
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
1462
|
-
:param
|
|
1470
|
+
:param amount_in: The amount of the `token_in` to sell
|
|
1463
1471
|
:param max_slippage_percent: The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed.
|
|
1464
|
-
:param chain:
|
|
1472
|
+
:param chain:
|
|
1465
1473
|
:param sender: The address of the transaction sender.
|
|
1466
|
-
:param wrap_eth: Whether to wrap ETH to WETH, only use when swapping WETH into something
|
|
1467
1474
|
:param retries: Override the default retry configuration for this method
|
|
1468
1475
|
:param server_url: Override the default server URL for this method
|
|
1469
1476
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1483,16 +1490,15 @@ class UniswapV3(BaseSDK):
|
|
|
1483
1490
|
token_in=token_in,
|
|
1484
1491
|
token_out=token_out,
|
|
1485
1492
|
fee=fee,
|
|
1486
|
-
|
|
1493
|
+
amount_in=amount_in,
|
|
1487
1494
|
max_slippage_percent=max_slippage_percent,
|
|
1488
|
-
wrap_eth=wrap_eth,
|
|
1489
1495
|
chain=chain,
|
|
1490
1496
|
sender=sender,
|
|
1491
1497
|
)
|
|
1492
1498
|
|
|
1493
1499
|
req = self._build_request_async(
|
|
1494
1500
|
method="POST",
|
|
1495
|
-
path="/
|
|
1501
|
+
path="/v1/uniswap/swap/sell_exactly",
|
|
1496
1502
|
base_url=base_url,
|
|
1497
1503
|
url_variables=url_variables,
|
|
1498
1504
|
request=request,
|
|
@@ -1521,7 +1527,7 @@ class UniswapV3(BaseSDK):
|
|
|
1521
1527
|
hook_ctx=HookContext(
|
|
1522
1528
|
config=self.sdk_configuration,
|
|
1523
1529
|
base_url=base_url or "",
|
|
1524
|
-
operation_id="
|
|
1530
|
+
operation_id="v1_uniswap_swap_sell_exactly",
|
|
1525
1531
|
oauth2_scopes=[],
|
|
1526
1532
|
security_source=self.sdk_configuration.security,
|
|
1527
1533
|
),
|
|
@@ -1532,7 +1538,9 @@ class UniswapV3(BaseSDK):
|
|
|
1532
1538
|
|
|
1533
1539
|
response_data: Any = None
|
|
1534
1540
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1535
|
-
return unmarshal_json_response(
|
|
1541
|
+
return unmarshal_json_response(
|
|
1542
|
+
models.UniswapSellExactlyTransactionResponse, http_res
|
|
1543
|
+
)
|
|
1536
1544
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1537
1545
|
response_data = unmarshal_json_response(
|
|
1538
1546
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -1547,7 +1555,7 @@ class UniswapV3(BaseSDK):
|
|
|
1547
1555
|
|
|
1548
1556
|
raise errors.APIError("Unexpected response received", http_res)
|
|
1549
1557
|
|
|
1550
|
-
def
|
|
1558
|
+
def uniswap_liquidity_provision_mint(
|
|
1551
1559
|
self,
|
|
1552
1560
|
*,
|
|
1553
1561
|
token0: models.TokenEnum,
|
|
@@ -1571,14 +1579,14 @@ class UniswapV3(BaseSDK):
|
|
|
1571
1579
|
models.UniswapMintLiquidityProvisionRequestAmount1Min,
|
|
1572
1580
|
models.UniswapMintLiquidityProvisionRequestAmount1MinTypedDict,
|
|
1573
1581
|
],
|
|
1574
|
-
chain: models.
|
|
1582
|
+
chain: models.UniswapMintLiquidityProvisionRequestChain,
|
|
1575
1583
|
sender: str,
|
|
1576
1584
|
recipient: OptionalNullable[str] = UNSET,
|
|
1577
1585
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1578
1586
|
server_url: Optional[str] = None,
|
|
1579
1587
|
timeout_ms: Optional[int] = None,
|
|
1580
1588
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1581
|
-
) -> models.
|
|
1589
|
+
) -> models.TransactionResponse:
|
|
1582
1590
|
r"""Open a new LP position
|
|
1583
1591
|
|
|
1584
1592
|
This endpoint allows users to open a new Liquidity Provider (LP) position on the
|
|
@@ -1593,7 +1601,7 @@ class UniswapV3(BaseSDK):
|
|
|
1593
1601
|
<Info>
|
|
1594
1602
|
**Required Allowances**
|
|
1595
1603
|
|
|
1596
|
-
In order to make this transaction, token allowances need to be set
|
|
1604
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1597
1605
|
|
|
1598
1606
|
- `UniswapV3NFTPositionManager`
|
|
1599
1607
|
</Info>
|
|
@@ -1608,7 +1616,7 @@ class UniswapV3(BaseSDK):
|
|
|
1608
1616
|
:param amount1_desired: The desired amount of the second token to deposit
|
|
1609
1617
|
:param amount0_min: The minimum amount of the first token to deposit
|
|
1610
1618
|
:param amount1_min: The minimum amount of the second token to deposit
|
|
1611
|
-
:param chain:
|
|
1619
|
+
:param chain:
|
|
1612
1620
|
:param sender: The address of the transaction sender.
|
|
1613
1621
|
:param recipient: The address that will receive the LP tokens
|
|
1614
1622
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1643,7 +1651,7 @@ class UniswapV3(BaseSDK):
|
|
|
1643
1651
|
|
|
1644
1652
|
req = self._build_request(
|
|
1645
1653
|
method="POST",
|
|
1646
|
-
path="/
|
|
1654
|
+
path="/v1/uniswap/liquidity_provision/mint",
|
|
1647
1655
|
base_url=base_url,
|
|
1648
1656
|
url_variables=url_variables,
|
|
1649
1657
|
request=request,
|
|
@@ -1676,7 +1684,7 @@ class UniswapV3(BaseSDK):
|
|
|
1676
1684
|
hook_ctx=HookContext(
|
|
1677
1685
|
config=self.sdk_configuration,
|
|
1678
1686
|
base_url=base_url or "",
|
|
1679
|
-
operation_id="
|
|
1687
|
+
operation_id="v1_uniswap_liquidity_provision_mint",
|
|
1680
1688
|
oauth2_scopes=[],
|
|
1681
1689
|
security_source=self.sdk_configuration.security,
|
|
1682
1690
|
),
|
|
@@ -1687,7 +1695,7 @@ class UniswapV3(BaseSDK):
|
|
|
1687
1695
|
|
|
1688
1696
|
response_data: Any = None
|
|
1689
1697
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1690
|
-
return unmarshal_json_response(models.
|
|
1698
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
1691
1699
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1692
1700
|
response_data = unmarshal_json_response(
|
|
1693
1701
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -1702,7 +1710,7 @@ class UniswapV3(BaseSDK):
|
|
|
1702
1710
|
|
|
1703
1711
|
raise errors.APIError("Unexpected response received", http_res)
|
|
1704
1712
|
|
|
1705
|
-
async def
|
|
1713
|
+
async def uniswap_liquidity_provision_mint_async(
|
|
1706
1714
|
self,
|
|
1707
1715
|
*,
|
|
1708
1716
|
token0: models.TokenEnum,
|
|
@@ -1726,14 +1734,14 @@ class UniswapV3(BaseSDK):
|
|
|
1726
1734
|
models.UniswapMintLiquidityProvisionRequestAmount1Min,
|
|
1727
1735
|
models.UniswapMintLiquidityProvisionRequestAmount1MinTypedDict,
|
|
1728
1736
|
],
|
|
1729
|
-
chain: models.
|
|
1737
|
+
chain: models.UniswapMintLiquidityProvisionRequestChain,
|
|
1730
1738
|
sender: str,
|
|
1731
1739
|
recipient: OptionalNullable[str] = UNSET,
|
|
1732
1740
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1733
1741
|
server_url: Optional[str] = None,
|
|
1734
1742
|
timeout_ms: Optional[int] = None,
|
|
1735
1743
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1736
|
-
) -> models.
|
|
1744
|
+
) -> models.TransactionResponse:
|
|
1737
1745
|
r"""Open a new LP position
|
|
1738
1746
|
|
|
1739
1747
|
This endpoint allows users to open a new Liquidity Provider (LP) position on the
|
|
@@ -1748,7 +1756,7 @@ class UniswapV3(BaseSDK):
|
|
|
1748
1756
|
<Info>
|
|
1749
1757
|
**Required Allowances**
|
|
1750
1758
|
|
|
1751
|
-
In order to make this transaction, token allowances need to be set
|
|
1759
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1752
1760
|
|
|
1753
1761
|
- `UniswapV3NFTPositionManager`
|
|
1754
1762
|
</Info>
|
|
@@ -1763,7 +1771,7 @@ class UniswapV3(BaseSDK):
|
|
|
1763
1771
|
:param amount1_desired: The desired amount of the second token to deposit
|
|
1764
1772
|
:param amount0_min: The minimum amount of the first token to deposit
|
|
1765
1773
|
:param amount1_min: The minimum amount of the second token to deposit
|
|
1766
|
-
:param chain:
|
|
1774
|
+
:param chain:
|
|
1767
1775
|
:param sender: The address of the transaction sender.
|
|
1768
1776
|
:param recipient: The address that will receive the LP tokens
|
|
1769
1777
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1798,7 +1806,7 @@ class UniswapV3(BaseSDK):
|
|
|
1798
1806
|
|
|
1799
1807
|
req = self._build_request_async(
|
|
1800
1808
|
method="POST",
|
|
1801
|
-
path="/
|
|
1809
|
+
path="/v1/uniswap/liquidity_provision/mint",
|
|
1802
1810
|
base_url=base_url,
|
|
1803
1811
|
url_variables=url_variables,
|
|
1804
1812
|
request=request,
|
|
@@ -1831,7 +1839,7 @@ class UniswapV3(BaseSDK):
|
|
|
1831
1839
|
hook_ctx=HookContext(
|
|
1832
1840
|
config=self.sdk_configuration,
|
|
1833
1841
|
base_url=base_url or "",
|
|
1834
|
-
operation_id="
|
|
1842
|
+
operation_id="v1_uniswap_liquidity_provision_mint",
|
|
1835
1843
|
oauth2_scopes=[],
|
|
1836
1844
|
security_source=self.sdk_configuration.security,
|
|
1837
1845
|
),
|
|
@@ -1842,7 +1850,7 @@ class UniswapV3(BaseSDK):
|
|
|
1842
1850
|
|
|
1843
1851
|
response_data: Any = None
|
|
1844
1852
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1845
|
-
return unmarshal_json_response(models.
|
|
1853
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
1846
1854
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1847
1855
|
response_data = unmarshal_json_response(
|
|
1848
1856
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -1857,7 +1865,7 @@ class UniswapV3(BaseSDK):
|
|
|
1857
1865
|
|
|
1858
1866
|
raise errors.APIError("Unexpected response received", http_res)
|
|
1859
1867
|
|
|
1860
|
-
def
|
|
1868
|
+
def uniswap_liquidity_provision_increase(
|
|
1861
1869
|
self,
|
|
1862
1870
|
*,
|
|
1863
1871
|
token_id: int,
|
|
@@ -1877,13 +1885,13 @@ class UniswapV3(BaseSDK):
|
|
|
1877
1885
|
models.UniswapIncreaseLiquidityProvisionRequestAmount1Min,
|
|
1878
1886
|
models.UniswapIncreaseLiquidityProvisionRequestAmount1MinTypedDict,
|
|
1879
1887
|
],
|
|
1880
|
-
chain: models.
|
|
1888
|
+
chain: models.UniswapIncreaseLiquidityProvisionRequestChain,
|
|
1881
1889
|
sender: str,
|
|
1882
1890
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1883
1891
|
server_url: Optional[str] = None,
|
|
1884
1892
|
timeout_ms: Optional[int] = None,
|
|
1885
1893
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1886
|
-
) -> models.
|
|
1894
|
+
) -> models.TransactionResponse:
|
|
1887
1895
|
r"""Increase an LP position
|
|
1888
1896
|
|
|
1889
1897
|
This endpoint allows users to increase their existing Liquidity Provider (LP)
|
|
@@ -1898,7 +1906,7 @@ class UniswapV3(BaseSDK):
|
|
|
1898
1906
|
<Info>
|
|
1899
1907
|
**Required Allowances**
|
|
1900
1908
|
|
|
1901
|
-
In order to make this transaction, token allowances need to be set
|
|
1909
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1902
1910
|
|
|
1903
1911
|
- `AerodromeSlipstreamRouter`
|
|
1904
1912
|
</Info>
|
|
@@ -1909,7 +1917,7 @@ class UniswapV3(BaseSDK):
|
|
|
1909
1917
|
:param amount1_desired: The desired amount of the second token to deposit
|
|
1910
1918
|
:param amount0_min: The minimum amount of the first token to deposit
|
|
1911
1919
|
:param amount1_min: The minimum amount of the second token to deposit
|
|
1912
|
-
:param chain:
|
|
1920
|
+
:param chain:
|
|
1913
1921
|
:param sender: The address of the transaction sender.
|
|
1914
1922
|
:param retries: Override the default retry configuration for this method
|
|
1915
1923
|
:param server_url: Override the default server URL for this method
|
|
@@ -1938,7 +1946,7 @@ class UniswapV3(BaseSDK):
|
|
|
1938
1946
|
|
|
1939
1947
|
req = self._build_request(
|
|
1940
1948
|
method="POST",
|
|
1941
|
-
path="/
|
|
1949
|
+
path="/v1/uniswap/liquidity_provision/increase",
|
|
1942
1950
|
base_url=base_url,
|
|
1943
1951
|
url_variables=url_variables,
|
|
1944
1952
|
request=request,
|
|
@@ -1971,7 +1979,7 @@ class UniswapV3(BaseSDK):
|
|
|
1971
1979
|
hook_ctx=HookContext(
|
|
1972
1980
|
config=self.sdk_configuration,
|
|
1973
1981
|
base_url=base_url or "",
|
|
1974
|
-
operation_id="
|
|
1982
|
+
operation_id="v1_uniswap_liquidity_provision_increase",
|
|
1975
1983
|
oauth2_scopes=[],
|
|
1976
1984
|
security_source=self.sdk_configuration.security,
|
|
1977
1985
|
),
|
|
@@ -1982,7 +1990,7 @@ class UniswapV3(BaseSDK):
|
|
|
1982
1990
|
|
|
1983
1991
|
response_data: Any = None
|
|
1984
1992
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1985
|
-
return unmarshal_json_response(models.
|
|
1993
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
1986
1994
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1987
1995
|
response_data = unmarshal_json_response(
|
|
1988
1996
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -1997,7 +2005,7 @@ class UniswapV3(BaseSDK):
|
|
|
1997
2005
|
|
|
1998
2006
|
raise errors.APIError("Unexpected response received", http_res)
|
|
1999
2007
|
|
|
2000
|
-
async def
|
|
2008
|
+
async def uniswap_liquidity_provision_increase_async(
|
|
2001
2009
|
self,
|
|
2002
2010
|
*,
|
|
2003
2011
|
token_id: int,
|
|
@@ -2017,13 +2025,13 @@ class UniswapV3(BaseSDK):
|
|
|
2017
2025
|
models.UniswapIncreaseLiquidityProvisionRequestAmount1Min,
|
|
2018
2026
|
models.UniswapIncreaseLiquidityProvisionRequestAmount1MinTypedDict,
|
|
2019
2027
|
],
|
|
2020
|
-
chain: models.
|
|
2028
|
+
chain: models.UniswapIncreaseLiquidityProvisionRequestChain,
|
|
2021
2029
|
sender: str,
|
|
2022
2030
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2023
2031
|
server_url: Optional[str] = None,
|
|
2024
2032
|
timeout_ms: Optional[int] = None,
|
|
2025
2033
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2026
|
-
) -> models.
|
|
2034
|
+
) -> models.TransactionResponse:
|
|
2027
2035
|
r"""Increase an LP position
|
|
2028
2036
|
|
|
2029
2037
|
This endpoint allows users to increase their existing Liquidity Provider (LP)
|
|
@@ -2038,7 +2046,7 @@ class UniswapV3(BaseSDK):
|
|
|
2038
2046
|
<Info>
|
|
2039
2047
|
**Required Allowances**
|
|
2040
2048
|
|
|
2041
|
-
In order to make this transaction, token allowances need to be set
|
|
2049
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2042
2050
|
|
|
2043
2051
|
- `AerodromeSlipstreamRouter`
|
|
2044
2052
|
</Info>
|
|
@@ -2049,7 +2057,7 @@ class UniswapV3(BaseSDK):
|
|
|
2049
2057
|
:param amount1_desired: The desired amount of the second token to deposit
|
|
2050
2058
|
:param amount0_min: The minimum amount of the first token to deposit
|
|
2051
2059
|
:param amount1_min: The minimum amount of the second token to deposit
|
|
2052
|
-
:param chain:
|
|
2060
|
+
:param chain:
|
|
2053
2061
|
:param sender: The address of the transaction sender.
|
|
2054
2062
|
:param retries: Override the default retry configuration for this method
|
|
2055
2063
|
:param server_url: Override the default server URL for this method
|
|
@@ -2078,7 +2086,7 @@ class UniswapV3(BaseSDK):
|
|
|
2078
2086
|
|
|
2079
2087
|
req = self._build_request_async(
|
|
2080
2088
|
method="POST",
|
|
2081
|
-
path="/
|
|
2089
|
+
path="/v1/uniswap/liquidity_provision/increase",
|
|
2082
2090
|
base_url=base_url,
|
|
2083
2091
|
url_variables=url_variables,
|
|
2084
2092
|
request=request,
|
|
@@ -2111,7 +2119,7 @@ class UniswapV3(BaseSDK):
|
|
|
2111
2119
|
hook_ctx=HookContext(
|
|
2112
2120
|
config=self.sdk_configuration,
|
|
2113
2121
|
base_url=base_url or "",
|
|
2114
|
-
operation_id="
|
|
2122
|
+
operation_id="v1_uniswap_liquidity_provision_increase",
|
|
2115
2123
|
oauth2_scopes=[],
|
|
2116
2124
|
security_source=self.sdk_configuration.security,
|
|
2117
2125
|
),
|
|
@@ -2122,7 +2130,7 @@ class UniswapV3(BaseSDK):
|
|
|
2122
2130
|
|
|
2123
2131
|
response_data: Any = None
|
|
2124
2132
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2125
|
-
return unmarshal_json_response(models.
|
|
2133
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2126
2134
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2127
2135
|
response_data = unmarshal_json_response(
|
|
2128
2136
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -2137,7 +2145,7 @@ class UniswapV3(BaseSDK):
|
|
|
2137
2145
|
|
|
2138
2146
|
raise errors.APIError("Unexpected response received", http_res)
|
|
2139
2147
|
|
|
2140
|
-
def
|
|
2148
|
+
def uniswap_liquidity_provision_withdraw(
|
|
2141
2149
|
self,
|
|
2142
2150
|
*,
|
|
2143
2151
|
token_id: int,
|
|
@@ -2145,13 +2153,13 @@ class UniswapV3(BaseSDK):
|
|
|
2145
2153
|
models.UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawal,
|
|
2146
2154
|
models.UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict,
|
|
2147
2155
|
],
|
|
2148
|
-
chain: models.
|
|
2156
|
+
chain: models.UniswapWithdrawLiquidityProvisionRequestChain,
|
|
2149
2157
|
sender: str,
|
|
2150
2158
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2151
2159
|
server_url: Optional[str] = None,
|
|
2152
2160
|
timeout_ms: Optional[int] = None,
|
|
2153
2161
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2154
|
-
) -> models.
|
|
2162
|
+
) -> models.TransactionResponse:
|
|
2155
2163
|
r"""Withdraw an LP position
|
|
2156
2164
|
|
|
2157
2165
|
This endpoint allows users to withdraw their Liquidity Provider (LP) positions
|
|
@@ -2167,7 +2175,7 @@ class UniswapV3(BaseSDK):
|
|
|
2167
2175
|
<Info>
|
|
2168
2176
|
**Required Allowances**
|
|
2169
2177
|
|
|
2170
|
-
In order to make this transaction, token allowances need to be set
|
|
2178
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2171
2179
|
|
|
2172
2180
|
- `UniswapV3NFTPositionManager`
|
|
2173
2181
|
</Info>
|
|
@@ -2175,7 +2183,7 @@ class UniswapV3(BaseSDK):
|
|
|
2175
2183
|
|
|
2176
2184
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
2177
2185
|
:param percentage_for_withdrawal: How much liquidity to take out in percentage.
|
|
2178
|
-
:param chain:
|
|
2186
|
+
:param chain:
|
|
2179
2187
|
:param sender: The address of the transaction sender.
|
|
2180
2188
|
:param retries: Override the default retry configuration for this method
|
|
2181
2189
|
:param server_url: Override the default server URL for this method
|
|
@@ -2201,7 +2209,7 @@ class UniswapV3(BaseSDK):
|
|
|
2201
2209
|
|
|
2202
2210
|
req = self._build_request(
|
|
2203
2211
|
method="POST",
|
|
2204
|
-
path="/
|
|
2212
|
+
path="/v1/uniswap/liquidity_provision/withdraw",
|
|
2205
2213
|
base_url=base_url,
|
|
2206
2214
|
url_variables=url_variables,
|
|
2207
2215
|
request=request,
|
|
@@ -2234,7 +2242,7 @@ class UniswapV3(BaseSDK):
|
|
|
2234
2242
|
hook_ctx=HookContext(
|
|
2235
2243
|
config=self.sdk_configuration,
|
|
2236
2244
|
base_url=base_url or "",
|
|
2237
|
-
operation_id="
|
|
2245
|
+
operation_id="v1_uniswap_liquidity_provision_withdraw",
|
|
2238
2246
|
oauth2_scopes=[],
|
|
2239
2247
|
security_source=self.sdk_configuration.security,
|
|
2240
2248
|
),
|
|
@@ -2245,7 +2253,7 @@ class UniswapV3(BaseSDK):
|
|
|
2245
2253
|
|
|
2246
2254
|
response_data: Any = None
|
|
2247
2255
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2248
|
-
return unmarshal_json_response(models.
|
|
2256
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2249
2257
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2250
2258
|
response_data = unmarshal_json_response(
|
|
2251
2259
|
errors.HTTPValidationErrorData, http_res
|
|
@@ -2260,7 +2268,7 @@ class UniswapV3(BaseSDK):
|
|
|
2260
2268
|
|
|
2261
2269
|
raise errors.APIError("Unexpected response received", http_res)
|
|
2262
2270
|
|
|
2263
|
-
async def
|
|
2271
|
+
async def uniswap_liquidity_provision_withdraw_async(
|
|
2264
2272
|
self,
|
|
2265
2273
|
*,
|
|
2266
2274
|
token_id: int,
|
|
@@ -2268,13 +2276,13 @@ class UniswapV3(BaseSDK):
|
|
|
2268
2276
|
models.UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawal,
|
|
2269
2277
|
models.UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict,
|
|
2270
2278
|
],
|
|
2271
|
-
chain: models.
|
|
2279
|
+
chain: models.UniswapWithdrawLiquidityProvisionRequestChain,
|
|
2272
2280
|
sender: str,
|
|
2273
2281
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2274
2282
|
server_url: Optional[str] = None,
|
|
2275
2283
|
timeout_ms: Optional[int] = None,
|
|
2276
2284
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2277
|
-
) -> models.
|
|
2285
|
+
) -> models.TransactionResponse:
|
|
2278
2286
|
r"""Withdraw an LP position
|
|
2279
2287
|
|
|
2280
2288
|
This endpoint allows users to withdraw their Liquidity Provider (LP) positions
|
|
@@ -2290,7 +2298,7 @@ class UniswapV3(BaseSDK):
|
|
|
2290
2298
|
<Info>
|
|
2291
2299
|
**Required Allowances**
|
|
2292
2300
|
|
|
2293
|
-
In order to make this transaction, token allowances need to be set
|
|
2301
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2294
2302
|
|
|
2295
2303
|
- `UniswapV3NFTPositionManager`
|
|
2296
2304
|
</Info>
|
|
@@ -2298,7 +2306,7 @@ class UniswapV3(BaseSDK):
|
|
|
2298
2306
|
|
|
2299
2307
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
2300
2308
|
:param percentage_for_withdrawal: How much liquidity to take out in percentage.
|
|
2301
|
-
:param chain:
|
|
2309
|
+
:param chain:
|
|
2302
2310
|
:param sender: The address of the transaction sender.
|
|
2303
2311
|
:param retries: Override the default retry configuration for this method
|
|
2304
2312
|
:param server_url: Override the default server URL for this method
|
|
@@ -2324,7 +2332,7 @@ class UniswapV3(BaseSDK):
|
|
|
2324
2332
|
|
|
2325
2333
|
req = self._build_request_async(
|
|
2326
2334
|
method="POST",
|
|
2327
|
-
path="/
|
|
2335
|
+
path="/v1/uniswap/liquidity_provision/withdraw",
|
|
2328
2336
|
base_url=base_url,
|
|
2329
2337
|
url_variables=url_variables,
|
|
2330
2338
|
request=request,
|
|
@@ -2357,7 +2365,7 @@ class UniswapV3(BaseSDK):
|
|
|
2357
2365
|
hook_ctx=HookContext(
|
|
2358
2366
|
config=self.sdk_configuration,
|
|
2359
2367
|
base_url=base_url or "",
|
|
2360
|
-
operation_id="
|
|
2368
|
+
operation_id="v1_uniswap_liquidity_provision_withdraw",
|
|
2361
2369
|
oauth2_scopes=[],
|
|
2362
2370
|
security_source=self.sdk_configuration.security,
|
|
2363
2371
|
),
|
|
@@ -2368,7 +2376,7 @@ class UniswapV3(BaseSDK):
|
|
|
2368
2376
|
|
|
2369
2377
|
response_data: Any = None
|
|
2370
2378
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2371
|
-
return unmarshal_json_response(models.
|
|
2379
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2372
2380
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2373
2381
|
response_data = unmarshal_json_response(
|
|
2374
2382
|
errors.HTTPValidationErrorData, http_res
|