compass_api_sdk 0.0.1__py3-none-any.whl → 0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of compass_api_sdk might be problematic. Click here for more details.
- compass_api_sdk/_version.py +2 -2
- compass_api_sdk/aave_v3.py +20 -44
- compass_api_sdk/aerodrome_slipstream.py +8 -24
- compass_api_sdk/models/aave_liquidity_changeop.py +5 -6
- compass_api_sdk/models/aave_token_priceop.py +5 -6
- compass_api_sdk/models/aave_user_position_per_tokenop.py +4 -4
- compass_api_sdk/models/aave_user_position_summaryop.py +2 -2
- compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +2 -2
- compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +6 -6
- compass_api_sdk/models/generic_allowanceop.py +5 -4
- compass_api_sdk/models/generic_balanceop.py +4 -4
- compass_api_sdk/models/generic_ensop.py +2 -2
- compass_api_sdk/models/generic_portfolioop.py +2 -2
- compass_api_sdk/models/generic_price_usdop.py +5 -6
- compass_api_sdk/models/generic_supported_tokensop.py +3 -4
- compass_api_sdk/models/generic_visualize_portfolioop.py +2 -2
- compass_api_sdk/models/morpho_market_positionop.py +3 -4
- compass_api_sdk/models/morpho_marketsop.py +3 -4
- compass_api_sdk/models/morpho_vault_positionop.py +3 -4
- compass_api_sdk/models/morpho_vaultsop.py +11 -18
- compass_api_sdk/models/morphocheckmarketpositionresponse.py +10 -0
- compass_api_sdk/models/morphomarket.py +2 -2
- compass_api_sdk/models/token_addressop.py +5 -6
- compass_api_sdk/models/uniswap_liquidity_provision_in_rangeop.py +3 -4
- compass_api_sdk/models/uniswap_liquidity_provision_positionsop.py +2 -2
- compass_api_sdk/models/uniswap_pool_priceop.py +3 -4
- compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +8 -8
- compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +8 -8
- compass_api_sdk/morpho.py +15 -31
- compass_api_sdk/token_sdk.py +4 -8
- compass_api_sdk/uniswap_v3.py +30 -66
- compass_api_sdk/universal.py +26 -58
- {compass_api_sdk-0.0.1.dist-info → compass_api_sdk-0.0.2.dist-info}/METADATA +18 -22
- {compass_api_sdk-0.0.1.dist-info → compass_api_sdk-0.0.2.dist-info}/RECORD +35 -35
- {compass_api_sdk-0.0.1.dist-info → compass_api_sdk-0.0.2.dist-info}/WHEEL +0 -0
compass_api_sdk/uniswap_v3.py
CHANGED
|
@@ -11,20 +11,14 @@ class UniswapV3(BaseSDK):
|
|
|
11
11
|
def quote_buy_exactly(
|
|
12
12
|
self,
|
|
13
13
|
*,
|
|
14
|
+
chain: models.UniswapQuoteBuyExactlyChain = models.UniswapQuoteBuyExactlyChain.ARBITRUM_MAINNET,
|
|
15
|
+
token_in: models.UniswapQuoteBuyExactlyTokenInToken = models.UniswapQuoteBuyExactlyTokenInToken.USDC,
|
|
16
|
+
token_out: models.UniswapQuoteBuyExactlyTokenOutToken = models.UniswapQuoteBuyExactlyTokenOutToken.USDT,
|
|
14
17
|
fee: models.UniswapQuoteBuyExactlyFeeEnum = models.UniswapQuoteBuyExactlyFeeEnum.ZERO_DOT_01,
|
|
15
18
|
amount_out: Union[
|
|
16
19
|
models.UniswapQuoteBuyExactlyAmountOut,
|
|
17
20
|
models.UniswapQuoteBuyExactlyAmountOutTypedDict,
|
|
18
21
|
],
|
|
19
|
-
chain: Optional[
|
|
20
|
-
models.UniswapQuoteBuyExactlyChain
|
|
21
|
-
] = models.UniswapQuoteBuyExactlyChain.ARBITRUM_MAINNET,
|
|
22
|
-
token_in: Optional[
|
|
23
|
-
models.UniswapQuoteBuyExactlyTokenInToken
|
|
24
|
-
] = models.UniswapQuoteBuyExactlyTokenInToken.USDC,
|
|
25
|
-
token_out: Optional[
|
|
26
|
-
models.UniswapQuoteBuyExactlyTokenOutToken
|
|
27
|
-
] = models.UniswapQuoteBuyExactlyTokenOutToken.USDT,
|
|
28
22
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
29
23
|
server_url: Optional[str] = None,
|
|
30
24
|
timeout_ms: Optional[int] = None,
|
|
@@ -38,11 +32,11 @@ class UniswapV3(BaseSDK):
|
|
|
38
32
|
It also provides the resulting price after the transaction. The calculation takes
|
|
39
33
|
into account the current pool state and the specified fee tier.
|
|
40
34
|
|
|
41
|
-
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
42
|
-
:param amount_out:
|
|
43
35
|
:param chain: The chain to use.
|
|
44
36
|
:param token_in: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
45
37
|
:param token_out: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
38
|
+
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
39
|
+
:param amount_out:
|
|
46
40
|
:param retries: Override the default retry configuration for this method
|
|
47
41
|
:param server_url: Override the default server URL for this method
|
|
48
42
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -135,20 +129,14 @@ class UniswapV3(BaseSDK):
|
|
|
135
129
|
async def quote_buy_exactly_async(
|
|
136
130
|
self,
|
|
137
131
|
*,
|
|
132
|
+
chain: models.UniswapQuoteBuyExactlyChain = models.UniswapQuoteBuyExactlyChain.ARBITRUM_MAINNET,
|
|
133
|
+
token_in: models.UniswapQuoteBuyExactlyTokenInToken = models.UniswapQuoteBuyExactlyTokenInToken.USDC,
|
|
134
|
+
token_out: models.UniswapQuoteBuyExactlyTokenOutToken = models.UniswapQuoteBuyExactlyTokenOutToken.USDT,
|
|
138
135
|
fee: models.UniswapQuoteBuyExactlyFeeEnum = models.UniswapQuoteBuyExactlyFeeEnum.ZERO_DOT_01,
|
|
139
136
|
amount_out: Union[
|
|
140
137
|
models.UniswapQuoteBuyExactlyAmountOut,
|
|
141
138
|
models.UniswapQuoteBuyExactlyAmountOutTypedDict,
|
|
142
139
|
],
|
|
143
|
-
chain: Optional[
|
|
144
|
-
models.UniswapQuoteBuyExactlyChain
|
|
145
|
-
] = models.UniswapQuoteBuyExactlyChain.ARBITRUM_MAINNET,
|
|
146
|
-
token_in: Optional[
|
|
147
|
-
models.UniswapQuoteBuyExactlyTokenInToken
|
|
148
|
-
] = models.UniswapQuoteBuyExactlyTokenInToken.USDC,
|
|
149
|
-
token_out: Optional[
|
|
150
|
-
models.UniswapQuoteBuyExactlyTokenOutToken
|
|
151
|
-
] = models.UniswapQuoteBuyExactlyTokenOutToken.USDT,
|
|
152
140
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
153
141
|
server_url: Optional[str] = None,
|
|
154
142
|
timeout_ms: Optional[int] = None,
|
|
@@ -162,11 +150,11 @@ class UniswapV3(BaseSDK):
|
|
|
162
150
|
It also provides the resulting price after the transaction. The calculation takes
|
|
163
151
|
into account the current pool state and the specified fee tier.
|
|
164
152
|
|
|
165
|
-
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
166
|
-
:param amount_out:
|
|
167
153
|
:param chain: The chain to use.
|
|
168
154
|
:param token_in: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
169
155
|
:param token_out: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
156
|
+
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
157
|
+
:param amount_out:
|
|
170
158
|
:param retries: Override the default retry configuration for this method
|
|
171
159
|
:param server_url: Override the default server URL for this method
|
|
172
160
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -259,20 +247,14 @@ class UniswapV3(BaseSDK):
|
|
|
259
247
|
def quote_sell_exactly(
|
|
260
248
|
self,
|
|
261
249
|
*,
|
|
250
|
+
chain: models.UniswapQuoteSellExactlyChain = models.UniswapQuoteSellExactlyChain.ARBITRUM_MAINNET,
|
|
251
|
+
token_in: models.UniswapQuoteSellExactlyTokenInToken = models.UniswapQuoteSellExactlyTokenInToken.USDC,
|
|
252
|
+
token_out: models.UniswapQuoteSellExactlyTokenOutToken = models.UniswapQuoteSellExactlyTokenOutToken.USDT,
|
|
262
253
|
fee: models.UniswapQuoteSellExactlyFeeEnum = models.UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01,
|
|
263
254
|
amount_in: Union[
|
|
264
255
|
models.UniswapQuoteSellExactlyAmountIn,
|
|
265
256
|
models.UniswapQuoteSellExactlyAmountInTypedDict,
|
|
266
257
|
],
|
|
267
|
-
chain: Optional[
|
|
268
|
-
models.UniswapQuoteSellExactlyChain
|
|
269
|
-
] = models.UniswapQuoteSellExactlyChain.ARBITRUM_MAINNET,
|
|
270
|
-
token_in: Optional[
|
|
271
|
-
models.UniswapQuoteSellExactlyTokenInToken
|
|
272
|
-
] = models.UniswapQuoteSellExactlyTokenInToken.USDC,
|
|
273
|
-
token_out: Optional[
|
|
274
|
-
models.UniswapQuoteSellExactlyTokenOutToken
|
|
275
|
-
] = models.UniswapQuoteSellExactlyTokenOutToken.USDT,
|
|
276
258
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
277
259
|
server_url: Optional[str] = None,
|
|
278
260
|
timeout_ms: Optional[int] = None,
|
|
@@ -286,11 +268,11 @@ class UniswapV3(BaseSDK):
|
|
|
286
268
|
It also provides the resulting price after the transaction. The calculation takes
|
|
287
269
|
into account the current pool state and the specified fee tier.
|
|
288
270
|
|
|
289
|
-
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
290
|
-
:param amount_in:
|
|
291
271
|
:param chain: The chain to use.
|
|
292
272
|
:param token_in: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
293
273
|
:param token_out: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
274
|
+
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
275
|
+
:param amount_in:
|
|
294
276
|
:param retries: Override the default retry configuration for this method
|
|
295
277
|
:param server_url: Override the default server URL for this method
|
|
296
278
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -383,20 +365,14 @@ class UniswapV3(BaseSDK):
|
|
|
383
365
|
async def quote_sell_exactly_async(
|
|
384
366
|
self,
|
|
385
367
|
*,
|
|
368
|
+
chain: models.UniswapQuoteSellExactlyChain = models.UniswapQuoteSellExactlyChain.ARBITRUM_MAINNET,
|
|
369
|
+
token_in: models.UniswapQuoteSellExactlyTokenInToken = models.UniswapQuoteSellExactlyTokenInToken.USDC,
|
|
370
|
+
token_out: models.UniswapQuoteSellExactlyTokenOutToken = models.UniswapQuoteSellExactlyTokenOutToken.USDT,
|
|
386
371
|
fee: models.UniswapQuoteSellExactlyFeeEnum = models.UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01,
|
|
387
372
|
amount_in: Union[
|
|
388
373
|
models.UniswapQuoteSellExactlyAmountIn,
|
|
389
374
|
models.UniswapQuoteSellExactlyAmountInTypedDict,
|
|
390
375
|
],
|
|
391
|
-
chain: Optional[
|
|
392
|
-
models.UniswapQuoteSellExactlyChain
|
|
393
|
-
] = models.UniswapQuoteSellExactlyChain.ARBITRUM_MAINNET,
|
|
394
|
-
token_in: Optional[
|
|
395
|
-
models.UniswapQuoteSellExactlyTokenInToken
|
|
396
|
-
] = models.UniswapQuoteSellExactlyTokenInToken.USDC,
|
|
397
|
-
token_out: Optional[
|
|
398
|
-
models.UniswapQuoteSellExactlyTokenOutToken
|
|
399
|
-
] = models.UniswapQuoteSellExactlyTokenOutToken.USDT,
|
|
400
376
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
401
377
|
server_url: Optional[str] = None,
|
|
402
378
|
timeout_ms: Optional[int] = None,
|
|
@@ -410,11 +386,11 @@ class UniswapV3(BaseSDK):
|
|
|
410
386
|
It also provides the resulting price after the transaction. The calculation takes
|
|
411
387
|
into account the current pool state and the specified fee tier.
|
|
412
388
|
|
|
413
|
-
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
414
|
-
:param amount_in:
|
|
415
389
|
:param chain: The chain to use.
|
|
416
390
|
:param token_in: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
417
391
|
:param token_out: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
392
|
+
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
393
|
+
:param amount_in:
|
|
418
394
|
:param retries: Override the default retry configuration for this method
|
|
419
395
|
:param server_url: Override the default server URL for this method
|
|
420
396
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -507,12 +483,10 @@ class UniswapV3(BaseSDK):
|
|
|
507
483
|
def pool_price(
|
|
508
484
|
self,
|
|
509
485
|
*,
|
|
486
|
+
chain: models.UniswapPoolPriceChain = models.UniswapPoolPriceChain.ARBITRUM_MAINNET,
|
|
510
487
|
token_in: models.UniswapPoolPriceTokenInToken = models.UniswapPoolPriceTokenInToken.USDC,
|
|
511
488
|
token_out: models.UniswapPoolPriceTokenOutToken = models.UniswapPoolPriceTokenOutToken.USDT,
|
|
512
489
|
fee: models.UniswapPoolPriceFeeEnum = models.UniswapPoolPriceFeeEnum.ZERO_DOT_01,
|
|
513
|
-
chain: Optional[
|
|
514
|
-
models.UniswapPoolPriceChain
|
|
515
|
-
] = models.UniswapPoolPriceChain.ARBITRUM_MAINNET,
|
|
516
490
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
517
491
|
server_url: Optional[str] = None,
|
|
518
492
|
timeout_ms: Optional[int] = None,
|
|
@@ -524,10 +498,10 @@ class UniswapV3(BaseSDK):
|
|
|
524
498
|
|
|
525
499
|
The price is calculated based on the current pool state and the specified fee tier.
|
|
526
500
|
|
|
501
|
+
:param chain: The chain to use.
|
|
527
502
|
:param token_in: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
528
503
|
:param token_out: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
529
504
|
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
530
|
-
:param chain: The chain to use.
|
|
531
505
|
:param retries: Override the default retry configuration for this method
|
|
532
506
|
:param server_url: Override the default server URL for this method
|
|
533
507
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -617,12 +591,10 @@ class UniswapV3(BaseSDK):
|
|
|
617
591
|
async def pool_price_async(
|
|
618
592
|
self,
|
|
619
593
|
*,
|
|
594
|
+
chain: models.UniswapPoolPriceChain = models.UniswapPoolPriceChain.ARBITRUM_MAINNET,
|
|
620
595
|
token_in: models.UniswapPoolPriceTokenInToken = models.UniswapPoolPriceTokenInToken.USDC,
|
|
621
596
|
token_out: models.UniswapPoolPriceTokenOutToken = models.UniswapPoolPriceTokenOutToken.USDT,
|
|
622
597
|
fee: models.UniswapPoolPriceFeeEnum = models.UniswapPoolPriceFeeEnum.ZERO_DOT_01,
|
|
623
|
-
chain: Optional[
|
|
624
|
-
models.UniswapPoolPriceChain
|
|
625
|
-
] = models.UniswapPoolPriceChain.ARBITRUM_MAINNET,
|
|
626
598
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
627
599
|
server_url: Optional[str] = None,
|
|
628
600
|
timeout_ms: Optional[int] = None,
|
|
@@ -634,10 +606,10 @@ class UniswapV3(BaseSDK):
|
|
|
634
606
|
|
|
635
607
|
The price is calculated based on the current pool state and the specified fee tier.
|
|
636
608
|
|
|
609
|
+
:param chain: The chain to use.
|
|
637
610
|
:param token_in: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
638
611
|
:param token_out: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
639
612
|
:param fee: The transaction fee of a Uniswap pool in bips. Uniswap supports 4 different fee levels.
|
|
640
|
-
:param chain: The chain to use.
|
|
641
613
|
:param retries: Override the default retry configuration for this method
|
|
642
614
|
:param server_url: Override the default server URL for this method
|
|
643
615
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -727,10 +699,8 @@ class UniswapV3(BaseSDK):
|
|
|
727
699
|
def liquidity_provision_in_range(
|
|
728
700
|
self,
|
|
729
701
|
*,
|
|
702
|
+
chain: models.UniswapLiquidityProvisionInRangeChain = models.UniswapLiquidityProvisionInRangeChain.ARBITRUM_MAINNET,
|
|
730
703
|
token_id: int = 4318185,
|
|
731
|
-
chain: Optional[
|
|
732
|
-
models.UniswapLiquidityProvisionInRangeChain
|
|
733
|
-
] = models.UniswapLiquidityProvisionInRangeChain.ARBITRUM_MAINNET,
|
|
734
704
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
735
705
|
server_url: Optional[str] = None,
|
|
736
706
|
timeout_ms: Optional[int] = None,
|
|
@@ -747,8 +717,8 @@ class UniswapV3(BaseSDK):
|
|
|
747
717
|
they are actively participating in the trading activities within the liquidity pool
|
|
748
718
|
and earning trading fees.
|
|
749
719
|
|
|
750
|
-
:param token_id:
|
|
751
720
|
:param chain: The chain to use.
|
|
721
|
+
:param token_id:
|
|
752
722
|
:param retries: Override the default retry configuration for this method
|
|
753
723
|
:param server_url: Override the default server URL for this method
|
|
754
724
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -838,10 +808,8 @@ class UniswapV3(BaseSDK):
|
|
|
838
808
|
async def liquidity_provision_in_range_async(
|
|
839
809
|
self,
|
|
840
810
|
*,
|
|
811
|
+
chain: models.UniswapLiquidityProvisionInRangeChain = models.UniswapLiquidityProvisionInRangeChain.ARBITRUM_MAINNET,
|
|
841
812
|
token_id: int = 4318185,
|
|
842
|
-
chain: Optional[
|
|
843
|
-
models.UniswapLiquidityProvisionInRangeChain
|
|
844
|
-
] = models.UniswapLiquidityProvisionInRangeChain.ARBITRUM_MAINNET,
|
|
845
813
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
846
814
|
server_url: Optional[str] = None,
|
|
847
815
|
timeout_ms: Optional[int] = None,
|
|
@@ -858,8 +826,8 @@ class UniswapV3(BaseSDK):
|
|
|
858
826
|
they are actively participating in the trading activities within the liquidity pool
|
|
859
827
|
and earning trading fees.
|
|
860
828
|
|
|
861
|
-
:param token_id:
|
|
862
829
|
:param chain: The chain to use.
|
|
830
|
+
:param token_id:
|
|
863
831
|
:param retries: Override the default retry configuration for this method
|
|
864
832
|
:param server_url: Override the default server URL for this method
|
|
865
833
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -949,9 +917,7 @@ class UniswapV3(BaseSDK):
|
|
|
949
917
|
def liquidity_provision_positions(
|
|
950
918
|
self,
|
|
951
919
|
*,
|
|
952
|
-
chain:
|
|
953
|
-
models.UniswapLiquidityProvisionPositionsChain
|
|
954
|
-
] = models.UniswapLiquidityProvisionPositionsChain.ARBITRUM_MAINNET,
|
|
920
|
+
chain: models.UniswapLiquidityProvisionPositionsChain = models.UniswapLiquidityProvisionPositionsChain.ARBITRUM_MAINNET,
|
|
955
921
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
956
922
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
957
923
|
server_url: Optional[str] = None,
|
|
@@ -1059,9 +1025,7 @@ class UniswapV3(BaseSDK):
|
|
|
1059
1025
|
async def liquidity_provision_positions_async(
|
|
1060
1026
|
self,
|
|
1061
1027
|
*,
|
|
1062
|
-
chain:
|
|
1063
|
-
models.UniswapLiquidityProvisionPositionsChain
|
|
1064
|
-
] = models.UniswapLiquidityProvisionPositionsChain.ARBITRUM_MAINNET,
|
|
1028
|
+
chain: models.UniswapLiquidityProvisionPositionsChain = models.UniswapLiquidityProvisionPositionsChain.ARBITRUM_MAINNET,
|
|
1065
1029
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
1066
1030
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1067
1031
|
server_url: Optional[str] = None,
|
compass_api_sdk/universal.py
CHANGED
|
@@ -11,9 +11,7 @@ class Universal(BaseSDK):
|
|
|
11
11
|
def portfolio(
|
|
12
12
|
self,
|
|
13
13
|
*,
|
|
14
|
-
chain:
|
|
15
|
-
models.GenericPortfolioChain
|
|
16
|
-
] = models.GenericPortfolioChain.ARBITRUM_MAINNET,
|
|
14
|
+
chain: models.GenericPortfolioChain = models.GenericPortfolioChain.ARBITRUM_MAINNET,
|
|
17
15
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
18
16
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
19
17
|
server_url: Optional[str] = None,
|
|
@@ -116,9 +114,7 @@ class Universal(BaseSDK):
|
|
|
116
114
|
async def portfolio_async(
|
|
117
115
|
self,
|
|
118
116
|
*,
|
|
119
|
-
chain:
|
|
120
|
-
models.GenericPortfolioChain
|
|
121
|
-
] = models.GenericPortfolioChain.ARBITRUM_MAINNET,
|
|
117
|
+
chain: models.GenericPortfolioChain = models.GenericPortfolioChain.ARBITRUM_MAINNET,
|
|
122
118
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
123
119
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
124
120
|
server_url: Optional[str] = None,
|
|
@@ -221,9 +217,7 @@ class Universal(BaseSDK):
|
|
|
221
217
|
def visualize_portfolio(
|
|
222
218
|
self,
|
|
223
219
|
*,
|
|
224
|
-
chain:
|
|
225
|
-
models.GenericVisualizePortfolioChain
|
|
226
|
-
] = models.GenericVisualizePortfolioChain.ARBITRUM_MAINNET,
|
|
220
|
+
chain: models.GenericVisualizePortfolioChain = models.GenericVisualizePortfolioChain.ARBITRUM_MAINNET,
|
|
227
221
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
228
222
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
229
223
|
server_url: Optional[str] = None,
|
|
@@ -327,9 +321,7 @@ class Universal(BaseSDK):
|
|
|
327
321
|
async def visualize_portfolio_async(
|
|
328
322
|
self,
|
|
329
323
|
*,
|
|
330
|
-
chain:
|
|
331
|
-
models.GenericVisualizePortfolioChain
|
|
332
|
-
] = models.GenericVisualizePortfolioChain.ARBITRUM_MAINNET,
|
|
324
|
+
chain: models.GenericVisualizePortfolioChain = models.GenericVisualizePortfolioChain.ARBITRUM_MAINNET,
|
|
333
325
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
334
326
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
335
327
|
server_url: Optional[str] = None,
|
|
@@ -433,10 +425,8 @@ class Universal(BaseSDK):
|
|
|
433
425
|
def price_usd(
|
|
434
426
|
self,
|
|
435
427
|
*,
|
|
436
|
-
chain:
|
|
437
|
-
|
|
438
|
-
] = models.GenericPriceUsdChain.ARBITRUM_MAINNET,
|
|
439
|
-
token: Optional[models.GenericPriceUsdToken] = models.GenericPriceUsdToken.WBTC,
|
|
428
|
+
chain: models.GenericPriceUsdChain = models.GenericPriceUsdChain.ARBITRUM_MAINNET,
|
|
429
|
+
token: models.GenericPriceUsdToken = models.GenericPriceUsdToken.WBTC,
|
|
440
430
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
441
431
|
server_url: Optional[str] = None,
|
|
442
432
|
timeout_ms: Optional[int] = None,
|
|
@@ -540,10 +530,8 @@ class Universal(BaseSDK):
|
|
|
540
530
|
async def price_usd_async(
|
|
541
531
|
self,
|
|
542
532
|
*,
|
|
543
|
-
chain:
|
|
544
|
-
|
|
545
|
-
] = models.GenericPriceUsdChain.ARBITRUM_MAINNET,
|
|
546
|
-
token: Optional[models.GenericPriceUsdToken] = models.GenericPriceUsdToken.WBTC,
|
|
533
|
+
chain: models.GenericPriceUsdChain = models.GenericPriceUsdChain.ARBITRUM_MAINNET,
|
|
534
|
+
token: models.GenericPriceUsdToken = models.GenericPriceUsdToken.WBTC,
|
|
547
535
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
548
536
|
server_url: Optional[str] = None,
|
|
549
537
|
timeout_ms: Optional[int] = None,
|
|
@@ -647,9 +635,7 @@ class Universal(BaseSDK):
|
|
|
647
635
|
def supported_tokens(
|
|
648
636
|
self,
|
|
649
637
|
*,
|
|
650
|
-
chain:
|
|
651
|
-
models.GenericSupportedTokensChain
|
|
652
|
-
] = models.GenericSupportedTokensChain.ARBITRUM_MAINNET,
|
|
638
|
+
chain: models.GenericSupportedTokensChain = models.GenericSupportedTokensChain.ARBITRUM_MAINNET,
|
|
653
639
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
654
640
|
server_url: Optional[str] = None,
|
|
655
641
|
timeout_ms: Optional[int] = None,
|
|
@@ -746,9 +732,7 @@ class Universal(BaseSDK):
|
|
|
746
732
|
async def supported_tokens_async(
|
|
747
733
|
self,
|
|
748
734
|
*,
|
|
749
|
-
chain:
|
|
750
|
-
models.GenericSupportedTokensChain
|
|
751
|
-
] = models.GenericSupportedTokensChain.ARBITRUM_MAINNET,
|
|
735
|
+
chain: models.GenericSupportedTokensChain = models.GenericSupportedTokensChain.ARBITRUM_MAINNET,
|
|
752
736
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
753
737
|
server_url: Optional[str] = None,
|
|
754
738
|
timeout_ms: Optional[int] = None,
|
|
@@ -845,11 +829,9 @@ class Universal(BaseSDK):
|
|
|
845
829
|
def balance(
|
|
846
830
|
self,
|
|
847
831
|
*,
|
|
848
|
-
chain:
|
|
849
|
-
|
|
850
|
-
] = models.GenericBalanceChain.ARBITRUM_MAINNET,
|
|
832
|
+
chain: models.GenericBalanceChain = models.GenericBalanceChain.ARBITRUM_MAINNET,
|
|
833
|
+
token: models.GenericBalanceToken = models.GenericBalanceToken.USDC,
|
|
851
834
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
852
|
-
token: Optional[models.GenericBalanceToken] = models.GenericBalanceToken.USDC,
|
|
853
835
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
854
836
|
server_url: Optional[str] = None,
|
|
855
837
|
timeout_ms: Optional[int] = None,
|
|
@@ -860,8 +842,8 @@ class Universal(BaseSDK):
|
|
|
860
842
|
Returns the balance of a specific ERC20 token for a given user address.
|
|
861
843
|
|
|
862
844
|
:param chain: The chain to use.
|
|
863
|
-
:param user:
|
|
864
845
|
:param token: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
846
|
+
:param user:
|
|
865
847
|
:param retries: Override the default retry configuration for this method
|
|
866
848
|
:param server_url: Override the default server URL for this method
|
|
867
849
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -950,11 +932,9 @@ class Universal(BaseSDK):
|
|
|
950
932
|
async def balance_async(
|
|
951
933
|
self,
|
|
952
934
|
*,
|
|
953
|
-
chain:
|
|
954
|
-
|
|
955
|
-
] = models.GenericBalanceChain.ARBITRUM_MAINNET,
|
|
935
|
+
chain: models.GenericBalanceChain = models.GenericBalanceChain.ARBITRUM_MAINNET,
|
|
936
|
+
token: models.GenericBalanceToken = models.GenericBalanceToken.USDC,
|
|
956
937
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
957
|
-
token: Optional[models.GenericBalanceToken] = models.GenericBalanceToken.USDC,
|
|
958
938
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
959
939
|
server_url: Optional[str] = None,
|
|
960
940
|
timeout_ms: Optional[int] = None,
|
|
@@ -965,8 +945,8 @@ class Universal(BaseSDK):
|
|
|
965
945
|
Returns the balance of a specific ERC20 token for a given user address.
|
|
966
946
|
|
|
967
947
|
:param chain: The chain to use.
|
|
968
|
-
:param user:
|
|
969
948
|
:param token: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
949
|
+
:param user:
|
|
970
950
|
:param retries: Override the default retry configuration for this method
|
|
971
951
|
:param server_url: Override the default server URL for this method
|
|
972
952
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1055,14 +1035,10 @@ class Universal(BaseSDK):
|
|
|
1055
1035
|
def allowance(
|
|
1056
1036
|
self,
|
|
1057
1037
|
*,
|
|
1038
|
+
chain: models.GenericAllowanceChain = models.GenericAllowanceChain.ARBITRUM_MAINNET,
|
|
1039
|
+
token: models.GenericAllowanceToken = models.GenericAllowanceToken.USDC,
|
|
1058
1040
|
contract_name: models.GenericAllowanceContractName = models.GenericAllowanceContractName.AAVE_V3_POOL,
|
|
1059
|
-
chain: Optional[
|
|
1060
|
-
models.GenericAllowanceChain
|
|
1061
|
-
] = models.GenericAllowanceChain.ARBITRUM_MAINNET,
|
|
1062
1041
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
1063
|
-
token: Optional[
|
|
1064
|
-
models.GenericAllowanceToken
|
|
1065
|
-
] = models.GenericAllowanceToken.USDC,
|
|
1066
1042
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1067
1043
|
server_url: Optional[str] = None,
|
|
1068
1044
|
timeout_ms: Optional[int] = None,
|
|
@@ -1078,10 +1054,10 @@ class Universal(BaseSDK):
|
|
|
1078
1054
|
these protocols, ensuring that the protocol has the necessary permissions to manage
|
|
1079
1055
|
the user's tokens securely and efficiently.
|
|
1080
1056
|
|
|
1081
|
-
:param contract_name:
|
|
1082
1057
|
:param chain: The chain to use.
|
|
1083
|
-
:param user:
|
|
1084
1058
|
:param token: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
1059
|
+
:param contract_name:
|
|
1060
|
+
:param user:
|
|
1085
1061
|
:param retries: Override the default retry configuration for this method
|
|
1086
1062
|
:param server_url: Override the default server URL for this method
|
|
1087
1063
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1171,14 +1147,10 @@ class Universal(BaseSDK):
|
|
|
1171
1147
|
async def allowance_async(
|
|
1172
1148
|
self,
|
|
1173
1149
|
*,
|
|
1150
|
+
chain: models.GenericAllowanceChain = models.GenericAllowanceChain.ARBITRUM_MAINNET,
|
|
1151
|
+
token: models.GenericAllowanceToken = models.GenericAllowanceToken.USDC,
|
|
1174
1152
|
contract_name: models.GenericAllowanceContractName = models.GenericAllowanceContractName.AAVE_V3_POOL,
|
|
1175
|
-
chain: Optional[
|
|
1176
|
-
models.GenericAllowanceChain
|
|
1177
|
-
] = models.GenericAllowanceChain.ARBITRUM_MAINNET,
|
|
1178
1153
|
user: Optional[str] = "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
1179
|
-
token: Optional[
|
|
1180
|
-
models.GenericAllowanceToken
|
|
1181
|
-
] = models.GenericAllowanceToken.USDC,
|
|
1182
1154
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1183
1155
|
server_url: Optional[str] = None,
|
|
1184
1156
|
timeout_ms: Optional[int] = None,
|
|
@@ -1194,10 +1166,10 @@ class Universal(BaseSDK):
|
|
|
1194
1166
|
these protocols, ensuring that the protocol has the necessary permissions to manage
|
|
1195
1167
|
the user's tokens securely and efficiently.
|
|
1196
1168
|
|
|
1197
|
-
:param contract_name:
|
|
1198
1169
|
:param chain: The chain to use.
|
|
1199
|
-
:param user:
|
|
1200
1170
|
:param token: A class representing the token. This class is used to represent the token in the system. Notice individual endpoints' documentation where per chain tokens are presented.
|
|
1171
|
+
:param contract_name:
|
|
1172
|
+
:param user:
|
|
1201
1173
|
:param retries: Override the default retry configuration for this method
|
|
1202
1174
|
:param server_url: Override the default server URL for this method
|
|
1203
1175
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1287,9 +1259,7 @@ class Universal(BaseSDK):
|
|
|
1287
1259
|
def ens(
|
|
1288
1260
|
self,
|
|
1289
1261
|
*,
|
|
1290
|
-
chain:
|
|
1291
|
-
models.GenericEnsChain
|
|
1292
|
-
] = models.GenericEnsChain.ETHEREUM_MAINNET,
|
|
1262
|
+
chain: models.GenericEnsChain = models.GenericEnsChain.ETHEREUM_MAINNET,
|
|
1293
1263
|
ens_name: Optional[str] = "vitalik.eth",
|
|
1294
1264
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1295
1265
|
server_url: Optional[str] = None,
|
|
@@ -1392,9 +1362,7 @@ class Universal(BaseSDK):
|
|
|
1392
1362
|
async def ens_async(
|
|
1393
1363
|
self,
|
|
1394
1364
|
*,
|
|
1395
|
-
chain:
|
|
1396
|
-
models.GenericEnsChain
|
|
1397
|
-
] = models.GenericEnsChain.ETHEREUM_MAINNET,
|
|
1365
|
+
chain: models.GenericEnsChain = models.GenericEnsChain.ETHEREUM_MAINNET,
|
|
1398
1366
|
ens_name: Optional[str] = "vitalik.eth",
|
|
1399
1367
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1400
1368
|
server_url: Optional[str] = None,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: compass_api_sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
|
-
Author:
|
|
5
|
+
Author: Speakeasy
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
8
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -60,10 +60,6 @@ Compass API: Compass Labs DeFi API
|
|
|
60
60
|
<!-- Start SDK Installation [installation] -->
|
|
61
61
|
## SDK Installation
|
|
62
62
|
|
|
63
|
-
> [!TIP]
|
|
64
|
-
> To finish publishing your SDK to PyPI you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
|
|
65
|
-
|
|
66
|
-
|
|
67
63
|
> [!NOTE]
|
|
68
64
|
> **Python version upgrade policy**
|
|
69
65
|
>
|
|
@@ -76,7 +72,7 @@ The SDK can be installed with either *pip* or *poetry* package managers.
|
|
|
76
72
|
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
|
|
77
73
|
|
|
78
74
|
```bash
|
|
79
|
-
pip install
|
|
75
|
+
pip install compass_api_sdk
|
|
80
76
|
```
|
|
81
77
|
|
|
82
78
|
### Poetry
|
|
@@ -84,7 +80,7 @@ pip install git+<UNSET>.git
|
|
|
84
80
|
*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
|
|
85
81
|
|
|
86
82
|
```bash
|
|
87
|
-
poetry add
|
|
83
|
+
poetry add compass_api_sdk
|
|
88
84
|
```
|
|
89
85
|
|
|
90
86
|
### Shell and script usage with `uv`
|
|
@@ -136,14 +132,14 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
|
|
|
136
132
|
|
|
137
133
|
```python
|
|
138
134
|
# Synchronous Example
|
|
139
|
-
from compass_api_sdk import CompassAPISDK
|
|
135
|
+
from compass_api_sdk import CompassAPISDK, models
|
|
140
136
|
|
|
141
137
|
|
|
142
138
|
with CompassAPISDK(
|
|
143
139
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
144
140
|
) as cas_client:
|
|
145
141
|
|
|
146
|
-
res = cas_client.aave_v3.token_price()
|
|
142
|
+
res = cas_client.aave_v3.token_price(chain=models.AaveTokenPriceChain.ARBITRUM_MAINNET, token=models.AaveTokenPriceToken.USDC)
|
|
147
143
|
|
|
148
144
|
# Handle response
|
|
149
145
|
print(res)
|
|
@@ -155,7 +151,7 @@ The same SDK client can also be used to make asychronous requests by importing a
|
|
|
155
151
|
```python
|
|
156
152
|
# Asynchronous Example
|
|
157
153
|
import asyncio
|
|
158
|
-
from compass_api_sdk import CompassAPISDK
|
|
154
|
+
from compass_api_sdk import CompassAPISDK, models
|
|
159
155
|
|
|
160
156
|
async def main():
|
|
161
157
|
|
|
@@ -163,7 +159,7 @@ async def main():
|
|
|
163
159
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
164
160
|
) as cas_client:
|
|
165
161
|
|
|
166
|
-
res = await cas_client.aave_v3.token_price_async()
|
|
162
|
+
res = await cas_client.aave_v3.token_price_async(chain=models.AaveTokenPriceChain.ARBITRUM_MAINNET, token=models.AaveTokenPriceToken.USDC)
|
|
167
163
|
|
|
168
164
|
# Handle response
|
|
169
165
|
print(res)
|
|
@@ -185,14 +181,14 @@ This SDK supports the following security scheme globally:
|
|
|
185
181
|
|
|
186
182
|
To authenticate with the API the `api_key_auth` parameter must be set when initializing the SDK client instance. For example:
|
|
187
183
|
```python
|
|
188
|
-
from compass_api_sdk import CompassAPISDK
|
|
184
|
+
from compass_api_sdk import CompassAPISDK, models
|
|
189
185
|
|
|
190
186
|
|
|
191
187
|
with CompassAPISDK(
|
|
192
188
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
193
189
|
) as cas_client:
|
|
194
190
|
|
|
195
|
-
res = cas_client.aave_v3.token_price()
|
|
191
|
+
res = cas_client.aave_v3.token_price(chain=models.AaveTokenPriceChain.ARBITRUM_MAINNET, token=models.AaveTokenPriceToken.USDC)
|
|
196
192
|
|
|
197
193
|
# Handle response
|
|
198
194
|
print(res)
|
|
@@ -287,7 +283,7 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
|
|
|
287
283
|
|
|
288
284
|
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
|
|
289
285
|
```python
|
|
290
|
-
from compass_api_sdk import CompassAPISDK
|
|
286
|
+
from compass_api_sdk import CompassAPISDK, models
|
|
291
287
|
from compass_api_sdk.utils import BackoffStrategy, RetryConfig
|
|
292
288
|
|
|
293
289
|
|
|
@@ -295,7 +291,7 @@ with CompassAPISDK(
|
|
|
295
291
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
296
292
|
) as cas_client:
|
|
297
293
|
|
|
298
|
-
res = cas_client.aave_v3.token_price(,
|
|
294
|
+
res = cas_client.aave_v3.token_price(chain=models.AaveTokenPriceChain.ARBITRUM_MAINNET, token=models.AaveTokenPriceToken.USDC,
|
|
299
295
|
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
300
296
|
|
|
301
297
|
# Handle response
|
|
@@ -305,7 +301,7 @@ with CompassAPISDK(
|
|
|
305
301
|
|
|
306
302
|
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
|
|
307
303
|
```python
|
|
308
|
-
from compass_api_sdk import CompassAPISDK
|
|
304
|
+
from compass_api_sdk import CompassAPISDK, models
|
|
309
305
|
from compass_api_sdk.utils import BackoffStrategy, RetryConfig
|
|
310
306
|
|
|
311
307
|
|
|
@@ -314,7 +310,7 @@ with CompassAPISDK(
|
|
|
314
310
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
315
311
|
) as cas_client:
|
|
316
312
|
|
|
317
|
-
res = cas_client.aave_v3.token_price()
|
|
313
|
+
res = cas_client.aave_v3.token_price(chain=models.AaveTokenPriceChain.ARBITRUM_MAINNET, token=models.AaveTokenPriceToken.USDC)
|
|
318
314
|
|
|
319
315
|
# Handle response
|
|
320
316
|
print(res)
|
|
@@ -346,7 +342,7 @@ When custom error responses are specified for an operation, the SDK may also rai
|
|
|
346
342
|
### Example
|
|
347
343
|
|
|
348
344
|
```python
|
|
349
|
-
from compass_api_sdk import CompassAPISDK, errors
|
|
345
|
+
from compass_api_sdk import CompassAPISDK, errors, models
|
|
350
346
|
|
|
351
347
|
|
|
352
348
|
with CompassAPISDK(
|
|
@@ -355,7 +351,7 @@ with CompassAPISDK(
|
|
|
355
351
|
res = None
|
|
356
352
|
try:
|
|
357
353
|
|
|
358
|
-
res = cas_client.aave_v3.token_price()
|
|
354
|
+
res = cas_client.aave_v3.token_price(chain=models.AaveTokenPriceChain.ARBITRUM_MAINNET, token=models.AaveTokenPriceToken.USDC)
|
|
359
355
|
|
|
360
356
|
# Handle response
|
|
361
357
|
print(res)
|
|
@@ -376,7 +372,7 @@ with CompassAPISDK(
|
|
|
376
372
|
|
|
377
373
|
The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
|
|
378
374
|
```python
|
|
379
|
-
from compass_api_sdk import CompassAPISDK
|
|
375
|
+
from compass_api_sdk import CompassAPISDK, models
|
|
380
376
|
|
|
381
377
|
|
|
382
378
|
with CompassAPISDK(
|
|
@@ -384,7 +380,7 @@ with CompassAPISDK(
|
|
|
384
380
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
385
381
|
) as cas_client:
|
|
386
382
|
|
|
387
|
-
res = cas_client.aave_v3.token_price()
|
|
383
|
+
res = cas_client.aave_v3.token_price(chain=models.AaveTokenPriceChain.ARBITRUM_MAINNET, token=models.AaveTokenPriceToken.USDC)
|
|
388
384
|
|
|
389
385
|
# Handle response
|
|
390
386
|
print(res)
|