compass_api_sdk 0.5.2__py3-none-any.whl → 0.5.4__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.
- compass_api_sdk/_version.py +2 -2
- compass_api_sdk/aave_v3.py +120 -0
- compass_api_sdk/aerodrome_slipstream.py +32 -0
- compass_api_sdk/models/__init__.py +208 -1
- compass_api_sdk/models/aave_avg_rateop.py +18 -1
- compass_api_sdk/models/aave_historical_transactionsop.py +22 -2
- compass_api_sdk/models/aave_liquidity_changeop.py +20 -1
- compass_api_sdk/models/aave_rateop.py +18 -1
- compass_api_sdk/models/aave_reserve_overviewop.py +20 -1
- compass_api_sdk/models/aave_std_rateop.py +18 -1
- compass_api_sdk/models/aave_token_priceop.py +20 -1
- compass_api_sdk/models/aave_user_position_per_tokenop.py +22 -1
- compass_api_sdk/models/aave_user_position_summaryop.py +22 -1
- compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +22 -2
- compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +22 -2
- compass_api_sdk/models/generic_allowanceop.py +20 -2
- compass_api_sdk/models/generic_ensop.py +18 -2
- compass_api_sdk/models/generic_portfolioop.py +20 -2
- compass_api_sdk/models/generic_supported_tokensop.py +22 -1
- compass_api_sdk/models/generic_visualize_portfolioop.py +22 -2
- compass_api_sdk/models/morpho_market_positionop.py +20 -1
- compass_api_sdk/models/morpho_marketop.py +20 -1
- compass_api_sdk/models/morpho_marketsop.py +21 -2
- compass_api_sdk/models/morpho_user_positionop.py +20 -1
- compass_api_sdk/models/morpho_vault_positionop.py +20 -1
- compass_api_sdk/models/morpho_vaultop.py +18 -1
- compass_api_sdk/models/morpho_vaultsop.py +21 -2
- compass_api_sdk/models/multicallauthorizationrequest.py +15 -1
- compass_api_sdk/models/pendle_marketop.py +20 -1
- compass_api_sdk/models/pendle_positionop.py +20 -1
- compass_api_sdk/models/sky_positionop.py +18 -2
- compass_api_sdk/models/token_addressop.py +20 -1
- compass_api_sdk/models/token_balanceop.py +20 -2
- compass_api_sdk/models/uniswap_liquidity_provision_in_rangeop.py +22 -1
- compass_api_sdk/models/uniswap_liquidity_provision_positionsop.py +22 -2
- compass_api_sdk/models/uniswap_pool_priceop.py +20 -1
- compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +22 -2
- compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +22 -2
- compass_api_sdk/morpho.py +86 -0
- compass_api_sdk/pendle.py +25 -5
- compass_api_sdk/sky.py +10 -0
- compass_api_sdk/token_sdk.py +20 -0
- compass_api_sdk/transaction_batching.py +6 -0
- compass_api_sdk/uniswap_v3.py +74 -0
- compass_api_sdk/universal.py +62 -0
- {compass_api_sdk-0.5.2.dist-info → compass_api_sdk-0.5.4.dist-info}/METADATA +1 -1
- {compass_api_sdk-0.5.2.dist-info → compass_api_sdk-0.5.4.dist-info}/RECORD +48 -48
- {compass_api_sdk-0.5.2.dist-info → compass_api_sdk-0.5.4.dist-info}/WHEEL +0 -0
compass_api_sdk/pendle.py
CHANGED
|
@@ -4,7 +4,7 @@ from .basesdk import BaseSDK
|
|
|
4
4
|
from compass_api_sdk import errors, models, utils
|
|
5
5
|
from compass_api_sdk._hooks import HookContext
|
|
6
6
|
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
|
-
from typing import Any, Mapping, Optional
|
|
7
|
+
from typing import Any, Mapping, Optional, Union
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class Pendle(BaseSDK):
|
|
@@ -14,6 +14,9 @@ class Pendle(BaseSDK):
|
|
|
14
14
|
chain: models.PendlePositionChain = models.PendlePositionChain.ETHEREUM_MAINNET,
|
|
15
15
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
16
16
|
market_address: str = "0xdace1121e10500e9e29d071f01593fd76b000f08",
|
|
17
|
+
block: Optional[
|
|
18
|
+
Union[models.PendlePositionBlock, models.PendlePositionBlockTypedDict]
|
|
19
|
+
] = None,
|
|
17
20
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
18
21
|
server_url: Optional[str] = None,
|
|
19
22
|
timeout_ms: Optional[int] = None,
|
|
@@ -21,11 +24,12 @@ class Pendle(BaseSDK):
|
|
|
21
24
|
) -> models.PendleGetUserPositionResponse:
|
|
22
25
|
r"""Check User's Market Position
|
|
23
26
|
|
|
24
|
-
Check the SY, PT, and
|
|
27
|
+
Check the SY, PT, YT and Underlying Token positions for a given market.
|
|
25
28
|
|
|
26
29
|
:param chain: The chain to use.
|
|
27
30
|
:param user_address: The user address of the desired position.
|
|
28
31
|
:param market_address: The market address of the desired position.
|
|
32
|
+
:param block: The block number you want to get this data at.
|
|
29
33
|
:param retries: Override the default retry configuration for this method
|
|
30
34
|
:param server_url: Override the default server URL for this method
|
|
31
35
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -43,6 +47,7 @@ class Pendle(BaseSDK):
|
|
|
43
47
|
|
|
44
48
|
request = models.PendlePositionRequest(
|
|
45
49
|
chain=chain,
|
|
50
|
+
block=block,
|
|
46
51
|
user_address=user_address,
|
|
47
52
|
market_address=market_address,
|
|
48
53
|
)
|
|
@@ -119,6 +124,9 @@ class Pendle(BaseSDK):
|
|
|
119
124
|
chain: models.PendlePositionChain = models.PendlePositionChain.ETHEREUM_MAINNET,
|
|
120
125
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
121
126
|
market_address: str = "0xdace1121e10500e9e29d071f01593fd76b000f08",
|
|
127
|
+
block: Optional[
|
|
128
|
+
Union[models.PendlePositionBlock, models.PendlePositionBlockTypedDict]
|
|
129
|
+
] = None,
|
|
122
130
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
123
131
|
server_url: Optional[str] = None,
|
|
124
132
|
timeout_ms: Optional[int] = None,
|
|
@@ -126,11 +134,12 @@ class Pendle(BaseSDK):
|
|
|
126
134
|
) -> models.PendleGetUserPositionResponse:
|
|
127
135
|
r"""Check User's Market Position
|
|
128
136
|
|
|
129
|
-
Check the SY, PT, and
|
|
137
|
+
Check the SY, PT, YT and Underlying Token positions for a given market.
|
|
130
138
|
|
|
131
139
|
:param chain: The chain to use.
|
|
132
140
|
:param user_address: The user address of the desired position.
|
|
133
141
|
:param market_address: The market address of the desired position.
|
|
142
|
+
:param block: The block number you want to get this data at.
|
|
134
143
|
:param retries: Override the default retry configuration for this method
|
|
135
144
|
:param server_url: Override the default server URL for this method
|
|
136
145
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -148,6 +157,7 @@ class Pendle(BaseSDK):
|
|
|
148
157
|
|
|
149
158
|
request = models.PendlePositionRequest(
|
|
150
159
|
chain=chain,
|
|
160
|
+
block=block,
|
|
151
161
|
user_address=user_address,
|
|
152
162
|
market_address=market_address,
|
|
153
163
|
)
|
|
@@ -224,6 +234,9 @@ class Pendle(BaseSDK):
|
|
|
224
234
|
chain: models.PendleMarketChain = models.PendleMarketChain.ETHEREUM_MAINNET,
|
|
225
235
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
226
236
|
market_address: str = "0xdace1121e10500e9e29d071f01593fd76b000f08",
|
|
237
|
+
block: Optional[
|
|
238
|
+
Union[models.PendleMarketBlock, models.PendleMarketBlockTypedDict]
|
|
239
|
+
] = None,
|
|
227
240
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
228
241
|
server_url: Optional[str] = None,
|
|
229
242
|
timeout_ms: Optional[int] = None,
|
|
@@ -231,11 +244,12 @@ class Pendle(BaseSDK):
|
|
|
231
244
|
) -> models.PendleGetMarketResponse:
|
|
232
245
|
r"""Get Market Data
|
|
233
246
|
|
|
234
|
-
Get market data.
|
|
247
|
+
Get the market's implied APY, maturity date and the associated token data.
|
|
235
248
|
|
|
236
249
|
:param chain: The chain to use.
|
|
237
250
|
:param user_address: The user address of the desired position.
|
|
238
251
|
:param market_address: The market address of the desired position.
|
|
252
|
+
:param block: The block number you want to get this data at.
|
|
239
253
|
:param retries: Override the default retry configuration for this method
|
|
240
254
|
:param server_url: Override the default server URL for this method
|
|
241
255
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -253,6 +267,7 @@ class Pendle(BaseSDK):
|
|
|
253
267
|
|
|
254
268
|
request = models.PendleMarketRequest(
|
|
255
269
|
chain=chain,
|
|
270
|
+
block=block,
|
|
256
271
|
user_address=user_address,
|
|
257
272
|
market_address=market_address,
|
|
258
273
|
)
|
|
@@ -327,6 +342,9 @@ class Pendle(BaseSDK):
|
|
|
327
342
|
chain: models.PendleMarketChain = models.PendleMarketChain.ETHEREUM_MAINNET,
|
|
328
343
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
329
344
|
market_address: str = "0xdace1121e10500e9e29d071f01593fd76b000f08",
|
|
345
|
+
block: Optional[
|
|
346
|
+
Union[models.PendleMarketBlock, models.PendleMarketBlockTypedDict]
|
|
347
|
+
] = None,
|
|
330
348
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
331
349
|
server_url: Optional[str] = None,
|
|
332
350
|
timeout_ms: Optional[int] = None,
|
|
@@ -334,11 +352,12 @@ class Pendle(BaseSDK):
|
|
|
334
352
|
) -> models.PendleGetMarketResponse:
|
|
335
353
|
r"""Get Market Data
|
|
336
354
|
|
|
337
|
-
Get market data.
|
|
355
|
+
Get the market's implied APY, maturity date and the associated token data.
|
|
338
356
|
|
|
339
357
|
:param chain: The chain to use.
|
|
340
358
|
:param user_address: The user address of the desired position.
|
|
341
359
|
:param market_address: The market address of the desired position.
|
|
360
|
+
:param block: The block number you want to get this data at.
|
|
342
361
|
:param retries: Override the default retry configuration for this method
|
|
343
362
|
:param server_url: Override the default server URL for this method
|
|
344
363
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -356,6 +375,7 @@ class Pendle(BaseSDK):
|
|
|
356
375
|
|
|
357
376
|
request = models.PendleMarketRequest(
|
|
358
377
|
chain=chain,
|
|
378
|
+
block=block,
|
|
359
379
|
user_address=user_address,
|
|
360
380
|
market_address=market_address,
|
|
361
381
|
)
|
compass_api_sdk/sky.py
CHANGED
|
@@ -12,6 +12,9 @@ class Sky(BaseSDK):
|
|
|
12
12
|
self,
|
|
13
13
|
*,
|
|
14
14
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
15
|
+
block: Optional[
|
|
16
|
+
Union[models.SkyPositionBlock, models.SkyPositionBlockTypedDict]
|
|
17
|
+
] = None,
|
|
15
18
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
16
19
|
server_url: Optional[str] = None,
|
|
17
20
|
timeout_ms: Optional[int] = None,
|
|
@@ -22,6 +25,7 @@ class Sky(BaseSDK):
|
|
|
22
25
|
Check the USDS overall position.
|
|
23
26
|
|
|
24
27
|
:param user_address: The user address of the desired position.
|
|
28
|
+
:param block: The block number you want to get this data at.
|
|
25
29
|
:param retries: Override the default retry configuration for this method
|
|
26
30
|
:param server_url: Override the default server URL for this method
|
|
27
31
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -38,6 +42,7 @@ class Sky(BaseSDK):
|
|
|
38
42
|
base_url = self._get_url(base_url, url_variables)
|
|
39
43
|
|
|
40
44
|
request = models.SkyPositionRequest(
|
|
45
|
+
block=block,
|
|
41
46
|
user_address=user_address,
|
|
42
47
|
)
|
|
43
48
|
|
|
@@ -109,6 +114,9 @@ class Sky(BaseSDK):
|
|
|
109
114
|
self,
|
|
110
115
|
*,
|
|
111
116
|
user_address: str = "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
|
|
117
|
+
block: Optional[
|
|
118
|
+
Union[models.SkyPositionBlock, models.SkyPositionBlockTypedDict]
|
|
119
|
+
] = None,
|
|
112
120
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
113
121
|
server_url: Optional[str] = None,
|
|
114
122
|
timeout_ms: Optional[int] = None,
|
|
@@ -119,6 +127,7 @@ class Sky(BaseSDK):
|
|
|
119
127
|
Check the USDS overall position.
|
|
120
128
|
|
|
121
129
|
:param user_address: The user address of the desired position.
|
|
130
|
+
:param block: The block number you want to get this data at.
|
|
122
131
|
:param retries: Override the default retry configuration for this method
|
|
123
132
|
:param server_url: Override the default server URL for this method
|
|
124
133
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -135,6 +144,7 @@ class Sky(BaseSDK):
|
|
|
135
144
|
base_url = self._get_url(base_url, url_variables)
|
|
136
145
|
|
|
137
146
|
request = models.SkyPositionRequest(
|
|
147
|
+
block=block,
|
|
138
148
|
user_address=user_address,
|
|
139
149
|
)
|
|
140
150
|
|
compass_api_sdk/token_sdk.py
CHANGED
|
@@ -13,6 +13,9 @@ class TokenSDK(BaseSDK):
|
|
|
13
13
|
*,
|
|
14
14
|
chain: models.TokenAddressChain = models.TokenAddressChain.ARBITRUM_MAINNET,
|
|
15
15
|
token: models.TokenAddressToken = models.TokenAddressToken.WETH,
|
|
16
|
+
block: Optional[
|
|
17
|
+
Union[models.TokenAddressBlock, models.TokenAddressBlockTypedDict]
|
|
18
|
+
] = None,
|
|
16
19
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
17
20
|
server_url: Optional[str] = None,
|
|
18
21
|
timeout_ms: Optional[int] = None,
|
|
@@ -24,6 +27,7 @@ class TokenSDK(BaseSDK):
|
|
|
24
27
|
|
|
25
28
|
:param chain: The chain to use.
|
|
26
29
|
:param token: The token symbol to get the address for..
|
|
30
|
+
:param block: The block number you want to get this data at.
|
|
27
31
|
:param retries: Override the default retry configuration for this method
|
|
28
32
|
:param server_url: Override the default server URL for this method
|
|
29
33
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -41,6 +45,7 @@ class TokenSDK(BaseSDK):
|
|
|
41
45
|
|
|
42
46
|
request = models.TokenAddressRequest(
|
|
43
47
|
chain=chain,
|
|
48
|
+
block=block,
|
|
44
49
|
token=token,
|
|
45
50
|
)
|
|
46
51
|
|
|
@@ -113,6 +118,9 @@ class TokenSDK(BaseSDK):
|
|
|
113
118
|
*,
|
|
114
119
|
chain: models.TokenAddressChain = models.TokenAddressChain.ARBITRUM_MAINNET,
|
|
115
120
|
token: models.TokenAddressToken = models.TokenAddressToken.WETH,
|
|
121
|
+
block: Optional[
|
|
122
|
+
Union[models.TokenAddressBlock, models.TokenAddressBlockTypedDict]
|
|
123
|
+
] = None,
|
|
116
124
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
117
125
|
server_url: Optional[str] = None,
|
|
118
126
|
timeout_ms: Optional[int] = None,
|
|
@@ -124,6 +132,7 @@ class TokenSDK(BaseSDK):
|
|
|
124
132
|
|
|
125
133
|
:param chain: The chain to use.
|
|
126
134
|
:param token: The token symbol to get the address for..
|
|
135
|
+
:param block: The block number you want to get this data at.
|
|
127
136
|
:param retries: Override the default retry configuration for this method
|
|
128
137
|
:param server_url: Override the default server URL for this method
|
|
129
138
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -141,6 +150,7 @@ class TokenSDK(BaseSDK):
|
|
|
141
150
|
|
|
142
151
|
request = models.TokenAddressRequest(
|
|
143
152
|
chain=chain,
|
|
153
|
+
block=block,
|
|
144
154
|
token=token,
|
|
145
155
|
)
|
|
146
156
|
|
|
@@ -422,6 +432,9 @@ class TokenSDK(BaseSDK):
|
|
|
422
432
|
chain: models.TokenBalanceChain = models.TokenBalanceChain.ARBITRUM_MAINNET,
|
|
423
433
|
user: str = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
424
434
|
token: Union[models.TokenBalanceToken, models.TokenBalanceTokenTypedDict],
|
|
435
|
+
block: Optional[
|
|
436
|
+
Union[models.TokenBalanceBlock, models.TokenBalanceBlockTypedDict]
|
|
437
|
+
] = None,
|
|
425
438
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
426
439
|
server_url: Optional[str] = None,
|
|
427
440
|
timeout_ms: Optional[int] = None,
|
|
@@ -434,6 +447,7 @@ class TokenSDK(BaseSDK):
|
|
|
434
447
|
:param chain: The chain to use.
|
|
435
448
|
:param user: The user to get the ERC20 balance of.
|
|
436
449
|
:param token: The symbol of the token for which the balance is checked..
|
|
450
|
+
:param block: The block number you want to get this data at.
|
|
437
451
|
:param retries: Override the default retry configuration for this method
|
|
438
452
|
:param server_url: Override the default server URL for this method
|
|
439
453
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -451,6 +465,7 @@ class TokenSDK(BaseSDK):
|
|
|
451
465
|
|
|
452
466
|
request = models.TokenBalanceRequest(
|
|
453
467
|
chain=chain,
|
|
468
|
+
block=block,
|
|
454
469
|
user=user,
|
|
455
470
|
token=token,
|
|
456
471
|
)
|
|
@@ -525,6 +540,9 @@ class TokenSDK(BaseSDK):
|
|
|
525
540
|
chain: models.TokenBalanceChain = models.TokenBalanceChain.ARBITRUM_MAINNET,
|
|
526
541
|
user: str = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
527
542
|
token: Union[models.TokenBalanceToken, models.TokenBalanceTokenTypedDict],
|
|
543
|
+
block: Optional[
|
|
544
|
+
Union[models.TokenBalanceBlock, models.TokenBalanceBlockTypedDict]
|
|
545
|
+
] = None,
|
|
528
546
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
529
547
|
server_url: Optional[str] = None,
|
|
530
548
|
timeout_ms: Optional[int] = None,
|
|
@@ -537,6 +555,7 @@ class TokenSDK(BaseSDK):
|
|
|
537
555
|
:param chain: The chain to use.
|
|
538
556
|
:param user: The user to get the ERC20 balance of.
|
|
539
557
|
:param token: The symbol of the token for which the balance is checked..
|
|
558
|
+
:param block: The block number you want to get this data at.
|
|
540
559
|
:param retries: Override the default retry configuration for this method
|
|
541
560
|
:param server_url: Override the default server URL for this method
|
|
542
561
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -554,6 +573,7 @@ class TokenSDK(BaseSDK):
|
|
|
554
573
|
|
|
555
574
|
request = models.TokenBalanceRequest(
|
|
556
575
|
chain=chain,
|
|
576
|
+
block=block,
|
|
557
577
|
user=user,
|
|
558
578
|
token=token,
|
|
559
579
|
)
|
|
@@ -13,6 +13,7 @@ class TransactionBatching(BaseSDK):
|
|
|
13
13
|
*,
|
|
14
14
|
chain: models.Chain,
|
|
15
15
|
sender: str,
|
|
16
|
+
block: Optional[Union[models.Block, models.BlockTypedDict]] = None,
|
|
16
17
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
17
18
|
server_url: Optional[str] = None,
|
|
18
19
|
timeout_ms: Optional[int] = None,
|
|
@@ -29,6 +30,7 @@ class TransactionBatching(BaseSDK):
|
|
|
29
30
|
|
|
30
31
|
:param chain: The chain to use.
|
|
31
32
|
:param sender: The Ethereum address to use for authorization
|
|
33
|
+
:param block: The block number you want to get this data at.
|
|
32
34
|
:param retries: Override the default retry configuration for this method
|
|
33
35
|
:param server_url: Override the default server URL for this method
|
|
34
36
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -46,6 +48,7 @@ class TransactionBatching(BaseSDK):
|
|
|
46
48
|
|
|
47
49
|
request = models.MulticallAuthorizationRequest(
|
|
48
50
|
chain=chain,
|
|
51
|
+
block=block,
|
|
49
52
|
sender=sender,
|
|
50
53
|
)
|
|
51
54
|
|
|
@@ -123,6 +126,7 @@ class TransactionBatching(BaseSDK):
|
|
|
123
126
|
*,
|
|
124
127
|
chain: models.Chain,
|
|
125
128
|
sender: str,
|
|
129
|
+
block: Optional[Union[models.Block, models.BlockTypedDict]] = None,
|
|
126
130
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
127
131
|
server_url: Optional[str] = None,
|
|
128
132
|
timeout_ms: Optional[int] = None,
|
|
@@ -139,6 +143,7 @@ class TransactionBatching(BaseSDK):
|
|
|
139
143
|
|
|
140
144
|
:param chain: The chain to use.
|
|
141
145
|
:param sender: The Ethereum address to use for authorization
|
|
146
|
+
:param block: The block number you want to get this data at.
|
|
142
147
|
:param retries: Override the default retry configuration for this method
|
|
143
148
|
:param server_url: Override the default server URL for this method
|
|
144
149
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -156,6 +161,7 @@ class TransactionBatching(BaseSDK):
|
|
|
156
161
|
|
|
157
162
|
request = models.MulticallAuthorizationRequest(
|
|
158
163
|
chain=chain,
|
|
164
|
+
block=block,
|
|
159
165
|
sender=sender,
|
|
160
166
|
)
|
|
161
167
|
|
compass_api_sdk/uniswap_v3.py
CHANGED
|
@@ -19,6 +19,12 @@ class UniswapV3(BaseSDK):
|
|
|
19
19
|
models.UniswapQuoteBuyExactlyAmountOut,
|
|
20
20
|
models.UniswapQuoteBuyExactlyAmountOutTypedDict,
|
|
21
21
|
],
|
|
22
|
+
block: Optional[
|
|
23
|
+
Union[
|
|
24
|
+
models.UniswapQuoteBuyExactlyBlock,
|
|
25
|
+
models.UniswapQuoteBuyExactlyBlockTypedDict,
|
|
26
|
+
]
|
|
27
|
+
] = None,
|
|
22
28
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
23
29
|
server_url: Optional[str] = None,
|
|
24
30
|
timeout_ms: Optional[int] = None,
|
|
@@ -37,6 +43,7 @@ class UniswapV3(BaseSDK):
|
|
|
37
43
|
:param token_out: The symbol of the token to swap to.
|
|
38
44
|
:param fee: The fee to pay for the swap
|
|
39
45
|
:param amount_out: The amount of the token to swap to
|
|
46
|
+
:param block: The block number you want to get this data at.
|
|
40
47
|
:param retries: Override the default retry configuration for this method
|
|
41
48
|
:param server_url: Override the default server URL for this method
|
|
42
49
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -54,6 +61,7 @@ class UniswapV3(BaseSDK):
|
|
|
54
61
|
|
|
55
62
|
request = models.UniswapQuoteBuyExactlyRequest(
|
|
56
63
|
chain=chain,
|
|
64
|
+
block=block,
|
|
57
65
|
token_in=token_in,
|
|
58
66
|
token_out=token_out,
|
|
59
67
|
fee=fee,
|
|
@@ -137,6 +145,12 @@ class UniswapV3(BaseSDK):
|
|
|
137
145
|
models.UniswapQuoteBuyExactlyAmountOut,
|
|
138
146
|
models.UniswapQuoteBuyExactlyAmountOutTypedDict,
|
|
139
147
|
],
|
|
148
|
+
block: Optional[
|
|
149
|
+
Union[
|
|
150
|
+
models.UniswapQuoteBuyExactlyBlock,
|
|
151
|
+
models.UniswapQuoteBuyExactlyBlockTypedDict,
|
|
152
|
+
]
|
|
153
|
+
] = None,
|
|
140
154
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
141
155
|
server_url: Optional[str] = None,
|
|
142
156
|
timeout_ms: Optional[int] = None,
|
|
@@ -155,6 +169,7 @@ class UniswapV3(BaseSDK):
|
|
|
155
169
|
:param token_out: The symbol of the token to swap to.
|
|
156
170
|
:param fee: The fee to pay for the swap
|
|
157
171
|
:param amount_out: The amount of the token to swap to
|
|
172
|
+
:param block: The block number you want to get this data at.
|
|
158
173
|
:param retries: Override the default retry configuration for this method
|
|
159
174
|
:param server_url: Override the default server URL for this method
|
|
160
175
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -172,6 +187,7 @@ class UniswapV3(BaseSDK):
|
|
|
172
187
|
|
|
173
188
|
request = models.UniswapQuoteBuyExactlyRequest(
|
|
174
189
|
chain=chain,
|
|
190
|
+
block=block,
|
|
175
191
|
token_in=token_in,
|
|
176
192
|
token_out=token_out,
|
|
177
193
|
fee=fee,
|
|
@@ -255,6 +271,12 @@ class UniswapV3(BaseSDK):
|
|
|
255
271
|
models.UniswapQuoteSellExactlyAmountIn,
|
|
256
272
|
models.UniswapQuoteSellExactlyAmountInTypedDict,
|
|
257
273
|
],
|
|
274
|
+
block: Optional[
|
|
275
|
+
Union[
|
|
276
|
+
models.UniswapQuoteSellExactlyBlock,
|
|
277
|
+
models.UniswapQuoteSellExactlyBlockTypedDict,
|
|
278
|
+
]
|
|
279
|
+
] = None,
|
|
258
280
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
259
281
|
server_url: Optional[str] = None,
|
|
260
282
|
timeout_ms: Optional[int] = None,
|
|
@@ -273,6 +295,7 @@ class UniswapV3(BaseSDK):
|
|
|
273
295
|
:param token_out: The symbol of the token to swap to.
|
|
274
296
|
:param fee: The fee to pay for the swap
|
|
275
297
|
:param amount_in: The amount of the token to swap from
|
|
298
|
+
:param block: The block number you want to get this data at.
|
|
276
299
|
:param retries: Override the default retry configuration for this method
|
|
277
300
|
:param server_url: Override the default server URL for this method
|
|
278
301
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -290,6 +313,7 @@ class UniswapV3(BaseSDK):
|
|
|
290
313
|
|
|
291
314
|
request = models.UniswapQuoteSellExactlyRequest(
|
|
292
315
|
chain=chain,
|
|
316
|
+
block=block,
|
|
293
317
|
token_in=token_in,
|
|
294
318
|
token_out=token_out,
|
|
295
319
|
fee=fee,
|
|
@@ -373,6 +397,12 @@ class UniswapV3(BaseSDK):
|
|
|
373
397
|
models.UniswapQuoteSellExactlyAmountIn,
|
|
374
398
|
models.UniswapQuoteSellExactlyAmountInTypedDict,
|
|
375
399
|
],
|
|
400
|
+
block: Optional[
|
|
401
|
+
Union[
|
|
402
|
+
models.UniswapQuoteSellExactlyBlock,
|
|
403
|
+
models.UniswapQuoteSellExactlyBlockTypedDict,
|
|
404
|
+
]
|
|
405
|
+
] = None,
|
|
376
406
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
377
407
|
server_url: Optional[str] = None,
|
|
378
408
|
timeout_ms: Optional[int] = None,
|
|
@@ -391,6 +421,7 @@ class UniswapV3(BaseSDK):
|
|
|
391
421
|
:param token_out: The symbol of the token to swap to.
|
|
392
422
|
:param fee: The fee to pay for the swap
|
|
393
423
|
:param amount_in: The amount of the token to swap from
|
|
424
|
+
:param block: The block number you want to get this data at.
|
|
394
425
|
:param retries: Override the default retry configuration for this method
|
|
395
426
|
:param server_url: Override the default server URL for this method
|
|
396
427
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -408,6 +439,7 @@ class UniswapV3(BaseSDK):
|
|
|
408
439
|
|
|
409
440
|
request = models.UniswapQuoteSellExactlyRequest(
|
|
410
441
|
chain=chain,
|
|
442
|
+
block=block,
|
|
411
443
|
token_in=token_in,
|
|
412
444
|
token_out=token_out,
|
|
413
445
|
fee=fee,
|
|
@@ -487,6 +519,9 @@ class UniswapV3(BaseSDK):
|
|
|
487
519
|
token_in: models.UniswapPoolPriceTokenInToken = models.UniswapPoolPriceTokenInToken.USDC,
|
|
488
520
|
token_out: models.UniswapPoolPriceTokenOutToken = models.UniswapPoolPriceTokenOutToken.USDT,
|
|
489
521
|
fee: models.UniswapPoolPriceFeeEnum = models.UniswapPoolPriceFeeEnum.ZERO_DOT_01,
|
|
522
|
+
block: Optional[
|
|
523
|
+
Union[models.UniswapPoolPriceBlock, models.UniswapPoolPriceBlockTypedDict]
|
|
524
|
+
] = None,
|
|
490
525
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
491
526
|
server_url: Optional[str] = None,
|
|
492
527
|
timeout_ms: Optional[int] = None,
|
|
@@ -502,6 +537,7 @@ class UniswapV3(BaseSDK):
|
|
|
502
537
|
:param token_in: The symbol of a token in the pool
|
|
503
538
|
:param token_out: The symbol of a token in the pool
|
|
504
539
|
:param fee: The fee of the pool
|
|
540
|
+
:param block: The block number you want to get this data at.
|
|
505
541
|
:param retries: Override the default retry configuration for this method
|
|
506
542
|
:param server_url: Override the default server URL for this method
|
|
507
543
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -519,6 +555,7 @@ class UniswapV3(BaseSDK):
|
|
|
519
555
|
|
|
520
556
|
request = models.UniswapPoolPriceRequest(
|
|
521
557
|
chain=chain,
|
|
558
|
+
block=block,
|
|
522
559
|
token_in=token_in,
|
|
523
560
|
token_out=token_out,
|
|
524
561
|
fee=fee,
|
|
@@ -595,6 +632,9 @@ class UniswapV3(BaseSDK):
|
|
|
595
632
|
token_in: models.UniswapPoolPriceTokenInToken = models.UniswapPoolPriceTokenInToken.USDC,
|
|
596
633
|
token_out: models.UniswapPoolPriceTokenOutToken = models.UniswapPoolPriceTokenOutToken.USDT,
|
|
597
634
|
fee: models.UniswapPoolPriceFeeEnum = models.UniswapPoolPriceFeeEnum.ZERO_DOT_01,
|
|
635
|
+
block: Optional[
|
|
636
|
+
Union[models.UniswapPoolPriceBlock, models.UniswapPoolPriceBlockTypedDict]
|
|
637
|
+
] = None,
|
|
598
638
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
599
639
|
server_url: Optional[str] = None,
|
|
600
640
|
timeout_ms: Optional[int] = None,
|
|
@@ -610,6 +650,7 @@ class UniswapV3(BaseSDK):
|
|
|
610
650
|
:param token_in: The symbol of a token in the pool
|
|
611
651
|
:param token_out: The symbol of a token in the pool
|
|
612
652
|
:param fee: The fee of the pool
|
|
653
|
+
:param block: The block number you want to get this data at.
|
|
613
654
|
:param retries: Override the default retry configuration for this method
|
|
614
655
|
:param server_url: Override the default server URL for this method
|
|
615
656
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -627,6 +668,7 @@ class UniswapV3(BaseSDK):
|
|
|
627
668
|
|
|
628
669
|
request = models.UniswapPoolPriceRequest(
|
|
629
670
|
chain=chain,
|
|
671
|
+
block=block,
|
|
630
672
|
token_in=token_in,
|
|
631
673
|
token_out=token_out,
|
|
632
674
|
fee=fee,
|
|
@@ -701,6 +743,12 @@ class UniswapV3(BaseSDK):
|
|
|
701
743
|
*,
|
|
702
744
|
chain: models.UniswapLiquidityProvisionInRangeChain = models.UniswapLiquidityProvisionInRangeChain.ARBITRUM_MAINNET,
|
|
703
745
|
token_id: int = 4318185,
|
|
746
|
+
block: Optional[
|
|
747
|
+
Union[
|
|
748
|
+
models.UniswapLiquidityProvisionInRangeBlock,
|
|
749
|
+
models.UniswapLiquidityProvisionInRangeBlockTypedDict,
|
|
750
|
+
]
|
|
751
|
+
] = None,
|
|
704
752
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
705
753
|
server_url: Optional[str] = None,
|
|
706
754
|
timeout_ms: Optional[int] = None,
|
|
@@ -719,6 +767,7 @@ class UniswapV3(BaseSDK):
|
|
|
719
767
|
|
|
720
768
|
:param chain: The chain to use.
|
|
721
769
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
770
|
+
:param block: The block number you want to get this data at.
|
|
722
771
|
:param retries: Override the default retry configuration for this method
|
|
723
772
|
:param server_url: Override the default server URL for this method
|
|
724
773
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -736,6 +785,7 @@ class UniswapV3(BaseSDK):
|
|
|
736
785
|
|
|
737
786
|
request = models.UniswapLiquidityProvisionInRangeRequest(
|
|
738
787
|
chain=chain,
|
|
788
|
+
block=block,
|
|
739
789
|
token_id=token_id,
|
|
740
790
|
)
|
|
741
791
|
|
|
@@ -810,6 +860,12 @@ class UniswapV3(BaseSDK):
|
|
|
810
860
|
*,
|
|
811
861
|
chain: models.UniswapLiquidityProvisionInRangeChain = models.UniswapLiquidityProvisionInRangeChain.ARBITRUM_MAINNET,
|
|
812
862
|
token_id: int = 4318185,
|
|
863
|
+
block: Optional[
|
|
864
|
+
Union[
|
|
865
|
+
models.UniswapLiquidityProvisionInRangeBlock,
|
|
866
|
+
models.UniswapLiquidityProvisionInRangeBlockTypedDict,
|
|
867
|
+
]
|
|
868
|
+
] = None,
|
|
813
869
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
814
870
|
server_url: Optional[str] = None,
|
|
815
871
|
timeout_ms: Optional[int] = None,
|
|
@@ -828,6 +884,7 @@ class UniswapV3(BaseSDK):
|
|
|
828
884
|
|
|
829
885
|
:param chain: The chain to use.
|
|
830
886
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
887
|
+
:param block: The block number you want to get this data at.
|
|
831
888
|
:param retries: Override the default retry configuration for this method
|
|
832
889
|
:param server_url: Override the default server URL for this method
|
|
833
890
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -845,6 +902,7 @@ class UniswapV3(BaseSDK):
|
|
|
845
902
|
|
|
846
903
|
request = models.UniswapLiquidityProvisionInRangeRequest(
|
|
847
904
|
chain=chain,
|
|
905
|
+
block=block,
|
|
848
906
|
token_id=token_id,
|
|
849
907
|
)
|
|
850
908
|
|
|
@@ -918,6 +976,12 @@ class UniswapV3(BaseSDK):
|
|
|
918
976
|
self,
|
|
919
977
|
*,
|
|
920
978
|
chain: models.UniswapLiquidityProvisionPositionsChain = models.UniswapLiquidityProvisionPositionsChain.ARBITRUM_MAINNET,
|
|
979
|
+
block: Optional[
|
|
980
|
+
Union[
|
|
981
|
+
models.UniswapLiquidityProvisionPositionsBlock,
|
|
982
|
+
models.UniswapLiquidityProvisionPositionsBlockTypedDict,
|
|
983
|
+
]
|
|
984
|
+
] = None,
|
|
921
985
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
922
986
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
923
987
|
server_url: Optional[str] = None,
|
|
@@ -935,6 +999,7 @@ class UniswapV3(BaseSDK):
|
|
|
935
999
|
activities effectively.
|
|
936
1000
|
|
|
937
1001
|
:param chain: The chain to use.
|
|
1002
|
+
:param block: The block number you want to get this data at.
|
|
938
1003
|
:param user: The user to get positions for.
|
|
939
1004
|
:param retries: Override the default retry configuration for this method
|
|
940
1005
|
:param server_url: Override the default server URL for this method
|
|
@@ -953,6 +1018,7 @@ class UniswapV3(BaseSDK):
|
|
|
953
1018
|
|
|
954
1019
|
request = models.UniswapLiquidityProvisionPositionsRequest(
|
|
955
1020
|
chain=chain,
|
|
1021
|
+
block=block,
|
|
956
1022
|
user=user,
|
|
957
1023
|
)
|
|
958
1024
|
|
|
@@ -1026,6 +1092,12 @@ class UniswapV3(BaseSDK):
|
|
|
1026
1092
|
self,
|
|
1027
1093
|
*,
|
|
1028
1094
|
chain: models.UniswapLiquidityProvisionPositionsChain = models.UniswapLiquidityProvisionPositionsChain.ARBITRUM_MAINNET,
|
|
1095
|
+
block: Optional[
|
|
1096
|
+
Union[
|
|
1097
|
+
models.UniswapLiquidityProvisionPositionsBlock,
|
|
1098
|
+
models.UniswapLiquidityProvisionPositionsBlockTypedDict,
|
|
1099
|
+
]
|
|
1100
|
+
] = None,
|
|
1029
1101
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
1030
1102
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1031
1103
|
server_url: Optional[str] = None,
|
|
@@ -1043,6 +1115,7 @@ class UniswapV3(BaseSDK):
|
|
|
1043
1115
|
activities effectively.
|
|
1044
1116
|
|
|
1045
1117
|
:param chain: The chain to use.
|
|
1118
|
+
:param block: The block number you want to get this data at.
|
|
1046
1119
|
:param user: The user to get positions for.
|
|
1047
1120
|
:param retries: Override the default retry configuration for this method
|
|
1048
1121
|
:param server_url: Override the default server URL for this method
|
|
@@ -1061,6 +1134,7 @@ class UniswapV3(BaseSDK):
|
|
|
1061
1134
|
|
|
1062
1135
|
request = models.UniswapLiquidityProvisionPositionsRequest(
|
|
1063
1136
|
chain=chain,
|
|
1137
|
+
block=block,
|
|
1064
1138
|
user=user,
|
|
1065
1139
|
)
|
|
1066
1140
|
|