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
|
@@ -4,15 +4,17 @@ from .basesdk import BaseSDK
|
|
|
4
4
|
from compass_api_sdk import errors, models, utils
|
|
5
5
|
from compass_api_sdk._hooks import HookContext
|
|
6
6
|
from compass_api_sdk.types import OptionalNullable, UNSET
|
|
7
|
+
from compass_api_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
7
8
|
from typing import Any, Mapping, Optional, Union
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class AerodromeSlipstream(BaseSDK):
|
|
11
|
-
def
|
|
12
|
+
def aerodrome_slipstream_liquidity_provision_positions(
|
|
12
13
|
self,
|
|
13
14
|
*,
|
|
14
|
-
chain: models.
|
|
15
|
-
user: Optional[str] =
|
|
15
|
+
chain: models.V1AerodromeSlipstreamLiquidityProvisionPositionsChain,
|
|
16
|
+
user: Optional[str] = None,
|
|
17
|
+
pool: OptionalNullable[str] = UNSET,
|
|
16
18
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
17
19
|
server_url: Optional[str] = None,
|
|
18
20
|
timeout_ms: Optional[int] = None,
|
|
@@ -30,8 +32,9 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
30
32
|
managing their liquidity provision activities, enabling them to make informed
|
|
31
33
|
decisions based on their current positions.
|
|
32
34
|
|
|
33
|
-
:param chain:
|
|
35
|
+
:param chain:
|
|
34
36
|
:param user: The user to get positions for.
|
|
37
|
+
:param pool: Optional pool address to filter positions by. If provided, only positions for this pool will be returned.
|
|
35
38
|
:param retries: Override the default retry configuration for this method
|
|
36
39
|
:param server_url: Override the default server URL for this method
|
|
37
40
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -47,14 +50,15 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
47
50
|
else:
|
|
48
51
|
base_url = self._get_url(base_url, url_variables)
|
|
49
52
|
|
|
50
|
-
request = models.
|
|
53
|
+
request = models.V1AerodromeSlipstreamLiquidityProvisionPositionsRequest(
|
|
51
54
|
chain=chain,
|
|
52
55
|
user=user,
|
|
56
|
+
pool=pool,
|
|
53
57
|
)
|
|
54
58
|
|
|
55
59
|
req = self._build_request(
|
|
56
60
|
method="GET",
|
|
57
|
-
path="/
|
|
61
|
+
path="/v1/aerodrome_slipstream/liquidity_provision/positions",
|
|
58
62
|
base_url=base_url,
|
|
59
63
|
url_variables=url_variables,
|
|
60
64
|
request=request,
|
|
@@ -65,6 +69,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
65
69
|
accept_header_value="application/json",
|
|
66
70
|
http_headers=http_headers,
|
|
67
71
|
security=self.sdk_configuration.security,
|
|
72
|
+
allow_empty_value=None,
|
|
68
73
|
timeout_ms=timeout_ms,
|
|
69
74
|
)
|
|
70
75
|
|
|
@@ -80,8 +85,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
80
85
|
hook_ctx=HookContext(
|
|
81
86
|
config=self.sdk_configuration,
|
|
82
87
|
base_url=base_url or "",
|
|
83
|
-
operation_id="
|
|
84
|
-
oauth2_scopes=
|
|
88
|
+
operation_id="v1_aerodrome_slipstream_liquidity_provision_positions",
|
|
89
|
+
oauth2_scopes=None,
|
|
85
90
|
security_source=self.sdk_configuration.security,
|
|
86
91
|
),
|
|
87
92
|
request=req,
|
|
@@ -91,39 +96,29 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
91
96
|
|
|
92
97
|
response_data: Any = None
|
|
93
98
|
if utils.match_response(http_res, "200", "application/json"):
|
|
94
|
-
return
|
|
95
|
-
|
|
99
|
+
return unmarshal_json_response(
|
|
100
|
+
models.AerodromeLPPositionsResponse, http_res
|
|
96
101
|
)
|
|
97
102
|
if utils.match_response(http_res, "422", "application/json"):
|
|
98
|
-
response_data =
|
|
99
|
-
|
|
103
|
+
response_data = unmarshal_json_response(
|
|
104
|
+
errors.HTTPValidationErrorData, http_res
|
|
100
105
|
)
|
|
101
|
-
raise errors.HTTPValidationError(
|
|
106
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
102
107
|
if utils.match_response(http_res, "4XX", "*"):
|
|
103
108
|
http_res_text = utils.stream_to_text(http_res)
|
|
104
|
-
raise errors.APIError(
|
|
105
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
106
|
-
)
|
|
109
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
107
110
|
if utils.match_response(http_res, "5XX", "*"):
|
|
108
111
|
http_res_text = utils.stream_to_text(http_res)
|
|
109
|
-
raise errors.APIError(
|
|
110
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
111
|
-
)
|
|
112
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
112
113
|
|
|
113
|
-
|
|
114
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
115
|
-
raise errors.APIError(
|
|
116
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
117
|
-
http_res.status_code,
|
|
118
|
-
http_res_text,
|
|
119
|
-
http_res,
|
|
120
|
-
)
|
|
114
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
121
115
|
|
|
122
|
-
async def
|
|
116
|
+
async def aerodrome_slipstream_liquidity_provision_positions_async(
|
|
123
117
|
self,
|
|
124
118
|
*,
|
|
125
|
-
chain: models.
|
|
126
|
-
user: Optional[str] =
|
|
119
|
+
chain: models.V1AerodromeSlipstreamLiquidityProvisionPositionsChain,
|
|
120
|
+
user: Optional[str] = None,
|
|
121
|
+
pool: OptionalNullable[str] = UNSET,
|
|
127
122
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
128
123
|
server_url: Optional[str] = None,
|
|
129
124
|
timeout_ms: Optional[int] = None,
|
|
@@ -141,8 +136,9 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
141
136
|
managing their liquidity provision activities, enabling them to make informed
|
|
142
137
|
decisions based on their current positions.
|
|
143
138
|
|
|
144
|
-
:param chain:
|
|
139
|
+
:param chain:
|
|
145
140
|
:param user: The user to get positions for.
|
|
141
|
+
:param pool: Optional pool address to filter positions by. If provided, only positions for this pool will be returned.
|
|
146
142
|
:param retries: Override the default retry configuration for this method
|
|
147
143
|
:param server_url: Override the default server URL for this method
|
|
148
144
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -158,14 +154,15 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
158
154
|
else:
|
|
159
155
|
base_url = self._get_url(base_url, url_variables)
|
|
160
156
|
|
|
161
|
-
request = models.
|
|
157
|
+
request = models.V1AerodromeSlipstreamLiquidityProvisionPositionsRequest(
|
|
162
158
|
chain=chain,
|
|
163
159
|
user=user,
|
|
160
|
+
pool=pool,
|
|
164
161
|
)
|
|
165
162
|
|
|
166
163
|
req = self._build_request_async(
|
|
167
164
|
method="GET",
|
|
168
|
-
path="/
|
|
165
|
+
path="/v1/aerodrome_slipstream/liquidity_provision/positions",
|
|
169
166
|
base_url=base_url,
|
|
170
167
|
url_variables=url_variables,
|
|
171
168
|
request=request,
|
|
@@ -176,6 +173,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
176
173
|
accept_header_value="application/json",
|
|
177
174
|
http_headers=http_headers,
|
|
178
175
|
security=self.sdk_configuration.security,
|
|
176
|
+
allow_empty_value=None,
|
|
179
177
|
timeout_ms=timeout_ms,
|
|
180
178
|
)
|
|
181
179
|
|
|
@@ -191,8 +189,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
191
189
|
hook_ctx=HookContext(
|
|
192
190
|
config=self.sdk_configuration,
|
|
193
191
|
base_url=base_url or "",
|
|
194
|
-
operation_id="
|
|
195
|
-
oauth2_scopes=
|
|
192
|
+
operation_id="v1_aerodrome_slipstream_liquidity_provision_positions",
|
|
193
|
+
oauth2_scopes=None,
|
|
196
194
|
security_source=self.sdk_configuration.security,
|
|
197
195
|
),
|
|
198
196
|
request=req,
|
|
@@ -202,41 +200,30 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
202
200
|
|
|
203
201
|
response_data: Any = None
|
|
204
202
|
if utils.match_response(http_res, "200", "application/json"):
|
|
205
|
-
return
|
|
206
|
-
|
|
203
|
+
return unmarshal_json_response(
|
|
204
|
+
models.AerodromeLPPositionsResponse, http_res
|
|
207
205
|
)
|
|
208
206
|
if utils.match_response(http_res, "422", "application/json"):
|
|
209
|
-
response_data =
|
|
210
|
-
|
|
207
|
+
response_data = unmarshal_json_response(
|
|
208
|
+
errors.HTTPValidationErrorData, http_res
|
|
211
209
|
)
|
|
212
|
-
raise errors.HTTPValidationError(
|
|
210
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
213
211
|
if utils.match_response(http_res, "4XX", "*"):
|
|
214
212
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
215
|
-
raise errors.APIError(
|
|
216
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
217
|
-
)
|
|
213
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
218
214
|
if utils.match_response(http_res, "5XX", "*"):
|
|
219
215
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
220
|
-
raise errors.APIError(
|
|
221
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
222
|
-
)
|
|
216
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
223
217
|
|
|
224
|
-
|
|
225
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
226
|
-
raise errors.APIError(
|
|
227
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
228
|
-
http_res.status_code,
|
|
229
|
-
http_res_text,
|
|
230
|
-
http_res,
|
|
231
|
-
)
|
|
218
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
232
219
|
|
|
233
|
-
def
|
|
220
|
+
def aerodrome_slipstream_pool_price(
|
|
234
221
|
self,
|
|
235
222
|
*,
|
|
236
|
-
chain: models.
|
|
237
|
-
token_in:
|
|
238
|
-
token_out:
|
|
239
|
-
tick_spacing: Optional[int] =
|
|
223
|
+
chain: models.V1AerodromeSlipstreamPoolPriceChain,
|
|
224
|
+
token_in: str,
|
|
225
|
+
token_out: str,
|
|
226
|
+
tick_spacing: Optional[int] = None,
|
|
240
227
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
241
228
|
server_url: Optional[str] = None,
|
|
242
229
|
timeout_ms: Optional[int] = None,
|
|
@@ -251,9 +238,9 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
251
238
|
accurate representation of the trade ratios between the two assets, consider using
|
|
252
239
|
the quote endpoint.
|
|
253
240
|
|
|
254
|
-
:param chain:
|
|
255
|
-
:param token_in: The symbol of a token in the pool.
|
|
256
|
-
:param token_out: The symbol of a token in the pool.
|
|
241
|
+
:param chain:
|
|
242
|
+
:param token_in: The symbol or address of a token in the pool.
|
|
243
|
+
:param token_out: The symbol or address of a token in the pool.
|
|
257
244
|
:param tick_spacing: The tick spacing of the pool
|
|
258
245
|
:param retries: Override the default retry configuration for this method
|
|
259
246
|
:param server_url: Override the default server URL for this method
|
|
@@ -270,7 +257,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
270
257
|
else:
|
|
271
258
|
base_url = self._get_url(base_url, url_variables)
|
|
272
259
|
|
|
273
|
-
request = models.
|
|
260
|
+
request = models.V1AerodromeSlipstreamPoolPriceRequest(
|
|
274
261
|
chain=chain,
|
|
275
262
|
token_in=token_in,
|
|
276
263
|
token_out=token_out,
|
|
@@ -279,7 +266,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
279
266
|
|
|
280
267
|
req = self._build_request(
|
|
281
268
|
method="GET",
|
|
282
|
-
path="/
|
|
269
|
+
path="/v1/aerodrome_slipstream/pool_price",
|
|
283
270
|
base_url=base_url,
|
|
284
271
|
url_variables=url_variables,
|
|
285
272
|
request=request,
|
|
@@ -290,6 +277,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
290
277
|
accept_header_value="application/json",
|
|
291
278
|
http_headers=http_headers,
|
|
292
279
|
security=self.sdk_configuration.security,
|
|
280
|
+
allow_empty_value=None,
|
|
293
281
|
timeout_ms=timeout_ms,
|
|
294
282
|
)
|
|
295
283
|
|
|
@@ -305,8 +293,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
305
293
|
hook_ctx=HookContext(
|
|
306
294
|
config=self.sdk_configuration,
|
|
307
295
|
base_url=base_url or "",
|
|
308
|
-
operation_id="
|
|
309
|
-
oauth2_scopes=
|
|
296
|
+
operation_id="v1_aerodrome_slipstream_pool_price",
|
|
297
|
+
oauth2_scopes=None,
|
|
310
298
|
security_source=self.sdk_configuration.security,
|
|
311
299
|
),
|
|
312
300
|
request=req,
|
|
@@ -316,41 +304,30 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
316
304
|
|
|
317
305
|
response_data: Any = None
|
|
318
306
|
if utils.match_response(http_res, "200", "application/json"):
|
|
319
|
-
return
|
|
320
|
-
|
|
307
|
+
return unmarshal_json_response(
|
|
308
|
+
models.AerodromeSlipstreamPoolPriceResponse, http_res
|
|
321
309
|
)
|
|
322
310
|
if utils.match_response(http_res, "422", "application/json"):
|
|
323
|
-
response_data =
|
|
324
|
-
|
|
311
|
+
response_data = unmarshal_json_response(
|
|
312
|
+
errors.HTTPValidationErrorData, http_res
|
|
325
313
|
)
|
|
326
|
-
raise errors.HTTPValidationError(
|
|
314
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
327
315
|
if utils.match_response(http_res, "4XX", "*"):
|
|
328
316
|
http_res_text = utils.stream_to_text(http_res)
|
|
329
|
-
raise errors.APIError(
|
|
330
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
331
|
-
)
|
|
317
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
332
318
|
if utils.match_response(http_res, "5XX", "*"):
|
|
333
319
|
http_res_text = utils.stream_to_text(http_res)
|
|
334
|
-
raise errors.APIError(
|
|
335
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
336
|
-
)
|
|
320
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
337
321
|
|
|
338
|
-
|
|
339
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
340
|
-
raise errors.APIError(
|
|
341
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
342
|
-
http_res.status_code,
|
|
343
|
-
http_res_text,
|
|
344
|
-
http_res,
|
|
345
|
-
)
|
|
322
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
346
323
|
|
|
347
|
-
async def
|
|
324
|
+
async def aerodrome_slipstream_pool_price_async(
|
|
348
325
|
self,
|
|
349
326
|
*,
|
|
350
|
-
chain: models.
|
|
351
|
-
token_in:
|
|
352
|
-
token_out:
|
|
353
|
-
tick_spacing: Optional[int] =
|
|
327
|
+
chain: models.V1AerodromeSlipstreamPoolPriceChain,
|
|
328
|
+
token_in: str,
|
|
329
|
+
token_out: str,
|
|
330
|
+
tick_spacing: Optional[int] = None,
|
|
354
331
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
355
332
|
server_url: Optional[str] = None,
|
|
356
333
|
timeout_ms: Optional[int] = None,
|
|
@@ -365,9 +342,9 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
365
342
|
accurate representation of the trade ratios between the two assets, consider using
|
|
366
343
|
the quote endpoint.
|
|
367
344
|
|
|
368
|
-
:param chain:
|
|
369
|
-
:param token_in: The symbol of a token in the pool.
|
|
370
|
-
:param token_out: The symbol of a token in the pool.
|
|
345
|
+
:param chain:
|
|
346
|
+
:param token_in: The symbol or address of a token in the pool.
|
|
347
|
+
:param token_out: The symbol or address of a token in the pool.
|
|
371
348
|
:param tick_spacing: The tick spacing of the pool
|
|
372
349
|
:param retries: Override the default retry configuration for this method
|
|
373
350
|
:param server_url: Override the default server URL for this method
|
|
@@ -384,7 +361,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
384
361
|
else:
|
|
385
362
|
base_url = self._get_url(base_url, url_variables)
|
|
386
363
|
|
|
387
|
-
request = models.
|
|
364
|
+
request = models.V1AerodromeSlipstreamPoolPriceRequest(
|
|
388
365
|
chain=chain,
|
|
389
366
|
token_in=token_in,
|
|
390
367
|
token_out=token_out,
|
|
@@ -393,7 +370,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
393
370
|
|
|
394
371
|
req = self._build_request_async(
|
|
395
372
|
method="GET",
|
|
396
|
-
path="/
|
|
373
|
+
path="/v1/aerodrome_slipstream/pool_price",
|
|
397
374
|
base_url=base_url,
|
|
398
375
|
url_variables=url_variables,
|
|
399
376
|
request=request,
|
|
@@ -404,6 +381,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
404
381
|
accept_header_value="application/json",
|
|
405
382
|
http_headers=http_headers,
|
|
406
383
|
security=self.sdk_configuration.security,
|
|
384
|
+
allow_empty_value=None,
|
|
407
385
|
timeout_ms=timeout_ms,
|
|
408
386
|
)
|
|
409
387
|
|
|
@@ -419,8 +397,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
419
397
|
hook_ctx=HookContext(
|
|
420
398
|
config=self.sdk_configuration,
|
|
421
399
|
base_url=base_url or "",
|
|
422
|
-
operation_id="
|
|
423
|
-
oauth2_scopes=
|
|
400
|
+
operation_id="v1_aerodrome_slipstream_pool_price",
|
|
401
|
+
oauth2_scopes=None,
|
|
424
402
|
security_source=self.sdk_configuration.security,
|
|
425
403
|
),
|
|
426
404
|
request=req,
|
|
@@ -430,45 +408,34 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
430
408
|
|
|
431
409
|
response_data: Any = None
|
|
432
410
|
if utils.match_response(http_res, "200", "application/json"):
|
|
433
|
-
return
|
|
434
|
-
|
|
411
|
+
return unmarshal_json_response(
|
|
412
|
+
models.AerodromeSlipstreamPoolPriceResponse, http_res
|
|
435
413
|
)
|
|
436
414
|
if utils.match_response(http_res, "422", "application/json"):
|
|
437
|
-
response_data =
|
|
438
|
-
|
|
415
|
+
response_data = unmarshal_json_response(
|
|
416
|
+
errors.HTTPValidationErrorData, http_res
|
|
439
417
|
)
|
|
440
|
-
raise errors.HTTPValidationError(
|
|
418
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
441
419
|
if utils.match_response(http_res, "4XX", "*"):
|
|
442
420
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
443
|
-
raise errors.APIError(
|
|
444
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
445
|
-
)
|
|
421
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
446
422
|
if utils.match_response(http_res, "5XX", "*"):
|
|
447
423
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
448
|
-
raise errors.APIError(
|
|
449
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
450
|
-
)
|
|
424
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
451
425
|
|
|
452
|
-
|
|
453
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
454
|
-
raise errors.APIError(
|
|
455
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
456
|
-
http_res.status_code,
|
|
457
|
-
http_res_text,
|
|
458
|
-
http_res,
|
|
459
|
-
)
|
|
426
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
460
427
|
|
|
461
|
-
def
|
|
428
|
+
def aerodrome_slipstream_swap_sell_exactly(
|
|
462
429
|
self,
|
|
463
430
|
*,
|
|
464
|
-
token_in:
|
|
465
|
-
token_out:
|
|
431
|
+
token_in: str,
|
|
432
|
+
token_out: str,
|
|
466
433
|
tick_spacing: int,
|
|
467
434
|
amount_in: Union[
|
|
468
435
|
models.AerodromeSlipstreamSellExactlyRequestAmountIn,
|
|
469
436
|
models.AerodromeSlipstreamSellExactlyRequestAmountInTypedDict,
|
|
470
437
|
],
|
|
471
|
-
chain: models.
|
|
438
|
+
chain: models.AerodromeSlipstreamSellExactlyRequestChain,
|
|
472
439
|
sender: str,
|
|
473
440
|
amount_out_minimum: Optional[
|
|
474
441
|
Union[
|
|
@@ -476,11 +443,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
476
443
|
models.AerodromeSlipstreamSellExactlyRequestAmountOutMinimumTypedDict,
|
|
477
444
|
]
|
|
478
445
|
] = None,
|
|
446
|
+
estimate_gas: Optional[bool] = None,
|
|
479
447
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
480
448
|
server_url: Optional[str] = None,
|
|
481
449
|
timeout_ms: Optional[int] = None,
|
|
482
450
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
483
|
-
) -> models.
|
|
451
|
+
) -> models.TransactionResponse:
|
|
484
452
|
r"""Swap - from Specified Amount
|
|
485
453
|
|
|
486
454
|
This endpoint allows users to trade a specific amount of one token into another
|
|
@@ -492,14 +460,23 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
492
460
|
of the current market conditions, taking into account the liquidity and price
|
|
493
461
|
impact. This endpoint is suitable for users who want to sell a precise quantity of a
|
|
494
462
|
token and are willing to accept the resulting amount of the other token.
|
|
463
|
+
<Info>
|
|
464
|
+
**Required Allowances**
|
|
465
|
+
|
|
466
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
467
|
+
|
|
468
|
+
- `AerodromeSlipstreamRouter`
|
|
469
|
+
</Info>
|
|
495
470
|
|
|
496
|
-
|
|
497
|
-
:param
|
|
471
|
+
|
|
472
|
+
:param token_in: The symbol or address of the token to swap from.
|
|
473
|
+
:param token_out: The symbol or address of the token to swap to.
|
|
498
474
|
:param tick_spacing: The tick spacing of the pool
|
|
499
475
|
:param amount_in: The amount of the token to swap from
|
|
500
|
-
:param chain:
|
|
476
|
+
:param chain:
|
|
501
477
|
:param sender: The address of the transaction sender.
|
|
502
478
|
:param amount_out_minimum: The minimum amount of the token to swap to, defaults to 0
|
|
479
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
503
480
|
:param retries: Override the default retry configuration for this method
|
|
504
481
|
:param server_url: Override the default server URL for this method
|
|
505
482
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -523,11 +500,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
523
500
|
amount_out_minimum=amount_out_minimum,
|
|
524
501
|
chain=chain,
|
|
525
502
|
sender=sender,
|
|
503
|
+
estimate_gas=estimate_gas,
|
|
526
504
|
)
|
|
527
505
|
|
|
528
506
|
req = self._build_request(
|
|
529
507
|
method="POST",
|
|
530
|
-
path="/
|
|
508
|
+
path="/v1/aerodrome_slipstream/swap/sell_exactly",
|
|
531
509
|
base_url=base_url,
|
|
532
510
|
url_variables=url_variables,
|
|
533
511
|
request=request,
|
|
@@ -545,6 +523,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
545
523
|
"json",
|
|
546
524
|
models.AerodromeSlipstreamSellExactlyRequest,
|
|
547
525
|
),
|
|
526
|
+
allow_empty_value=None,
|
|
548
527
|
timeout_ms=timeout_ms,
|
|
549
528
|
)
|
|
550
529
|
|
|
@@ -560,8 +539,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
560
539
|
hook_ctx=HookContext(
|
|
561
540
|
config=self.sdk_configuration,
|
|
562
541
|
base_url=base_url or "",
|
|
563
|
-
operation_id="
|
|
564
|
-
oauth2_scopes=
|
|
542
|
+
operation_id="v1_aerodrome_slipstream_swap_sell_exactly",
|
|
543
|
+
oauth2_scopes=None,
|
|
565
544
|
security_source=self.sdk_configuration.security,
|
|
566
545
|
),
|
|
567
546
|
request=req,
|
|
@@ -571,43 +550,32 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
571
550
|
|
|
572
551
|
response_data: Any = None
|
|
573
552
|
if utils.match_response(http_res, "200", "application/json"):
|
|
574
|
-
return
|
|
553
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
575
554
|
if utils.match_response(http_res, "422", "application/json"):
|
|
576
|
-
response_data =
|
|
577
|
-
|
|
555
|
+
response_data = unmarshal_json_response(
|
|
556
|
+
errors.HTTPValidationErrorData, http_res
|
|
578
557
|
)
|
|
579
|
-
raise errors.HTTPValidationError(
|
|
558
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
580
559
|
if utils.match_response(http_res, "4XX", "*"):
|
|
581
560
|
http_res_text = utils.stream_to_text(http_res)
|
|
582
|
-
raise errors.APIError(
|
|
583
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
584
|
-
)
|
|
561
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
585
562
|
if utils.match_response(http_res, "5XX", "*"):
|
|
586
563
|
http_res_text = utils.stream_to_text(http_res)
|
|
587
|
-
raise errors.APIError(
|
|
588
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
589
|
-
)
|
|
564
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
590
565
|
|
|
591
|
-
|
|
592
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
593
|
-
raise errors.APIError(
|
|
594
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
595
|
-
http_res.status_code,
|
|
596
|
-
http_res_text,
|
|
597
|
-
http_res,
|
|
598
|
-
)
|
|
566
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
599
567
|
|
|
600
|
-
async def
|
|
568
|
+
async def aerodrome_slipstream_swap_sell_exactly_async(
|
|
601
569
|
self,
|
|
602
570
|
*,
|
|
603
|
-
token_in:
|
|
604
|
-
token_out:
|
|
571
|
+
token_in: str,
|
|
572
|
+
token_out: str,
|
|
605
573
|
tick_spacing: int,
|
|
606
574
|
amount_in: Union[
|
|
607
575
|
models.AerodromeSlipstreamSellExactlyRequestAmountIn,
|
|
608
576
|
models.AerodromeSlipstreamSellExactlyRequestAmountInTypedDict,
|
|
609
577
|
],
|
|
610
|
-
chain: models.
|
|
578
|
+
chain: models.AerodromeSlipstreamSellExactlyRequestChain,
|
|
611
579
|
sender: str,
|
|
612
580
|
amount_out_minimum: Optional[
|
|
613
581
|
Union[
|
|
@@ -615,11 +583,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
615
583
|
models.AerodromeSlipstreamSellExactlyRequestAmountOutMinimumTypedDict,
|
|
616
584
|
]
|
|
617
585
|
] = None,
|
|
586
|
+
estimate_gas: Optional[bool] = None,
|
|
618
587
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
619
588
|
server_url: Optional[str] = None,
|
|
620
589
|
timeout_ms: Optional[int] = None,
|
|
621
590
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
622
|
-
) -> models.
|
|
591
|
+
) -> models.TransactionResponse:
|
|
623
592
|
r"""Swap - from Specified Amount
|
|
624
593
|
|
|
625
594
|
This endpoint allows users to trade a specific amount of one token into another
|
|
@@ -631,14 +600,23 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
631
600
|
of the current market conditions, taking into account the liquidity and price
|
|
632
601
|
impact. This endpoint is suitable for users who want to sell a precise quantity of a
|
|
633
602
|
token and are willing to accept the resulting amount of the other token.
|
|
603
|
+
<Info>
|
|
604
|
+
**Required Allowances**
|
|
634
605
|
|
|
635
|
-
|
|
636
|
-
|
|
606
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
607
|
+
|
|
608
|
+
- `AerodromeSlipstreamRouter`
|
|
609
|
+
</Info>
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
:param token_in: The symbol or address of the token to swap from.
|
|
613
|
+
:param token_out: The symbol or address of the token to swap to.
|
|
637
614
|
:param tick_spacing: The tick spacing of the pool
|
|
638
615
|
:param amount_in: The amount of the token to swap from
|
|
639
|
-
:param chain:
|
|
616
|
+
:param chain:
|
|
640
617
|
:param sender: The address of the transaction sender.
|
|
641
618
|
:param amount_out_minimum: The minimum amount of the token to swap to, defaults to 0
|
|
619
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
642
620
|
:param retries: Override the default retry configuration for this method
|
|
643
621
|
:param server_url: Override the default server URL for this method
|
|
644
622
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -662,11 +640,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
662
640
|
amount_out_minimum=amount_out_minimum,
|
|
663
641
|
chain=chain,
|
|
664
642
|
sender=sender,
|
|
643
|
+
estimate_gas=estimate_gas,
|
|
665
644
|
)
|
|
666
645
|
|
|
667
646
|
req = self._build_request_async(
|
|
668
647
|
method="POST",
|
|
669
|
-
path="/
|
|
648
|
+
path="/v1/aerodrome_slipstream/swap/sell_exactly",
|
|
670
649
|
base_url=base_url,
|
|
671
650
|
url_variables=url_variables,
|
|
672
651
|
request=request,
|
|
@@ -684,6 +663,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
684
663
|
"json",
|
|
685
664
|
models.AerodromeSlipstreamSellExactlyRequest,
|
|
686
665
|
),
|
|
666
|
+
allow_empty_value=None,
|
|
687
667
|
timeout_ms=timeout_ms,
|
|
688
668
|
)
|
|
689
669
|
|
|
@@ -699,8 +679,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
699
679
|
hook_ctx=HookContext(
|
|
700
680
|
config=self.sdk_configuration,
|
|
701
681
|
base_url=base_url or "",
|
|
702
|
-
operation_id="
|
|
703
|
-
oauth2_scopes=
|
|
682
|
+
operation_id="v1_aerodrome_slipstream_swap_sell_exactly",
|
|
683
|
+
oauth2_scopes=None,
|
|
704
684
|
security_source=self.sdk_configuration.security,
|
|
705
685
|
),
|
|
706
686
|
request=req,
|
|
@@ -710,37 +690,26 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
710
690
|
|
|
711
691
|
response_data: Any = None
|
|
712
692
|
if utils.match_response(http_res, "200", "application/json"):
|
|
713
|
-
return
|
|
693
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
714
694
|
if utils.match_response(http_res, "422", "application/json"):
|
|
715
|
-
response_data =
|
|
716
|
-
|
|
695
|
+
response_data = unmarshal_json_response(
|
|
696
|
+
errors.HTTPValidationErrorData, http_res
|
|
717
697
|
)
|
|
718
|
-
raise errors.HTTPValidationError(
|
|
698
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
719
699
|
if utils.match_response(http_res, "4XX", "*"):
|
|
720
700
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
721
|
-
raise errors.APIError(
|
|
722
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
723
|
-
)
|
|
701
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
724
702
|
if utils.match_response(http_res, "5XX", "*"):
|
|
725
703
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
726
|
-
raise errors.APIError(
|
|
727
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
728
|
-
)
|
|
704
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
729
705
|
|
|
730
|
-
|
|
731
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
732
|
-
raise errors.APIError(
|
|
733
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
734
|
-
http_res.status_code,
|
|
735
|
-
http_res_text,
|
|
736
|
-
http_res,
|
|
737
|
-
)
|
|
706
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
738
707
|
|
|
739
|
-
def
|
|
708
|
+
def aerodrome_slipstream_swap_buy_exactly(
|
|
740
709
|
self,
|
|
741
710
|
*,
|
|
742
|
-
token_in:
|
|
743
|
-
token_out:
|
|
711
|
+
token_in: str,
|
|
712
|
+
token_out: str,
|
|
744
713
|
tick_spacing: int,
|
|
745
714
|
amount_out: Union[
|
|
746
715
|
models.AerodromeSlipstreamBuyExactlyRequestAmountOut,
|
|
@@ -750,13 +719,14 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
750
719
|
models.AerodromeSlipstreamBuyExactlyRequestAmountInMaximum,
|
|
751
720
|
models.AerodromeSlipstreamBuyExactlyRequestAmountInMaximumTypedDict,
|
|
752
721
|
],
|
|
753
|
-
chain: models.
|
|
722
|
+
chain: models.AerodromeSlipstreamBuyExactlyRequestChain,
|
|
754
723
|
sender: str,
|
|
724
|
+
estimate_gas: Optional[bool] = None,
|
|
755
725
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
756
726
|
server_url: Optional[str] = None,
|
|
757
727
|
timeout_ms: Optional[int] = None,
|
|
758
728
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
759
|
-
) -> models.
|
|
729
|
+
) -> models.TransactionResponse:
|
|
760
730
|
r"""Swap - into Specified Amount
|
|
761
731
|
|
|
762
732
|
This endpoint facilitates the trading of tokens by allowing users to specify the
|
|
@@ -769,14 +739,23 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
769
739
|
transaction is executed with consideration of current market conditions, including
|
|
770
740
|
liquidity and price impact, ensuring that the trade is completed efficiently and
|
|
771
741
|
effectively.
|
|
742
|
+
<Info>
|
|
743
|
+
**Required Allowances**
|
|
744
|
+
|
|
745
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
746
|
+
|
|
747
|
+
- `AerodromeSlipstreamRouter`
|
|
748
|
+
</Info>
|
|
749
|
+
|
|
772
750
|
|
|
773
|
-
:param token_in:
|
|
774
|
-
:param token_out:
|
|
751
|
+
:param token_in: The symbol of the token to swap from.
|
|
752
|
+
:param token_out: The symbol of the token to swap to.
|
|
775
753
|
:param tick_spacing: The tick spacing of the pool
|
|
776
754
|
:param amount_out: The amount of the token to swap to
|
|
777
755
|
:param amount_in_maximum: The maximum amount of the token to swap from
|
|
778
|
-
:param chain:
|
|
756
|
+
:param chain:
|
|
779
757
|
:param sender: The address of the transaction sender.
|
|
758
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
780
759
|
:param retries: Override the default retry configuration for this method
|
|
781
760
|
:param server_url: Override the default server URL for this method
|
|
782
761
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -800,11 +779,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
800
779
|
amount_in_maximum=amount_in_maximum,
|
|
801
780
|
chain=chain,
|
|
802
781
|
sender=sender,
|
|
782
|
+
estimate_gas=estimate_gas,
|
|
803
783
|
)
|
|
804
784
|
|
|
805
785
|
req = self._build_request(
|
|
806
786
|
method="POST",
|
|
807
|
-
path="/
|
|
787
|
+
path="/v1/aerodrome_slipstream/swap/buy_exactly",
|
|
808
788
|
base_url=base_url,
|
|
809
789
|
url_variables=url_variables,
|
|
810
790
|
request=request,
|
|
@@ -822,6 +802,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
822
802
|
"json",
|
|
823
803
|
models.AerodromeSlipstreamBuyExactlyRequest,
|
|
824
804
|
),
|
|
805
|
+
allow_empty_value=None,
|
|
825
806
|
timeout_ms=timeout_ms,
|
|
826
807
|
)
|
|
827
808
|
|
|
@@ -837,8 +818,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
837
818
|
hook_ctx=HookContext(
|
|
838
819
|
config=self.sdk_configuration,
|
|
839
820
|
base_url=base_url or "",
|
|
840
|
-
operation_id="
|
|
841
|
-
oauth2_scopes=
|
|
821
|
+
operation_id="v1_aerodrome_slipstream_swap_buy_exactly",
|
|
822
|
+
oauth2_scopes=None,
|
|
842
823
|
security_source=self.sdk_configuration.security,
|
|
843
824
|
),
|
|
844
825
|
request=req,
|
|
@@ -848,37 +829,26 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
848
829
|
|
|
849
830
|
response_data: Any = None
|
|
850
831
|
if utils.match_response(http_res, "200", "application/json"):
|
|
851
|
-
return
|
|
832
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
852
833
|
if utils.match_response(http_res, "422", "application/json"):
|
|
853
|
-
response_data =
|
|
854
|
-
|
|
834
|
+
response_data = unmarshal_json_response(
|
|
835
|
+
errors.HTTPValidationErrorData, http_res
|
|
855
836
|
)
|
|
856
|
-
raise errors.HTTPValidationError(
|
|
837
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
857
838
|
if utils.match_response(http_res, "4XX", "*"):
|
|
858
839
|
http_res_text = utils.stream_to_text(http_res)
|
|
859
|
-
raise errors.APIError(
|
|
860
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
861
|
-
)
|
|
840
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
862
841
|
if utils.match_response(http_res, "5XX", "*"):
|
|
863
842
|
http_res_text = utils.stream_to_text(http_res)
|
|
864
|
-
raise errors.APIError(
|
|
865
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
866
|
-
)
|
|
843
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
867
844
|
|
|
868
|
-
|
|
869
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
870
|
-
raise errors.APIError(
|
|
871
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
872
|
-
http_res.status_code,
|
|
873
|
-
http_res_text,
|
|
874
|
-
http_res,
|
|
875
|
-
)
|
|
845
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
876
846
|
|
|
877
|
-
async def
|
|
847
|
+
async def aerodrome_slipstream_swap_buy_exactly_async(
|
|
878
848
|
self,
|
|
879
849
|
*,
|
|
880
|
-
token_in:
|
|
881
|
-
token_out:
|
|
850
|
+
token_in: str,
|
|
851
|
+
token_out: str,
|
|
882
852
|
tick_spacing: int,
|
|
883
853
|
amount_out: Union[
|
|
884
854
|
models.AerodromeSlipstreamBuyExactlyRequestAmountOut,
|
|
@@ -888,13 +858,14 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
888
858
|
models.AerodromeSlipstreamBuyExactlyRequestAmountInMaximum,
|
|
889
859
|
models.AerodromeSlipstreamBuyExactlyRequestAmountInMaximumTypedDict,
|
|
890
860
|
],
|
|
891
|
-
chain: models.
|
|
861
|
+
chain: models.AerodromeSlipstreamBuyExactlyRequestChain,
|
|
892
862
|
sender: str,
|
|
863
|
+
estimate_gas: Optional[bool] = None,
|
|
893
864
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
894
865
|
server_url: Optional[str] = None,
|
|
895
866
|
timeout_ms: Optional[int] = None,
|
|
896
867
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
897
|
-
) -> models.
|
|
868
|
+
) -> models.TransactionResponse:
|
|
898
869
|
r"""Swap - into Specified Amount
|
|
899
870
|
|
|
900
871
|
This endpoint facilitates the trading of tokens by allowing users to specify the
|
|
@@ -907,14 +878,23 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
907
878
|
transaction is executed with consideration of current market conditions, including
|
|
908
879
|
liquidity and price impact, ensuring that the trade is completed efficiently and
|
|
909
880
|
effectively.
|
|
881
|
+
<Info>
|
|
882
|
+
**Required Allowances**
|
|
883
|
+
|
|
884
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
885
|
+
|
|
886
|
+
- `AerodromeSlipstreamRouter`
|
|
887
|
+
</Info>
|
|
910
888
|
|
|
911
|
-
|
|
912
|
-
:param
|
|
889
|
+
|
|
890
|
+
:param token_in: The symbol of the token to swap from.
|
|
891
|
+
:param token_out: The symbol of the token to swap to.
|
|
913
892
|
:param tick_spacing: The tick spacing of the pool
|
|
914
893
|
:param amount_out: The amount of the token to swap to
|
|
915
894
|
:param amount_in_maximum: The maximum amount of the token to swap from
|
|
916
|
-
:param chain:
|
|
895
|
+
:param chain:
|
|
917
896
|
:param sender: The address of the transaction sender.
|
|
897
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
918
898
|
:param retries: Override the default retry configuration for this method
|
|
919
899
|
:param server_url: Override the default server URL for this method
|
|
920
900
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -938,11 +918,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
938
918
|
amount_in_maximum=amount_in_maximum,
|
|
939
919
|
chain=chain,
|
|
940
920
|
sender=sender,
|
|
921
|
+
estimate_gas=estimate_gas,
|
|
941
922
|
)
|
|
942
923
|
|
|
943
924
|
req = self._build_request_async(
|
|
944
925
|
method="POST",
|
|
945
|
-
path="/
|
|
926
|
+
path="/v1/aerodrome_slipstream/swap/buy_exactly",
|
|
946
927
|
base_url=base_url,
|
|
947
928
|
url_variables=url_variables,
|
|
948
929
|
request=request,
|
|
@@ -960,6 +941,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
960
941
|
"json",
|
|
961
942
|
models.AerodromeSlipstreamBuyExactlyRequest,
|
|
962
943
|
),
|
|
944
|
+
allow_empty_value=None,
|
|
963
945
|
timeout_ms=timeout_ms,
|
|
964
946
|
)
|
|
965
947
|
|
|
@@ -975,8 +957,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
975
957
|
hook_ctx=HookContext(
|
|
976
958
|
config=self.sdk_configuration,
|
|
977
959
|
base_url=base_url or "",
|
|
978
|
-
operation_id="
|
|
979
|
-
oauth2_scopes=
|
|
960
|
+
operation_id="v1_aerodrome_slipstream_swap_buy_exactly",
|
|
961
|
+
oauth2_scopes=None,
|
|
980
962
|
security_source=self.sdk_configuration.security,
|
|
981
963
|
),
|
|
982
964
|
request=req,
|
|
@@ -986,37 +968,26 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
986
968
|
|
|
987
969
|
response_data: Any = None
|
|
988
970
|
if utils.match_response(http_res, "200", "application/json"):
|
|
989
|
-
return
|
|
971
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
990
972
|
if utils.match_response(http_res, "422", "application/json"):
|
|
991
|
-
response_data =
|
|
992
|
-
|
|
973
|
+
response_data = unmarshal_json_response(
|
|
974
|
+
errors.HTTPValidationErrorData, http_res
|
|
993
975
|
)
|
|
994
|
-
raise errors.HTTPValidationError(
|
|
976
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
995
977
|
if utils.match_response(http_res, "4XX", "*"):
|
|
996
978
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
997
|
-
raise errors.APIError(
|
|
998
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
999
|
-
)
|
|
979
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1000
980
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1001
981
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1002
|
-
raise errors.APIError(
|
|
1003
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1004
|
-
)
|
|
982
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1005
983
|
|
|
1006
|
-
|
|
1007
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1008
|
-
raise errors.APIError(
|
|
1009
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1010
|
-
http_res.status_code,
|
|
1011
|
-
http_res_text,
|
|
1012
|
-
http_res,
|
|
1013
|
-
)
|
|
984
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1014
985
|
|
|
1015
|
-
def
|
|
986
|
+
def aerodrome_slipstream_liquidity_provision_mint(
|
|
1016
987
|
self,
|
|
1017
988
|
*,
|
|
1018
|
-
token0:
|
|
1019
|
-
token1:
|
|
989
|
+
token0: str,
|
|
990
|
+
token1: str,
|
|
1020
991
|
tick_spacing: int,
|
|
1021
992
|
tick_lower: int,
|
|
1022
993
|
tick_upper: int,
|
|
@@ -1036,14 +1007,15 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1036
1007
|
models.AerodromeSlipstreamMintLiquidityProvisionRequestAmount1Min,
|
|
1037
1008
|
models.AerodromeSlipstreamMintLiquidityProvisionRequestAmount1MinTypedDict,
|
|
1038
1009
|
],
|
|
1039
|
-
chain: models.
|
|
1010
|
+
chain: models.AerodromeSlipstreamMintLiquidityProvisionRequestChain,
|
|
1040
1011
|
sender: str,
|
|
1041
1012
|
recipient: OptionalNullable[str] = UNSET,
|
|
1013
|
+
estimate_gas: Optional[bool] = None,
|
|
1042
1014
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1043
1015
|
server_url: Optional[str] = None,
|
|
1044
1016
|
timeout_ms: Optional[int] = None,
|
|
1045
1017
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1046
|
-
) -> models.
|
|
1018
|
+
) -> models.TransactionResponse:
|
|
1047
1019
|
r"""Open a New LP Position
|
|
1048
1020
|
|
|
1049
1021
|
Initiate a new Liquidity Provider (LP) position by minting tokens.
|
|
@@ -1055,9 +1027,17 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1055
1027
|
necessary information to manage their newly minted position. This functionality is
|
|
1056
1028
|
crucial for users looking to expand their liquidity provision activities, offering
|
|
1057
1029
|
them the opportunity to engage in decentralized finance (DeFi) markets effectively.
|
|
1030
|
+
<Info>
|
|
1031
|
+
**Required Allowances**
|
|
1058
1032
|
|
|
1059
|
-
|
|
1060
|
-
|
|
1033
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1034
|
+
|
|
1035
|
+
- `AerodromeSlipstreamNonfungiblePositionManager`
|
|
1036
|
+
</Info>
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
:param token0: The symbol or address of the first token in the pair.
|
|
1040
|
+
:param token1: The symbol or address of the second token in the pair.
|
|
1061
1041
|
:param tick_spacing: The tick spacing of the pool
|
|
1062
1042
|
:param tick_lower: The lower tick of the range to mint the position in
|
|
1063
1043
|
:param tick_upper: The upper tick of the range to mint the position in
|
|
@@ -1065,9 +1045,10 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1065
1045
|
:param amount1_desired: The desired amount of the second token to deposit
|
|
1066
1046
|
:param amount0_min: The minimum amount of the first token to deposit
|
|
1067
1047
|
:param amount1_min: The minimum amount of the second token to deposit
|
|
1068
|
-
:param chain:
|
|
1048
|
+
:param chain:
|
|
1069
1049
|
:param sender: The address of the transaction sender.
|
|
1070
1050
|
:param recipient: The address that will receive the LP tokens
|
|
1051
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
1071
1052
|
:param retries: Override the default retry configuration for this method
|
|
1072
1053
|
:param server_url: Override the default server URL for this method
|
|
1073
1054
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1096,11 +1077,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1096
1077
|
recipient=recipient,
|
|
1097
1078
|
chain=chain,
|
|
1098
1079
|
sender=sender,
|
|
1080
|
+
estimate_gas=estimate_gas,
|
|
1099
1081
|
)
|
|
1100
1082
|
|
|
1101
1083
|
req = self._build_request(
|
|
1102
1084
|
method="POST",
|
|
1103
|
-
path="/
|
|
1085
|
+
path="/v1/aerodrome_slipstream/liquidity_provision/mint",
|
|
1104
1086
|
base_url=base_url,
|
|
1105
1087
|
url_variables=url_variables,
|
|
1106
1088
|
request=request,
|
|
@@ -1118,6 +1100,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1118
1100
|
"json",
|
|
1119
1101
|
models.AerodromeSlipstreamMintLiquidityProvisionRequest,
|
|
1120
1102
|
),
|
|
1103
|
+
allow_empty_value=None,
|
|
1121
1104
|
timeout_ms=timeout_ms,
|
|
1122
1105
|
)
|
|
1123
1106
|
|
|
@@ -1133,8 +1116,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1133
1116
|
hook_ctx=HookContext(
|
|
1134
1117
|
config=self.sdk_configuration,
|
|
1135
1118
|
base_url=base_url or "",
|
|
1136
|
-
operation_id="
|
|
1137
|
-
oauth2_scopes=
|
|
1119
|
+
operation_id="v1_aerodrome_slipstream_liquidity_provision_mint",
|
|
1120
|
+
oauth2_scopes=None,
|
|
1138
1121
|
security_source=self.sdk_configuration.security,
|
|
1139
1122
|
),
|
|
1140
1123
|
request=req,
|
|
@@ -1144,37 +1127,26 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1144
1127
|
|
|
1145
1128
|
response_data: Any = None
|
|
1146
1129
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1147
|
-
return
|
|
1130
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
1148
1131
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1149
|
-
response_data =
|
|
1150
|
-
|
|
1132
|
+
response_data = unmarshal_json_response(
|
|
1133
|
+
errors.HTTPValidationErrorData, http_res
|
|
1151
1134
|
)
|
|
1152
|
-
raise errors.HTTPValidationError(
|
|
1135
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1153
1136
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1154
1137
|
http_res_text = utils.stream_to_text(http_res)
|
|
1155
|
-
raise errors.APIError(
|
|
1156
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1157
|
-
)
|
|
1138
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1158
1139
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1159
1140
|
http_res_text = utils.stream_to_text(http_res)
|
|
1160
|
-
raise errors.APIError(
|
|
1161
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1162
|
-
)
|
|
1141
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1163
1142
|
|
|
1164
|
-
|
|
1165
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1166
|
-
raise errors.APIError(
|
|
1167
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1168
|
-
http_res.status_code,
|
|
1169
|
-
http_res_text,
|
|
1170
|
-
http_res,
|
|
1171
|
-
)
|
|
1143
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1172
1144
|
|
|
1173
|
-
async def
|
|
1145
|
+
async def aerodrome_slipstream_liquidity_provision_mint_async(
|
|
1174
1146
|
self,
|
|
1175
1147
|
*,
|
|
1176
|
-
token0:
|
|
1177
|
-
token1:
|
|
1148
|
+
token0: str,
|
|
1149
|
+
token1: str,
|
|
1178
1150
|
tick_spacing: int,
|
|
1179
1151
|
tick_lower: int,
|
|
1180
1152
|
tick_upper: int,
|
|
@@ -1194,14 +1166,15 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1194
1166
|
models.AerodromeSlipstreamMintLiquidityProvisionRequestAmount1Min,
|
|
1195
1167
|
models.AerodromeSlipstreamMintLiquidityProvisionRequestAmount1MinTypedDict,
|
|
1196
1168
|
],
|
|
1197
|
-
chain: models.
|
|
1169
|
+
chain: models.AerodromeSlipstreamMintLiquidityProvisionRequestChain,
|
|
1198
1170
|
sender: str,
|
|
1199
1171
|
recipient: OptionalNullable[str] = UNSET,
|
|
1172
|
+
estimate_gas: Optional[bool] = None,
|
|
1200
1173
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1201
1174
|
server_url: Optional[str] = None,
|
|
1202
1175
|
timeout_ms: Optional[int] = None,
|
|
1203
1176
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1204
|
-
) -> models.
|
|
1177
|
+
) -> models.TransactionResponse:
|
|
1205
1178
|
r"""Open a New LP Position
|
|
1206
1179
|
|
|
1207
1180
|
Initiate a new Liquidity Provider (LP) position by minting tokens.
|
|
@@ -1213,9 +1186,17 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1213
1186
|
necessary information to manage their newly minted position. This functionality is
|
|
1214
1187
|
crucial for users looking to expand their liquidity provision activities, offering
|
|
1215
1188
|
them the opportunity to engage in decentralized finance (DeFi) markets effectively.
|
|
1189
|
+
<Info>
|
|
1190
|
+
**Required Allowances**
|
|
1191
|
+
|
|
1192
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1193
|
+
|
|
1194
|
+
- `AerodromeSlipstreamNonfungiblePositionManager`
|
|
1195
|
+
</Info>
|
|
1196
|
+
|
|
1216
1197
|
|
|
1217
|
-
:param token0:
|
|
1218
|
-
:param token1:
|
|
1198
|
+
:param token0: The symbol or address of the first token in the pair.
|
|
1199
|
+
:param token1: The symbol or address of the second token in the pair.
|
|
1219
1200
|
:param tick_spacing: The tick spacing of the pool
|
|
1220
1201
|
:param tick_lower: The lower tick of the range to mint the position in
|
|
1221
1202
|
:param tick_upper: The upper tick of the range to mint the position in
|
|
@@ -1223,9 +1204,10 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1223
1204
|
:param amount1_desired: The desired amount of the second token to deposit
|
|
1224
1205
|
:param amount0_min: The minimum amount of the first token to deposit
|
|
1225
1206
|
:param amount1_min: The minimum amount of the second token to deposit
|
|
1226
|
-
:param chain:
|
|
1207
|
+
:param chain:
|
|
1227
1208
|
:param sender: The address of the transaction sender.
|
|
1228
1209
|
:param recipient: The address that will receive the LP tokens
|
|
1210
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
1229
1211
|
:param retries: Override the default retry configuration for this method
|
|
1230
1212
|
:param server_url: Override the default server URL for this method
|
|
1231
1213
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1254,11 +1236,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1254
1236
|
recipient=recipient,
|
|
1255
1237
|
chain=chain,
|
|
1256
1238
|
sender=sender,
|
|
1239
|
+
estimate_gas=estimate_gas,
|
|
1257
1240
|
)
|
|
1258
1241
|
|
|
1259
1242
|
req = self._build_request_async(
|
|
1260
1243
|
method="POST",
|
|
1261
|
-
path="/
|
|
1244
|
+
path="/v1/aerodrome_slipstream/liquidity_provision/mint",
|
|
1262
1245
|
base_url=base_url,
|
|
1263
1246
|
url_variables=url_variables,
|
|
1264
1247
|
request=request,
|
|
@@ -1276,6 +1259,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1276
1259
|
"json",
|
|
1277
1260
|
models.AerodromeSlipstreamMintLiquidityProvisionRequest,
|
|
1278
1261
|
),
|
|
1262
|
+
allow_empty_value=None,
|
|
1279
1263
|
timeout_ms=timeout_ms,
|
|
1280
1264
|
)
|
|
1281
1265
|
|
|
@@ -1291,8 +1275,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1291
1275
|
hook_ctx=HookContext(
|
|
1292
1276
|
config=self.sdk_configuration,
|
|
1293
1277
|
base_url=base_url or "",
|
|
1294
|
-
operation_id="
|
|
1295
|
-
oauth2_scopes=
|
|
1278
|
+
operation_id="v1_aerodrome_slipstream_liquidity_provision_mint",
|
|
1279
|
+
oauth2_scopes=None,
|
|
1296
1280
|
security_source=self.sdk_configuration.security,
|
|
1297
1281
|
),
|
|
1298
1282
|
request=req,
|
|
@@ -1302,33 +1286,22 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1302
1286
|
|
|
1303
1287
|
response_data: Any = None
|
|
1304
1288
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1305
|
-
return
|
|
1289
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
1306
1290
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1307
|
-
response_data =
|
|
1308
|
-
|
|
1291
|
+
response_data = unmarshal_json_response(
|
|
1292
|
+
errors.HTTPValidationErrorData, http_res
|
|
1309
1293
|
)
|
|
1310
|
-
raise errors.HTTPValidationError(
|
|
1294
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1311
1295
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1312
1296
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1313
|
-
raise errors.APIError(
|
|
1314
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1315
|
-
)
|
|
1297
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1316
1298
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1317
1299
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1318
|
-
raise errors.APIError(
|
|
1319
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1320
|
-
)
|
|
1300
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1321
1301
|
|
|
1322
|
-
|
|
1323
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1324
|
-
raise errors.APIError(
|
|
1325
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1326
|
-
http_res.status_code,
|
|
1327
|
-
http_res_text,
|
|
1328
|
-
http_res,
|
|
1329
|
-
)
|
|
1302
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1330
1303
|
|
|
1331
|
-
def
|
|
1304
|
+
def aerodrome_slipstream_liquidity_provision_increase(
|
|
1332
1305
|
self,
|
|
1333
1306
|
*,
|
|
1334
1307
|
token_id: int,
|
|
@@ -1348,13 +1321,14 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1348
1321
|
models.AerodromeSlipstreamIncreaseLiquidityProvisionRequestAmount1Min,
|
|
1349
1322
|
models.AerodromeSlipstreamIncreaseLiquidityProvisionRequestAmount1MinTypedDict,
|
|
1350
1323
|
],
|
|
1351
|
-
chain: models.
|
|
1324
|
+
chain: models.AerodromeSlipstreamIncreaseLiquidityProvisionRequestChain,
|
|
1352
1325
|
sender: str,
|
|
1326
|
+
estimate_gas: Optional[bool] = None,
|
|
1353
1327
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1354
1328
|
server_url: Optional[str] = None,
|
|
1355
1329
|
timeout_ms: Optional[int] = None,
|
|
1356
1330
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1357
|
-
) -> models.
|
|
1331
|
+
) -> models.TransactionResponse:
|
|
1358
1332
|
r"""Increase an LP Position
|
|
1359
1333
|
|
|
1360
1334
|
Increase the liquidity of an existing Liquidity Provider (LP) position.
|
|
@@ -1368,14 +1342,23 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1368
1342
|
vital for users aiming to optimize their liquidity provision strategy, enabling them
|
|
1369
1343
|
to adapt to market conditions and maximize their returns in decentralized finance
|
|
1370
1344
|
(DeFi) markets.
|
|
1345
|
+
<Info>
|
|
1346
|
+
**Required Allowances**
|
|
1347
|
+
|
|
1348
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1349
|
+
|
|
1350
|
+
- `AerodromeSlipstreamRouter`
|
|
1351
|
+
</Info>
|
|
1352
|
+
|
|
1371
1353
|
|
|
1372
1354
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
1373
1355
|
:param amount0_desired: The desired amount of the first token to deposit
|
|
1374
1356
|
:param amount1_desired: The desired amount of the second token to deposit
|
|
1375
1357
|
:param amount0_min: The minimum amount of the first token to deposit
|
|
1376
1358
|
:param amount1_min: The minimum amount of the second token to deposit
|
|
1377
|
-
:param chain:
|
|
1359
|
+
:param chain:
|
|
1378
1360
|
:param sender: The address of the transaction sender.
|
|
1361
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
1379
1362
|
:param retries: Override the default retry configuration for this method
|
|
1380
1363
|
:param server_url: Override the default server URL for this method
|
|
1381
1364
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1399,11 +1382,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1399
1382
|
amount1_min=amount1_min,
|
|
1400
1383
|
chain=chain,
|
|
1401
1384
|
sender=sender,
|
|
1385
|
+
estimate_gas=estimate_gas,
|
|
1402
1386
|
)
|
|
1403
1387
|
|
|
1404
1388
|
req = self._build_request(
|
|
1405
1389
|
method="POST",
|
|
1406
|
-
path="/
|
|
1390
|
+
path="/v1/aerodrome_slipstream/liquidity_provision/increase",
|
|
1407
1391
|
base_url=base_url,
|
|
1408
1392
|
url_variables=url_variables,
|
|
1409
1393
|
request=request,
|
|
@@ -1421,6 +1405,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1421
1405
|
"json",
|
|
1422
1406
|
models.AerodromeSlipstreamIncreaseLiquidityProvisionRequest,
|
|
1423
1407
|
),
|
|
1408
|
+
allow_empty_value=None,
|
|
1424
1409
|
timeout_ms=timeout_ms,
|
|
1425
1410
|
)
|
|
1426
1411
|
|
|
@@ -1436,8 +1421,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1436
1421
|
hook_ctx=HookContext(
|
|
1437
1422
|
config=self.sdk_configuration,
|
|
1438
1423
|
base_url=base_url or "",
|
|
1439
|
-
operation_id="
|
|
1440
|
-
oauth2_scopes=
|
|
1424
|
+
operation_id="v1_aerodrome_slipstream_liquidity_provision_increase",
|
|
1425
|
+
oauth2_scopes=None,
|
|
1441
1426
|
security_source=self.sdk_configuration.security,
|
|
1442
1427
|
),
|
|
1443
1428
|
request=req,
|
|
@@ -1447,33 +1432,22 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1447
1432
|
|
|
1448
1433
|
response_data: Any = None
|
|
1449
1434
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1450
|
-
return
|
|
1435
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
1451
1436
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1452
|
-
response_data =
|
|
1453
|
-
|
|
1437
|
+
response_data = unmarshal_json_response(
|
|
1438
|
+
errors.HTTPValidationErrorData, http_res
|
|
1454
1439
|
)
|
|
1455
|
-
raise errors.HTTPValidationError(
|
|
1440
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1456
1441
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1457
1442
|
http_res_text = utils.stream_to_text(http_res)
|
|
1458
|
-
raise errors.APIError(
|
|
1459
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1460
|
-
)
|
|
1443
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1461
1444
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1462
1445
|
http_res_text = utils.stream_to_text(http_res)
|
|
1463
|
-
raise errors.APIError(
|
|
1464
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1465
|
-
)
|
|
1446
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1466
1447
|
|
|
1467
|
-
|
|
1468
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1469
|
-
raise errors.APIError(
|
|
1470
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1471
|
-
http_res.status_code,
|
|
1472
|
-
http_res_text,
|
|
1473
|
-
http_res,
|
|
1474
|
-
)
|
|
1448
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1475
1449
|
|
|
1476
|
-
async def
|
|
1450
|
+
async def aerodrome_slipstream_liquidity_provision_increase_async(
|
|
1477
1451
|
self,
|
|
1478
1452
|
*,
|
|
1479
1453
|
token_id: int,
|
|
@@ -1493,13 +1467,14 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1493
1467
|
models.AerodromeSlipstreamIncreaseLiquidityProvisionRequestAmount1Min,
|
|
1494
1468
|
models.AerodromeSlipstreamIncreaseLiquidityProvisionRequestAmount1MinTypedDict,
|
|
1495
1469
|
],
|
|
1496
|
-
chain: models.
|
|
1470
|
+
chain: models.AerodromeSlipstreamIncreaseLiquidityProvisionRequestChain,
|
|
1497
1471
|
sender: str,
|
|
1472
|
+
estimate_gas: Optional[bool] = None,
|
|
1498
1473
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1499
1474
|
server_url: Optional[str] = None,
|
|
1500
1475
|
timeout_ms: Optional[int] = None,
|
|
1501
1476
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1502
|
-
) -> models.
|
|
1477
|
+
) -> models.TransactionResponse:
|
|
1503
1478
|
r"""Increase an LP Position
|
|
1504
1479
|
|
|
1505
1480
|
Increase the liquidity of an existing Liquidity Provider (LP) position.
|
|
@@ -1513,14 +1488,23 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1513
1488
|
vital for users aiming to optimize their liquidity provision strategy, enabling them
|
|
1514
1489
|
to adapt to market conditions and maximize their returns in decentralized finance
|
|
1515
1490
|
(DeFi) markets.
|
|
1491
|
+
<Info>
|
|
1492
|
+
**Required Allowances**
|
|
1493
|
+
|
|
1494
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1495
|
+
|
|
1496
|
+
- `AerodromeSlipstreamRouter`
|
|
1497
|
+
</Info>
|
|
1498
|
+
|
|
1516
1499
|
|
|
1517
1500
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
1518
1501
|
:param amount0_desired: The desired amount of the first token to deposit
|
|
1519
1502
|
:param amount1_desired: The desired amount of the second token to deposit
|
|
1520
1503
|
:param amount0_min: The minimum amount of the first token to deposit
|
|
1521
1504
|
:param amount1_min: The minimum amount of the second token to deposit
|
|
1522
|
-
:param chain:
|
|
1505
|
+
:param chain:
|
|
1523
1506
|
:param sender: The address of the transaction sender.
|
|
1507
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
1524
1508
|
:param retries: Override the default retry configuration for this method
|
|
1525
1509
|
:param server_url: Override the default server URL for this method
|
|
1526
1510
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1544,11 +1528,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1544
1528
|
amount1_min=amount1_min,
|
|
1545
1529
|
chain=chain,
|
|
1546
1530
|
sender=sender,
|
|
1531
|
+
estimate_gas=estimate_gas,
|
|
1547
1532
|
)
|
|
1548
1533
|
|
|
1549
1534
|
req = self._build_request_async(
|
|
1550
1535
|
method="POST",
|
|
1551
|
-
path="/
|
|
1536
|
+
path="/v1/aerodrome_slipstream/liquidity_provision/increase",
|
|
1552
1537
|
base_url=base_url,
|
|
1553
1538
|
url_variables=url_variables,
|
|
1554
1539
|
request=request,
|
|
@@ -1566,6 +1551,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1566
1551
|
"json",
|
|
1567
1552
|
models.AerodromeSlipstreamIncreaseLiquidityProvisionRequest,
|
|
1568
1553
|
),
|
|
1554
|
+
allow_empty_value=None,
|
|
1569
1555
|
timeout_ms=timeout_ms,
|
|
1570
1556
|
)
|
|
1571
1557
|
|
|
@@ -1581,8 +1567,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1581
1567
|
hook_ctx=HookContext(
|
|
1582
1568
|
config=self.sdk_configuration,
|
|
1583
1569
|
base_url=base_url or "",
|
|
1584
|
-
operation_id="
|
|
1585
|
-
oauth2_scopes=
|
|
1570
|
+
operation_id="v1_aerodrome_slipstream_liquidity_provision_increase",
|
|
1571
|
+
oauth2_scopes=None,
|
|
1586
1572
|
security_source=self.sdk_configuration.security,
|
|
1587
1573
|
),
|
|
1588
1574
|
request=req,
|
|
@@ -1592,33 +1578,22 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1592
1578
|
|
|
1593
1579
|
response_data: Any = None
|
|
1594
1580
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1595
|
-
return
|
|
1581
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
1596
1582
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1597
|
-
response_data =
|
|
1598
|
-
|
|
1583
|
+
response_data = unmarshal_json_response(
|
|
1584
|
+
errors.HTTPValidationErrorData, http_res
|
|
1599
1585
|
)
|
|
1600
|
-
raise errors.HTTPValidationError(
|
|
1586
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1601
1587
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1602
1588
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1603
|
-
raise errors.APIError(
|
|
1604
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1605
|
-
)
|
|
1589
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1606
1590
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1607
1591
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1608
|
-
raise errors.APIError(
|
|
1609
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1610
|
-
)
|
|
1592
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1611
1593
|
|
|
1612
|
-
|
|
1613
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1614
|
-
raise errors.APIError(
|
|
1615
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1616
|
-
http_res.status_code,
|
|
1617
|
-
http_res_text,
|
|
1618
|
-
http_res,
|
|
1619
|
-
)
|
|
1594
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1620
1595
|
|
|
1621
|
-
def
|
|
1596
|
+
def aerodrome_slipstream_liquidity_provision_withdraw(
|
|
1622
1597
|
self,
|
|
1623
1598
|
*,
|
|
1624
1599
|
token_id: int,
|
|
@@ -1626,13 +1601,14 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1626
1601
|
models.AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawal,
|
|
1627
1602
|
models.AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict,
|
|
1628
1603
|
],
|
|
1629
|
-
chain: models.
|
|
1604
|
+
chain: models.AerodromeSlipstreamWithdrawLiquidityProvisionRequestChain,
|
|
1630
1605
|
sender: str,
|
|
1606
|
+
estimate_gas: Optional[bool] = None,
|
|
1631
1607
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1632
1608
|
server_url: Optional[str] = None,
|
|
1633
1609
|
timeout_ms: Optional[int] = None,
|
|
1634
1610
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1635
|
-
) -> models.
|
|
1611
|
+
) -> models.TransactionResponse:
|
|
1636
1612
|
r"""Withdraw an LP Position
|
|
1637
1613
|
|
|
1638
1614
|
Withdraw an existing Liquidity Provider (LP) position.
|
|
@@ -1646,11 +1622,20 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1646
1622
|
assets and potentially reallocate them to other investment opportunities. The
|
|
1647
1623
|
endpoint ensures a smooth and secure withdrawal process, facilitating users'
|
|
1648
1624
|
strategic management of their decentralized finance (DeFi) portfolios.
|
|
1625
|
+
<Info>
|
|
1626
|
+
**Required Allowances**
|
|
1627
|
+
|
|
1628
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1629
|
+
|
|
1630
|
+
- `AerodromeSlipstreamNonfungiblePositionManager`
|
|
1631
|
+
</Info>
|
|
1632
|
+
|
|
1649
1633
|
|
|
1650
1634
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
1651
1635
|
:param percentage_for_withdrawal: How much liquidity to take out in percentage.
|
|
1652
|
-
:param chain:
|
|
1636
|
+
:param chain:
|
|
1653
1637
|
:param sender: The address of the transaction sender.
|
|
1638
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
1654
1639
|
:param retries: Override the default retry configuration for this method
|
|
1655
1640
|
:param server_url: Override the default server URL for this method
|
|
1656
1641
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1671,11 +1656,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1671
1656
|
percentage_for_withdrawal=percentage_for_withdrawal,
|
|
1672
1657
|
chain=chain,
|
|
1673
1658
|
sender=sender,
|
|
1659
|
+
estimate_gas=estimate_gas,
|
|
1674
1660
|
)
|
|
1675
1661
|
|
|
1676
1662
|
req = self._build_request(
|
|
1677
1663
|
method="POST",
|
|
1678
|
-
path="/
|
|
1664
|
+
path="/v1/aerodrome_slipstream/liquidity_provision/withdraw",
|
|
1679
1665
|
base_url=base_url,
|
|
1680
1666
|
url_variables=url_variables,
|
|
1681
1667
|
request=request,
|
|
@@ -1693,6 +1679,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1693
1679
|
"json",
|
|
1694
1680
|
models.AerodromeSlipstreamWithdrawLiquidityProvisionRequest,
|
|
1695
1681
|
),
|
|
1682
|
+
allow_empty_value=None,
|
|
1696
1683
|
timeout_ms=timeout_ms,
|
|
1697
1684
|
)
|
|
1698
1685
|
|
|
@@ -1708,8 +1695,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1708
1695
|
hook_ctx=HookContext(
|
|
1709
1696
|
config=self.sdk_configuration,
|
|
1710
1697
|
base_url=base_url or "",
|
|
1711
|
-
operation_id="
|
|
1712
|
-
oauth2_scopes=
|
|
1698
|
+
operation_id="v1_aerodrome_slipstream_liquidity_provision_withdraw",
|
|
1699
|
+
oauth2_scopes=None,
|
|
1713
1700
|
security_source=self.sdk_configuration.security,
|
|
1714
1701
|
),
|
|
1715
1702
|
request=req,
|
|
@@ -1719,33 +1706,22 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1719
1706
|
|
|
1720
1707
|
response_data: Any = None
|
|
1721
1708
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1722
|
-
return
|
|
1709
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
1723
1710
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1724
|
-
response_data =
|
|
1725
|
-
|
|
1711
|
+
response_data = unmarshal_json_response(
|
|
1712
|
+
errors.HTTPValidationErrorData, http_res
|
|
1726
1713
|
)
|
|
1727
|
-
raise errors.HTTPValidationError(
|
|
1714
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1728
1715
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1729
1716
|
http_res_text = utils.stream_to_text(http_res)
|
|
1730
|
-
raise errors.APIError(
|
|
1731
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1732
|
-
)
|
|
1717
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1733
1718
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1734
1719
|
http_res_text = utils.stream_to_text(http_res)
|
|
1735
|
-
raise errors.APIError(
|
|
1736
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1737
|
-
)
|
|
1720
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1738
1721
|
|
|
1739
|
-
|
|
1740
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1741
|
-
raise errors.APIError(
|
|
1742
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1743
|
-
http_res.status_code,
|
|
1744
|
-
http_res_text,
|
|
1745
|
-
http_res,
|
|
1746
|
-
)
|
|
1722
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1747
1723
|
|
|
1748
|
-
async def
|
|
1724
|
+
async def aerodrome_slipstream_liquidity_provision_withdraw_async(
|
|
1749
1725
|
self,
|
|
1750
1726
|
*,
|
|
1751
1727
|
token_id: int,
|
|
@@ -1753,13 +1729,14 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1753
1729
|
models.AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawal,
|
|
1754
1730
|
models.AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict,
|
|
1755
1731
|
],
|
|
1756
|
-
chain: models.
|
|
1732
|
+
chain: models.AerodromeSlipstreamWithdrawLiquidityProvisionRequestChain,
|
|
1757
1733
|
sender: str,
|
|
1734
|
+
estimate_gas: Optional[bool] = None,
|
|
1758
1735
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1759
1736
|
server_url: Optional[str] = None,
|
|
1760
1737
|
timeout_ms: Optional[int] = None,
|
|
1761
1738
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1762
|
-
) -> models.
|
|
1739
|
+
) -> models.TransactionResponse:
|
|
1763
1740
|
r"""Withdraw an LP Position
|
|
1764
1741
|
|
|
1765
1742
|
Withdraw an existing Liquidity Provider (LP) position.
|
|
@@ -1773,11 +1750,20 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1773
1750
|
assets and potentially reallocate them to other investment opportunities. The
|
|
1774
1751
|
endpoint ensures a smooth and secure withdrawal process, facilitating users'
|
|
1775
1752
|
strategic management of their decentralized finance (DeFi) portfolios.
|
|
1753
|
+
<Info>
|
|
1754
|
+
**Required Allowances**
|
|
1755
|
+
|
|
1756
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
1757
|
+
|
|
1758
|
+
- `AerodromeSlipstreamNonfungiblePositionManager`
|
|
1759
|
+
</Info>
|
|
1760
|
+
|
|
1776
1761
|
|
|
1777
1762
|
:param token_id: Token ID of the NFT representing the liquidity provisioned position.
|
|
1778
1763
|
:param percentage_for_withdrawal: How much liquidity to take out in percentage.
|
|
1779
|
-
:param chain:
|
|
1764
|
+
:param chain:
|
|
1780
1765
|
:param sender: The address of the transaction sender.
|
|
1766
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
1781
1767
|
:param retries: Override the default retry configuration for this method
|
|
1782
1768
|
:param server_url: Override the default server URL for this method
|
|
1783
1769
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1798,11 +1784,12 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1798
1784
|
percentage_for_withdrawal=percentage_for_withdrawal,
|
|
1799
1785
|
chain=chain,
|
|
1800
1786
|
sender=sender,
|
|
1787
|
+
estimate_gas=estimate_gas,
|
|
1801
1788
|
)
|
|
1802
1789
|
|
|
1803
1790
|
req = self._build_request_async(
|
|
1804
1791
|
method="POST",
|
|
1805
|
-
path="/
|
|
1792
|
+
path="/v1/aerodrome_slipstream/liquidity_provision/withdraw",
|
|
1806
1793
|
base_url=base_url,
|
|
1807
1794
|
url_variables=url_variables,
|
|
1808
1795
|
request=request,
|
|
@@ -1820,6 +1807,7 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1820
1807
|
"json",
|
|
1821
1808
|
models.AerodromeSlipstreamWithdrawLiquidityProvisionRequest,
|
|
1822
1809
|
),
|
|
1810
|
+
allow_empty_value=None,
|
|
1823
1811
|
timeout_ms=timeout_ms,
|
|
1824
1812
|
)
|
|
1825
1813
|
|
|
@@ -1835,8 +1823,8 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1835
1823
|
hook_ctx=HookContext(
|
|
1836
1824
|
config=self.sdk_configuration,
|
|
1837
1825
|
base_url=base_url or "",
|
|
1838
|
-
operation_id="
|
|
1839
|
-
oauth2_scopes=
|
|
1826
|
+
operation_id="v1_aerodrome_slipstream_liquidity_provision_withdraw",
|
|
1827
|
+
oauth2_scopes=None,
|
|
1840
1828
|
security_source=self.sdk_configuration.security,
|
|
1841
1829
|
),
|
|
1842
1830
|
request=req,
|
|
@@ -1846,28 +1834,17 @@ class AerodromeSlipstream(BaseSDK):
|
|
|
1846
1834
|
|
|
1847
1835
|
response_data: Any = None
|
|
1848
1836
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1849
|
-
return
|
|
1837
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
1850
1838
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1851
|
-
response_data =
|
|
1852
|
-
|
|
1839
|
+
response_data = unmarshal_json_response(
|
|
1840
|
+
errors.HTTPValidationErrorData, http_res
|
|
1853
1841
|
)
|
|
1854
|
-
raise errors.HTTPValidationError(
|
|
1842
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1855
1843
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1856
1844
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1857
|
-
raise errors.APIError(
|
|
1858
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1859
|
-
)
|
|
1845
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1860
1846
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1861
1847
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1862
|
-
raise errors.APIError(
|
|
1863
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1864
|
-
)
|
|
1848
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1865
1849
|
|
|
1866
|
-
|
|
1867
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1868
|
-
raise errors.APIError(
|
|
1869
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1870
|
-
http_res.status_code,
|
|
1871
|
-
http_res_text,
|
|
1872
|
-
http_res,
|
|
1873
|
-
)
|
|
1850
|
+
raise errors.APIError("Unexpected response received", http_res)
|