compass_api_sdk 0.3.4__py3-none-any.whl → 0.3.7__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.
- {compassapisdk → compass_api_sdk}/_hooks/sdkhooks.py +1 -1
- {compassapisdk → compass_api_sdk}/_hooks/types.py +1 -1
- {compassapisdk → compass_api_sdk}/_version.py +3 -3
- {compassapisdk → compass_api_sdk}/aave_v3.py +15 -15
- {compassapisdk → compass_api_sdk}/aerodrome_slipstream.py +3 -3
- {compassapisdk → compass_api_sdk}/basesdk.py +3 -3
- {compassapisdk → compass_api_sdk}/errors/httpvalidationerror.py +3 -3
- {compassapisdk → compass_api_sdk}/models/__init__.py +132 -6
- {compassapisdk → compass_api_sdk}/models/aave_avg_rateop.py +6 -6
- {compassapisdk → compass_api_sdk}/models/aave_historical_transactionsop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_liquidity_changeop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_rateop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_reserve_overviewop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_std_rateop.py +6 -6
- {compassapisdk → compass_api_sdk}/models/aave_token_priceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_user_position_per_tokenop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aave_user_position_summaryop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aaveavgrateresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaveborrowparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaveborrowrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavehistoricaltransactionsresponse.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aaveliquiditychangeresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavelooprequest.py +3 -3
- {compassapisdk → compass_api_sdk}/models/aaverateresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaverepayparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaverepayrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavereserveoverviewresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavestdrateresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavesupplyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavesupplyrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavetokenpriceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaveuserpositionpertokenresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aaveuserpositionsummaryresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavewithdrawparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aavewithdrawrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodrome_slipstream_liquidity_provision_positionsop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aerodrome_slipstream_pool_priceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/aerodromelppositionsresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeposition.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreambuyexactlyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreambuyexactlyrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamincreaseliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreammintliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreammintliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreampoolpriceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamsellexactlyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamsellexactlyrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamwithdrawliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/allowanceinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/borrow.py +2 -2
- {compassapisdk → compass_api_sdk}/models/chaininfo.py +1 -1
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_apydata.py +19 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_asset.py +62 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_marketstate.py +40 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_check_user_position_vaultstate.py +25 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_market_apydata.py +23 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_market_asset.py +60 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_market_marketstate.py +38 -0
- {compassapisdk → compass_api_sdk}/models/compass_api_backend_models_morpho_read_response_get_markets_asset.py +1 -1
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_markets_marketstate.py +72 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_asset.py +60 -0
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py +53 -0
- {compassapisdk → compass_api_sdk}/models/compass_api_backend_models_morpho_read_response_get_vaults_asset.py +1 -1
- compassapisdk/models/vaultstate.py → compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_vaultstate.py +3 -3
- compass_api_sdk/models/curator.py +53 -0
- {compassapisdk → compass_api_sdk}/models/ensnameinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/generic_allowanceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/generic_ensop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/generic_portfolioop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/generic_supported_tokensop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/generic_visualize_portfolioop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/image.py +1 -1
- {compassapisdk → compass_api_sdk}/models/increaseallowanceanyparams.py +3 -7
- {compassapisdk → compass_api_sdk}/models/increaseallowanceparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/increaseallowancerequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/liquidationcall.py +2 -2
- compass_api_sdk/models/liquidity.py +16 -0
- compass_api_sdk/models/market.py +14 -0
- compass_api_sdk/models/marketposition.py +63 -0
- compass_api_sdk/models/metadata.py +56 -0
- {compassapisdk → compass_api_sdk}/models/morpho_market_positionop.py +2 -2
- compass_api_sdk/models/morpho_marketop.py +30 -0
- {compassapisdk → compass_api_sdk}/models/morpho_marketsop.py +22 -16
- compass_api_sdk/models/morpho_user_positionop.py +30 -0
- {compassapisdk → compass_api_sdk}/models/morpho_vault_positionop.py +2 -2
- compass_api_sdk/models/morpho_vaultop.py +30 -0
- {compassapisdk → compass_api_sdk}/models/morpho_vaultsop.py +18 -12
- {compassapisdk → compass_api_sdk}/models/morphoborrowparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphoborrowrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphocheckmarketpositionresponse.py +1 -1
- compass_api_sdk/models/morphocheckuserpositionresponse.py +32 -0
- {compassapisdk → compass_api_sdk}/models/morphocheckvaultpositionresponse.py +3 -3
- {compassapisdk → compass_api_sdk}/models/morphodepositparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphodepositrequest.py +1 -1
- compass_api_sdk/models/morphogetmarketresponse.py +78 -0
- {compassapisdk → compass_api_sdk}/models/morphogetmarketsresponse.py +1 -1
- compass_api_sdk/models/morphogetvaultresponse.py +47 -0
- {compassapisdk → compass_api_sdk}/models/morphogetvaultsresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphomarket.py +7 -4
- {compassapisdk → compass_api_sdk}/models/morphorepayparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphorepayrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphosetvaultallowanceparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphosetvaultallowancerequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphosupplycollateralparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphosupplycollateralrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphovault.py +7 -4
- {compassapisdk → compass_api_sdk}/models/morphowithdrawcollateralparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphowithdrawcollateralrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphowithdrawparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/morphowithdrawrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/multicallaction.py +1 -1
- {compassapisdk → compass_api_sdk}/models/multicallauthorizationrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/multicallauthorizationresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/multicallexecuterequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/portfolio.py +1 -1
- {compassapisdk → compass_api_sdk}/models/redeemunderlying.py +1 -1
- {compassapisdk → compass_api_sdk}/models/repay.py +2 -2
- {compassapisdk → compass_api_sdk}/models/reserve.py +1 -1
- {compassapisdk → compass_api_sdk}/models/security.py +2 -2
- {compassapisdk → compass_api_sdk}/models/signedauthorization.py +1 -1
- {compassapisdk → compass_api_sdk}/models/sky_positionop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/skybuyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skybuyrequest.py +2 -2
- {compassapisdk → compass_api_sdk}/models/skycheckpositionresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skydepositparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skydepositrequest.py +2 -2
- {compassapisdk → compass_api_sdk}/models/skysellparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skysellrequest.py +2 -2
- {compassapisdk → compass_api_sdk}/models/skywithdrawparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/skywithdrawrequest.py +2 -2
- {compassapisdk → compass_api_sdk}/models/supply.py +2 -2
- {compassapisdk → compass_api_sdk}/models/swapborrowrate.py +2 -2
- {compassapisdk → compass_api_sdk}/models/token_addressop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/token_balanceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/token_priceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/tokenaddressresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokenbalance.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokenbalanceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokeninfo.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokenpriceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokentransfererc20params.py +1 -1
- {compassapisdk → compass_api_sdk}/models/tokentransferrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswap_liquidity_provision_in_rangeop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswap_liquidity_provision_positionsop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswap_pool_priceop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswap_quote_buy_exactlyop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswap_quote_sell_exactlyop.py +2 -2
- {compassapisdk → compass_api_sdk}/models/uniswapbuyexactlyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapbuyexactlyrequest.py +3 -3
- {compassapisdk → compass_api_sdk}/models/uniswapbuyquoteinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapcheckinrangeresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapincreaseliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapincreaseliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswaplppositionsinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapmintliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapmintliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswappoolpriceresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswappositionssolidityresponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapsellexactlyparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapsellexactlyrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapsellquoteinforesponse.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapwithdrawliquidityprovisionparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/uniswapwithdrawliquidityprovisionrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/unsignedmulticalltransaction.py +1 -1
- {compassapisdk → compass_api_sdk}/models/unsignedtransaction.py +1 -1
- {compassapisdk → compass_api_sdk}/models/unwrapwethparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/unwrapwethrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/models/usageascollateral.py +2 -2
- compass_api_sdk/models/userstate.py +33 -0
- {compassapisdk → compass_api_sdk}/models/validationerror.py +1 -1
- compass_api_sdk/models/vault.py +58 -0
- compass_api_sdk/models/vaultposition.py +24 -0
- {compassapisdk → compass_api_sdk}/models/weeklyapys.py +1 -1
- {compassapisdk → compass_api_sdk}/models/wrapethparams.py +1 -1
- {compassapisdk → compass_api_sdk}/models/wrapethrequest.py +1 -1
- {compassapisdk → compass_api_sdk}/morpho.py +646 -42
- {compassapisdk → compass_api_sdk}/sdk.py +12 -12
- {compassapisdk → compass_api_sdk}/sdkconfiguration.py +2 -2
- {compassapisdk → compass_api_sdk}/sky.py +3 -7
- {compassapisdk → compass_api_sdk}/token_sdk.py +5 -5
- {compassapisdk → compass_api_sdk}/transaction_batching.py +3 -3
- {compassapisdk → compass_api_sdk}/uniswap_v3.py +3 -3
- {compassapisdk → compass_api_sdk}/universal.py +5 -5
- {compass_api_sdk-0.3.4.dist-info → compass_api_sdk-0.3.7.dist-info}/METADATA +53 -57
- compass_api_sdk-0.3.7.dist-info/RECORD +218 -0
- compass_api_sdk-0.3.4.dist-info/RECORD +0 -195
- compassapisdk/models/marketstate.py +0 -35
- {compassapisdk → compass_api_sdk}/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/_hooks/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/errors/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/errors/apierror.py +0 -0
- {compassapisdk → compass_api_sdk}/httpclient.py +0 -0
- {compassapisdk → compass_api_sdk}/models/chain.py +0 -0
- {compassapisdk → compass_api_sdk}/models/contractname.py +0 -0
- {compassapisdk → compass_api_sdk}/models/feeenum.py +0 -0
- {compassapisdk → compass_api_sdk}/models/interestratemode.py +0 -0
- {compassapisdk → compass_api_sdk}/models/multicallactiontype.py +0 -0
- {compassapisdk → compass_api_sdk}/models/token_enum.py +0 -0
- {compassapisdk → compass_api_sdk}/py.typed +0 -0
- {compassapisdk → compass_api_sdk}/types/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/types/basemodel.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/__init__.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/annotations.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/datetimes.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/enums.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/eventstreaming.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/forms.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/headers.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/logger.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/metadata.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/queryparams.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/requestbodies.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/retries.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/security.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/serializers.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/url.py +0 -0
- {compassapisdk → compass_api_sdk}/utils/values.py +0 -0
- {compass_api_sdk-0.3.4.dist-info → compass_api_sdk-0.3.7.dist-info}/WHEEL +0 -0
|
@@ -5,23 +5,23 @@ from .httpclient import AsyncHttpClient, ClientOwner, HttpClient, close_clients
|
|
|
5
5
|
from .sdkconfiguration import SDKConfiguration
|
|
6
6
|
from .utils.logger import Logger, get_default_logger
|
|
7
7
|
from .utils.retries import RetryConfig
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
8
|
+
from compass_api_sdk import models, utils
|
|
9
|
+
from compass_api_sdk._hooks import SDKHooks
|
|
10
|
+
from compass_api_sdk.aave_v3 import AaveV3
|
|
11
|
+
from compass_api_sdk.aerodrome_slipstream import AerodromeSlipstream
|
|
12
|
+
from compass_api_sdk.morpho import Morpho
|
|
13
|
+
from compass_api_sdk.sky import Sky
|
|
14
|
+
from compass_api_sdk.token_sdk import TokenSDK
|
|
15
|
+
from compass_api_sdk.transaction_batching import TransactionBatching
|
|
16
|
+
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
17
|
+
from compass_api_sdk.uniswap_v3 import UniswapV3
|
|
18
|
+
from compass_api_sdk.universal import Universal
|
|
19
19
|
import httpx
|
|
20
20
|
from typing import Any, Callable, Dict, Optional, Union, cast
|
|
21
21
|
import weakref
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
class
|
|
24
|
+
class CompassAPI(BaseSDK):
|
|
25
25
|
r"""Compass API: Compass Labs DeFi API"""
|
|
26
26
|
|
|
27
27
|
aave_v3: AaveV3
|
|
@@ -9,8 +9,8 @@ from ._version import (
|
|
|
9
9
|
)
|
|
10
10
|
from .httpclient import AsyncHttpClient, HttpClient
|
|
11
11
|
from .utils import Logger, RetryConfig, remove_suffix
|
|
12
|
-
from
|
|
13
|
-
from
|
|
12
|
+
from compass_api_sdk import models
|
|
13
|
+
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
14
14
|
from dataclasses import dataclass
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
from typing import Callable, Dict, Optional, Tuple, Union
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
4
|
+
from compass_api_sdk import errors, models, utils
|
|
5
|
+
from compass_api_sdk._hooks import HookContext
|
|
6
|
+
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from typing import Any, Mapping, Optional, Union
|
|
8
8
|
|
|
9
9
|
|
|
@@ -889,8 +889,6 @@ class Sky(BaseSDK):
|
|
|
889
889
|
|
|
890
890
|
Withdraw USDS for sUSDS to stop earning yield.
|
|
891
891
|
|
|
892
|
-
There are no fees.
|
|
893
|
-
|
|
894
892
|
:param amount: The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn.
|
|
895
893
|
:param sender: The address of the transaction sender.
|
|
896
894
|
:param receiver: The address which will receive the withdrawn USDS. Defaults to the sender.
|
|
@@ -997,8 +995,6 @@ class Sky(BaseSDK):
|
|
|
997
995
|
|
|
998
996
|
Withdraw USDS for sUSDS to stop earning yield.
|
|
999
997
|
|
|
1000
|
-
There are no fees.
|
|
1001
|
-
|
|
1002
998
|
:param amount: The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn.
|
|
1003
999
|
:param sender: The address of the transaction sender.
|
|
1004
1000
|
:param receiver: The address which will receive the withdrawn USDS. Defaults to the sender.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
4
|
+
from compass_api_sdk import errors, models, utils
|
|
5
|
+
from compass_api_sdk._hooks import HookContext
|
|
6
|
+
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from typing import Any, Mapping, Optional, Union
|
|
8
8
|
|
|
9
9
|
|
|
@@ -640,7 +640,7 @@ class TokenSDK(BaseSDK):
|
|
|
640
640
|
timeout_ms: Optional[int] = None,
|
|
641
641
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
642
642
|
) -> models.UnsignedTransaction:
|
|
643
|
-
r"""Transfer ETH or ERC20 Tokens
|
|
643
|
+
r"""Transfer ETH or ERC20 Tokens.
|
|
644
644
|
|
|
645
645
|
Sends native ETH or ERC20 tokens from the sender's address to another address.
|
|
646
646
|
|
|
@@ -757,7 +757,7 @@ class TokenSDK(BaseSDK):
|
|
|
757
757
|
timeout_ms: Optional[int] = None,
|
|
758
758
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
759
759
|
) -> models.UnsignedTransaction:
|
|
760
|
-
r"""Transfer ETH or ERC20 Tokens
|
|
760
|
+
r"""Transfer ETH or ERC20 Tokens.
|
|
761
761
|
|
|
762
762
|
Sends native ETH or ERC20 tokens from the sender's address to another address.
|
|
763
763
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
4
|
+
from compass_api_sdk import errors, models, utils
|
|
5
|
+
from compass_api_sdk._hooks import HookContext
|
|
6
|
+
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from typing import Any, List, Mapping, Optional, Union
|
|
8
8
|
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
4
|
+
from compass_api_sdk import errors, models, utils
|
|
5
|
+
from compass_api_sdk._hooks import HookContext
|
|
6
|
+
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from typing import Any, Mapping, Optional, Union
|
|
8
8
|
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
4
|
+
from compass_api_sdk import errors, models, utils
|
|
5
|
+
from compass_api_sdk._hooks import HookContext
|
|
6
|
+
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from typing import Any, Mapping, Optional, Union
|
|
8
8
|
|
|
9
9
|
|
|
@@ -1061,7 +1061,7 @@ class Universal(BaseSDK):
|
|
|
1061
1061
|
) -> models.UnsignedTransaction:
|
|
1062
1062
|
r"""Wrap ETH
|
|
1063
1063
|
|
|
1064
|
-
Wrapping ETH creates an
|
|
1064
|
+
Wrapping ETH creates an ERC20 compliant form of ETH that is typically needed for
|
|
1065
1065
|
it to be traded on DeFi protocols.
|
|
1066
1066
|
|
|
1067
1067
|
:param amount: The amount of ETH to wrap.
|
|
@@ -1170,7 +1170,7 @@ class Universal(BaseSDK):
|
|
|
1170
1170
|
) -> models.UnsignedTransaction:
|
|
1171
1171
|
r"""Wrap ETH
|
|
1172
1172
|
|
|
1173
|
-
Wrapping ETH creates an
|
|
1173
|
+
Wrapping ETH creates an ERC20 compliant form of ETH that is typically needed for
|
|
1174
1174
|
it to be traded on DeFi protocols.
|
|
1175
1175
|
|
|
1176
1176
|
:param amount: The amount of ETH to wrap.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: compass_api_sdk
|
|
3
|
-
Version: 0.3.
|
|
4
|
-
Summary: Compass API
|
|
3
|
+
Version: 0.3.7
|
|
4
|
+
Summary: Compass API SDK.
|
|
5
5
|
Author: royalnine
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -18,13 +18,6 @@ Description-Content-Type: text/markdown
|
|
|
18
18
|
|
|
19
19
|
Developer-friendly & type-safe Python SDK specifically catered to leverage *compass_api_sdk* API.
|
|
20
20
|
|
|
21
|
-
<div align="left">
|
|
22
|
-
<a href="https://opensource.org/licenses/MIT">
|
|
23
|
-
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
|
|
24
|
-
</a>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
|
|
28
21
|
<!-- Start Summary [summary] -->
|
|
29
22
|
## Summary
|
|
30
23
|
|
|
@@ -97,9 +90,9 @@ It's also possible to write a standalone Python script without needing to set up
|
|
|
97
90
|
# ]
|
|
98
91
|
# ///
|
|
99
92
|
|
|
100
|
-
from
|
|
93
|
+
from compass_api_sdk import CompassAPI
|
|
101
94
|
|
|
102
|
-
sdk =
|
|
95
|
+
sdk = CompassAPI(
|
|
103
96
|
# SDK arguments
|
|
104
97
|
)
|
|
105
98
|
|
|
@@ -127,14 +120,14 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
|
|
|
127
120
|
|
|
128
121
|
```python
|
|
129
122
|
# Synchronous Example
|
|
130
|
-
from
|
|
123
|
+
from compass_api_sdk import CompassAPI, models
|
|
131
124
|
|
|
132
125
|
|
|
133
|
-
with
|
|
126
|
+
with CompassAPI(
|
|
134
127
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
135
|
-
) as
|
|
128
|
+
) as compass_api:
|
|
136
129
|
|
|
137
|
-
res =
|
|
130
|
+
res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
|
|
138
131
|
|
|
139
132
|
# Handle response
|
|
140
133
|
print(res)
|
|
@@ -146,15 +139,15 @@ The same SDK client can also be used to make asychronous requests by importing a
|
|
|
146
139
|
```python
|
|
147
140
|
# Asynchronous Example
|
|
148
141
|
import asyncio
|
|
149
|
-
from
|
|
142
|
+
from compass_api_sdk import CompassAPI, models
|
|
150
143
|
|
|
151
144
|
async def main():
|
|
152
145
|
|
|
153
|
-
async with
|
|
146
|
+
async with CompassAPI(
|
|
154
147
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
155
|
-
) as
|
|
148
|
+
) as compass_api:
|
|
156
149
|
|
|
157
|
-
res = await
|
|
150
|
+
res = await compass_api.aave_v3.std_rate_async(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
|
|
158
151
|
|
|
159
152
|
# Handle response
|
|
160
153
|
print(res)
|
|
@@ -176,14 +169,14 @@ This SDK supports the following security scheme globally:
|
|
|
176
169
|
|
|
177
170
|
To authenticate with the API the `api_key_auth` parameter must be set when initializing the SDK client instance. For example:
|
|
178
171
|
```python
|
|
179
|
-
from
|
|
172
|
+
from compass_api_sdk import CompassAPI, models
|
|
180
173
|
|
|
181
174
|
|
|
182
|
-
with
|
|
175
|
+
with CompassAPI(
|
|
183
176
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
184
|
-
) as
|
|
177
|
+
) as compass_api:
|
|
185
178
|
|
|
186
|
-
res =
|
|
179
|
+
res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
|
|
187
180
|
|
|
188
181
|
# Handle response
|
|
189
182
|
print(res)
|
|
@@ -227,9 +220,12 @@ with CompassAPISDK(
|
|
|
227
220
|
### [morpho](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md)
|
|
228
221
|
|
|
229
222
|
* [vaults](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#vaults) - Get Vaults
|
|
223
|
+
* [vault](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#vault) - Get Vault
|
|
230
224
|
* [vault_position](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#vault_position) - Check Vault Position
|
|
231
225
|
* [markets](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#markets) - Get Markets
|
|
226
|
+
* [market](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#market) - Get Market
|
|
232
227
|
* [market_position](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#market_position) - Check Market Position
|
|
228
|
+
* [user_position](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#user_position) - Check User Position
|
|
233
229
|
* [allowance](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#allowance) - Set Allowance for Vault
|
|
234
230
|
* [deposit](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#deposit) - Deposit to Vault
|
|
235
231
|
* [withdraw](https://github.com/CompassLabs/mono/blob/master/docs/sdks/morpho/README.md#withdraw) - Withdraw from Vault
|
|
@@ -251,7 +247,7 @@ with CompassAPISDK(
|
|
|
251
247
|
* [address](https://github.com/CompassLabs/mono/blob/master/docs/sdks/tokensdk/README.md#address) - Token Address
|
|
252
248
|
* [price](https://github.com/CompassLabs/mono/blob/master/docs/sdks/tokensdk/README.md#price) - Token Price
|
|
253
249
|
* [balance](https://github.com/CompassLabs/mono/blob/master/docs/sdks/tokensdk/README.md#balance) - Token Balance
|
|
254
|
-
* [transfer](https://github.com/CompassLabs/mono/blob/master/docs/sdks/tokensdk/README.md#transfer) - Transfer ETH or ERC20 Tokens
|
|
250
|
+
* [transfer](https://github.com/CompassLabs/mono/blob/master/docs/sdks/tokensdk/README.md#transfer) - Transfer ETH or ERC20 Tokens.
|
|
255
251
|
|
|
256
252
|
### [transaction_batching](https://github.com/CompassLabs/mono/blob/master/docs/sdks/transactionbatching/README.md)
|
|
257
253
|
|
|
@@ -293,15 +289,15 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
|
|
|
293
289
|
|
|
294
290
|
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
|
|
295
291
|
```python
|
|
296
|
-
from
|
|
297
|
-
from
|
|
292
|
+
from compass_api_sdk import CompassAPI, models
|
|
293
|
+
from compass_api_sdk.utils import BackoffStrategy, RetryConfig
|
|
298
294
|
|
|
299
295
|
|
|
300
|
-
with
|
|
296
|
+
with CompassAPI(
|
|
301
297
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
302
|
-
) as
|
|
298
|
+
) as compass_api:
|
|
303
299
|
|
|
304
|
-
res =
|
|
300
|
+
res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7,
|
|
305
301
|
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
306
302
|
|
|
307
303
|
# Handle response
|
|
@@ -311,16 +307,16 @@ with CompassAPISDK(
|
|
|
311
307
|
|
|
312
308
|
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:
|
|
313
309
|
```python
|
|
314
|
-
from
|
|
315
|
-
from
|
|
310
|
+
from compass_api_sdk import CompassAPI, models
|
|
311
|
+
from compass_api_sdk.utils import BackoffStrategy, RetryConfig
|
|
316
312
|
|
|
317
313
|
|
|
318
|
-
with
|
|
314
|
+
with CompassAPI(
|
|
319
315
|
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
|
|
320
316
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
321
|
-
) as
|
|
317
|
+
) as compass_api:
|
|
322
318
|
|
|
323
|
-
res =
|
|
319
|
+
res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
|
|
324
320
|
|
|
325
321
|
# Handle response
|
|
326
322
|
print(res)
|
|
@@ -352,16 +348,16 @@ When custom error responses are specified for an operation, the SDK may also rai
|
|
|
352
348
|
### Example
|
|
353
349
|
|
|
354
350
|
```python
|
|
355
|
-
from
|
|
351
|
+
from compass_api_sdk import CompassAPI, errors, models
|
|
356
352
|
|
|
357
353
|
|
|
358
|
-
with
|
|
354
|
+
with CompassAPI(
|
|
359
355
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
360
|
-
) as
|
|
356
|
+
) as compass_api:
|
|
361
357
|
res = None
|
|
362
358
|
try:
|
|
363
359
|
|
|
364
|
-
res =
|
|
360
|
+
res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
|
|
365
361
|
|
|
366
362
|
# Handle response
|
|
367
363
|
print(res)
|
|
@@ -382,15 +378,15 @@ with CompassAPISDK(
|
|
|
382
378
|
|
|
383
379
|
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:
|
|
384
380
|
```python
|
|
385
|
-
from
|
|
381
|
+
from compass_api_sdk import CompassAPI, models
|
|
386
382
|
|
|
387
383
|
|
|
388
|
-
with
|
|
384
|
+
with CompassAPI(
|
|
389
385
|
server_url="https://api.compasslabs.ai",
|
|
390
386
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
391
|
-
) as
|
|
387
|
+
) as compass_api:
|
|
392
388
|
|
|
393
|
-
res =
|
|
389
|
+
res = compass_api.aave_v3.std_rate(chain=models.AaveStdRateChain.ETHEREUM_MAINNET, token=models.AaveStdRateToken.USDC, days=7)
|
|
394
390
|
|
|
395
391
|
# Handle response
|
|
396
392
|
print(res)
|
|
@@ -407,17 +403,17 @@ This allows you to wrap the client with your own custom logic, such as adding cu
|
|
|
407
403
|
|
|
408
404
|
For example, you could specify a header for every request that this sdk makes as follows:
|
|
409
405
|
```python
|
|
410
|
-
from
|
|
406
|
+
from compass_api_sdk import CompassAPI
|
|
411
407
|
import httpx
|
|
412
408
|
|
|
413
409
|
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
|
|
414
|
-
s =
|
|
410
|
+
s = CompassAPI(client=http_client)
|
|
415
411
|
```
|
|
416
412
|
|
|
417
413
|
or you could wrap the client with your own custom logic:
|
|
418
414
|
```python
|
|
419
|
-
from
|
|
420
|
-
from
|
|
415
|
+
from compass_api_sdk import CompassAPI
|
|
416
|
+
from compass_api_sdk.httpclient import AsyncHttpClient
|
|
421
417
|
import httpx
|
|
422
418
|
|
|
423
419
|
class CustomClient(AsyncHttpClient):
|
|
@@ -475,33 +471,33 @@ class CustomClient(AsyncHttpClient):
|
|
|
475
471
|
extensions=extensions,
|
|
476
472
|
)
|
|
477
473
|
|
|
478
|
-
s =
|
|
474
|
+
s = CompassAPI(async_client=CustomClient(httpx.AsyncClient()))
|
|
479
475
|
```
|
|
480
476
|
<!-- End Custom HTTP Client [http-client] -->
|
|
481
477
|
|
|
482
478
|
<!-- Start Resource Management [resource-management] -->
|
|
483
479
|
## Resource Management
|
|
484
480
|
|
|
485
|
-
The `
|
|
481
|
+
The `CompassAPI` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
|
|
486
482
|
|
|
487
483
|
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
|
|
488
484
|
|
|
489
485
|
```python
|
|
490
|
-
from
|
|
486
|
+
from compass_api_sdk import CompassAPI
|
|
491
487
|
def main():
|
|
492
488
|
|
|
493
|
-
with
|
|
489
|
+
with CompassAPI(
|
|
494
490
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
495
|
-
) as
|
|
491
|
+
) as compass_api:
|
|
496
492
|
# Rest of application here...
|
|
497
493
|
|
|
498
494
|
|
|
499
495
|
# Or when using async:
|
|
500
496
|
async def amain():
|
|
501
497
|
|
|
502
|
-
async with
|
|
498
|
+
async with CompassAPI(
|
|
503
499
|
api_key_auth="<YOUR_API_KEY_HERE>",
|
|
504
|
-
) as
|
|
500
|
+
) as compass_api:
|
|
505
501
|
# Rest of application here...
|
|
506
502
|
```
|
|
507
503
|
<!-- End Resource Management [resource-management] -->
|
|
@@ -513,16 +509,14 @@ You can setup your SDK to emit debug logs for SDK requests and responses.
|
|
|
513
509
|
|
|
514
510
|
You can pass your own logger class directly into your SDK.
|
|
515
511
|
```python
|
|
516
|
-
from
|
|
512
|
+
from compass_api_sdk import CompassAPI
|
|
517
513
|
import logging
|
|
518
514
|
|
|
519
515
|
logging.basicConfig(level=logging.DEBUG)
|
|
520
|
-
s =
|
|
516
|
+
s = CompassAPI(debug_logger=logging.getLogger("compass_api_sdk"))
|
|
521
517
|
```
|
|
522
518
|
<!-- End Debugging [debug] -->
|
|
523
519
|
|
|
524
|
-
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
|
525
|
-
|
|
526
520
|
# Development
|
|
527
521
|
|
|
528
522
|
## Maturity
|
|
@@ -536,3 +530,5 @@ looking for the latest version.
|
|
|
536
530
|
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
|
|
537
531
|
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
|
|
538
532
|
|
|
533
|
+
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
|
534
|
+
|