compass_api_sdk 1.0.0__py3-none-any.whl → 1.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 +3 -3
- compass_api_sdk/aave_v3.py +8 -0
- compass_api_sdk/ethena.py +864 -0
- compass_api_sdk/models/__init__.py +140 -28
- compass_api_sdk/models/bundlertransactionresponse.py +17 -0
- compass_api_sdk/models/compass_api_backend_models_vaults_read_response_vault_userposition.py +8 -4
- compass_api_sdk/models/cooldownposition.py +35 -0
- compass_api_sdk/models/ethenadepositparams.py +82 -0
- compass_api_sdk/models/ethenadepositrequest.py +95 -0
- compass_api_sdk/models/ethenagetvaultresponse.py +109 -0
- compass_api_sdk/models/ethenarequesttowithdrawparams.py +28 -0
- compass_api_sdk/models/ethenarequesttowithdrawrequest.py +41 -0
- compass_api_sdk/models/ethenarequesttowithdrawtransactionresponse.py +37 -0
- compass_api_sdk/models/ethenaunstakeparams.py +65 -0
- compass_api_sdk/models/ethenaunstakerequest.py +78 -0
- compass_api_sdk/models/odostransactionresponse.py +37 -0
- compass_api_sdk/models/pendletxresponse.py +2 -11
- compass_api_sdk/models/setallowanceparams.py +1 -0
- compass_api_sdk/models/setallowancerequest.py +1 -0
- compass_api_sdk/models/token_enum.py +31 -25
- compass_api_sdk/models/tokentransferparams.py +21 -21
- compass_api_sdk/models/tokentransferrequest.py +21 -21
- compass_api_sdk/models/transactionresponse.py +2 -11
- compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_asset.py → underlyingtoken.py} +2 -2
- compass_api_sdk/models/uniswapbuyexactlytransactionresponse.py +2 -10
- compass_api_sdk/models/uniswapsellexactlytransactionresponse.py +2 -10
- compass_api_sdk/models/unsignedmulticalltransaction.py +12 -12
- compass_api_sdk/models/unsignedtransaction.py +12 -12
- compass_api_sdk/models/useroperation.py +29 -23
- compass_api_sdk/models/useroperationresponse.py +2 -2
- compass_api_sdk/models/v1_aave_avg_rateop.py +31 -25
- compass_api_sdk/models/v1_aave_liquidity_changeop.py +31 -25
- compass_api_sdk/models/v1_aave_rateop.py +31 -25
- compass_api_sdk/models/v1_aave_reserve_overviewop.py +31 -25
- compass_api_sdk/models/v1_aave_std_rateop.py +31 -25
- compass_api_sdk/models/v1_aave_token_priceop.py +31 -25
- compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +31 -25
- compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +62 -50
- compass_api_sdk/models/v1_ethena_vaultop.py +75 -0
- compass_api_sdk/models/v1_generic_allowanceop.py +1 -0
- compass_api_sdk/models/v1_sky_positionop.py +2 -2
- compass_api_sdk/models/v1_token_addressop.py +31 -25
- compass_api_sdk/models/v1_token_priceop.py +4 -16
- compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +6 -3
- compass_api_sdk/models/v1_uniswap_pool_priceop.py +62 -50
- compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +62 -50
- compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +62 -50
- compass_api_sdk/models/vaultgetvaultresponse.py +3 -6
- compass_api_sdk/sdk.py +3 -0
- compass_api_sdk/sky.py +2 -2
- compass_api_sdk/swap.py +4 -4
- compass_api_sdk/token_sdk.py +20 -20
- compass_api_sdk/transaction_bundler.py +4 -4
- {compass_api_sdk-1.0.0.dist-info → compass_api_sdk-1.0.2.dist-info}/METADATA +150 -135
- {compass_api_sdk-1.0.0.dist-info → compass_api_sdk-1.0.2.dist-info}/RECORD +56 -44
- compass_api_sdk/models/tokentransfererc20params.py +0 -63
- {compass_api_sdk-1.0.0.dist-info → compass_api_sdk-1.0.2.dist-info}/WHEEL +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: compass_api_sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Compass API SDK.
|
|
5
5
|
Author: royalnine
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -28,21 +28,21 @@ Compass API: Compass Labs DeFi API
|
|
|
28
28
|
<!-- Start Table of Contents [toc] -->
|
|
29
29
|
## Table of Contents
|
|
30
30
|
<!-- $toc-max-depth=2 -->
|
|
31
|
-
* [compass_api_sdk](https://github.com/CompassLabs/mono/blob/master/#compassapisdk)
|
|
32
|
-
* [SDK Installation](https://github.com/CompassLabs/mono/blob/master/#sdk-installation)
|
|
33
|
-
* [IDE Support](https://github.com/CompassLabs/mono/blob/master/#ide-support)
|
|
34
|
-
* [SDK Example Usage](https://github.com/CompassLabs/mono/blob/master/#sdk-example-usage)
|
|
35
|
-
* [Authentication](https://github.com/CompassLabs/mono/blob/master/#authentication)
|
|
36
|
-
* [Available Resources and Operations](https://github.com/CompassLabs/mono/blob/master/#available-resources-and-operations)
|
|
37
|
-
* [Retries](https://github.com/CompassLabs/mono/blob/master/#retries)
|
|
38
|
-
* [Error Handling](https://github.com/CompassLabs/mono/blob/master/#error-handling)
|
|
39
|
-
* [Server Selection](https://github.com/CompassLabs/mono/blob/master/#server-selection)
|
|
40
|
-
* [Custom HTTP Client](https://github.com/CompassLabs/mono/blob/master/#custom-http-client)
|
|
41
|
-
* [Resource Management](https://github.com/CompassLabs/mono/blob/master/#resource-management)
|
|
42
|
-
* [Debugging](https://github.com/CompassLabs/mono/blob/master/#debugging)
|
|
43
|
-
* [Development](https://github.com/CompassLabs/mono/blob/master/#development)
|
|
44
|
-
* [Maturity](https://github.com/CompassLabs/mono/blob/master/#maturity)
|
|
45
|
-
* [Contributions](https://github.com/CompassLabs/mono/blob/master/#contributions)
|
|
31
|
+
* [compass_api_sdk](https://github.com/CompassLabs/mono/blob/master/python-sdk/#compassapisdk)
|
|
32
|
+
* [SDK Installation](https://github.com/CompassLabs/mono/blob/master/python-sdk/#sdk-installation)
|
|
33
|
+
* [IDE Support](https://github.com/CompassLabs/mono/blob/master/python-sdk/#ide-support)
|
|
34
|
+
* [SDK Example Usage](https://github.com/CompassLabs/mono/blob/master/python-sdk/#sdk-example-usage)
|
|
35
|
+
* [Authentication](https://github.com/CompassLabs/mono/blob/master/python-sdk/#authentication)
|
|
36
|
+
* [Available Resources and Operations](https://github.com/CompassLabs/mono/blob/master/python-sdk/#available-resources-and-operations)
|
|
37
|
+
* [Retries](https://github.com/CompassLabs/mono/blob/master/python-sdk/#retries)
|
|
38
|
+
* [Error Handling](https://github.com/CompassLabs/mono/blob/master/python-sdk/#error-handling)
|
|
39
|
+
* [Server Selection](https://github.com/CompassLabs/mono/blob/master/python-sdk/#server-selection)
|
|
40
|
+
* [Custom HTTP Client](https://github.com/CompassLabs/mono/blob/master/python-sdk/#custom-http-client)
|
|
41
|
+
* [Resource Management](https://github.com/CompassLabs/mono/blob/master/python-sdk/#resource-management)
|
|
42
|
+
* [Debugging](https://github.com/CompassLabs/mono/blob/master/python-sdk/#debugging)
|
|
43
|
+
* [Development](https://github.com/CompassLabs/mono/blob/master/python-sdk/#development)
|
|
44
|
+
* [Maturity](https://github.com/CompassLabs/mono/blob/master/python-sdk/#maturity)
|
|
45
|
+
* [Contributions](https://github.com/CompassLabs/mono/blob/master/python-sdk/#contributions)
|
|
46
46
|
|
|
47
47
|
<!-- End Table of Contents [toc] -->
|
|
48
48
|
|
|
@@ -54,7 +54,15 @@ Compass API: Compass Labs DeFi API
|
|
|
54
54
|
>
|
|
55
55
|
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
|
|
56
56
|
|
|
57
|
-
The SDK can be installed with
|
|
57
|
+
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
|
|
58
|
+
|
|
59
|
+
### uv
|
|
60
|
+
|
|
61
|
+
*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
uv add compass_api_sdk
|
|
65
|
+
```
|
|
58
66
|
|
|
59
67
|
### PIP
|
|
60
68
|
|
|
@@ -136,7 +144,7 @@ with CompassAPI(
|
|
|
136
144
|
|
|
137
145
|
</br>
|
|
138
146
|
|
|
139
|
-
The same SDK client can also be used to make
|
|
147
|
+
The same SDK client can also be used to make asynchronous requests by importing asyncio.
|
|
140
148
|
```python
|
|
141
149
|
# Asynchronous Example
|
|
142
150
|
import asyncio
|
|
@@ -191,117 +199,124 @@ with CompassAPI(
|
|
|
191
199
|
<details open>
|
|
192
200
|
<summary>Available methods</summary>
|
|
193
201
|
|
|
194
|
-
### [aave_v3](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md)
|
|
195
|
-
|
|
196
|
-
* [aave_aave_supported_tokens](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_aave_supported_tokens) - Aave Supported Tokens
|
|
197
|
-
* [aave_rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_rate) - Interest Rates
|
|
198
|
-
* [aave_avg_rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_avg_rate) - Interest Rates: Time Average
|
|
199
|
-
* [aave_std_rate](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_std_rate) - Interest Rates: Standard Deviation
|
|
200
|
-
* [aave_reserve_overview](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_reserve_overview) - Reserve Overview
|
|
201
|
-
* [aave_token_price](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_token_price) - Token Prices
|
|
202
|
-
* [aave_liquidity_change](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_liquidity_change) - Liquidity Index
|
|
203
|
-
* [aave_user_position_summary](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_user_position_summary) - Positions - Total
|
|
204
|
-
* [aave_user_position_per_token](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_user_position_per_token) - Positions - per Token
|
|
205
|
-
* [aave_historical_transactions](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_historical_transactions) - Historical Transactions
|
|
206
|
-
* [aave_supply](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_supply) - Supply/Lend
|
|
207
|
-
* [aave_borrow](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_borrow) - Borrow
|
|
208
|
-
* [aave_repay](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_repay) - Repay Loans
|
|
209
|
-
* [aave_withdraw](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aavev3/README.md#aave_withdraw) - Unstake
|
|
210
|
-
|
|
211
|
-
### [aerodrome_slipstream](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aerodromeslipstream/README.md)
|
|
212
|
-
|
|
213
|
-
* [aerodrome_slipstream_liquidity_provision_positions](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_positions) - List LP Positions
|
|
214
|
-
* [aerodrome_slipstream_pool_price](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_pool_price) - Pool Price
|
|
215
|
-
* [aerodrome_slipstream_swap_sell_exactly](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_swap_sell_exactly) - Swap - from Specified Amount
|
|
216
|
-
* [aerodrome_slipstream_swap_buy_exactly](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_swap_buy_exactly) - Swap - into Specified Amount
|
|
217
|
-
* [aerodrome_slipstream_liquidity_provision_mint](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_mint) - Open a New LP Position
|
|
218
|
-
* [aerodrome_slipstream_liquidity_provision_increase](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_increase) - Increase an LP Position
|
|
219
|
-
* [aerodrome_slipstream_liquidity_provision_withdraw](https://github.com/CompassLabs/mono/blob/master/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_withdraw) - Withdraw an LP Position
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
### [erc_4626_vaults](https://github.com/CompassLabs/mono/blob/master/docs/sdks/erc4626vaults/README.md)
|
|
223
|
-
|
|
224
|
-
* [vaults_vault](https://github.com/CompassLabs/mono/blob/master/docs/sdks/erc4626vaults/README.md#vaults_vault) - Get Vault & User Position
|
|
225
|
-
* [vaults_deposit](https://github.com/CompassLabs/mono/blob/master/docs/sdks/erc4626vaults/README.md#vaults_deposit) - Deposit to Vault
|
|
226
|
-
* [vaults_withdraw](https://github.com/CompassLabs/mono/blob/master/docs/sdks/erc4626vaults/README.md#vaults_withdraw) - Withdraw from Vault
|
|
227
|
-
|
|
228
|
-
### [
|
|
229
|
-
|
|
230
|
-
* [
|
|
231
|
-
* [
|
|
232
|
-
* [
|
|
233
|
-
* [
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
* [
|
|
238
|
-
* [
|
|
239
|
-
* [
|
|
240
|
-
* [
|
|
241
|
-
* [
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
* [
|
|
246
|
-
* [
|
|
247
|
-
* [
|
|
248
|
-
* [
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
* [
|
|
256
|
-
* [
|
|
257
|
-
* [
|
|
258
|
-
* [
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
* [
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
* [
|
|
275
|
-
|
|
276
|
-
### [
|
|
277
|
-
|
|
278
|
-
* [
|
|
279
|
-
* [
|
|
280
|
-
* [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
* [
|
|
286
|
-
* [
|
|
287
|
-
* [
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
* [
|
|
292
|
-
* [
|
|
293
|
-
* [
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
* [
|
|
298
|
-
* [
|
|
299
|
-
* [
|
|
300
|
-
* [
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
* [
|
|
202
|
+
### [aave_v3](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md)
|
|
203
|
+
|
|
204
|
+
* [aave_aave_supported_tokens](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_aave_supported_tokens) - Aave Supported Tokens
|
|
205
|
+
* [aave_rate](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_rate) - Interest Rates
|
|
206
|
+
* [aave_avg_rate](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_avg_rate) - Interest Rates: Time Average
|
|
207
|
+
* [aave_std_rate](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_std_rate) - Interest Rates: Standard Deviation
|
|
208
|
+
* [aave_reserve_overview](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_reserve_overview) - Reserve Overview
|
|
209
|
+
* [aave_token_price](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_token_price) - Token Prices
|
|
210
|
+
* [aave_liquidity_change](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_liquidity_change) - Liquidity Index
|
|
211
|
+
* [aave_user_position_summary](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_user_position_summary) - Positions - Total
|
|
212
|
+
* [aave_user_position_per_token](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_user_position_per_token) - Positions - per Token
|
|
213
|
+
* [aave_historical_transactions](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_historical_transactions) - Historical Transactions
|
|
214
|
+
* [aave_supply](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_supply) - Supply/Lend
|
|
215
|
+
* [aave_borrow](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_borrow) - Borrow
|
|
216
|
+
* [aave_repay](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_repay) - Repay Loans
|
|
217
|
+
* [aave_withdraw](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aavev3/README.md#aave_withdraw) - Unstake
|
|
218
|
+
|
|
219
|
+
### [aerodrome_slipstream](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aerodromeslipstream/README.md)
|
|
220
|
+
|
|
221
|
+
* [aerodrome_slipstream_liquidity_provision_positions](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_positions) - List LP Positions
|
|
222
|
+
* [aerodrome_slipstream_pool_price](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_pool_price) - Pool Price
|
|
223
|
+
* [aerodrome_slipstream_swap_sell_exactly](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_swap_sell_exactly) - Swap - from Specified Amount
|
|
224
|
+
* [aerodrome_slipstream_swap_buy_exactly](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_swap_buy_exactly) - Swap - into Specified Amount
|
|
225
|
+
* [aerodrome_slipstream_liquidity_provision_mint](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_mint) - Open a New LP Position
|
|
226
|
+
* [aerodrome_slipstream_liquidity_provision_increase](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_increase) - Increase an LP Position
|
|
227
|
+
* [aerodrome_slipstream_liquidity_provision_withdraw](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_withdraw) - Withdraw an LP Position
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
### [erc_4626_vaults](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/erc4626vaults/README.md)
|
|
231
|
+
|
|
232
|
+
* [vaults_vault](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/erc4626vaults/README.md#vaults_vault) - Get Vault & User Position
|
|
233
|
+
* [vaults_deposit](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/erc4626vaults/README.md#vaults_deposit) - Deposit to Vault
|
|
234
|
+
* [vaults_withdraw](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/erc4626vaults/README.md#vaults_withdraw) - Withdraw from Vault
|
|
235
|
+
|
|
236
|
+
### [ethena](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/ethena/README.md)
|
|
237
|
+
|
|
238
|
+
* [ethena_vault](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/ethena/README.md#ethena_vault) - Get Vault & User Position
|
|
239
|
+
* [ethena_deposit](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/ethena/README.md#ethena_deposit) - Deposit USDe
|
|
240
|
+
* [ethena_request](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/ethena/README.md#ethena_request) - Request to Withdraw USDe
|
|
241
|
+
* [ethena_unstake](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/ethena/README.md#ethena_unstake) - Unstake USDe
|
|
242
|
+
|
|
243
|
+
### [morpho](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md)
|
|
244
|
+
|
|
245
|
+
* [morpho_vaults](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_vaults) - Get Vaults
|
|
246
|
+
* [morpho_vault](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_vault) - Get Vault & User Position
|
|
247
|
+
* [morpho_markets](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_markets) - Get Markets
|
|
248
|
+
* [morpho_market](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_market) - Get Market
|
|
249
|
+
* [morpho_market_position](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_market_position) - Check Market Position
|
|
250
|
+
* [morpho_user_position](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_user_position) - Check User Position
|
|
251
|
+
* [morpho_deposit](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_deposit) - Deposit to Vault
|
|
252
|
+
* [morpho_withdraw](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_withdraw) - Withdraw from Vault
|
|
253
|
+
* [morpho_supply_collateral](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_supply_collateral) - Supply Collateral to Market
|
|
254
|
+
* [morpho_withdraw_collateral](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_withdraw_collateral) - Withdraw Collateral from Market
|
|
255
|
+
* [morpho_borrow](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_borrow) - Borrow from Market
|
|
256
|
+
* [morpho_repay](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/morpho/README.md#morpho_repay) - Repay to Market
|
|
257
|
+
|
|
258
|
+
### [pendle](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/pendle/README.md)
|
|
259
|
+
|
|
260
|
+
* [pendle_market](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/pendle/README.md#pendle_market) - Get Market & User Position
|
|
261
|
+
* [pendle_positions](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/pendle/README.md#pendle_positions) - List User's Market Positions
|
|
262
|
+
* [pendle_markets](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/pendle/README.md#pendle_markets) - List Market Data
|
|
263
|
+
* [pendle_pt](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/pendle/README.md#pendle_pt) - Trade Principal Token (PT)
|
|
264
|
+
* [pendle_yt](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/pendle/README.md#pendle_yt) - Trade Yield Token (YT)
|
|
265
|
+
* [pendle_liquidity](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/pendle/README.md#pendle_liquidity) - Manage Liquidity (LP)
|
|
266
|
+
* [pendle_redeem_yield](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/pendle/README.md#pendle_redeem_yield) - Redeem Claimable Yield
|
|
267
|
+
|
|
268
|
+
### [sky](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/sky/README.md)
|
|
269
|
+
|
|
270
|
+
* [sky_position](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/sky/README.md#sky_position) - Check USDS Position
|
|
271
|
+
* [sky_buy](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/sky/README.md#sky_buy) - Buy USDS
|
|
272
|
+
* [sky_sell](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/sky/README.md#sky_sell) - Sell USDS
|
|
273
|
+
* [sky_deposit](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/sky/README.md#sky_deposit) - Deposit USDS
|
|
274
|
+
* [sky_withdraw](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/sky/README.md#sky_withdraw) - Withdraw USDS
|
|
275
|
+
|
|
276
|
+
### [smart_account](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/smartaccount/README.md)
|
|
277
|
+
|
|
278
|
+
* [smart_account_batched_user_operations](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/smartaccount/README.md#smart_account_batched_user_operations) - Get Smart Account Batched User Operations
|
|
279
|
+
|
|
280
|
+
### [swap](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/swap/README.md)
|
|
281
|
+
|
|
282
|
+
* [swap_odos](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/swap/README.md#swap_odos) - Odos Swap
|
|
283
|
+
|
|
284
|
+
### [token](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md)
|
|
285
|
+
|
|
286
|
+
* [token_address](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md#token_address) - Token Address
|
|
287
|
+
* [token_price](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md#token_price) - Token Price
|
|
288
|
+
* [token_balance](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md#token_balance) - Token Balance
|
|
289
|
+
* [token_transfer](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/tokensdk/README.md#token_transfer) - Transfer Tokens
|
|
290
|
+
|
|
291
|
+
### [transaction_bundler](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/transactionbundler/README.md)
|
|
292
|
+
|
|
293
|
+
* [transaction_bundler_authorization](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/transactionbundler/README.md#transaction_bundler_authorization) - Enable Transaction Bundling
|
|
294
|
+
* [transaction_bundler_execute](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/transactionbundler/README.md#transaction_bundler_execute) - Construct Bundled Transaction
|
|
295
|
+
* [transaction_bundler_aave_loop](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/transactionbundler/README.md#transaction_bundler_aave_loop) - AAVE Leverage Long/Short
|
|
296
|
+
|
|
297
|
+
### [uniswap_v3](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md)
|
|
298
|
+
|
|
299
|
+
* [uniswap_quote_buy_exactly](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_quote_buy_exactly) - Get Quote - to Specified Amount
|
|
300
|
+
* [uniswap_quote_sell_exactly](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_quote_sell_exactly) - Get quote - From Specified Amount
|
|
301
|
+
* [uniswap_pool_price](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_pool_price) - Pool Price
|
|
302
|
+
* [uniswap_liquidity_provision_in_range](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_in_range) - Check if LP is Active.
|
|
303
|
+
* [uniswap_liquidity_provision_positions](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_positions) - List LP
|
|
304
|
+
* [uniswap_swap_buy_exactly](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_swap_buy_exactly) - Buy exact amount
|
|
305
|
+
* [uniswap_swap_sell_exactly](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_swap_sell_exactly) - Sell exact amount
|
|
306
|
+
* [uniswap_liquidity_provision_mint](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_mint) - Open a new LP position
|
|
307
|
+
* [uniswap_liquidity_provision_increase](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_increase) - Increase an LP position
|
|
308
|
+
* [uniswap_liquidity_provision_withdraw](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_withdraw) - Withdraw an LP position
|
|
309
|
+
|
|
310
|
+
### [universal](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md)
|
|
311
|
+
|
|
312
|
+
* [generic_portfolio](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_portfolio) - List User Portfolio
|
|
313
|
+
* [generic_supported_tokens](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_supported_tokens) - List Supported Tokens
|
|
314
|
+
* [generic_supported_chains](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_supported_chains) - List Supported Chains
|
|
315
|
+
* [generic_allowance](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_allowance) - Get Allowance
|
|
316
|
+
* [generic_ens](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_ens) - Resolve ENS
|
|
317
|
+
* [generic_wrap_eth](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_wrap_eth) - Wrap ETH
|
|
318
|
+
* [generic_unwrap_weth](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_unwrap_weth) - Unwrap WETH
|
|
319
|
+
* [generic_allowance_set](https://github.com/CompassLabs/mono/blob/master/python-sdk/docs/sdks/universal/README.md#generic_allowance_set) - Set Allowance
|
|
305
320
|
|
|
306
321
|
</details>
|
|
307
322
|
<!-- End Available Resources and Operations [operations] -->
|
|
@@ -351,7 +366,7 @@ with CompassAPI(
|
|
|
351
366
|
<!-- Start Error Handling [errors] -->
|
|
352
367
|
## Error Handling
|
|
353
368
|
|
|
354
|
-
[`CompassAPIError`](https://github.com/CompassLabs/mono/blob/master/./src/compass_api_sdk/errors/compassapierror.py) is the base class for all HTTP error responses. It has the following properties:
|
|
369
|
+
[`CompassAPIError`](https://github.com/CompassLabs/mono/blob/master/python-sdk/./src/compass_api_sdk/errors/compassapierror.py) is the base class for all HTTP error responses. It has the following properties:
|
|
355
370
|
|
|
356
371
|
| Property | Type | Description |
|
|
357
372
|
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
|
|
@@ -360,7 +375,7 @@ with CompassAPI(
|
|
|
360
375
|
| `err.headers` | `httpx.Headers` | HTTP response headers |
|
|
361
376
|
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
|
|
362
377
|
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
|
|
363
|
-
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](https://github.com/CompassLabs/mono/blob/master/#error-classes). |
|
|
378
|
+
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](https://github.com/CompassLabs/mono/blob/master/python-sdk/#error-classes). |
|
|
364
379
|
|
|
365
380
|
### Example
|
|
366
381
|
```python
|
|
@@ -394,8 +409,8 @@ with CompassAPI(
|
|
|
394
409
|
|
|
395
410
|
### Error Classes
|
|
396
411
|
**Primary errors:**
|
|
397
|
-
* [`CompassAPIError`](https://github.com/CompassLabs/mono/blob/master/./src/compass_api_sdk/errors/compassapierror.py): The base class for HTTP error responses.
|
|
398
|
-
* [`HTTPValidationError`](https://github.com/CompassLabs/mono/blob/master/./src/compass_api_sdk/errors/httpvalidationerror.py): Validation Error. Status code `422`.
|
|
412
|
+
* [`CompassAPIError`](https://github.com/CompassLabs/mono/blob/master/python-sdk/./src/compass_api_sdk/errors/compassapierror.py): The base class for HTTP error responses.
|
|
413
|
+
* [`HTTPValidationError`](https://github.com/CompassLabs/mono/blob/master/python-sdk/./src/compass_api_sdk/errors/httpvalidationerror.py): Validation Error. Status code `422`.
|
|
399
414
|
|
|
400
415
|
<details><summary>Less common errors (5)</summary>
|
|
401
416
|
|
|
@@ -407,8 +422,8 @@ with CompassAPI(
|
|
|
407
422
|
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
|
|
408
423
|
|
|
409
424
|
|
|
410
|
-
**Inherit from [`CompassAPIError`](https://github.com/CompassLabs/mono/blob/master/./src/compass_api_sdk/errors/compassapierror.py)**:
|
|
411
|
-
* [`ResponseValidationError`](https://github.com/CompassLabs/mono/blob/master/./src/compass_api_sdk/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
|
|
425
|
+
**Inherit from [`CompassAPIError`](https://github.com/CompassLabs/mono/blob/master/python-sdk/./src/compass_api_sdk/errors/compassapierror.py)**:
|
|
426
|
+
* [`ResponseValidationError`](https://github.com/CompassLabs/mono/blob/master/python-sdk/./src/compass_api_sdk/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
|
|
412
427
|
|
|
413
428
|
</details>
|
|
414
429
|
<!-- End Error Handling [errors] -->
|