compass_api_sdk 0.9.35__py3-none-any.whl → 2.0.21rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- compass_api_sdk/_hooks/sdkhooks.py +4 -4
- compass_api_sdk/_hooks/types.py +1 -2
- compass_api_sdk/_version.py +3 -3
- compass_api_sdk/aave_v3.py +971 -728
- compass_api_sdk/aerodrome_slipstream.py +367 -390
- compass_api_sdk/basesdk.py +21 -5
- compass_api_sdk/bridge.py +536 -0
- compass_api_sdk/earn.py +1780 -0
- compass_api_sdk/erc_4626_vaults.py +127 -154
- compass_api_sdk/errors/__init__.py +38 -4
- compass_api_sdk/errors/apierror.py +32 -14
- compass_api_sdk/errors/compassapierror.py +30 -0
- compass_api_sdk/errors/httpvalidationerror.py +15 -8
- compass_api_sdk/errors/mintpreparenotfoundresponse_error.py +49 -0
- compass_api_sdk/errors/no_response_error.py +17 -0
- compass_api_sdk/errors/responsevalidationerror.py +27 -0
- compass_api_sdk/{token_sdk.py → ethena.py} +318 -293
- compass_api_sdk/gas_sponsorship.py +446 -0
- compass_api_sdk/httpclient.py +0 -1
- compass_api_sdk/models/__init__.py +1701 -945
- compass_api_sdk/models/aaveborrowparams.py +4 -13
- compass_api_sdk/models/aaveborrowrequest.py +19 -19
- compass_api_sdk/models/aavehistoricaltransactionsresponse.py +8 -8
- compass_api_sdk/models/aavelooprequest.py +88 -36
- compass_api_sdk/models/aaveposition.py +49 -0
- compass_api_sdk/models/aaverepayparams.py +4 -13
- compass_api_sdk/models/aaverepayrequest.py +19 -19
- compass_api_sdk/models/aavereserveoverviewresponse.py +34 -3
- compass_api_sdk/models/aavesetuseremodeparams.py +28 -0
- compass_api_sdk/models/aavesetuseremoderequest.py +48 -0
- compass_api_sdk/models/aavesupplyparams.py +4 -13
- compass_api_sdk/models/aavesupplyrequest.py +19 -19
- compass_api_sdk/models/aavesupportedtokenmetadata.py +30 -0
- compass_api_sdk/models/aavesupportedtokensresponse.py +20 -0
- compass_api_sdk/models/aavevenue.py +27 -0
- compass_api_sdk/models/aavewithdrawparams.py +4 -13
- compass_api_sdk/models/aavewithdrawrequest.py +19 -19
- compass_api_sdk/models/aerodromeenrichedposition.py +109 -0
- compass_api_sdk/models/aerodromelppositionsresponse.py +10 -7
- compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +21 -31
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +13 -6
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +21 -31
- compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +8 -25
- compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +8 -25
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +20 -30
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +13 -6
- compass_api_sdk/models/approvetransferrequest.py +32 -0
- compass_api_sdk/models/{curator.py → approvetransferresponse.py} +12 -13
- compass_api_sdk/models/apy.py +3 -0
- compass_api_sdk/models/batchedsafeoperationsresponse_input.py +52 -0
- compass_api_sdk/models/batchedsafeoperationsresponse_output.py +52 -0
- compass_api_sdk/models/batcheduseroperationsrequest.py +24 -9
- compass_api_sdk/models/bundlertransactionresponse.py +17 -0
- compass_api_sdk/models/chain.py +3 -3
- compass_api_sdk/models/chainmarketinfo.py +29 -0
- compass_api_sdk/models/{compass_api_backend_models_generic_read_response_portfolio_tokenbalance.py → compass_api_backend_v1_models_generic_read_response_portfolio_tokenbalance.py} +6 -15
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_apydata.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_apydata.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_asset.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_asset.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_marketstate.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_marketstate.py} +4 -2
- compass_api_sdk/models/compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultposition.py +30 -0
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vaultstate.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultstate.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_apydata.py → compass_api_backend_v1_models_morpho_read_response_get_market_apydata.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vault_asset.py → compass_api_backend_v1_models_morpho_read_response_get_market_asset.py} +5 -5
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_marketstate.py → compass_api_backend_v1_models_morpho_read_response_get_market_marketstate.py} +4 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_asset.py → compass_api_backend_v1_models_morpho_read_response_get_markets_asset.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_marketstate.py → compass_api_backend_v1_models_morpho_read_response_get_markets_marketstate.py} +2 -2
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vaults_asset.py → compass_api_backend_v1_models_morpho_read_response_get_vaults_asset.py} +2 -2
- compass_api_sdk/models/compass_api_backend_v1_models_morpho_read_response_get_vaults_vaultstate.py +73 -0
- compass_api_sdk/models/compass_api_backend_v1_models_pendle_read_response_market_userposition.py +82 -0
- compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_tokenbalance.py → compass_api_backend_v1_models_pendle_read_response_positions_tokenbalance.py} +2 -2
- compass_api_sdk/models/compass_api_backend_v1_models_vaults_read_response_vault_userposition.py +20 -0
- compass_api_sdk/models/compass_api_backend_v1_models_wildcat_read_response_market_userposition.py +22 -0
- compass_api_sdk/models/compass_api_backend_v2_models_earn_read_response_positions_vaultposition.py +49 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712domain.py +36 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712types.py +36 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712domain.py +37 -0
- compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712types.py +32 -0
- compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712domain.py +29 -0
- compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712types.py +34 -0
- compass_api_sdk/models/cooldownposition.py +35 -0
- compass_api_sdk/models/createaccountrequest.py +40 -0
- compass_api_sdk/models/createaccountresponse.py +56 -0
- compass_api_sdk/models/depositforburnrequest.py +77 -0
- compass_api_sdk/models/depositforburnresponse.py +100 -0
- compass_api_sdk/models/details.py +44 -7
- compass_api_sdk/models/earnmanageparams.py +74 -0
- compass_api_sdk/models/earnmanagerequest.py +130 -0
- compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_asset.py → earnmanageresponse.py} +13 -21
- compass_api_sdk/models/earnpositionsresponse.py +39 -0
- compass_api_sdk/models/earnswapparams.py +74 -0
- compass_api_sdk/models/earnswaprequest.py +90 -0
- compass_api_sdk/models/earnswapresponse.py +55 -0
- compass_api_sdk/models/earntransferrequest.py +104 -0
- compass_api_sdk/models/earntransferresponse.py +71 -0
- compass_api_sdk/models/eip712domainfield.py +20 -0
- compass_api_sdk/models/eip712field.py +20 -0
- compass_api_sdk/models/ethenadepositparams.py +82 -0
- compass_api_sdk/models/ethenadepositrequest.py +100 -0
- compass_api_sdk/models/ethenagetvaultresponse.py +109 -0
- compass_api_sdk/models/ethenarequesttowithdrawparams.py +28 -0
- compass_api_sdk/models/ethenarequesttowithdrawrequest.py +46 -0
- compass_api_sdk/models/ethenarequesttowithdrawtransactionresponse.py +37 -0
- compass_api_sdk/models/ethenaunstakeparams.py +65 -0
- compass_api_sdk/models/ethenaunstakerequest.py +83 -0
- compass_api_sdk/models/fee.py +42 -0
- compass_api_sdk/models/listaavemarketsresponse.py +21 -0
- compass_api_sdk/models/marketposition.py +5 -5
- compass_api_sdk/models/maxsupplyapyinfo.py +34 -0
- compass_api_sdk/models/mintpreparecompletedresponse.py +46 -0
- compass_api_sdk/models/mintpreparependingresponse.py +65 -0
- compass_api_sdk/models/mintpreparereadyresponse.py +43 -0
- compass_api_sdk/models/mintpreparerequest.py +25 -0
- compass_api_sdk/models/morphoborrowrequest.py +9 -3
- compass_api_sdk/models/morphocheckuserpositionresponse.py +9 -3
- compass_api_sdk/models/morphodepositrequest.py +9 -3
- compass_api_sdk/models/morphogetmarketresponse.py +72 -31
- compass_api_sdk/models/morphomarket.py +26 -20
- compass_api_sdk/models/morphorepayrequest.py +14 -3
- compass_api_sdk/models/morphosupplycollateralrequest.py +14 -3
- compass_api_sdk/models/morphovault.py +10 -10
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +9 -3
- compass_api_sdk/models/morphowithdrawrequest.py +9 -3
- compass_api_sdk/models/movement10percent.py +65 -10
- compass_api_sdk/models/multicallauthorizationrequest.py +9 -9
- compass_api_sdk/models/multicallexecuterequest.py +59 -11
- compass_api_sdk/models/odosswapparams.py +52 -0
- compass_api_sdk/models/odosswaprequest.py +72 -0
- compass_api_sdk/models/odostransactionresponse.py +37 -0
- compass_api_sdk/models/oneinchswapparams.py +59 -0
- compass_api_sdk/models/openposition.py +7 -7
- compass_api_sdk/models/operationtype.py +11 -0
- compass_api_sdk/models/pendlegetmarketresponse.py +52 -2
- compass_api_sdk/models/pendlemanageliquidityparams.py +68 -0
- compass_api_sdk/models/pendlemanageliquidityrequest.py +87 -0
- compass_api_sdk/models/pendleredeemyieldrequest.py +15 -6
- compass_api_sdk/models/pendletradeptparams.py +68 -0
- compass_api_sdk/models/pendletradeptrequest.py +87 -0
- compass_api_sdk/models/pendletradeytparams.py +68 -0
- compass_api_sdk/models/pendletradeytrequest.py +87 -0
- compass_api_sdk/models/pendletxresponse.py +36 -0
- compass_api_sdk/models/permit2typeddata_input.py +46 -0
- compass_api_sdk/models/permit2typeddata_output.py +46 -0
- compass_api_sdk/models/permitfield.py +20 -0
- compass_api_sdk/models/permitmessage.py +39 -0
- compass_api_sdk/models/permittransferfrommessage.py +29 -0
- compass_api_sdk/models/permittypeddataresponse_input.py +50 -0
- compass_api_sdk/models/permittypeddataresponse_output.py +50 -0
- compass_api_sdk/models/portfolio.py +5 -5
- compass_api_sdk/models/protocol.py +13 -0
- compass_api_sdk/models/reserve.py +6 -15
- compass_api_sdk/models/safetransactionparams.py +78 -0
- compass_api_sdk/models/safetransactionresponse.py +28 -0
- compass_api_sdk/models/safetxfield.py +20 -0
- compass_api_sdk/models/safetxmessage.py +66 -0
- compass_api_sdk/models/setallowanceparams.py +5 -16
- compass_api_sdk/models/setallowancerequest.py +19 -22
- compass_api_sdk/models/skybuyrequest.py +12 -9
- compass_api_sdk/models/skydepositrequest.py +13 -9
- compass_api_sdk/models/skysellrequest.py +12 -9
- compass_api_sdk/models/skywithdrawrequest.py +13 -9
- compass_api_sdk/models/sponsorgasrequest.py +71 -0
- compass_api_sdk/models/sponsorgasresponse.py +14 -0
- compass_api_sdk/models/supportedchaininfo.py +19 -0
- compass_api_sdk/models/tokenbalanceresponse.py +5 -15
- compass_api_sdk/models/tokenconfig.py +30 -0
- compass_api_sdk/models/tokenlistresponse.py +21 -0
- compass_api_sdk/models/tokenmarketdata.py +27 -0
- compass_api_sdk/models/tokenpermissions.py +20 -0
- compass_api_sdk/models/tokentransferparams.py +54 -0
- compass_api_sdk/models/tokentransferrequest.py +23 -27
- compass_api_sdk/models/transactionresponse.py +31 -0
- compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_asset.py → underlyingtoken.py} +2 -2
- compass_api_sdk/models/uniswapbuyexactlyparams.py +19 -41
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +31 -44
- compass_api_sdk/models/uniswapbuyexactlytransactionresponse.py +37 -0
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +15 -6
- compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +8 -25
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +23 -31
- compass_api_sdk/models/uniswappoolpriceresponse.py +8 -25
- compass_api_sdk/models/uniswappositionssolidityresponse.py +42 -2
- compass_api_sdk/models/uniswapsellexactlyparams.py +19 -41
- compass_api_sdk/models/uniswapsellexactlyrequest.py +31 -44
- compass_api_sdk/models/uniswapsellexactlytransactionresponse.py +37 -0
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +15 -6
- compass_api_sdk/models/unsignedmulticalltransaction.py +44 -13
- compass_api_sdk/models/unsignedtransaction.py +44 -13
- compass_api_sdk/models/unwrapwethrequest.py +15 -6
- compass_api_sdk/models/useroperation.py +61 -49
- compass_api_sdk/models/useroperationresponse.py +2 -2
- compass_api_sdk/models/userstate.py +3 -3
- compass_api_sdk/models/v1_aave_aave_supported_tokensop.py +69 -0
- compass_api_sdk/models/v1_aave_avg_rateop.py +83 -0
- compass_api_sdk/models/{aave_historical_transactionsop.py → v1_aave_historical_transactionsop.py} +21 -25
- compass_api_sdk/models/v1_aave_liquidity_changeop.py +45 -0
- compass_api_sdk/models/{pendle_marketop.py → v1_aave_rateop.py} +16 -20
- compass_api_sdk/models/v1_aave_reserve_overviewop.py +76 -0
- compass_api_sdk/models/v1_aave_std_rateop.py +83 -0
- compass_api_sdk/models/v1_aave_token_priceop.py +76 -0
- compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +83 -0
- compass_api_sdk/models/{aave_user_position_summaryop.py → v1_aave_user_position_summaryop.py} +16 -20
- compass_api_sdk/models/v1_aerodrome_slipstream_liquidity_provision_positionsop.py +76 -0
- compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +45 -0
- compass_api_sdk/models/v1_ethena_vaultop.py +75 -0
- compass_api_sdk/models/{generic_allowanceop.py → v1_generic_allowanceop.py} +28 -41
- compass_api_sdk/models/{generic_ensop.py → v1_generic_ensop.py} +8 -14
- compass_api_sdk/models/{generic_portfolioop.py → v1_generic_portfolioop.py} +10 -14
- compass_api_sdk/models/v1_generic_supported_chainsop.py +57 -0
- compass_api_sdk/models/{morpho_market_positionop.py → v1_morpho_market_positionop.py} +11 -10
- compass_api_sdk/models/{morpho_marketop.py → v1_morpho_marketop.py} +10 -9
- compass_api_sdk/models/{morpho_marketsop.py → v1_morpho_marketsop.py} +13 -12
- compass_api_sdk/models/{morpho_user_positionop.py → v1_morpho_user_positionop.py} +10 -9
- compass_api_sdk/models/{vaults_vaultop.py → v1_morpho_vaultop.py} +16 -20
- compass_api_sdk/models/{morpho_vaultsop.py → v1_morpho_vaultsop.py} +11 -10
- compass_api_sdk/models/{pendle_positionop.py → v1_pendle_marketop.py} +24 -27
- compass_api_sdk/models/v1_pendle_marketsop.py +24 -0
- compass_api_sdk/models/{pendle_positionsop.py → v1_pendle_positionsop.py} +10 -14
- compass_api_sdk/models/v1_sky_positionop.py +29 -0
- compass_api_sdk/models/v1_token_balanceop.py +38 -0
- compass_api_sdk/models/v1_token_listop.py +24 -0
- compass_api_sdk/models/v1_token_priceop.py +76 -0
- compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +27 -0
- compass_api_sdk/models/{uniswap_liquidity_provision_in_rangeop.py → v1_uniswap_liquidity_provision_in_rangeop.py} +10 -14
- compass_api_sdk/models/{uniswap_liquidity_provision_positionsop.py → v1_uniswap_liquidity_provision_positionsop.py} +10 -14
- compass_api_sdk/models/v1_uniswap_pool_priceop.py +58 -0
- compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +79 -0
- compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +79 -0
- compass_api_sdk/models/v1_vaults_vaultop.py +84 -0
- compass_api_sdk/models/v1_wildcat_marketop.py +82 -0
- compass_api_sdk/models/v2_cctp_mintop.py +47 -0
- compass_api_sdk/models/v2_earn_aave_marketsop.py +57 -0
- compass_api_sdk/models/v2_earn_positionsop.py +56 -0
- compass_api_sdk/models/v2_earn_vaultsop.py +105 -0
- compass_api_sdk/models/v2bundlerequest.py +33 -0
- compass_api_sdk/models/v2bundleresponse.py +67 -0
- compass_api_sdk/models/v2useroperation.py +37 -0
- compass_api_sdk/models/vault.py +14 -14
- compass_api_sdk/models/vaultdepositparams.py +85 -0
- compass_api_sdk/models/vaultdepositrequest.py +15 -6
- compass_api_sdk/models/vaultgetvaultresponse.py +21 -11
- compass_api_sdk/models/vaultinfo.py +129 -0
- compass_api_sdk/models/vaultsresponse.py +30 -0
- compass_api_sdk/models/vaultvenue.py +27 -0
- compass_api_sdk/models/vaultwithdrawparams.py +75 -0
- compass_api_sdk/models/vaultwithdrawrequest.py +15 -6
- compass_api_sdk/models/wildcatgetmarketresponse.py +151 -0
- compass_api_sdk/models/{redeemunderlying.py → withdraw.py} +2 -2
- compass_api_sdk/models/wrapethrequest.py +15 -6
- compass_api_sdk/morpho.py +481 -816
- compass_api_sdk/pendle.py +495 -1384
- compass_api_sdk/sdk.py +39 -13
- compass_api_sdk/sky.py +275 -240
- compass_api_sdk/smart_account.py +37 -50
- compass_api_sdk/swap.py +248 -0
- compass_api_sdk/token.py +1192 -0
- compass_api_sdk/transaction_bundler.py +151 -184
- compass_api_sdk/uniswap_v3.py +531 -620
- compass_api_sdk/universal.py +181 -932
- compass_api_sdk/utils/__init__.py +18 -5
- compass_api_sdk/utils/annotations.py +32 -8
- compass_api_sdk/utils/eventstreaming.py +10 -0
- compass_api_sdk/utils/forms.py +21 -10
- compass_api_sdk/utils/queryparams.py +14 -2
- compass_api_sdk/utils/retries.py +69 -5
- compass_api_sdk/utils/serializers.py +3 -2
- compass_api_sdk/utils/unmarshal_json_response.py +38 -0
- compass_api_sdk/wildcat.py +208 -0
- compass_api_sdk-2.0.21rc1.dist-info/METADATA +623 -0
- compass_api_sdk-2.0.21rc1.dist-info/RECORD +346 -0
- {compass_api_sdk-0.9.35.dist-info → compass_api_sdk-2.0.21rc1.dist-info}/WHEEL +1 -1
- compass_api_sdk/models/aave_avg_rateop.py +0 -141
- compass_api_sdk/models/aave_liquidity_changeop.py +0 -103
- compass_api_sdk/models/aave_rateop.py +0 -134
- compass_api_sdk/models/aave_reserve_overviewop.py +0 -134
- compass_api_sdk/models/aave_std_rateop.py +0 -141
- compass_api_sdk/models/aave_token_priceop.py +0 -134
- compass_api_sdk/models/aave_user_position_per_tokenop.py +0 -141
- compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +0 -37
- compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +0 -159
- compass_api_sdk/models/aerodromeposition.py +0 -70
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py +0 -53
- compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_vaultstate.py +0 -32
- compass_api_sdk/models/generic_supported_tokensop.py +0 -28
- compass_api_sdk/models/generic_visualize_portfolioop.py +0 -37
- compass_api_sdk/models/image.py +0 -15
- compass_api_sdk/models/liquidity.py +0 -16
- compass_api_sdk/models/metadata.py +0 -50
- compass_api_sdk/models/morpho_vault_positionop.py +0 -37
- compass_api_sdk/models/morpho_vaultop.py +0 -30
- compass_api_sdk/models/morphocheckvaultpositionresponse.py +0 -20
- compass_api_sdk/models/morphogetvaultresponse.py +0 -86
- compass_api_sdk/models/pendle_marketsop.py +0 -28
- compass_api_sdk/models/pendleaddliquidityparams.py +0 -50
- compass_api_sdk/models/pendleaddliquidityrequest.py +0 -61
- compass_api_sdk/models/pendlebuyptparams.py +0 -48
- compass_api_sdk/models/pendlebuyptrequest.py +0 -59
- compass_api_sdk/models/pendlebuyytparams.py +0 -48
- compass_api_sdk/models/pendlebuyytrequest.py +0 -59
- compass_api_sdk/models/pendlegetuserpositionresponse.py +0 -56
- compass_api_sdk/models/pendleremoveliquidityparams.py +0 -50
- compass_api_sdk/models/pendleremoveliquidityrequest.py +0 -61
- compass_api_sdk/models/pendlesellptparams.py +0 -48
- compass_api_sdk/models/pendlesellptrequest.py +0 -61
- compass_api_sdk/models/pendlesellytparams.py +0 -48
- compass_api_sdk/models/pendlesellytrequest.py +0 -61
- compass_api_sdk/models/sky_positionop.py +0 -31
- compass_api_sdk/models/token_addressop.py +0 -89
- compass_api_sdk/models/token_balanceop.py +0 -55
- compass_api_sdk/models/token_enum.py +0 -57
- compass_api_sdk/models/token_priceop.py +0 -89
- compass_api_sdk/models/tokenaddressresponse.py +0 -15
- compass_api_sdk/models/tokeninfo.py +0 -17
- compass_api_sdk/models/tokentransfererc20params.py +0 -63
- compass_api_sdk/models/txresponse.py +0 -27
- compass_api_sdk/models/uniswap_pool_priceop.py +0 -170
- compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +0 -191
- compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +0 -191
- compass_api_sdk/models/userposition.py +0 -16
- compass_api_sdk/models/vaultposition.py +0 -24
- compass_api_sdk-0.9.35.dist-info/METADATA +0 -558
- compass_api_sdk-0.9.35.dist-info/RECORD +0 -260
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
from .compass_api_backend_v1_models_pendle_read_response_positions_tokenbalance import (
|
|
5
|
+
CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalance,
|
|
6
|
+
CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalanceTypedDict,
|
|
7
7
|
)
|
|
8
8
|
from .lpbalance import LpBalance, LpBalanceTypedDict
|
|
9
9
|
from compass_api_sdk.types import BaseModel
|
|
@@ -13,16 +13,16 @@ from typing_extensions import Annotated, TypedDict
|
|
|
13
13
|
|
|
14
14
|
class OpenPositionTypedDict(TypedDict):
|
|
15
15
|
market_id: str
|
|
16
|
-
pt:
|
|
17
|
-
yt:
|
|
16
|
+
pt: CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalanceTypedDict
|
|
17
|
+
yt: CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalanceTypedDict
|
|
18
18
|
lp: LpBalanceTypedDict
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class OpenPosition(BaseModel):
|
|
22
22
|
market_id: Annotated[str, pydantic.Field(alias="marketId")]
|
|
23
23
|
|
|
24
|
-
pt:
|
|
24
|
+
pt: CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalance
|
|
25
25
|
|
|
26
|
-
yt:
|
|
26
|
+
yt: CompassAPIBackendV1ModelsPendleReadResponsePositionsTokenBalance
|
|
27
27
|
|
|
28
28
|
lp: LpBalance
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .compass_api_backend_v1_models_pendle_read_response_market_userposition import (
|
|
5
|
+
CompassAPIBackendV1ModelsPendleReadResponseMarketUserPosition,
|
|
6
|
+
CompassAPIBackendV1ModelsPendleReadResponseMarketUserPositionTypedDict,
|
|
7
|
+
)
|
|
4
8
|
from .markettokens import MarketTokens, MarketTokensTypedDict
|
|
5
|
-
from compass_api_sdk.types import
|
|
9
|
+
from compass_api_sdk.types import (
|
|
10
|
+
BaseModel,
|
|
11
|
+
Nullable,
|
|
12
|
+
OptionalNullable,
|
|
13
|
+
UNSET,
|
|
14
|
+
UNSET_SENTINEL,
|
|
15
|
+
)
|
|
6
16
|
from datetime import datetime
|
|
7
|
-
from
|
|
17
|
+
from pydantic import model_serializer
|
|
18
|
+
from typing_extensions import NotRequired, TypedDict
|
|
8
19
|
|
|
9
20
|
|
|
10
21
|
class PendleGetMarketResponseTypedDict(TypedDict):
|
|
@@ -15,6 +26,10 @@ class PendleGetMarketResponseTypedDict(TypedDict):
|
|
|
15
26
|
maturity_date: datetime
|
|
16
27
|
r"""The maturity date of the market. ISO 8601 format. UTC timezone."""
|
|
17
28
|
tokens: MarketTokensTypedDict
|
|
29
|
+
user_position: NotRequired[
|
|
30
|
+
Nullable[CompassAPIBackendV1ModelsPendleReadResponseMarketUserPositionTypedDict]
|
|
31
|
+
]
|
|
32
|
+
r"""The user's position in the market."""
|
|
18
33
|
|
|
19
34
|
|
|
20
35
|
class PendleGetMarketResponse(BaseModel):
|
|
@@ -28,3 +43,38 @@ class PendleGetMarketResponse(BaseModel):
|
|
|
28
43
|
r"""The maturity date of the market. ISO 8601 format. UTC timezone."""
|
|
29
44
|
|
|
30
45
|
tokens: MarketTokens
|
|
46
|
+
|
|
47
|
+
user_position: OptionalNullable[
|
|
48
|
+
CompassAPIBackendV1ModelsPendleReadResponseMarketUserPosition
|
|
49
|
+
] = UNSET
|
|
50
|
+
r"""The user's position in the market."""
|
|
51
|
+
|
|
52
|
+
@model_serializer(mode="wrap")
|
|
53
|
+
def serialize_model(self, handler):
|
|
54
|
+
optional_fields = ["user_position"]
|
|
55
|
+
nullable_fields = ["user_position"]
|
|
56
|
+
null_default_fields = []
|
|
57
|
+
|
|
58
|
+
serialized = handler(self)
|
|
59
|
+
|
|
60
|
+
m = {}
|
|
61
|
+
|
|
62
|
+
for n, f in type(self).model_fields.items():
|
|
63
|
+
k = f.alias or n
|
|
64
|
+
val = serialized.get(k)
|
|
65
|
+
serialized.pop(k, None)
|
|
66
|
+
|
|
67
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
68
|
+
is_set = (
|
|
69
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
70
|
+
or k in null_default_fields
|
|
71
|
+
) # pylint: disable=no-member
|
|
72
|
+
|
|
73
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
74
|
+
m[k] = val
|
|
75
|
+
elif val != UNSET_SENTINEL and (
|
|
76
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
77
|
+
):
|
|
78
|
+
m[k] = val
|
|
79
|
+
|
|
80
|
+
return m
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PendleManageLiquidityParamsAction(str, Enum):
|
|
14
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
15
|
+
|
|
16
|
+
SUPPLY = "SUPPLY"
|
|
17
|
+
WITHDRAW = "WITHDRAW"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
PendleManageLiquidityParamsAmountInTypedDict = TypeAliasType(
|
|
21
|
+
"PendleManageLiquidityParamsAmountInTypedDict", Union[float, str]
|
|
22
|
+
)
|
|
23
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
PendleManageLiquidityParamsAmountIn = TypeAliasType(
|
|
27
|
+
"PendleManageLiquidityParamsAmountIn", Union[float, str]
|
|
28
|
+
)
|
|
29
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class PendleManageLiquidityParamsTypedDict(TypedDict):
|
|
33
|
+
market_address: str
|
|
34
|
+
r"""The address identifying which Pendle Market you would like to add liquidity to."""
|
|
35
|
+
action: PendleManageLiquidityParamsAction
|
|
36
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
37
|
+
token: str
|
|
38
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
39
|
+
amount_in: PendleManageLiquidityParamsAmountInTypedDict
|
|
40
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
41
|
+
max_slippage_percent: float
|
|
42
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
43
|
+
action_type: Literal["PENDLE_MANAGE_LIQUIDITY"]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class PendleManageLiquidityParams(BaseModel):
|
|
47
|
+
market_address: str
|
|
48
|
+
r"""The address identifying which Pendle Market you would like to add liquidity to."""
|
|
49
|
+
|
|
50
|
+
action: PendleManageLiquidityParamsAction
|
|
51
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
52
|
+
|
|
53
|
+
token: str
|
|
54
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
55
|
+
|
|
56
|
+
amount_in: PendleManageLiquidityParamsAmountIn
|
|
57
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
58
|
+
|
|
59
|
+
max_slippage_percent: float
|
|
60
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
61
|
+
|
|
62
|
+
ACTION_TYPE: Annotated[
|
|
63
|
+
Annotated[
|
|
64
|
+
Optional[Literal["PENDLE_MANAGE_LIQUIDITY"]],
|
|
65
|
+
AfterValidator(validate_const("PENDLE_MANAGE_LIQUIDITY")),
|
|
66
|
+
],
|
|
67
|
+
pydantic.Field(alias="action_type"),
|
|
68
|
+
] = "PENDLE_MANAGE_LIQUIDITY"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PendleManageLiquidityRequestAction(str, Enum):
|
|
14
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
15
|
+
|
|
16
|
+
SUPPLY = "SUPPLY"
|
|
17
|
+
WITHDRAW = "WITHDRAW"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
PendleManageLiquidityRequestAmountInTypedDict = TypeAliasType(
|
|
21
|
+
"PendleManageLiquidityRequestAmountInTypedDict", Union[float, str]
|
|
22
|
+
)
|
|
23
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
PendleManageLiquidityRequestAmountIn = TypeAliasType(
|
|
27
|
+
"PendleManageLiquidityRequestAmountIn", Union[float, str]
|
|
28
|
+
)
|
|
29
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class PendleManageLiquidityRequestChain(str, Enum):
|
|
33
|
+
ARBITRUM = "arbitrum"
|
|
34
|
+
BASE = "base"
|
|
35
|
+
ETHEREUM = "ethereum"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class PendleManageLiquidityRequestTypedDict(TypedDict):
|
|
39
|
+
market_address: str
|
|
40
|
+
r"""The address identifying which Pendle Market you would like to add liquidity to."""
|
|
41
|
+
action: PendleManageLiquidityRequestAction
|
|
42
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
43
|
+
token: str
|
|
44
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
45
|
+
amount_in: PendleManageLiquidityRequestAmountInTypedDict
|
|
46
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
47
|
+
max_slippage_percent: float
|
|
48
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
49
|
+
chain: PendleManageLiquidityRequestChain
|
|
50
|
+
sender: str
|
|
51
|
+
r"""The address of the transaction sender."""
|
|
52
|
+
action_type: Literal["PENDLE_MANAGE_LIQUIDITY"]
|
|
53
|
+
estimate_gas: NotRequired[bool]
|
|
54
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class PendleManageLiquidityRequest(BaseModel):
|
|
58
|
+
market_address: str
|
|
59
|
+
r"""The address identifying which Pendle Market you would like to add liquidity to."""
|
|
60
|
+
|
|
61
|
+
action: PendleManageLiquidityRequestAction
|
|
62
|
+
r"""Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)."""
|
|
63
|
+
|
|
64
|
+
token: str
|
|
65
|
+
r"""The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity."""
|
|
66
|
+
|
|
67
|
+
amount_in: PendleManageLiquidityRequestAmountIn
|
|
68
|
+
r"""For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`."""
|
|
69
|
+
|
|
70
|
+
max_slippage_percent: float
|
|
71
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
72
|
+
|
|
73
|
+
chain: PendleManageLiquidityRequestChain
|
|
74
|
+
|
|
75
|
+
sender: str
|
|
76
|
+
r"""The address of the transaction sender."""
|
|
77
|
+
|
|
78
|
+
ACTION_TYPE: Annotated[
|
|
79
|
+
Annotated[
|
|
80
|
+
Optional[Literal["PENDLE_MANAGE_LIQUIDITY"]],
|
|
81
|
+
AfterValidator(validate_const("PENDLE_MANAGE_LIQUIDITY")),
|
|
82
|
+
],
|
|
83
|
+
pydantic.Field(alias="action_type"),
|
|
84
|
+
] = "PENDLE_MANAGE_LIQUIDITY"
|
|
85
|
+
|
|
86
|
+
estimate_gas: Optional[bool] = None
|
|
87
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .chain import Chain
|
|
5
4
|
from compass_api_sdk.types import BaseModel
|
|
6
5
|
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional
|
|
10
|
-
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PendleRedeemYieldRequestChain(str, Enum):
|
|
14
|
+
ARBITRUM = "arbitrum"
|
|
15
|
+
BASE = "base"
|
|
16
|
+
ETHEREUM = "ethereum"
|
|
11
17
|
|
|
12
18
|
|
|
13
19
|
class PendleRedeemYieldRequestTypedDict(TypedDict):
|
|
14
20
|
market_address: str
|
|
15
21
|
r"""The address of the market identifying which Yield Token (YT) you would like to claim yield from."""
|
|
16
|
-
chain:
|
|
17
|
-
r"""The chain to use."""
|
|
22
|
+
chain: PendleRedeemYieldRequestChain
|
|
18
23
|
sender: str
|
|
19
24
|
r"""The address of the transaction sender."""
|
|
20
25
|
action_type: Literal["PENDLE_REDEEM_YIELD"]
|
|
26
|
+
estimate_gas: NotRequired[bool]
|
|
27
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
21
28
|
|
|
22
29
|
|
|
23
30
|
class PendleRedeemYieldRequest(BaseModel):
|
|
24
31
|
market_address: str
|
|
25
32
|
r"""The address of the market identifying which Yield Token (YT) you would like to claim yield from."""
|
|
26
33
|
|
|
27
|
-
chain:
|
|
28
|
-
r"""The chain to use."""
|
|
34
|
+
chain: PendleRedeemYieldRequestChain
|
|
29
35
|
|
|
30
36
|
sender: str
|
|
31
37
|
r"""The address of the transaction sender."""
|
|
@@ -37,3 +43,6 @@ class PendleRedeemYieldRequest(BaseModel):
|
|
|
37
43
|
],
|
|
38
44
|
pydantic.Field(alias="action_type"),
|
|
39
45
|
] = "PENDLE_REDEEM_YIELD"
|
|
46
|
+
|
|
47
|
+
estimate_gas: Optional[bool] = None
|
|
48
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PendleTradePtParamsAction(str, Enum):
|
|
14
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
15
|
+
|
|
16
|
+
BUY = "BUY"
|
|
17
|
+
SELL = "SELL"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
PendleTradePtParamsAmountInTypedDict = TypeAliasType(
|
|
21
|
+
"PendleTradePtParamsAmountInTypedDict", Union[float, str]
|
|
22
|
+
)
|
|
23
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
PendleTradePtParamsAmountIn = TypeAliasType(
|
|
27
|
+
"PendleTradePtParamsAmountIn", Union[float, str]
|
|
28
|
+
)
|
|
29
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class PendleTradePtParamsTypedDict(TypedDict):
|
|
33
|
+
market_address: str
|
|
34
|
+
r"""The address of the market identifying which Principal Token (PT) you would like to trade."""
|
|
35
|
+
action: PendleTradePtParamsAction
|
|
36
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
37
|
+
token: str
|
|
38
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
39
|
+
amount_in: PendleTradePtParamsAmountInTypedDict
|
|
40
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
41
|
+
max_slippage_percent: float
|
|
42
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
43
|
+
action_type: Literal["PENDLE_TRADE_PT"]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class PendleTradePtParams(BaseModel):
|
|
47
|
+
market_address: str
|
|
48
|
+
r"""The address of the market identifying which Principal Token (PT) you would like to trade."""
|
|
49
|
+
|
|
50
|
+
action: PendleTradePtParamsAction
|
|
51
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
52
|
+
|
|
53
|
+
token: str
|
|
54
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
55
|
+
|
|
56
|
+
amount_in: PendleTradePtParamsAmountIn
|
|
57
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
58
|
+
|
|
59
|
+
max_slippage_percent: float
|
|
60
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
61
|
+
|
|
62
|
+
ACTION_TYPE: Annotated[
|
|
63
|
+
Annotated[
|
|
64
|
+
Optional[Literal["PENDLE_TRADE_PT"]],
|
|
65
|
+
AfterValidator(validate_const("PENDLE_TRADE_PT")),
|
|
66
|
+
],
|
|
67
|
+
pydantic.Field(alias="action_type"),
|
|
68
|
+
] = "PENDLE_TRADE_PT"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PendleTradePtRequestAction(str, Enum):
|
|
14
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
15
|
+
|
|
16
|
+
BUY = "BUY"
|
|
17
|
+
SELL = "SELL"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
PendleTradePtRequestAmountInTypedDict = TypeAliasType(
|
|
21
|
+
"PendleTradePtRequestAmountInTypedDict", Union[float, str]
|
|
22
|
+
)
|
|
23
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
PendleTradePtRequestAmountIn = TypeAliasType(
|
|
27
|
+
"PendleTradePtRequestAmountIn", Union[float, str]
|
|
28
|
+
)
|
|
29
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class PendleTradePtRequestChain(str, Enum):
|
|
33
|
+
ARBITRUM = "arbitrum"
|
|
34
|
+
BASE = "base"
|
|
35
|
+
ETHEREUM = "ethereum"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class PendleTradePtRequestTypedDict(TypedDict):
|
|
39
|
+
market_address: str
|
|
40
|
+
r"""The address of the market identifying which Principal Token (PT) you would like to trade."""
|
|
41
|
+
action: PendleTradePtRequestAction
|
|
42
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
43
|
+
token: str
|
|
44
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
45
|
+
amount_in: PendleTradePtRequestAmountInTypedDict
|
|
46
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
47
|
+
max_slippage_percent: float
|
|
48
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
49
|
+
chain: PendleTradePtRequestChain
|
|
50
|
+
sender: str
|
|
51
|
+
r"""The address of the transaction sender."""
|
|
52
|
+
action_type: Literal["PENDLE_TRADE_PT"]
|
|
53
|
+
estimate_gas: NotRequired[bool]
|
|
54
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class PendleTradePtRequest(BaseModel):
|
|
58
|
+
market_address: str
|
|
59
|
+
r"""The address of the market identifying which Principal Token (PT) you would like to trade."""
|
|
60
|
+
|
|
61
|
+
action: PendleTradePtRequestAction
|
|
62
|
+
r"""Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)."""
|
|
63
|
+
|
|
64
|
+
token: str
|
|
65
|
+
r"""TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for."""
|
|
66
|
+
|
|
67
|
+
amount_in: PendleTradePtRequestAmountIn
|
|
68
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`."""
|
|
69
|
+
|
|
70
|
+
max_slippage_percent: float
|
|
71
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
72
|
+
|
|
73
|
+
chain: PendleTradePtRequestChain
|
|
74
|
+
|
|
75
|
+
sender: str
|
|
76
|
+
r"""The address of the transaction sender."""
|
|
77
|
+
|
|
78
|
+
ACTION_TYPE: Annotated[
|
|
79
|
+
Annotated[
|
|
80
|
+
Optional[Literal["PENDLE_TRADE_PT"]],
|
|
81
|
+
AfterValidator(validate_const("PENDLE_TRADE_PT")),
|
|
82
|
+
],
|
|
83
|
+
pydantic.Field(alias="action_type"),
|
|
84
|
+
] = "PENDLE_TRADE_PT"
|
|
85
|
+
|
|
86
|
+
estimate_gas: Optional[bool] = None
|
|
87
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PendleTradeYtParamsAction(str, Enum):
|
|
14
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
15
|
+
|
|
16
|
+
BUY = "BUY"
|
|
17
|
+
SELL = "SELL"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
PendleTradeYtParamsAmountInTypedDict = TypeAliasType(
|
|
21
|
+
"PendleTradeYtParamsAmountInTypedDict", Union[float, str]
|
|
22
|
+
)
|
|
23
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
PendleTradeYtParamsAmountIn = TypeAliasType(
|
|
27
|
+
"PendleTradeYtParamsAmountIn", Union[float, str]
|
|
28
|
+
)
|
|
29
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class PendleTradeYtParamsTypedDict(TypedDict):
|
|
33
|
+
market_address: str
|
|
34
|
+
r"""The address of the market identifying which Yield Token (YT) you would like to trade."""
|
|
35
|
+
action: PendleTradeYtParamsAction
|
|
36
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
37
|
+
token: str
|
|
38
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
39
|
+
amount_in: PendleTradeYtParamsAmountInTypedDict
|
|
40
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
41
|
+
max_slippage_percent: float
|
|
42
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
43
|
+
action_type: Literal["PENDLE_TRADE_YT"]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class PendleTradeYtParams(BaseModel):
|
|
47
|
+
market_address: str
|
|
48
|
+
r"""The address of the market identifying which Yield Token (YT) you would like to trade."""
|
|
49
|
+
|
|
50
|
+
action: PendleTradeYtParamsAction
|
|
51
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
52
|
+
|
|
53
|
+
token: str
|
|
54
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
55
|
+
|
|
56
|
+
amount_in: PendleTradeYtParamsAmountIn
|
|
57
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
58
|
+
|
|
59
|
+
max_slippage_percent: float
|
|
60
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
61
|
+
|
|
62
|
+
ACTION_TYPE: Annotated[
|
|
63
|
+
Annotated[
|
|
64
|
+
Optional[Literal["PENDLE_TRADE_YT"]],
|
|
65
|
+
AfterValidator(validate_const("PENDLE_TRADE_YT")),
|
|
66
|
+
],
|
|
67
|
+
pydantic.Field(alias="action_type"),
|
|
68
|
+
] = "PENDLE_TRADE_YT"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compass_api_sdk.types import BaseModel
|
|
5
|
+
from compass_api_sdk.utils import validate_const
|
|
6
|
+
from enum import Enum
|
|
7
|
+
import pydantic
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional, Union
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PendleTradeYtRequestAction(str, Enum):
|
|
14
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
15
|
+
|
|
16
|
+
BUY = "BUY"
|
|
17
|
+
SELL = "SELL"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
PendleTradeYtRequestAmountInTypedDict = TypeAliasType(
|
|
21
|
+
"PendleTradeYtRequestAmountInTypedDict", Union[float, str]
|
|
22
|
+
)
|
|
23
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
PendleTradeYtRequestAmountIn = TypeAliasType(
|
|
27
|
+
"PendleTradeYtRequestAmountIn", Union[float, str]
|
|
28
|
+
)
|
|
29
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class PendleTradeYtRequestChain(str, Enum):
|
|
33
|
+
ARBITRUM = "arbitrum"
|
|
34
|
+
BASE = "base"
|
|
35
|
+
ETHEREUM = "ethereum"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class PendleTradeYtRequestTypedDict(TypedDict):
|
|
39
|
+
market_address: str
|
|
40
|
+
r"""The address of the market identifying which Yield Token (YT) you would like to trade."""
|
|
41
|
+
action: PendleTradeYtRequestAction
|
|
42
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
43
|
+
token: str
|
|
44
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
45
|
+
amount_in: PendleTradeYtRequestAmountInTypedDict
|
|
46
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
47
|
+
max_slippage_percent: float
|
|
48
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
49
|
+
chain: PendleTradeYtRequestChain
|
|
50
|
+
sender: str
|
|
51
|
+
r"""The address of the transaction sender."""
|
|
52
|
+
action_type: Literal["PENDLE_TRADE_YT"]
|
|
53
|
+
estimate_gas: NotRequired[bool]
|
|
54
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class PendleTradeYtRequest(BaseModel):
|
|
58
|
+
market_address: str
|
|
59
|
+
r"""The address of the market identifying which Yield Token (YT) you would like to trade."""
|
|
60
|
+
|
|
61
|
+
action: PendleTradeYtRequestAction
|
|
62
|
+
r"""Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)."""
|
|
63
|
+
|
|
64
|
+
token: str
|
|
65
|
+
r"""TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for."""
|
|
66
|
+
|
|
67
|
+
amount_in: PendleTradeYtRequestAmountIn
|
|
68
|
+
r"""For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`."""
|
|
69
|
+
|
|
70
|
+
max_slippage_percent: float
|
|
71
|
+
r"""The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed."""
|
|
72
|
+
|
|
73
|
+
chain: PendleTradeYtRequestChain
|
|
74
|
+
|
|
75
|
+
sender: str
|
|
76
|
+
r"""The address of the transaction sender."""
|
|
77
|
+
|
|
78
|
+
ACTION_TYPE: Annotated[
|
|
79
|
+
Annotated[
|
|
80
|
+
Optional[Literal["PENDLE_TRADE_YT"]],
|
|
81
|
+
AfterValidator(validate_const("PENDLE_TRADE_YT")),
|
|
82
|
+
],
|
|
83
|
+
pydantic.Field(alias="action_type"),
|
|
84
|
+
] = "PENDLE_TRADE_YT"
|
|
85
|
+
|
|
86
|
+
estimate_gas: Optional[bool] = None
|
|
87
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|