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
compass_api_sdk/aave_v3.py
CHANGED
|
@@ -4,15 +4,210 @@ 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 AaveV3(BaseSDK):
|
|
11
|
-
def
|
|
12
|
+
def aave_aave_supported_tokens(
|
|
12
13
|
self,
|
|
13
14
|
*,
|
|
14
|
-
chain: models.
|
|
15
|
-
|
|
15
|
+
chain: models.V1AaveAaveSupportedTokensChain,
|
|
16
|
+
block: OptionalNullable[int] = UNSET,
|
|
17
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
18
|
+
server_url: Optional[str] = None,
|
|
19
|
+
timeout_ms: Optional[int] = None,
|
|
20
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
21
|
+
) -> models.AaveSupportedTokensResponse:
|
|
22
|
+
r"""Aave Supported Tokens
|
|
23
|
+
|
|
24
|
+
Returns the list of supported tokens on Aave for the specified network, along
|
|
25
|
+
with key metadata.
|
|
26
|
+
|
|
27
|
+
For each token, the response includes:
|
|
28
|
+
- The symbol and contract address.
|
|
29
|
+
- Whether the token is currently enabled for supplying (depositing).
|
|
30
|
+
- Whether it is enabled for borrowing.
|
|
31
|
+
|
|
32
|
+
:param chain:
|
|
33
|
+
:param block: Optional block number (defaults to latest).
|
|
34
|
+
:param retries: Override the default retry configuration for this method
|
|
35
|
+
:param server_url: Override the default server URL for this method
|
|
36
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
37
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
38
|
+
"""
|
|
39
|
+
base_url = None
|
|
40
|
+
url_variables = None
|
|
41
|
+
if timeout_ms is None:
|
|
42
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
43
|
+
|
|
44
|
+
if server_url is not None:
|
|
45
|
+
base_url = server_url
|
|
46
|
+
else:
|
|
47
|
+
base_url = self._get_url(base_url, url_variables)
|
|
48
|
+
|
|
49
|
+
request = models.V1AaveAaveSupportedTokensRequest(
|
|
50
|
+
chain=chain,
|
|
51
|
+
block=block,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
req = self._build_request(
|
|
55
|
+
method="GET",
|
|
56
|
+
path="/v1/aave/aave_supported_tokens",
|
|
57
|
+
base_url=base_url,
|
|
58
|
+
url_variables=url_variables,
|
|
59
|
+
request=request,
|
|
60
|
+
request_body_required=False,
|
|
61
|
+
request_has_path_params=False,
|
|
62
|
+
request_has_query_params=True,
|
|
63
|
+
user_agent_header="user-agent",
|
|
64
|
+
accept_header_value="application/json",
|
|
65
|
+
http_headers=http_headers,
|
|
66
|
+
security=self.sdk_configuration.security,
|
|
67
|
+
allow_empty_value=None,
|
|
68
|
+
timeout_ms=timeout_ms,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
if retries == UNSET:
|
|
72
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
73
|
+
retries = self.sdk_configuration.retry_config
|
|
74
|
+
|
|
75
|
+
retry_config = None
|
|
76
|
+
if isinstance(retries, utils.RetryConfig):
|
|
77
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
78
|
+
|
|
79
|
+
http_res = self.do_request(
|
|
80
|
+
hook_ctx=HookContext(
|
|
81
|
+
config=self.sdk_configuration,
|
|
82
|
+
base_url=base_url or "",
|
|
83
|
+
operation_id="v1_aave_aave_supported_tokens",
|
|
84
|
+
oauth2_scopes=None,
|
|
85
|
+
security_source=self.sdk_configuration.security,
|
|
86
|
+
),
|
|
87
|
+
request=req,
|
|
88
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
89
|
+
retry_config=retry_config,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
response_data: Any = None
|
|
93
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
94
|
+
return unmarshal_json_response(models.AaveSupportedTokensResponse, http_res)
|
|
95
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
96
|
+
response_data = unmarshal_json_response(
|
|
97
|
+
errors.HTTPValidationErrorData, http_res
|
|
98
|
+
)
|
|
99
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
100
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
101
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
102
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
103
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
104
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
105
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
106
|
+
|
|
107
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
108
|
+
|
|
109
|
+
async def aave_aave_supported_tokens_async(
|
|
110
|
+
self,
|
|
111
|
+
*,
|
|
112
|
+
chain: models.V1AaveAaveSupportedTokensChain,
|
|
113
|
+
block: OptionalNullable[int] = UNSET,
|
|
114
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
115
|
+
server_url: Optional[str] = None,
|
|
116
|
+
timeout_ms: Optional[int] = None,
|
|
117
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
118
|
+
) -> models.AaveSupportedTokensResponse:
|
|
119
|
+
r"""Aave Supported Tokens
|
|
120
|
+
|
|
121
|
+
Returns the list of supported tokens on Aave for the specified network, along
|
|
122
|
+
with key metadata.
|
|
123
|
+
|
|
124
|
+
For each token, the response includes:
|
|
125
|
+
- The symbol and contract address.
|
|
126
|
+
- Whether the token is currently enabled for supplying (depositing).
|
|
127
|
+
- Whether it is enabled for borrowing.
|
|
128
|
+
|
|
129
|
+
:param chain:
|
|
130
|
+
:param block: Optional block number (defaults to latest).
|
|
131
|
+
:param retries: Override the default retry configuration for this method
|
|
132
|
+
:param server_url: Override the default server URL for this method
|
|
133
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
134
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
135
|
+
"""
|
|
136
|
+
base_url = None
|
|
137
|
+
url_variables = None
|
|
138
|
+
if timeout_ms is None:
|
|
139
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
140
|
+
|
|
141
|
+
if server_url is not None:
|
|
142
|
+
base_url = server_url
|
|
143
|
+
else:
|
|
144
|
+
base_url = self._get_url(base_url, url_variables)
|
|
145
|
+
|
|
146
|
+
request = models.V1AaveAaveSupportedTokensRequest(
|
|
147
|
+
chain=chain,
|
|
148
|
+
block=block,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
req = self._build_request_async(
|
|
152
|
+
method="GET",
|
|
153
|
+
path="/v1/aave/aave_supported_tokens",
|
|
154
|
+
base_url=base_url,
|
|
155
|
+
url_variables=url_variables,
|
|
156
|
+
request=request,
|
|
157
|
+
request_body_required=False,
|
|
158
|
+
request_has_path_params=False,
|
|
159
|
+
request_has_query_params=True,
|
|
160
|
+
user_agent_header="user-agent",
|
|
161
|
+
accept_header_value="application/json",
|
|
162
|
+
http_headers=http_headers,
|
|
163
|
+
security=self.sdk_configuration.security,
|
|
164
|
+
allow_empty_value=None,
|
|
165
|
+
timeout_ms=timeout_ms,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
if retries == UNSET:
|
|
169
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
170
|
+
retries = self.sdk_configuration.retry_config
|
|
171
|
+
|
|
172
|
+
retry_config = None
|
|
173
|
+
if isinstance(retries, utils.RetryConfig):
|
|
174
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
175
|
+
|
|
176
|
+
http_res = await self.do_request_async(
|
|
177
|
+
hook_ctx=HookContext(
|
|
178
|
+
config=self.sdk_configuration,
|
|
179
|
+
base_url=base_url or "",
|
|
180
|
+
operation_id="v1_aave_aave_supported_tokens",
|
|
181
|
+
oauth2_scopes=None,
|
|
182
|
+
security_source=self.sdk_configuration.security,
|
|
183
|
+
),
|
|
184
|
+
request=req,
|
|
185
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
186
|
+
retry_config=retry_config,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
response_data: Any = None
|
|
190
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
191
|
+
return unmarshal_json_response(models.AaveSupportedTokensResponse, http_res)
|
|
192
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
193
|
+
response_data = unmarshal_json_response(
|
|
194
|
+
errors.HTTPValidationErrorData, http_res
|
|
195
|
+
)
|
|
196
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
197
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
198
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
199
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
200
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
201
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
202
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
203
|
+
|
|
204
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
205
|
+
|
|
206
|
+
def aave_rate(
|
|
207
|
+
self,
|
|
208
|
+
*,
|
|
209
|
+
chain: models.V1AaveRateChain,
|
|
210
|
+
token: str,
|
|
16
211
|
block: OptionalNullable[int] = UNSET,
|
|
17
212
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
18
213
|
server_url: Optional[str] = None,
|
|
@@ -36,8 +231,8 @@ class AaveV3(BaseSDK):
|
|
|
36
231
|
|
|
37
232
|
For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
|
|
38
233
|
|
|
39
|
-
:param chain:
|
|
40
|
-
:param token: The symbol of the
|
|
234
|
+
:param chain:
|
|
235
|
+
:param token: The symbol or address of the token to fetch the user's position on..
|
|
41
236
|
:param block: Optional block number (defaults to latest).
|
|
42
237
|
:param retries: Override the default retry configuration for this method
|
|
43
238
|
:param server_url: Override the default server URL for this method
|
|
@@ -54,7 +249,7 @@ class AaveV3(BaseSDK):
|
|
|
54
249
|
else:
|
|
55
250
|
base_url = self._get_url(base_url, url_variables)
|
|
56
251
|
|
|
57
|
-
request = models.
|
|
252
|
+
request = models.V1AaveRateRequest(
|
|
58
253
|
chain=chain,
|
|
59
254
|
block=block,
|
|
60
255
|
token=token,
|
|
@@ -62,7 +257,7 @@ class AaveV3(BaseSDK):
|
|
|
62
257
|
|
|
63
258
|
req = self._build_request(
|
|
64
259
|
method="GET",
|
|
65
|
-
path="/
|
|
260
|
+
path="/v1/aave/rate",
|
|
66
261
|
base_url=base_url,
|
|
67
262
|
url_variables=url_variables,
|
|
68
263
|
request=request,
|
|
@@ -73,6 +268,7 @@ class AaveV3(BaseSDK):
|
|
|
73
268
|
accept_header_value="application/json",
|
|
74
269
|
http_headers=http_headers,
|
|
75
270
|
security=self.sdk_configuration.security,
|
|
271
|
+
allow_empty_value=None,
|
|
76
272
|
timeout_ms=timeout_ms,
|
|
77
273
|
)
|
|
78
274
|
|
|
@@ -88,8 +284,8 @@ class AaveV3(BaseSDK):
|
|
|
88
284
|
hook_ctx=HookContext(
|
|
89
285
|
config=self.sdk_configuration,
|
|
90
286
|
base_url=base_url or "",
|
|
91
|
-
operation_id="
|
|
92
|
-
oauth2_scopes=
|
|
287
|
+
operation_id="v1_aave_rate",
|
|
288
|
+
oauth2_scopes=None,
|
|
93
289
|
security_source=self.sdk_configuration.security,
|
|
94
290
|
),
|
|
95
291
|
request=req,
|
|
@@ -99,37 +295,26 @@ class AaveV3(BaseSDK):
|
|
|
99
295
|
|
|
100
296
|
response_data: Any = None
|
|
101
297
|
if utils.match_response(http_res, "200", "application/json"):
|
|
102
|
-
return
|
|
298
|
+
return unmarshal_json_response(models.AaveRateResponse, http_res)
|
|
103
299
|
if utils.match_response(http_res, "422", "application/json"):
|
|
104
|
-
response_data =
|
|
105
|
-
|
|
300
|
+
response_data = unmarshal_json_response(
|
|
301
|
+
errors.HTTPValidationErrorData, http_res
|
|
106
302
|
)
|
|
107
|
-
raise errors.HTTPValidationError(
|
|
303
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
108
304
|
if utils.match_response(http_res, "4XX", "*"):
|
|
109
305
|
http_res_text = utils.stream_to_text(http_res)
|
|
110
|
-
raise errors.APIError(
|
|
111
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
112
|
-
)
|
|
306
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
113
307
|
if utils.match_response(http_res, "5XX", "*"):
|
|
114
308
|
http_res_text = utils.stream_to_text(http_res)
|
|
115
|
-
raise errors.APIError(
|
|
116
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
117
|
-
)
|
|
309
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
118
310
|
|
|
119
|
-
|
|
120
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
121
|
-
raise errors.APIError(
|
|
122
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
123
|
-
http_res.status_code,
|
|
124
|
-
http_res_text,
|
|
125
|
-
http_res,
|
|
126
|
-
)
|
|
311
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
127
312
|
|
|
128
|
-
async def
|
|
313
|
+
async def aave_rate_async(
|
|
129
314
|
self,
|
|
130
315
|
*,
|
|
131
|
-
chain: models.
|
|
132
|
-
token:
|
|
316
|
+
chain: models.V1AaveRateChain,
|
|
317
|
+
token: str,
|
|
133
318
|
block: OptionalNullable[int] = UNSET,
|
|
134
319
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
135
320
|
server_url: Optional[str] = None,
|
|
@@ -153,8 +338,8 @@ class AaveV3(BaseSDK):
|
|
|
153
338
|
|
|
154
339
|
For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
|
|
155
340
|
|
|
156
|
-
:param chain:
|
|
157
|
-
:param token: The symbol of the
|
|
341
|
+
:param chain:
|
|
342
|
+
:param token: The symbol or address of the token to fetch the user's position on..
|
|
158
343
|
:param block: Optional block number (defaults to latest).
|
|
159
344
|
:param retries: Override the default retry configuration for this method
|
|
160
345
|
:param server_url: Override the default server URL for this method
|
|
@@ -171,7 +356,7 @@ class AaveV3(BaseSDK):
|
|
|
171
356
|
else:
|
|
172
357
|
base_url = self._get_url(base_url, url_variables)
|
|
173
358
|
|
|
174
|
-
request = models.
|
|
359
|
+
request = models.V1AaveRateRequest(
|
|
175
360
|
chain=chain,
|
|
176
361
|
block=block,
|
|
177
362
|
token=token,
|
|
@@ -179,7 +364,7 @@ class AaveV3(BaseSDK):
|
|
|
179
364
|
|
|
180
365
|
req = self._build_request_async(
|
|
181
366
|
method="GET",
|
|
182
|
-
path="/
|
|
367
|
+
path="/v1/aave/rate",
|
|
183
368
|
base_url=base_url,
|
|
184
369
|
url_variables=url_variables,
|
|
185
370
|
request=request,
|
|
@@ -190,6 +375,7 @@ class AaveV3(BaseSDK):
|
|
|
190
375
|
accept_header_value="application/json",
|
|
191
376
|
http_headers=http_headers,
|
|
192
377
|
security=self.sdk_configuration.security,
|
|
378
|
+
allow_empty_value=None,
|
|
193
379
|
timeout_ms=timeout_ms,
|
|
194
380
|
)
|
|
195
381
|
|
|
@@ -205,8 +391,8 @@ class AaveV3(BaseSDK):
|
|
|
205
391
|
hook_ctx=HookContext(
|
|
206
392
|
config=self.sdk_configuration,
|
|
207
393
|
base_url=base_url or "",
|
|
208
|
-
operation_id="
|
|
209
|
-
oauth2_scopes=
|
|
394
|
+
operation_id="v1_aave_rate",
|
|
395
|
+
oauth2_scopes=None,
|
|
210
396
|
security_source=self.sdk_configuration.security,
|
|
211
397
|
),
|
|
212
398
|
request=req,
|
|
@@ -216,38 +402,27 @@ class AaveV3(BaseSDK):
|
|
|
216
402
|
|
|
217
403
|
response_data: Any = None
|
|
218
404
|
if utils.match_response(http_res, "200", "application/json"):
|
|
219
|
-
return
|
|
405
|
+
return unmarshal_json_response(models.AaveRateResponse, http_res)
|
|
220
406
|
if utils.match_response(http_res, "422", "application/json"):
|
|
221
|
-
response_data =
|
|
222
|
-
|
|
407
|
+
response_data = unmarshal_json_response(
|
|
408
|
+
errors.HTTPValidationErrorData, http_res
|
|
223
409
|
)
|
|
224
|
-
raise errors.HTTPValidationError(
|
|
410
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
225
411
|
if utils.match_response(http_res, "4XX", "*"):
|
|
226
412
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
227
|
-
raise errors.APIError(
|
|
228
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
229
|
-
)
|
|
413
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
230
414
|
if utils.match_response(http_res, "5XX", "*"):
|
|
231
415
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
232
|
-
raise errors.APIError(
|
|
233
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
234
|
-
)
|
|
416
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
235
417
|
|
|
236
|
-
|
|
237
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
238
|
-
raise errors.APIError(
|
|
239
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
240
|
-
http_res.status_code,
|
|
241
|
-
http_res_text,
|
|
242
|
-
http_res,
|
|
243
|
-
)
|
|
418
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
244
419
|
|
|
245
|
-
def
|
|
420
|
+
def aave_avg_rate(
|
|
246
421
|
self,
|
|
247
422
|
*,
|
|
248
|
-
chain: models.
|
|
249
|
-
token:
|
|
250
|
-
days: int
|
|
423
|
+
chain: models.V1AaveAvgRateChain,
|
|
424
|
+
token: str,
|
|
425
|
+
days: int,
|
|
251
426
|
block: OptionalNullable[int] = UNSET,
|
|
252
427
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
253
428
|
server_url: Optional[str] = None,
|
|
@@ -258,8 +433,8 @@ class AaveV3(BaseSDK):
|
|
|
258
433
|
|
|
259
434
|
Provides time-weighted averages of deposit and borrow rates for Aave reserves.
|
|
260
435
|
|
|
261
|
-
:param chain:
|
|
262
|
-
:param token: The symbol of the token..
|
|
436
|
+
:param chain:
|
|
437
|
+
:param token: The symbol or address of the token..
|
|
263
438
|
:param days: The number of days for which the average shall be calculated.
|
|
264
439
|
:param block: Optional block number (defaults to latest).
|
|
265
440
|
:param retries: Override the default retry configuration for this method
|
|
@@ -277,7 +452,7 @@ class AaveV3(BaseSDK):
|
|
|
277
452
|
else:
|
|
278
453
|
base_url = self._get_url(base_url, url_variables)
|
|
279
454
|
|
|
280
|
-
request = models.
|
|
455
|
+
request = models.V1AaveAvgRateRequest(
|
|
281
456
|
chain=chain,
|
|
282
457
|
block=block,
|
|
283
458
|
token=token,
|
|
@@ -286,7 +461,7 @@ class AaveV3(BaseSDK):
|
|
|
286
461
|
|
|
287
462
|
req = self._build_request(
|
|
288
463
|
method="GET",
|
|
289
|
-
path="/
|
|
464
|
+
path="/v1/aave/avg_rate",
|
|
290
465
|
base_url=base_url,
|
|
291
466
|
url_variables=url_variables,
|
|
292
467
|
request=request,
|
|
@@ -297,6 +472,7 @@ class AaveV3(BaseSDK):
|
|
|
297
472
|
accept_header_value="application/json",
|
|
298
473
|
http_headers=http_headers,
|
|
299
474
|
security=self.sdk_configuration.security,
|
|
475
|
+
allow_empty_value=None,
|
|
300
476
|
timeout_ms=timeout_ms,
|
|
301
477
|
)
|
|
302
478
|
|
|
@@ -312,8 +488,8 @@ class AaveV3(BaseSDK):
|
|
|
312
488
|
hook_ctx=HookContext(
|
|
313
489
|
config=self.sdk_configuration,
|
|
314
490
|
base_url=base_url or "",
|
|
315
|
-
operation_id="
|
|
316
|
-
oauth2_scopes=
|
|
491
|
+
operation_id="v1_aave_avg_rate",
|
|
492
|
+
oauth2_scopes=None,
|
|
317
493
|
security_source=self.sdk_configuration.security,
|
|
318
494
|
),
|
|
319
495
|
request=req,
|
|
@@ -323,38 +499,27 @@ class AaveV3(BaseSDK):
|
|
|
323
499
|
|
|
324
500
|
response_data: Any = None
|
|
325
501
|
if utils.match_response(http_res, "200", "application/json"):
|
|
326
|
-
return
|
|
502
|
+
return unmarshal_json_response(models.AaveAvgRateResponse, http_res)
|
|
327
503
|
if utils.match_response(http_res, "422", "application/json"):
|
|
328
|
-
response_data =
|
|
329
|
-
|
|
504
|
+
response_data = unmarshal_json_response(
|
|
505
|
+
errors.HTTPValidationErrorData, http_res
|
|
330
506
|
)
|
|
331
|
-
raise errors.HTTPValidationError(
|
|
507
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
332
508
|
if utils.match_response(http_res, "4XX", "*"):
|
|
333
509
|
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
|
-
)
|
|
510
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
337
511
|
if utils.match_response(http_res, "5XX", "*"):
|
|
338
512
|
http_res_text = utils.stream_to_text(http_res)
|
|
339
|
-
raise errors.APIError(
|
|
340
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
341
|
-
)
|
|
513
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
342
514
|
|
|
343
|
-
|
|
344
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
345
|
-
raise errors.APIError(
|
|
346
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
347
|
-
http_res.status_code,
|
|
348
|
-
http_res_text,
|
|
349
|
-
http_res,
|
|
350
|
-
)
|
|
515
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
351
516
|
|
|
352
|
-
async def
|
|
517
|
+
async def aave_avg_rate_async(
|
|
353
518
|
self,
|
|
354
519
|
*,
|
|
355
|
-
chain: models.
|
|
356
|
-
token:
|
|
357
|
-
days: int
|
|
520
|
+
chain: models.V1AaveAvgRateChain,
|
|
521
|
+
token: str,
|
|
522
|
+
days: int,
|
|
358
523
|
block: OptionalNullable[int] = UNSET,
|
|
359
524
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
360
525
|
server_url: Optional[str] = None,
|
|
@@ -365,8 +530,8 @@ class AaveV3(BaseSDK):
|
|
|
365
530
|
|
|
366
531
|
Provides time-weighted averages of deposit and borrow rates for Aave reserves.
|
|
367
532
|
|
|
368
|
-
:param chain:
|
|
369
|
-
:param token: The symbol of the token..
|
|
533
|
+
:param chain:
|
|
534
|
+
:param token: The symbol or address of the token..
|
|
370
535
|
:param days: The number of days for which the average shall be calculated.
|
|
371
536
|
:param block: Optional block number (defaults to latest).
|
|
372
537
|
:param retries: Override the default retry configuration for this method
|
|
@@ -384,7 +549,7 @@ class AaveV3(BaseSDK):
|
|
|
384
549
|
else:
|
|
385
550
|
base_url = self._get_url(base_url, url_variables)
|
|
386
551
|
|
|
387
|
-
request = models.
|
|
552
|
+
request = models.V1AaveAvgRateRequest(
|
|
388
553
|
chain=chain,
|
|
389
554
|
block=block,
|
|
390
555
|
token=token,
|
|
@@ -393,7 +558,7 @@ class AaveV3(BaseSDK):
|
|
|
393
558
|
|
|
394
559
|
req = self._build_request_async(
|
|
395
560
|
method="GET",
|
|
396
|
-
path="/
|
|
561
|
+
path="/v1/aave/avg_rate",
|
|
397
562
|
base_url=base_url,
|
|
398
563
|
url_variables=url_variables,
|
|
399
564
|
request=request,
|
|
@@ -404,6 +569,7 @@ class AaveV3(BaseSDK):
|
|
|
404
569
|
accept_header_value="application/json",
|
|
405
570
|
http_headers=http_headers,
|
|
406
571
|
security=self.sdk_configuration.security,
|
|
572
|
+
allow_empty_value=None,
|
|
407
573
|
timeout_ms=timeout_ms,
|
|
408
574
|
)
|
|
409
575
|
|
|
@@ -419,8 +585,8 @@ class AaveV3(BaseSDK):
|
|
|
419
585
|
hook_ctx=HookContext(
|
|
420
586
|
config=self.sdk_configuration,
|
|
421
587
|
base_url=base_url or "",
|
|
422
|
-
operation_id="
|
|
423
|
-
oauth2_scopes=
|
|
588
|
+
operation_id="v1_aave_avg_rate",
|
|
589
|
+
oauth2_scopes=None,
|
|
424
590
|
security_source=self.sdk_configuration.security,
|
|
425
591
|
),
|
|
426
592
|
request=req,
|
|
@@ -430,38 +596,27 @@ class AaveV3(BaseSDK):
|
|
|
430
596
|
|
|
431
597
|
response_data: Any = None
|
|
432
598
|
if utils.match_response(http_res, "200", "application/json"):
|
|
433
|
-
return
|
|
599
|
+
return unmarshal_json_response(models.AaveAvgRateResponse, http_res)
|
|
434
600
|
if utils.match_response(http_res, "422", "application/json"):
|
|
435
|
-
response_data =
|
|
436
|
-
|
|
601
|
+
response_data = unmarshal_json_response(
|
|
602
|
+
errors.HTTPValidationErrorData, http_res
|
|
437
603
|
)
|
|
438
|
-
raise errors.HTTPValidationError(
|
|
604
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
439
605
|
if utils.match_response(http_res, "4XX", "*"):
|
|
440
606
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
441
|
-
raise errors.APIError(
|
|
442
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
443
|
-
)
|
|
607
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
444
608
|
if utils.match_response(http_res, "5XX", "*"):
|
|
445
609
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
446
|
-
raise errors.APIError(
|
|
447
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
448
|
-
)
|
|
610
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
449
611
|
|
|
450
|
-
|
|
451
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
452
|
-
raise errors.APIError(
|
|
453
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
454
|
-
http_res.status_code,
|
|
455
|
-
http_res_text,
|
|
456
|
-
http_res,
|
|
457
|
-
)
|
|
612
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
458
613
|
|
|
459
|
-
def
|
|
614
|
+
def aave_std_rate(
|
|
460
615
|
self,
|
|
461
616
|
*,
|
|
462
|
-
chain: models.
|
|
463
|
-
token:
|
|
464
|
-
days: int
|
|
617
|
+
chain: models.V1AaveStdRateChain,
|
|
618
|
+
token: str,
|
|
619
|
+
days: int,
|
|
465
620
|
block: OptionalNullable[int] = UNSET,
|
|
466
621
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
467
622
|
server_url: Optional[str] = None,
|
|
@@ -473,8 +628,8 @@ class AaveV3(BaseSDK):
|
|
|
473
628
|
Returns the historical standard deviation of lending and borrowing rates for Aave
|
|
474
629
|
reserves, illustrating market volatility.
|
|
475
630
|
|
|
476
|
-
:param chain:
|
|
477
|
-
:param token: The symbol of the
|
|
631
|
+
:param chain:
|
|
632
|
+
:param token: The symbol or address of the token..
|
|
478
633
|
:param days: The number of days for which the standard deviation shall be calculated.
|
|
479
634
|
:param block: Optional block number (defaults to latest).
|
|
480
635
|
:param retries: Override the default retry configuration for this method
|
|
@@ -492,7 +647,7 @@ class AaveV3(BaseSDK):
|
|
|
492
647
|
else:
|
|
493
648
|
base_url = self._get_url(base_url, url_variables)
|
|
494
649
|
|
|
495
|
-
request = models.
|
|
650
|
+
request = models.V1AaveStdRateRequest(
|
|
496
651
|
chain=chain,
|
|
497
652
|
block=block,
|
|
498
653
|
token=token,
|
|
@@ -501,7 +656,7 @@ class AaveV3(BaseSDK):
|
|
|
501
656
|
|
|
502
657
|
req = self._build_request(
|
|
503
658
|
method="GET",
|
|
504
|
-
path="/
|
|
659
|
+
path="/v1/aave/std_rate",
|
|
505
660
|
base_url=base_url,
|
|
506
661
|
url_variables=url_variables,
|
|
507
662
|
request=request,
|
|
@@ -512,6 +667,7 @@ class AaveV3(BaseSDK):
|
|
|
512
667
|
accept_header_value="application/json",
|
|
513
668
|
http_headers=http_headers,
|
|
514
669
|
security=self.sdk_configuration.security,
|
|
670
|
+
allow_empty_value=None,
|
|
515
671
|
timeout_ms=timeout_ms,
|
|
516
672
|
)
|
|
517
673
|
|
|
@@ -527,8 +683,8 @@ class AaveV3(BaseSDK):
|
|
|
527
683
|
hook_ctx=HookContext(
|
|
528
684
|
config=self.sdk_configuration,
|
|
529
685
|
base_url=base_url or "",
|
|
530
|
-
operation_id="
|
|
531
|
-
oauth2_scopes=
|
|
686
|
+
operation_id="v1_aave_std_rate",
|
|
687
|
+
oauth2_scopes=None,
|
|
532
688
|
security_source=self.sdk_configuration.security,
|
|
533
689
|
),
|
|
534
690
|
request=req,
|
|
@@ -538,38 +694,27 @@ class AaveV3(BaseSDK):
|
|
|
538
694
|
|
|
539
695
|
response_data: Any = None
|
|
540
696
|
if utils.match_response(http_res, "200", "application/json"):
|
|
541
|
-
return
|
|
697
|
+
return unmarshal_json_response(models.AaveSTDRateResponse, http_res)
|
|
542
698
|
if utils.match_response(http_res, "422", "application/json"):
|
|
543
|
-
response_data =
|
|
544
|
-
|
|
699
|
+
response_data = unmarshal_json_response(
|
|
700
|
+
errors.HTTPValidationErrorData, http_res
|
|
545
701
|
)
|
|
546
|
-
raise errors.HTTPValidationError(
|
|
702
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
547
703
|
if utils.match_response(http_res, "4XX", "*"):
|
|
548
704
|
http_res_text = utils.stream_to_text(http_res)
|
|
549
|
-
raise errors.APIError(
|
|
550
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
551
|
-
)
|
|
705
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
552
706
|
if utils.match_response(http_res, "5XX", "*"):
|
|
553
707
|
http_res_text = utils.stream_to_text(http_res)
|
|
554
|
-
raise errors.APIError(
|
|
555
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
556
|
-
)
|
|
708
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
557
709
|
|
|
558
|
-
|
|
559
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
560
|
-
raise errors.APIError(
|
|
561
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
562
|
-
http_res.status_code,
|
|
563
|
-
http_res_text,
|
|
564
|
-
http_res,
|
|
565
|
-
)
|
|
710
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
566
711
|
|
|
567
|
-
async def
|
|
712
|
+
async def aave_std_rate_async(
|
|
568
713
|
self,
|
|
569
714
|
*,
|
|
570
|
-
chain: models.
|
|
571
|
-
token:
|
|
572
|
-
days: int
|
|
715
|
+
chain: models.V1AaveStdRateChain,
|
|
716
|
+
token: str,
|
|
717
|
+
days: int,
|
|
573
718
|
block: OptionalNullable[int] = UNSET,
|
|
574
719
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
575
720
|
server_url: Optional[str] = None,
|
|
@@ -581,8 +726,8 @@ class AaveV3(BaseSDK):
|
|
|
581
726
|
Returns the historical standard deviation of lending and borrowing rates for Aave
|
|
582
727
|
reserves, illustrating market volatility.
|
|
583
728
|
|
|
584
|
-
:param chain:
|
|
585
|
-
:param token: The symbol of the
|
|
729
|
+
:param chain:
|
|
730
|
+
:param token: The symbol or address of the token..
|
|
586
731
|
:param days: The number of days for which the standard deviation shall be calculated.
|
|
587
732
|
:param block: Optional block number (defaults to latest).
|
|
588
733
|
:param retries: Override the default retry configuration for this method
|
|
@@ -600,7 +745,7 @@ class AaveV3(BaseSDK):
|
|
|
600
745
|
else:
|
|
601
746
|
base_url = self._get_url(base_url, url_variables)
|
|
602
747
|
|
|
603
|
-
request = models.
|
|
748
|
+
request = models.V1AaveStdRateRequest(
|
|
604
749
|
chain=chain,
|
|
605
750
|
block=block,
|
|
606
751
|
token=token,
|
|
@@ -609,7 +754,7 @@ class AaveV3(BaseSDK):
|
|
|
609
754
|
|
|
610
755
|
req = self._build_request_async(
|
|
611
756
|
method="GET",
|
|
612
|
-
path="/
|
|
757
|
+
path="/v1/aave/std_rate",
|
|
613
758
|
base_url=base_url,
|
|
614
759
|
url_variables=url_variables,
|
|
615
760
|
request=request,
|
|
@@ -620,6 +765,7 @@ class AaveV3(BaseSDK):
|
|
|
620
765
|
accept_header_value="application/json",
|
|
621
766
|
http_headers=http_headers,
|
|
622
767
|
security=self.sdk_configuration.security,
|
|
768
|
+
allow_empty_value=None,
|
|
623
769
|
timeout_ms=timeout_ms,
|
|
624
770
|
)
|
|
625
771
|
|
|
@@ -635,8 +781,8 @@ class AaveV3(BaseSDK):
|
|
|
635
781
|
hook_ctx=HookContext(
|
|
636
782
|
config=self.sdk_configuration,
|
|
637
783
|
base_url=base_url or "",
|
|
638
|
-
operation_id="
|
|
639
|
-
oauth2_scopes=
|
|
784
|
+
operation_id="v1_aave_std_rate",
|
|
785
|
+
oauth2_scopes=None,
|
|
640
786
|
security_source=self.sdk_configuration.security,
|
|
641
787
|
),
|
|
642
788
|
request=req,
|
|
@@ -646,37 +792,26 @@ class AaveV3(BaseSDK):
|
|
|
646
792
|
|
|
647
793
|
response_data: Any = None
|
|
648
794
|
if utils.match_response(http_res, "200", "application/json"):
|
|
649
|
-
return
|
|
795
|
+
return unmarshal_json_response(models.AaveSTDRateResponse, http_res)
|
|
650
796
|
if utils.match_response(http_res, "422", "application/json"):
|
|
651
|
-
response_data =
|
|
652
|
-
|
|
797
|
+
response_data = unmarshal_json_response(
|
|
798
|
+
errors.HTTPValidationErrorData, http_res
|
|
653
799
|
)
|
|
654
|
-
raise errors.HTTPValidationError(
|
|
800
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
655
801
|
if utils.match_response(http_res, "4XX", "*"):
|
|
656
802
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
657
|
-
raise errors.APIError(
|
|
658
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
659
|
-
)
|
|
803
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
660
804
|
if utils.match_response(http_res, "5XX", "*"):
|
|
661
805
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
662
|
-
raise errors.APIError(
|
|
663
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
664
|
-
)
|
|
806
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
665
807
|
|
|
666
|
-
|
|
667
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
668
|
-
raise errors.APIError(
|
|
669
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
670
|
-
http_res.status_code,
|
|
671
|
-
http_res_text,
|
|
672
|
-
http_res,
|
|
673
|
-
)
|
|
808
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
674
809
|
|
|
675
|
-
def
|
|
810
|
+
def aave_reserve_overview(
|
|
676
811
|
self,
|
|
677
812
|
*,
|
|
678
|
-
chain: models.
|
|
679
|
-
token:
|
|
813
|
+
chain: models.V1AaveReserveOverviewChain,
|
|
814
|
+
token: str,
|
|
680
815
|
block: OptionalNullable[int] = UNSET,
|
|
681
816
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
682
817
|
server_url: Optional[str] = None,
|
|
@@ -692,8 +827,8 @@ class AaveV3(BaseSDK):
|
|
|
692
827
|
|
|
693
828
|
See below for more info:
|
|
694
829
|
|
|
695
|
-
:param chain:
|
|
696
|
-
:param token: The symbol of the asset..
|
|
830
|
+
:param chain:
|
|
831
|
+
:param token: The symbol or address of the asset..
|
|
697
832
|
:param block: Optional block number (defaults to latest).
|
|
698
833
|
:param retries: Override the default retry configuration for this method
|
|
699
834
|
:param server_url: Override the default server URL for this method
|
|
@@ -710,7 +845,7 @@ class AaveV3(BaseSDK):
|
|
|
710
845
|
else:
|
|
711
846
|
base_url = self._get_url(base_url, url_variables)
|
|
712
847
|
|
|
713
|
-
request = models.
|
|
848
|
+
request = models.V1AaveReserveOverviewRequest(
|
|
714
849
|
chain=chain,
|
|
715
850
|
block=block,
|
|
716
851
|
token=token,
|
|
@@ -718,7 +853,7 @@ class AaveV3(BaseSDK):
|
|
|
718
853
|
|
|
719
854
|
req = self._build_request(
|
|
720
855
|
method="GET",
|
|
721
|
-
path="/
|
|
856
|
+
path="/v1/aave/reserve_overview",
|
|
722
857
|
base_url=base_url,
|
|
723
858
|
url_variables=url_variables,
|
|
724
859
|
request=request,
|
|
@@ -729,6 +864,7 @@ class AaveV3(BaseSDK):
|
|
|
729
864
|
accept_header_value="application/json",
|
|
730
865
|
http_headers=http_headers,
|
|
731
866
|
security=self.sdk_configuration.security,
|
|
867
|
+
allow_empty_value=None,
|
|
732
868
|
timeout_ms=timeout_ms,
|
|
733
869
|
)
|
|
734
870
|
|
|
@@ -744,8 +880,8 @@ class AaveV3(BaseSDK):
|
|
|
744
880
|
hook_ctx=HookContext(
|
|
745
881
|
config=self.sdk_configuration,
|
|
746
882
|
base_url=base_url or "",
|
|
747
|
-
operation_id="
|
|
748
|
-
oauth2_scopes=
|
|
883
|
+
operation_id="v1_aave_reserve_overview",
|
|
884
|
+
oauth2_scopes=None,
|
|
749
885
|
security_source=self.sdk_configuration.security,
|
|
750
886
|
),
|
|
751
887
|
request=req,
|
|
@@ -755,39 +891,26 @@ class AaveV3(BaseSDK):
|
|
|
755
891
|
|
|
756
892
|
response_data: Any = None
|
|
757
893
|
if utils.match_response(http_res, "200", "application/json"):
|
|
758
|
-
return
|
|
759
|
-
http_res.text, models.AaveReserveOverviewResponse
|
|
760
|
-
)
|
|
894
|
+
return unmarshal_json_response(models.AaveReserveOverviewResponse, http_res)
|
|
761
895
|
if utils.match_response(http_res, "422", "application/json"):
|
|
762
|
-
response_data =
|
|
763
|
-
|
|
896
|
+
response_data = unmarshal_json_response(
|
|
897
|
+
errors.HTTPValidationErrorData, http_res
|
|
764
898
|
)
|
|
765
|
-
raise errors.HTTPValidationError(
|
|
899
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
766
900
|
if utils.match_response(http_res, "4XX", "*"):
|
|
767
901
|
http_res_text = utils.stream_to_text(http_res)
|
|
768
|
-
raise errors.APIError(
|
|
769
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
770
|
-
)
|
|
902
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
771
903
|
if utils.match_response(http_res, "5XX", "*"):
|
|
772
904
|
http_res_text = utils.stream_to_text(http_res)
|
|
773
|
-
raise errors.APIError(
|
|
774
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
775
|
-
)
|
|
905
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
776
906
|
|
|
777
|
-
|
|
778
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
779
|
-
raise errors.APIError(
|
|
780
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
781
|
-
http_res.status_code,
|
|
782
|
-
http_res_text,
|
|
783
|
-
http_res,
|
|
784
|
-
)
|
|
907
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
785
908
|
|
|
786
|
-
async def
|
|
909
|
+
async def aave_reserve_overview_async(
|
|
787
910
|
self,
|
|
788
911
|
*,
|
|
789
|
-
chain: models.
|
|
790
|
-
token:
|
|
912
|
+
chain: models.V1AaveReserveOverviewChain,
|
|
913
|
+
token: str,
|
|
791
914
|
block: OptionalNullable[int] = UNSET,
|
|
792
915
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
793
916
|
server_url: Optional[str] = None,
|
|
@@ -803,8 +926,8 @@ class AaveV3(BaseSDK):
|
|
|
803
926
|
|
|
804
927
|
See below for more info:
|
|
805
928
|
|
|
806
|
-
:param chain:
|
|
807
|
-
:param token: The symbol of the asset..
|
|
929
|
+
:param chain:
|
|
930
|
+
:param token: The symbol or address of the asset..
|
|
808
931
|
:param block: Optional block number (defaults to latest).
|
|
809
932
|
:param retries: Override the default retry configuration for this method
|
|
810
933
|
:param server_url: Override the default server URL for this method
|
|
@@ -821,7 +944,7 @@ class AaveV3(BaseSDK):
|
|
|
821
944
|
else:
|
|
822
945
|
base_url = self._get_url(base_url, url_variables)
|
|
823
946
|
|
|
824
|
-
request = models.
|
|
947
|
+
request = models.V1AaveReserveOverviewRequest(
|
|
825
948
|
chain=chain,
|
|
826
949
|
block=block,
|
|
827
950
|
token=token,
|
|
@@ -829,7 +952,7 @@ class AaveV3(BaseSDK):
|
|
|
829
952
|
|
|
830
953
|
req = self._build_request_async(
|
|
831
954
|
method="GET",
|
|
832
|
-
path="/
|
|
955
|
+
path="/v1/aave/reserve_overview",
|
|
833
956
|
base_url=base_url,
|
|
834
957
|
url_variables=url_variables,
|
|
835
958
|
request=request,
|
|
@@ -840,6 +963,7 @@ class AaveV3(BaseSDK):
|
|
|
840
963
|
accept_header_value="application/json",
|
|
841
964
|
http_headers=http_headers,
|
|
842
965
|
security=self.sdk_configuration.security,
|
|
966
|
+
allow_empty_value=None,
|
|
843
967
|
timeout_ms=timeout_ms,
|
|
844
968
|
)
|
|
845
969
|
|
|
@@ -855,8 +979,8 @@ class AaveV3(BaseSDK):
|
|
|
855
979
|
hook_ctx=HookContext(
|
|
856
980
|
config=self.sdk_configuration,
|
|
857
981
|
base_url=base_url or "",
|
|
858
|
-
operation_id="
|
|
859
|
-
oauth2_scopes=
|
|
982
|
+
operation_id="v1_aave_reserve_overview",
|
|
983
|
+
oauth2_scopes=None,
|
|
860
984
|
security_source=self.sdk_configuration.security,
|
|
861
985
|
),
|
|
862
986
|
request=req,
|
|
@@ -866,39 +990,26 @@ class AaveV3(BaseSDK):
|
|
|
866
990
|
|
|
867
991
|
response_data: Any = None
|
|
868
992
|
if utils.match_response(http_res, "200", "application/json"):
|
|
869
|
-
return
|
|
870
|
-
http_res.text, models.AaveReserveOverviewResponse
|
|
871
|
-
)
|
|
993
|
+
return unmarshal_json_response(models.AaveReserveOverviewResponse, http_res)
|
|
872
994
|
if utils.match_response(http_res, "422", "application/json"):
|
|
873
|
-
response_data =
|
|
874
|
-
|
|
995
|
+
response_data = unmarshal_json_response(
|
|
996
|
+
errors.HTTPValidationErrorData, http_res
|
|
875
997
|
)
|
|
876
|
-
raise errors.HTTPValidationError(
|
|
998
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
877
999
|
if utils.match_response(http_res, "4XX", "*"):
|
|
878
1000
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
879
|
-
raise errors.APIError(
|
|
880
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
881
|
-
)
|
|
1001
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
882
1002
|
if utils.match_response(http_res, "5XX", "*"):
|
|
883
1003
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
884
|
-
raise errors.APIError(
|
|
885
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
886
|
-
)
|
|
1004
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
887
1005
|
|
|
888
|
-
|
|
889
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
890
|
-
raise errors.APIError(
|
|
891
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
892
|
-
http_res.status_code,
|
|
893
|
-
http_res_text,
|
|
894
|
-
http_res,
|
|
895
|
-
)
|
|
1006
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
896
1007
|
|
|
897
|
-
def
|
|
1008
|
+
def aave_token_price(
|
|
898
1009
|
self,
|
|
899
1010
|
*,
|
|
900
|
-
chain: models.
|
|
901
|
-
token:
|
|
1011
|
+
chain: models.V1AaveTokenPriceChain,
|
|
1012
|
+
token: str,
|
|
902
1013
|
block: OptionalNullable[int] = UNSET,
|
|
903
1014
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
904
1015
|
server_url: Optional[str] = None,
|
|
@@ -916,8 +1027,8 @@ class AaveV3(BaseSDK):
|
|
|
916
1027
|
a standardized format, converted from Wei to the base currency decimals defined by
|
|
917
1028
|
Aave.
|
|
918
1029
|
|
|
919
|
-
:param chain:
|
|
920
|
-
:param token: The symbol of the asset whose price you want..
|
|
1030
|
+
:param chain:
|
|
1031
|
+
:param token: The symbol or address of the asset whose price you want..
|
|
921
1032
|
:param block: Optional block number (defaults to latest).
|
|
922
1033
|
:param retries: Override the default retry configuration for this method
|
|
923
1034
|
:param server_url: Override the default server URL for this method
|
|
@@ -934,7 +1045,7 @@ class AaveV3(BaseSDK):
|
|
|
934
1045
|
else:
|
|
935
1046
|
base_url = self._get_url(base_url, url_variables)
|
|
936
1047
|
|
|
937
|
-
request = models.
|
|
1048
|
+
request = models.V1AaveTokenPriceRequest(
|
|
938
1049
|
chain=chain,
|
|
939
1050
|
block=block,
|
|
940
1051
|
token=token,
|
|
@@ -942,7 +1053,7 @@ class AaveV3(BaseSDK):
|
|
|
942
1053
|
|
|
943
1054
|
req = self._build_request(
|
|
944
1055
|
method="GET",
|
|
945
|
-
path="/
|
|
1056
|
+
path="/v1/aave/token_price",
|
|
946
1057
|
base_url=base_url,
|
|
947
1058
|
url_variables=url_variables,
|
|
948
1059
|
request=request,
|
|
@@ -953,6 +1064,7 @@ class AaveV3(BaseSDK):
|
|
|
953
1064
|
accept_header_value="application/json",
|
|
954
1065
|
http_headers=http_headers,
|
|
955
1066
|
security=self.sdk_configuration.security,
|
|
1067
|
+
allow_empty_value=None,
|
|
956
1068
|
timeout_ms=timeout_ms,
|
|
957
1069
|
)
|
|
958
1070
|
|
|
@@ -968,8 +1080,8 @@ class AaveV3(BaseSDK):
|
|
|
968
1080
|
hook_ctx=HookContext(
|
|
969
1081
|
config=self.sdk_configuration,
|
|
970
1082
|
base_url=base_url or "",
|
|
971
|
-
operation_id="
|
|
972
|
-
oauth2_scopes=
|
|
1083
|
+
operation_id="v1_aave_token_price",
|
|
1084
|
+
oauth2_scopes=None,
|
|
973
1085
|
security_source=self.sdk_configuration.security,
|
|
974
1086
|
),
|
|
975
1087
|
request=req,
|
|
@@ -979,37 +1091,26 @@ class AaveV3(BaseSDK):
|
|
|
979
1091
|
|
|
980
1092
|
response_data: Any = None
|
|
981
1093
|
if utils.match_response(http_res, "200", "application/json"):
|
|
982
|
-
return
|
|
1094
|
+
return unmarshal_json_response(models.AaveTokenPriceResponse, http_res)
|
|
983
1095
|
if utils.match_response(http_res, "422", "application/json"):
|
|
984
|
-
response_data =
|
|
985
|
-
|
|
1096
|
+
response_data = unmarshal_json_response(
|
|
1097
|
+
errors.HTTPValidationErrorData, http_res
|
|
986
1098
|
)
|
|
987
|
-
raise errors.HTTPValidationError(
|
|
1099
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
988
1100
|
if utils.match_response(http_res, "4XX", "*"):
|
|
989
1101
|
http_res_text = utils.stream_to_text(http_res)
|
|
990
|
-
raise errors.APIError(
|
|
991
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
992
|
-
)
|
|
1102
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
993
1103
|
if utils.match_response(http_res, "5XX", "*"):
|
|
994
1104
|
http_res_text = utils.stream_to_text(http_res)
|
|
995
|
-
raise errors.APIError(
|
|
996
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
997
|
-
)
|
|
1105
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
998
1106
|
|
|
999
|
-
|
|
1000
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1001
|
-
raise errors.APIError(
|
|
1002
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1003
|
-
http_res.status_code,
|
|
1004
|
-
http_res_text,
|
|
1005
|
-
http_res,
|
|
1006
|
-
)
|
|
1107
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1007
1108
|
|
|
1008
|
-
async def
|
|
1109
|
+
async def aave_token_price_async(
|
|
1009
1110
|
self,
|
|
1010
1111
|
*,
|
|
1011
|
-
chain: models.
|
|
1012
|
-
token:
|
|
1112
|
+
chain: models.V1AaveTokenPriceChain,
|
|
1113
|
+
token: str,
|
|
1013
1114
|
block: OptionalNullable[int] = UNSET,
|
|
1014
1115
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1015
1116
|
server_url: Optional[str] = None,
|
|
@@ -1027,8 +1128,8 @@ class AaveV3(BaseSDK):
|
|
|
1027
1128
|
a standardized format, converted from Wei to the base currency decimals defined by
|
|
1028
1129
|
Aave.
|
|
1029
1130
|
|
|
1030
|
-
:param chain:
|
|
1031
|
-
:param token: The symbol of the asset whose price you want..
|
|
1131
|
+
:param chain:
|
|
1132
|
+
:param token: The symbol or address of the asset whose price you want..
|
|
1032
1133
|
:param block: Optional block number (defaults to latest).
|
|
1033
1134
|
:param retries: Override the default retry configuration for this method
|
|
1034
1135
|
:param server_url: Override the default server URL for this method
|
|
@@ -1045,7 +1146,7 @@ class AaveV3(BaseSDK):
|
|
|
1045
1146
|
else:
|
|
1046
1147
|
base_url = self._get_url(base_url, url_variables)
|
|
1047
1148
|
|
|
1048
|
-
request = models.
|
|
1149
|
+
request = models.V1AaveTokenPriceRequest(
|
|
1049
1150
|
chain=chain,
|
|
1050
1151
|
block=block,
|
|
1051
1152
|
token=token,
|
|
@@ -1053,7 +1154,7 @@ class AaveV3(BaseSDK):
|
|
|
1053
1154
|
|
|
1054
1155
|
req = self._build_request_async(
|
|
1055
1156
|
method="GET",
|
|
1056
|
-
path="/
|
|
1157
|
+
path="/v1/aave/token_price",
|
|
1057
1158
|
base_url=base_url,
|
|
1058
1159
|
url_variables=url_variables,
|
|
1059
1160
|
request=request,
|
|
@@ -1064,6 +1165,7 @@ class AaveV3(BaseSDK):
|
|
|
1064
1165
|
accept_header_value="application/json",
|
|
1065
1166
|
http_headers=http_headers,
|
|
1066
1167
|
security=self.sdk_configuration.security,
|
|
1168
|
+
allow_empty_value=None,
|
|
1067
1169
|
timeout_ms=timeout_ms,
|
|
1068
1170
|
)
|
|
1069
1171
|
|
|
@@ -1079,8 +1181,8 @@ class AaveV3(BaseSDK):
|
|
|
1079
1181
|
hook_ctx=HookContext(
|
|
1080
1182
|
config=self.sdk_configuration,
|
|
1081
1183
|
base_url=base_url or "",
|
|
1082
|
-
operation_id="
|
|
1083
|
-
oauth2_scopes=
|
|
1184
|
+
operation_id="v1_aave_token_price",
|
|
1185
|
+
oauth2_scopes=None,
|
|
1084
1186
|
security_source=self.sdk_configuration.security,
|
|
1085
1187
|
),
|
|
1086
1188
|
request=req,
|
|
@@ -1090,39 +1192,28 @@ class AaveV3(BaseSDK):
|
|
|
1090
1192
|
|
|
1091
1193
|
response_data: Any = None
|
|
1092
1194
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1093
|
-
return
|
|
1195
|
+
return unmarshal_json_response(models.AaveTokenPriceResponse, http_res)
|
|
1094
1196
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1095
|
-
response_data =
|
|
1096
|
-
|
|
1197
|
+
response_data = unmarshal_json_response(
|
|
1198
|
+
errors.HTTPValidationErrorData, http_res
|
|
1097
1199
|
)
|
|
1098
|
-
raise errors.HTTPValidationError(
|
|
1200
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1099
1201
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1100
1202
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1101
|
-
raise errors.APIError(
|
|
1102
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1103
|
-
)
|
|
1203
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1104
1204
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1105
1205
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1106
|
-
raise errors.APIError(
|
|
1107
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1108
|
-
)
|
|
1206
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1109
1207
|
|
|
1110
|
-
|
|
1111
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1112
|
-
raise errors.APIError(
|
|
1113
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1114
|
-
http_res.status_code,
|
|
1115
|
-
http_res_text,
|
|
1116
|
-
http_res,
|
|
1117
|
-
)
|
|
1208
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1118
1209
|
|
|
1119
|
-
def
|
|
1210
|
+
def aave_liquidity_change(
|
|
1120
1211
|
self,
|
|
1121
1212
|
*,
|
|
1122
|
-
chain: models.
|
|
1123
|
-
token:
|
|
1124
|
-
start_block: int
|
|
1125
|
-
end_block: int
|
|
1213
|
+
chain: models.V1AaveLiquidityChangeChain,
|
|
1214
|
+
token: str,
|
|
1215
|
+
start_block: int,
|
|
1216
|
+
end_block: int,
|
|
1126
1217
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1127
1218
|
server_url: Optional[str] = None,
|
|
1128
1219
|
timeout_ms: Optional[int] = None,
|
|
@@ -1142,8 +1233,8 @@ class AaveV3(BaseSDK):
|
|
|
1142
1233
|
increase, compound on itself and represent large debt. The reverse in both cases is
|
|
1143
1234
|
true if the liquidity index is negative.
|
|
1144
1235
|
|
|
1145
|
-
:param chain:
|
|
1146
|
-
:param token: The symbol of the asset to get liquidity change for..
|
|
1236
|
+
:param chain:
|
|
1237
|
+
:param token: The symbol or address of the asset to get liquidity change for..
|
|
1147
1238
|
:param start_block: The start block to calculate liquidity change from.
|
|
1148
1239
|
:param end_block: The end block to calculate liquidity change to.
|
|
1149
1240
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1161,7 +1252,7 @@ class AaveV3(BaseSDK):
|
|
|
1161
1252
|
else:
|
|
1162
1253
|
base_url = self._get_url(base_url, url_variables)
|
|
1163
1254
|
|
|
1164
|
-
request = models.
|
|
1255
|
+
request = models.V1AaveLiquidityChangeRequest(
|
|
1165
1256
|
chain=chain,
|
|
1166
1257
|
token=token,
|
|
1167
1258
|
start_block=start_block,
|
|
@@ -1170,7 +1261,7 @@ class AaveV3(BaseSDK):
|
|
|
1170
1261
|
|
|
1171
1262
|
req = self._build_request(
|
|
1172
1263
|
method="GET",
|
|
1173
|
-
path="/
|
|
1264
|
+
path="/v1/aave/liquidity/change",
|
|
1174
1265
|
base_url=base_url,
|
|
1175
1266
|
url_variables=url_variables,
|
|
1176
1267
|
request=request,
|
|
@@ -1181,6 +1272,7 @@ class AaveV3(BaseSDK):
|
|
|
1181
1272
|
accept_header_value="application/json",
|
|
1182
1273
|
http_headers=http_headers,
|
|
1183
1274
|
security=self.sdk_configuration.security,
|
|
1275
|
+
allow_empty_value=None,
|
|
1184
1276
|
timeout_ms=timeout_ms,
|
|
1185
1277
|
)
|
|
1186
1278
|
|
|
@@ -1196,8 +1288,8 @@ class AaveV3(BaseSDK):
|
|
|
1196
1288
|
hook_ctx=HookContext(
|
|
1197
1289
|
config=self.sdk_configuration,
|
|
1198
1290
|
base_url=base_url or "",
|
|
1199
|
-
operation_id="
|
|
1200
|
-
oauth2_scopes=
|
|
1291
|
+
operation_id="v1_aave_liquidity_change",
|
|
1292
|
+
oauth2_scopes=None,
|
|
1201
1293
|
security_source=self.sdk_configuration.security,
|
|
1202
1294
|
),
|
|
1203
1295
|
request=req,
|
|
@@ -1207,41 +1299,28 @@ class AaveV3(BaseSDK):
|
|
|
1207
1299
|
|
|
1208
1300
|
response_data: Any = None
|
|
1209
1301
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1210
|
-
return
|
|
1211
|
-
http_res.text, models.AaveLiquidityChangeResponse
|
|
1212
|
-
)
|
|
1302
|
+
return unmarshal_json_response(models.AaveLiquidityChangeResponse, http_res)
|
|
1213
1303
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1214
|
-
response_data =
|
|
1215
|
-
|
|
1304
|
+
response_data = unmarshal_json_response(
|
|
1305
|
+
errors.HTTPValidationErrorData, http_res
|
|
1216
1306
|
)
|
|
1217
|
-
raise errors.HTTPValidationError(
|
|
1307
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1218
1308
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1219
1309
|
http_res_text = utils.stream_to_text(http_res)
|
|
1220
|
-
raise errors.APIError(
|
|
1221
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1222
|
-
)
|
|
1310
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1223
1311
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1224
1312
|
http_res_text = utils.stream_to_text(http_res)
|
|
1225
|
-
raise errors.APIError(
|
|
1226
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1227
|
-
)
|
|
1313
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1228
1314
|
|
|
1229
|
-
|
|
1230
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1231
|
-
raise errors.APIError(
|
|
1232
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1233
|
-
http_res.status_code,
|
|
1234
|
-
http_res_text,
|
|
1235
|
-
http_res,
|
|
1236
|
-
)
|
|
1315
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1237
1316
|
|
|
1238
|
-
async def
|
|
1317
|
+
async def aave_liquidity_change_async(
|
|
1239
1318
|
self,
|
|
1240
1319
|
*,
|
|
1241
|
-
chain: models.
|
|
1242
|
-
token:
|
|
1243
|
-
start_block: int
|
|
1244
|
-
end_block: int
|
|
1320
|
+
chain: models.V1AaveLiquidityChangeChain,
|
|
1321
|
+
token: str,
|
|
1322
|
+
start_block: int,
|
|
1323
|
+
end_block: int,
|
|
1245
1324
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1246
1325
|
server_url: Optional[str] = None,
|
|
1247
1326
|
timeout_ms: Optional[int] = None,
|
|
@@ -1261,8 +1340,8 @@ class AaveV3(BaseSDK):
|
|
|
1261
1340
|
increase, compound on itself and represent large debt. The reverse in both cases is
|
|
1262
1341
|
true if the liquidity index is negative.
|
|
1263
1342
|
|
|
1264
|
-
:param chain:
|
|
1265
|
-
:param token: The symbol of the asset to get liquidity change for..
|
|
1343
|
+
:param chain:
|
|
1344
|
+
:param token: The symbol or address of the asset to get liquidity change for..
|
|
1266
1345
|
:param start_block: The start block to calculate liquidity change from.
|
|
1267
1346
|
:param end_block: The end block to calculate liquidity change to.
|
|
1268
1347
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1280,7 +1359,7 @@ class AaveV3(BaseSDK):
|
|
|
1280
1359
|
else:
|
|
1281
1360
|
base_url = self._get_url(base_url, url_variables)
|
|
1282
1361
|
|
|
1283
|
-
request = models.
|
|
1362
|
+
request = models.V1AaveLiquidityChangeRequest(
|
|
1284
1363
|
chain=chain,
|
|
1285
1364
|
token=token,
|
|
1286
1365
|
start_block=start_block,
|
|
@@ -1289,7 +1368,7 @@ class AaveV3(BaseSDK):
|
|
|
1289
1368
|
|
|
1290
1369
|
req = self._build_request_async(
|
|
1291
1370
|
method="GET",
|
|
1292
|
-
path="/
|
|
1371
|
+
path="/v1/aave/liquidity/change",
|
|
1293
1372
|
base_url=base_url,
|
|
1294
1373
|
url_variables=url_variables,
|
|
1295
1374
|
request=request,
|
|
@@ -1300,6 +1379,7 @@ class AaveV3(BaseSDK):
|
|
|
1300
1379
|
accept_header_value="application/json",
|
|
1301
1380
|
http_headers=http_headers,
|
|
1302
1381
|
security=self.sdk_configuration.security,
|
|
1382
|
+
allow_empty_value=None,
|
|
1303
1383
|
timeout_ms=timeout_ms,
|
|
1304
1384
|
)
|
|
1305
1385
|
|
|
@@ -1315,8 +1395,8 @@ class AaveV3(BaseSDK):
|
|
|
1315
1395
|
hook_ctx=HookContext(
|
|
1316
1396
|
config=self.sdk_configuration,
|
|
1317
1397
|
base_url=base_url or "",
|
|
1318
|
-
operation_id="
|
|
1319
|
-
oauth2_scopes=
|
|
1398
|
+
operation_id="v1_aave_liquidity_change",
|
|
1399
|
+
oauth2_scopes=None,
|
|
1320
1400
|
security_source=self.sdk_configuration.security,
|
|
1321
1401
|
),
|
|
1322
1402
|
request=req,
|
|
@@ -1326,39 +1406,26 @@ class AaveV3(BaseSDK):
|
|
|
1326
1406
|
|
|
1327
1407
|
response_data: Any = None
|
|
1328
1408
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1329
|
-
return
|
|
1330
|
-
http_res.text, models.AaveLiquidityChangeResponse
|
|
1331
|
-
)
|
|
1409
|
+
return unmarshal_json_response(models.AaveLiquidityChangeResponse, http_res)
|
|
1332
1410
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1333
|
-
response_data =
|
|
1334
|
-
|
|
1411
|
+
response_data = unmarshal_json_response(
|
|
1412
|
+
errors.HTTPValidationErrorData, http_res
|
|
1335
1413
|
)
|
|
1336
|
-
raise errors.HTTPValidationError(
|
|
1414
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1337
1415
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1338
1416
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1339
|
-
raise errors.APIError(
|
|
1340
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1341
|
-
)
|
|
1417
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1342
1418
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1343
1419
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1344
|
-
raise errors.APIError(
|
|
1345
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1346
|
-
)
|
|
1420
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1347
1421
|
|
|
1348
|
-
|
|
1349
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1350
|
-
raise errors.APIError(
|
|
1351
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1352
|
-
http_res.status_code,
|
|
1353
|
-
http_res_text,
|
|
1354
|
-
http_res,
|
|
1355
|
-
)
|
|
1422
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1356
1423
|
|
|
1357
|
-
def
|
|
1424
|
+
def aave_user_position_summary(
|
|
1358
1425
|
self,
|
|
1359
1426
|
*,
|
|
1360
|
-
chain: models.
|
|
1361
|
-
user: str
|
|
1427
|
+
chain: models.V1AaveUserPositionSummaryChain,
|
|
1428
|
+
user: str,
|
|
1362
1429
|
block: OptionalNullable[int] = UNSET,
|
|
1363
1430
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1364
1431
|
server_url: Optional[str] = None,
|
|
@@ -1376,7 +1443,7 @@ class AaveV3(BaseSDK):
|
|
|
1376
1443
|
calculated by aggregating data across all open positions held by the user, offering
|
|
1377
1444
|
a holistic view of their financial standing within the AAVE ecosystem.
|
|
1378
1445
|
|
|
1379
|
-
:param chain:
|
|
1446
|
+
:param chain:
|
|
1380
1447
|
:param user: The user to get position summary for.
|
|
1381
1448
|
:param block: Optional block number (defaults to latest).
|
|
1382
1449
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1394,7 +1461,7 @@ class AaveV3(BaseSDK):
|
|
|
1394
1461
|
else:
|
|
1395
1462
|
base_url = self._get_url(base_url, url_variables)
|
|
1396
1463
|
|
|
1397
|
-
request = models.
|
|
1464
|
+
request = models.V1AaveUserPositionSummaryRequest(
|
|
1398
1465
|
chain=chain,
|
|
1399
1466
|
block=block,
|
|
1400
1467
|
user=user,
|
|
@@ -1402,7 +1469,7 @@ class AaveV3(BaseSDK):
|
|
|
1402
1469
|
|
|
1403
1470
|
req = self._build_request(
|
|
1404
1471
|
method="GET",
|
|
1405
|
-
path="/
|
|
1472
|
+
path="/v1/aave/user_position_summary",
|
|
1406
1473
|
base_url=base_url,
|
|
1407
1474
|
url_variables=url_variables,
|
|
1408
1475
|
request=request,
|
|
@@ -1413,6 +1480,7 @@ class AaveV3(BaseSDK):
|
|
|
1413
1480
|
accept_header_value="application/json",
|
|
1414
1481
|
http_headers=http_headers,
|
|
1415
1482
|
security=self.sdk_configuration.security,
|
|
1483
|
+
allow_empty_value=None,
|
|
1416
1484
|
timeout_ms=timeout_ms,
|
|
1417
1485
|
)
|
|
1418
1486
|
|
|
@@ -1428,8 +1496,8 @@ class AaveV3(BaseSDK):
|
|
|
1428
1496
|
hook_ctx=HookContext(
|
|
1429
1497
|
config=self.sdk_configuration,
|
|
1430
1498
|
base_url=base_url or "",
|
|
1431
|
-
operation_id="
|
|
1432
|
-
oauth2_scopes=
|
|
1499
|
+
operation_id="v1_aave_user_position_summary",
|
|
1500
|
+
oauth2_scopes=None,
|
|
1433
1501
|
security_source=self.sdk_configuration.security,
|
|
1434
1502
|
),
|
|
1435
1503
|
request=req,
|
|
@@ -1439,39 +1507,28 @@ class AaveV3(BaseSDK):
|
|
|
1439
1507
|
|
|
1440
1508
|
response_data: Any = None
|
|
1441
1509
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1442
|
-
return
|
|
1443
|
-
|
|
1510
|
+
return unmarshal_json_response(
|
|
1511
|
+
models.AaveUserPositionSummaryResponse, http_res
|
|
1444
1512
|
)
|
|
1445
1513
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1446
|
-
response_data =
|
|
1447
|
-
|
|
1514
|
+
response_data = unmarshal_json_response(
|
|
1515
|
+
errors.HTTPValidationErrorData, http_res
|
|
1448
1516
|
)
|
|
1449
|
-
raise errors.HTTPValidationError(
|
|
1517
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1450
1518
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1451
1519
|
http_res_text = utils.stream_to_text(http_res)
|
|
1452
|
-
raise errors.APIError(
|
|
1453
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1454
|
-
)
|
|
1520
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1455
1521
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1456
1522
|
http_res_text = utils.stream_to_text(http_res)
|
|
1457
|
-
raise errors.APIError(
|
|
1458
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1459
|
-
)
|
|
1523
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1460
1524
|
|
|
1461
|
-
|
|
1462
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1463
|
-
raise errors.APIError(
|
|
1464
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1465
|
-
http_res.status_code,
|
|
1466
|
-
http_res_text,
|
|
1467
|
-
http_res,
|
|
1468
|
-
)
|
|
1525
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1469
1526
|
|
|
1470
|
-
async def
|
|
1527
|
+
async def aave_user_position_summary_async(
|
|
1471
1528
|
self,
|
|
1472
1529
|
*,
|
|
1473
|
-
chain: models.
|
|
1474
|
-
user: str
|
|
1530
|
+
chain: models.V1AaveUserPositionSummaryChain,
|
|
1531
|
+
user: str,
|
|
1475
1532
|
block: OptionalNullable[int] = UNSET,
|
|
1476
1533
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1477
1534
|
server_url: Optional[str] = None,
|
|
@@ -1489,7 +1546,7 @@ class AaveV3(BaseSDK):
|
|
|
1489
1546
|
calculated by aggregating data across all open positions held by the user, offering
|
|
1490
1547
|
a holistic view of their financial standing within the AAVE ecosystem.
|
|
1491
1548
|
|
|
1492
|
-
:param chain:
|
|
1549
|
+
:param chain:
|
|
1493
1550
|
:param user: The user to get position summary for.
|
|
1494
1551
|
:param block: Optional block number (defaults to latest).
|
|
1495
1552
|
:param retries: Override the default retry configuration for this method
|
|
@@ -1507,7 +1564,7 @@ class AaveV3(BaseSDK):
|
|
|
1507
1564
|
else:
|
|
1508
1565
|
base_url = self._get_url(base_url, url_variables)
|
|
1509
1566
|
|
|
1510
|
-
request = models.
|
|
1567
|
+
request = models.V1AaveUserPositionSummaryRequest(
|
|
1511
1568
|
chain=chain,
|
|
1512
1569
|
block=block,
|
|
1513
1570
|
user=user,
|
|
@@ -1515,7 +1572,7 @@ class AaveV3(BaseSDK):
|
|
|
1515
1572
|
|
|
1516
1573
|
req = self._build_request_async(
|
|
1517
1574
|
method="GET",
|
|
1518
|
-
path="/
|
|
1575
|
+
path="/v1/aave/user_position_summary",
|
|
1519
1576
|
base_url=base_url,
|
|
1520
1577
|
url_variables=url_variables,
|
|
1521
1578
|
request=request,
|
|
@@ -1526,6 +1583,7 @@ class AaveV3(BaseSDK):
|
|
|
1526
1583
|
accept_header_value="application/json",
|
|
1527
1584
|
http_headers=http_headers,
|
|
1528
1585
|
security=self.sdk_configuration.security,
|
|
1586
|
+
allow_empty_value=None,
|
|
1529
1587
|
timeout_ms=timeout_ms,
|
|
1530
1588
|
)
|
|
1531
1589
|
|
|
@@ -1541,8 +1599,8 @@ class AaveV3(BaseSDK):
|
|
|
1541
1599
|
hook_ctx=HookContext(
|
|
1542
1600
|
config=self.sdk_configuration,
|
|
1543
1601
|
base_url=base_url or "",
|
|
1544
|
-
operation_id="
|
|
1545
|
-
oauth2_scopes=
|
|
1602
|
+
operation_id="v1_aave_user_position_summary",
|
|
1603
|
+
oauth2_scopes=None,
|
|
1546
1604
|
security_source=self.sdk_configuration.security,
|
|
1547
1605
|
),
|
|
1548
1606
|
request=req,
|
|
@@ -1552,40 +1610,29 @@ class AaveV3(BaseSDK):
|
|
|
1552
1610
|
|
|
1553
1611
|
response_data: Any = None
|
|
1554
1612
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1555
|
-
return
|
|
1556
|
-
|
|
1613
|
+
return unmarshal_json_response(
|
|
1614
|
+
models.AaveUserPositionSummaryResponse, http_res
|
|
1557
1615
|
)
|
|
1558
1616
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1559
|
-
response_data =
|
|
1560
|
-
|
|
1617
|
+
response_data = unmarshal_json_response(
|
|
1618
|
+
errors.HTTPValidationErrorData, http_res
|
|
1561
1619
|
)
|
|
1562
|
-
raise errors.HTTPValidationError(
|
|
1620
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1563
1621
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1564
1622
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1565
|
-
raise errors.APIError(
|
|
1566
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1567
|
-
)
|
|
1623
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1568
1624
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1569
1625
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1570
|
-
raise errors.APIError(
|
|
1571
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1572
|
-
)
|
|
1626
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1573
1627
|
|
|
1574
|
-
|
|
1575
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1576
|
-
raise errors.APIError(
|
|
1577
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1578
|
-
http_res.status_code,
|
|
1579
|
-
http_res_text,
|
|
1580
|
-
http_res,
|
|
1581
|
-
)
|
|
1628
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1582
1629
|
|
|
1583
|
-
def
|
|
1630
|
+
def aave_user_position_per_token(
|
|
1584
1631
|
self,
|
|
1585
1632
|
*,
|
|
1586
|
-
chain: models.
|
|
1587
|
-
user: str
|
|
1588
|
-
token:
|
|
1633
|
+
chain: models.V1AaveUserPositionPerTokenChain,
|
|
1634
|
+
user: str,
|
|
1635
|
+
token: str,
|
|
1589
1636
|
block: OptionalNullable[int] = UNSET,
|
|
1590
1637
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1591
1638
|
server_url: Optional[str] = None,
|
|
@@ -1604,9 +1651,9 @@ class AaveV3(BaseSDK):
|
|
|
1604
1651
|
positions held by the user for the specified token, offering a detailed view of
|
|
1605
1652
|
their financial standing within the AAVE ecosystem.
|
|
1606
1653
|
|
|
1607
|
-
:param chain:
|
|
1654
|
+
:param chain:
|
|
1608
1655
|
:param user: The user to fetch the token-specific position of.
|
|
1609
|
-
:param token: The symbol of the asset to fetch the user's position on..
|
|
1656
|
+
:param token: The symbol or address of the asset to fetch the user's position on..
|
|
1610
1657
|
:param block: Optional block number (defaults to latest).
|
|
1611
1658
|
:param retries: Override the default retry configuration for this method
|
|
1612
1659
|
:param server_url: Override the default server URL for this method
|
|
@@ -1623,7 +1670,7 @@ class AaveV3(BaseSDK):
|
|
|
1623
1670
|
else:
|
|
1624
1671
|
base_url = self._get_url(base_url, url_variables)
|
|
1625
1672
|
|
|
1626
|
-
request = models.
|
|
1673
|
+
request = models.V1AaveUserPositionPerTokenRequest(
|
|
1627
1674
|
chain=chain,
|
|
1628
1675
|
block=block,
|
|
1629
1676
|
user=user,
|
|
@@ -1632,7 +1679,7 @@ class AaveV3(BaseSDK):
|
|
|
1632
1679
|
|
|
1633
1680
|
req = self._build_request(
|
|
1634
1681
|
method="GET",
|
|
1635
|
-
path="/
|
|
1682
|
+
path="/v1/aave/user_position_per_token",
|
|
1636
1683
|
base_url=base_url,
|
|
1637
1684
|
url_variables=url_variables,
|
|
1638
1685
|
request=request,
|
|
@@ -1643,6 +1690,7 @@ class AaveV3(BaseSDK):
|
|
|
1643
1690
|
accept_header_value="application/json",
|
|
1644
1691
|
http_headers=http_headers,
|
|
1645
1692
|
security=self.sdk_configuration.security,
|
|
1693
|
+
allow_empty_value=None,
|
|
1646
1694
|
timeout_ms=timeout_ms,
|
|
1647
1695
|
)
|
|
1648
1696
|
|
|
@@ -1658,8 +1706,8 @@ class AaveV3(BaseSDK):
|
|
|
1658
1706
|
hook_ctx=HookContext(
|
|
1659
1707
|
config=self.sdk_configuration,
|
|
1660
1708
|
base_url=base_url or "",
|
|
1661
|
-
operation_id="
|
|
1662
|
-
oauth2_scopes=
|
|
1709
|
+
operation_id="v1_aave_user_position_per_token",
|
|
1710
|
+
oauth2_scopes=None,
|
|
1663
1711
|
security_source=self.sdk_configuration.security,
|
|
1664
1712
|
),
|
|
1665
1713
|
request=req,
|
|
@@ -1669,40 +1717,29 @@ class AaveV3(BaseSDK):
|
|
|
1669
1717
|
|
|
1670
1718
|
response_data: Any = None
|
|
1671
1719
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1672
|
-
return
|
|
1673
|
-
|
|
1720
|
+
return unmarshal_json_response(
|
|
1721
|
+
models.AaveUserPositionPerTokenResponse, http_res
|
|
1674
1722
|
)
|
|
1675
1723
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1676
|
-
response_data =
|
|
1677
|
-
|
|
1724
|
+
response_data = unmarshal_json_response(
|
|
1725
|
+
errors.HTTPValidationErrorData, http_res
|
|
1678
1726
|
)
|
|
1679
|
-
raise errors.HTTPValidationError(
|
|
1727
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1680
1728
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1681
1729
|
http_res_text = utils.stream_to_text(http_res)
|
|
1682
|
-
raise errors.APIError(
|
|
1683
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1684
|
-
)
|
|
1730
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1685
1731
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1686
1732
|
http_res_text = utils.stream_to_text(http_res)
|
|
1687
|
-
raise errors.APIError(
|
|
1688
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1689
|
-
)
|
|
1733
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1690
1734
|
|
|
1691
|
-
|
|
1692
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1693
|
-
raise errors.APIError(
|
|
1694
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1695
|
-
http_res.status_code,
|
|
1696
|
-
http_res_text,
|
|
1697
|
-
http_res,
|
|
1698
|
-
)
|
|
1735
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1699
1736
|
|
|
1700
|
-
async def
|
|
1737
|
+
async def aave_user_position_per_token_async(
|
|
1701
1738
|
self,
|
|
1702
1739
|
*,
|
|
1703
|
-
chain: models.
|
|
1704
|
-
user: str
|
|
1705
|
-
token:
|
|
1740
|
+
chain: models.V1AaveUserPositionPerTokenChain,
|
|
1741
|
+
user: str,
|
|
1742
|
+
token: str,
|
|
1706
1743
|
block: OptionalNullable[int] = UNSET,
|
|
1707
1744
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1708
1745
|
server_url: Optional[str] = None,
|
|
@@ -1721,9 +1758,9 @@ class AaveV3(BaseSDK):
|
|
|
1721
1758
|
positions held by the user for the specified token, offering a detailed view of
|
|
1722
1759
|
their financial standing within the AAVE ecosystem.
|
|
1723
1760
|
|
|
1724
|
-
:param chain:
|
|
1761
|
+
:param chain:
|
|
1725
1762
|
:param user: The user to fetch the token-specific position of.
|
|
1726
|
-
:param token: The symbol of the asset to fetch the user's position on..
|
|
1763
|
+
:param token: The symbol or address of the asset to fetch the user's position on..
|
|
1727
1764
|
:param block: Optional block number (defaults to latest).
|
|
1728
1765
|
:param retries: Override the default retry configuration for this method
|
|
1729
1766
|
:param server_url: Override the default server URL for this method
|
|
@@ -1740,7 +1777,7 @@ class AaveV3(BaseSDK):
|
|
|
1740
1777
|
else:
|
|
1741
1778
|
base_url = self._get_url(base_url, url_variables)
|
|
1742
1779
|
|
|
1743
|
-
request = models.
|
|
1780
|
+
request = models.V1AaveUserPositionPerTokenRequest(
|
|
1744
1781
|
chain=chain,
|
|
1745
1782
|
block=block,
|
|
1746
1783
|
user=user,
|
|
@@ -1749,7 +1786,7 @@ class AaveV3(BaseSDK):
|
|
|
1749
1786
|
|
|
1750
1787
|
req = self._build_request_async(
|
|
1751
1788
|
method="GET",
|
|
1752
|
-
path="/
|
|
1789
|
+
path="/v1/aave/user_position_per_token",
|
|
1753
1790
|
base_url=base_url,
|
|
1754
1791
|
url_variables=url_variables,
|
|
1755
1792
|
request=request,
|
|
@@ -1760,6 +1797,7 @@ class AaveV3(BaseSDK):
|
|
|
1760
1797
|
accept_header_value="application/json",
|
|
1761
1798
|
http_headers=http_headers,
|
|
1762
1799
|
security=self.sdk_configuration.security,
|
|
1800
|
+
allow_empty_value=None,
|
|
1763
1801
|
timeout_ms=timeout_ms,
|
|
1764
1802
|
)
|
|
1765
1803
|
|
|
@@ -1775,8 +1813,8 @@ class AaveV3(BaseSDK):
|
|
|
1775
1813
|
hook_ctx=HookContext(
|
|
1776
1814
|
config=self.sdk_configuration,
|
|
1777
1815
|
base_url=base_url or "",
|
|
1778
|
-
operation_id="
|
|
1779
|
-
oauth2_scopes=
|
|
1816
|
+
operation_id="v1_aave_user_position_per_token",
|
|
1817
|
+
oauth2_scopes=None,
|
|
1780
1818
|
security_source=self.sdk_configuration.security,
|
|
1781
1819
|
),
|
|
1782
1820
|
request=req,
|
|
@@ -1786,41 +1824,30 @@ class AaveV3(BaseSDK):
|
|
|
1786
1824
|
|
|
1787
1825
|
response_data: Any = None
|
|
1788
1826
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1789
|
-
return
|
|
1790
|
-
|
|
1827
|
+
return unmarshal_json_response(
|
|
1828
|
+
models.AaveUserPositionPerTokenResponse, http_res
|
|
1791
1829
|
)
|
|
1792
1830
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1793
|
-
response_data =
|
|
1794
|
-
|
|
1831
|
+
response_data = unmarshal_json_response(
|
|
1832
|
+
errors.HTTPValidationErrorData, http_res
|
|
1795
1833
|
)
|
|
1796
|
-
raise errors.HTTPValidationError(
|
|
1834
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1797
1835
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1798
1836
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1799
|
-
raise errors.APIError(
|
|
1800
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1801
|
-
)
|
|
1837
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1802
1838
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1803
1839
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1804
|
-
raise errors.APIError(
|
|
1805
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1806
|
-
)
|
|
1840
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1807
1841
|
|
|
1808
|
-
|
|
1809
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1810
|
-
raise errors.APIError(
|
|
1811
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1812
|
-
http_res.status_code,
|
|
1813
|
-
http_res_text,
|
|
1814
|
-
http_res,
|
|
1815
|
-
)
|
|
1842
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1816
1843
|
|
|
1817
|
-
def
|
|
1844
|
+
def aave_historical_transactions(
|
|
1818
1845
|
self,
|
|
1819
1846
|
*,
|
|
1820
|
-
chain: models.
|
|
1821
|
-
user_address: str
|
|
1822
|
-
offset: Optional[int] =
|
|
1823
|
-
limit: Optional[int] =
|
|
1847
|
+
chain: models.V1AaveHistoricalTransactionsChain,
|
|
1848
|
+
user_address: str,
|
|
1849
|
+
offset: Optional[int] = None,
|
|
1850
|
+
limit: Optional[int] = None,
|
|
1824
1851
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1825
1852
|
server_url: Optional[str] = None,
|
|
1826
1853
|
timeout_ms: Optional[int] = None,
|
|
@@ -1835,7 +1862,11 @@ class AaveV3(BaseSDK):
|
|
|
1835
1862
|
and transaction type. This provides a comprehensive view of the user's historical
|
|
1836
1863
|
activity within the AAVE protocol.
|
|
1837
1864
|
|
|
1838
|
-
|
|
1865
|
+
⚠️ Data comes from the official Aave subgraph (
|
|
1866
|
+
https://github.com/aave/protocol-subgraphs)
|
|
1867
|
+
and thus this particular endpoint may be less reliable than our other endpoints. ⚠️
|
|
1868
|
+
|
|
1869
|
+
:param chain:
|
|
1839
1870
|
:param user_address: The address of the user to get historical transactions for.
|
|
1840
1871
|
:param offset: The offset of the first item to return.
|
|
1841
1872
|
:param limit: The number of items to return.
|
|
@@ -1854,7 +1885,7 @@ class AaveV3(BaseSDK):
|
|
|
1854
1885
|
else:
|
|
1855
1886
|
base_url = self._get_url(base_url, url_variables)
|
|
1856
1887
|
|
|
1857
|
-
request = models.
|
|
1888
|
+
request = models.V1AaveHistoricalTransactionsRequest(
|
|
1858
1889
|
offset=offset,
|
|
1859
1890
|
limit=limit,
|
|
1860
1891
|
chain=chain,
|
|
@@ -1863,7 +1894,7 @@ class AaveV3(BaseSDK):
|
|
|
1863
1894
|
|
|
1864
1895
|
req = self._build_request(
|
|
1865
1896
|
method="GET",
|
|
1866
|
-
path="/
|
|
1897
|
+
path="/v1/aave/historical_transactions",
|
|
1867
1898
|
base_url=base_url,
|
|
1868
1899
|
url_variables=url_variables,
|
|
1869
1900
|
request=request,
|
|
@@ -1874,6 +1905,7 @@ class AaveV3(BaseSDK):
|
|
|
1874
1905
|
accept_header_value="application/json",
|
|
1875
1906
|
http_headers=http_headers,
|
|
1876
1907
|
security=self.sdk_configuration.security,
|
|
1908
|
+
allow_empty_value=None,
|
|
1877
1909
|
timeout_ms=timeout_ms,
|
|
1878
1910
|
)
|
|
1879
1911
|
|
|
@@ -1889,8 +1921,8 @@ class AaveV3(BaseSDK):
|
|
|
1889
1921
|
hook_ctx=HookContext(
|
|
1890
1922
|
config=self.sdk_configuration,
|
|
1891
1923
|
base_url=base_url or "",
|
|
1892
|
-
operation_id="
|
|
1893
|
-
oauth2_scopes=
|
|
1924
|
+
operation_id="v1_aave_historical_transactions",
|
|
1925
|
+
oauth2_scopes=None,
|
|
1894
1926
|
security_source=self.sdk_configuration.security,
|
|
1895
1927
|
),
|
|
1896
1928
|
request=req,
|
|
@@ -1900,41 +1932,30 @@ class AaveV3(BaseSDK):
|
|
|
1900
1932
|
|
|
1901
1933
|
response_data: Any = None
|
|
1902
1934
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1903
|
-
return
|
|
1904
|
-
|
|
1935
|
+
return unmarshal_json_response(
|
|
1936
|
+
models.AaveHistoricalTransactionsResponse, http_res
|
|
1905
1937
|
)
|
|
1906
1938
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1907
|
-
response_data =
|
|
1908
|
-
|
|
1939
|
+
response_data = unmarshal_json_response(
|
|
1940
|
+
errors.HTTPValidationErrorData, http_res
|
|
1909
1941
|
)
|
|
1910
|
-
raise errors.HTTPValidationError(
|
|
1942
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
1911
1943
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1912
1944
|
http_res_text = utils.stream_to_text(http_res)
|
|
1913
|
-
raise errors.APIError(
|
|
1914
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1915
|
-
)
|
|
1945
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1916
1946
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1917
1947
|
http_res_text = utils.stream_to_text(http_res)
|
|
1918
|
-
raise errors.APIError(
|
|
1919
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1920
|
-
)
|
|
1948
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1921
1949
|
|
|
1922
|
-
|
|
1923
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1924
|
-
raise errors.APIError(
|
|
1925
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1926
|
-
http_res.status_code,
|
|
1927
|
-
http_res_text,
|
|
1928
|
-
http_res,
|
|
1929
|
-
)
|
|
1950
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1930
1951
|
|
|
1931
|
-
async def
|
|
1952
|
+
async def aave_historical_transactions_async(
|
|
1932
1953
|
self,
|
|
1933
1954
|
*,
|
|
1934
|
-
chain: models.
|
|
1935
|
-
user_address: str
|
|
1936
|
-
offset: Optional[int] =
|
|
1937
|
-
limit: Optional[int] =
|
|
1955
|
+
chain: models.V1AaveHistoricalTransactionsChain,
|
|
1956
|
+
user_address: str,
|
|
1957
|
+
offset: Optional[int] = None,
|
|
1958
|
+
limit: Optional[int] = None,
|
|
1938
1959
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1939
1960
|
server_url: Optional[str] = None,
|
|
1940
1961
|
timeout_ms: Optional[int] = None,
|
|
@@ -1949,7 +1970,11 @@ class AaveV3(BaseSDK):
|
|
|
1949
1970
|
and transaction type. This provides a comprehensive view of the user's historical
|
|
1950
1971
|
activity within the AAVE protocol.
|
|
1951
1972
|
|
|
1952
|
-
|
|
1973
|
+
⚠️ Data comes from the official Aave subgraph (
|
|
1974
|
+
https://github.com/aave/protocol-subgraphs)
|
|
1975
|
+
and thus this particular endpoint may be less reliable than our other endpoints. ⚠️
|
|
1976
|
+
|
|
1977
|
+
:param chain:
|
|
1953
1978
|
:param user_address: The address of the user to get historical transactions for.
|
|
1954
1979
|
:param offset: The offset of the first item to return.
|
|
1955
1980
|
:param limit: The number of items to return.
|
|
@@ -1968,7 +1993,7 @@ class AaveV3(BaseSDK):
|
|
|
1968
1993
|
else:
|
|
1969
1994
|
base_url = self._get_url(base_url, url_variables)
|
|
1970
1995
|
|
|
1971
|
-
request = models.
|
|
1996
|
+
request = models.V1AaveHistoricalTransactionsRequest(
|
|
1972
1997
|
offset=offset,
|
|
1973
1998
|
limit=limit,
|
|
1974
1999
|
chain=chain,
|
|
@@ -1977,7 +2002,7 @@ class AaveV3(BaseSDK):
|
|
|
1977
2002
|
|
|
1978
2003
|
req = self._build_request_async(
|
|
1979
2004
|
method="GET",
|
|
1980
|
-
path="/
|
|
2005
|
+
path="/v1/aave/historical_transactions",
|
|
1981
2006
|
base_url=base_url,
|
|
1982
2007
|
url_variables=url_variables,
|
|
1983
2008
|
request=request,
|
|
@@ -1988,6 +2013,7 @@ class AaveV3(BaseSDK):
|
|
|
1988
2013
|
accept_header_value="application/json",
|
|
1989
2014
|
http_headers=http_headers,
|
|
1990
2015
|
security=self.sdk_configuration.security,
|
|
2016
|
+
allow_empty_value=None,
|
|
1991
2017
|
timeout_ms=timeout_ms,
|
|
1992
2018
|
)
|
|
1993
2019
|
|
|
@@ -2003,8 +2029,8 @@ class AaveV3(BaseSDK):
|
|
|
2003
2029
|
hook_ctx=HookContext(
|
|
2004
2030
|
config=self.sdk_configuration,
|
|
2005
2031
|
base_url=base_url or "",
|
|
2006
|
-
operation_id="
|
|
2007
|
-
oauth2_scopes=
|
|
2032
|
+
operation_id="v1_aave_historical_transactions",
|
|
2033
|
+
oauth2_scopes=None,
|
|
2008
2034
|
security_source=self.sdk_configuration.security,
|
|
2009
2035
|
),
|
|
2010
2036
|
request=req,
|
|
@@ -2014,49 +2040,39 @@ class AaveV3(BaseSDK):
|
|
|
2014
2040
|
|
|
2015
2041
|
response_data: Any = None
|
|
2016
2042
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2017
|
-
return
|
|
2018
|
-
|
|
2043
|
+
return unmarshal_json_response(
|
|
2044
|
+
models.AaveHistoricalTransactionsResponse, http_res
|
|
2019
2045
|
)
|
|
2020
2046
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2021
|
-
response_data =
|
|
2022
|
-
|
|
2047
|
+
response_data = unmarshal_json_response(
|
|
2048
|
+
errors.HTTPValidationErrorData, http_res
|
|
2023
2049
|
)
|
|
2024
|
-
raise errors.HTTPValidationError(
|
|
2050
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
2025
2051
|
if utils.match_response(http_res, "4XX", "*"):
|
|
2026
2052
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2027
|
-
raise errors.APIError(
|
|
2028
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2029
|
-
)
|
|
2053
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2030
2054
|
if utils.match_response(http_res, "5XX", "*"):
|
|
2031
2055
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2032
|
-
raise errors.APIError(
|
|
2033
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2034
|
-
)
|
|
2056
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2035
2057
|
|
|
2036
|
-
|
|
2037
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2038
|
-
raise errors.APIError(
|
|
2039
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
2040
|
-
http_res.status_code,
|
|
2041
|
-
http_res_text,
|
|
2042
|
-
http_res,
|
|
2043
|
-
)
|
|
2058
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
2044
2059
|
|
|
2045
|
-
def
|
|
2060
|
+
def aave_supply(
|
|
2046
2061
|
self,
|
|
2047
2062
|
*,
|
|
2048
|
-
token:
|
|
2063
|
+
token: str,
|
|
2049
2064
|
amount: Union[
|
|
2050
2065
|
models.AaveSupplyRequestAmount, models.AaveSupplyRequestAmountTypedDict
|
|
2051
2066
|
],
|
|
2052
|
-
chain: models.
|
|
2067
|
+
chain: models.AaveSupplyRequestChain,
|
|
2053
2068
|
sender: str,
|
|
2054
2069
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2070
|
+
estimate_gas: Optional[bool] = None,
|
|
2055
2071
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2056
2072
|
server_url: Optional[str] = None,
|
|
2057
2073
|
timeout_ms: Optional[int] = None,
|
|
2058
2074
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2059
|
-
) -> models.
|
|
2075
|
+
) -> models.TransactionResponse:
|
|
2060
2076
|
r"""Supply/Lend
|
|
2061
2077
|
|
|
2062
2078
|
By supplying assets, users can earn interest on their deposits.
|
|
@@ -2068,12 +2084,21 @@ class AaveV3(BaseSDK):
|
|
|
2068
2084
|
Overall, this endpoint is a critical component for users looking to maximize their
|
|
2069
2085
|
asset utility within the AAVEv3 ecosystem, providing both earning potential and
|
|
2070
2086
|
borrowing flexibility.
|
|
2087
|
+
<Info>
|
|
2088
|
+
**Required Allowances**
|
|
2089
|
+
|
|
2090
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2091
|
+
|
|
2092
|
+
- `AaveV3Pool`
|
|
2093
|
+
</Info>
|
|
2094
|
+
|
|
2071
2095
|
|
|
2072
|
-
:param token:
|
|
2096
|
+
:param token: The symbol or address of the underlying asset to supply as collateral. You can borrow against it..
|
|
2073
2097
|
:param amount: The amount of the asset to supply
|
|
2074
|
-
:param chain:
|
|
2098
|
+
:param chain:
|
|
2075
2099
|
:param sender: The address of the transaction sender.
|
|
2076
2100
|
:param on_behalf_of: The address on behalf of whom the supply is made. Defaults to the transaction sender.
|
|
2101
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
2077
2102
|
:param retries: Override the default retry configuration for this method
|
|
2078
2103
|
:param server_url: Override the default server URL for this method
|
|
2079
2104
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -2095,11 +2120,12 @@ class AaveV3(BaseSDK):
|
|
|
2095
2120
|
on_behalf_of=on_behalf_of,
|
|
2096
2121
|
chain=chain,
|
|
2097
2122
|
sender=sender,
|
|
2123
|
+
estimate_gas=estimate_gas,
|
|
2098
2124
|
)
|
|
2099
2125
|
|
|
2100
2126
|
req = self._build_request(
|
|
2101
2127
|
method="POST",
|
|
2102
|
-
path="/
|
|
2128
|
+
path="/v1/aave/supply",
|
|
2103
2129
|
base_url=base_url,
|
|
2104
2130
|
url_variables=url_variables,
|
|
2105
2131
|
request=request,
|
|
@@ -2113,6 +2139,7 @@ class AaveV3(BaseSDK):
|
|
|
2113
2139
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
2114
2140
|
request, False, False, "json", models.AaveSupplyRequest
|
|
2115
2141
|
),
|
|
2142
|
+
allow_empty_value=None,
|
|
2116
2143
|
timeout_ms=timeout_ms,
|
|
2117
2144
|
)
|
|
2118
2145
|
|
|
@@ -2128,8 +2155,8 @@ class AaveV3(BaseSDK):
|
|
|
2128
2155
|
hook_ctx=HookContext(
|
|
2129
2156
|
config=self.sdk_configuration,
|
|
2130
2157
|
base_url=base_url or "",
|
|
2131
|
-
operation_id="
|
|
2132
|
-
oauth2_scopes=
|
|
2158
|
+
operation_id="v1_aave_supply",
|
|
2159
|
+
oauth2_scopes=None,
|
|
2133
2160
|
security_source=self.sdk_configuration.security,
|
|
2134
2161
|
),
|
|
2135
2162
|
request=req,
|
|
@@ -2139,47 +2166,37 @@ class AaveV3(BaseSDK):
|
|
|
2139
2166
|
|
|
2140
2167
|
response_data: Any = None
|
|
2141
2168
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2142
|
-
return
|
|
2169
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2143
2170
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2144
|
-
response_data =
|
|
2145
|
-
|
|
2171
|
+
response_data = unmarshal_json_response(
|
|
2172
|
+
errors.HTTPValidationErrorData, http_res
|
|
2146
2173
|
)
|
|
2147
|
-
raise errors.HTTPValidationError(
|
|
2174
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
2148
2175
|
if utils.match_response(http_res, "4XX", "*"):
|
|
2149
2176
|
http_res_text = utils.stream_to_text(http_res)
|
|
2150
|
-
raise errors.APIError(
|
|
2151
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2152
|
-
)
|
|
2177
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2153
2178
|
if utils.match_response(http_res, "5XX", "*"):
|
|
2154
2179
|
http_res_text = utils.stream_to_text(http_res)
|
|
2155
|
-
raise errors.APIError(
|
|
2156
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2157
|
-
)
|
|
2180
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2158
2181
|
|
|
2159
|
-
|
|
2160
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
2161
|
-
raise errors.APIError(
|
|
2162
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
2163
|
-
http_res.status_code,
|
|
2164
|
-
http_res_text,
|
|
2165
|
-
http_res,
|
|
2166
|
-
)
|
|
2182
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
2167
2183
|
|
|
2168
|
-
async def
|
|
2184
|
+
async def aave_supply_async(
|
|
2169
2185
|
self,
|
|
2170
2186
|
*,
|
|
2171
|
-
token:
|
|
2187
|
+
token: str,
|
|
2172
2188
|
amount: Union[
|
|
2173
2189
|
models.AaveSupplyRequestAmount, models.AaveSupplyRequestAmountTypedDict
|
|
2174
2190
|
],
|
|
2175
|
-
chain: models.
|
|
2191
|
+
chain: models.AaveSupplyRequestChain,
|
|
2176
2192
|
sender: str,
|
|
2177
2193
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2194
|
+
estimate_gas: Optional[bool] = None,
|
|
2178
2195
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2179
2196
|
server_url: Optional[str] = None,
|
|
2180
2197
|
timeout_ms: Optional[int] = None,
|
|
2181
2198
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2182
|
-
) -> models.
|
|
2199
|
+
) -> models.TransactionResponse:
|
|
2183
2200
|
r"""Supply/Lend
|
|
2184
2201
|
|
|
2185
2202
|
By supplying assets, users can earn interest on their deposits.
|
|
@@ -2191,12 +2208,21 @@ class AaveV3(BaseSDK):
|
|
|
2191
2208
|
Overall, this endpoint is a critical component for users looking to maximize their
|
|
2192
2209
|
asset utility within the AAVEv3 ecosystem, providing both earning potential and
|
|
2193
2210
|
borrowing flexibility.
|
|
2211
|
+
<Info>
|
|
2212
|
+
**Required Allowances**
|
|
2213
|
+
|
|
2214
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2215
|
+
|
|
2216
|
+
- `AaveV3Pool`
|
|
2217
|
+
</Info>
|
|
2218
|
+
|
|
2194
2219
|
|
|
2195
|
-
:param token:
|
|
2220
|
+
:param token: The symbol or address of the underlying asset to supply as collateral. You can borrow against it..
|
|
2196
2221
|
:param amount: The amount of the asset to supply
|
|
2197
|
-
:param chain:
|
|
2222
|
+
:param chain:
|
|
2198
2223
|
:param sender: The address of the transaction sender.
|
|
2199
2224
|
:param on_behalf_of: The address on behalf of whom the supply is made. Defaults to the transaction sender.
|
|
2225
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
2200
2226
|
:param retries: Override the default retry configuration for this method
|
|
2201
2227
|
:param server_url: Override the default server URL for this method
|
|
2202
2228
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -2218,11 +2244,12 @@ class AaveV3(BaseSDK):
|
|
|
2218
2244
|
on_behalf_of=on_behalf_of,
|
|
2219
2245
|
chain=chain,
|
|
2220
2246
|
sender=sender,
|
|
2247
|
+
estimate_gas=estimate_gas,
|
|
2221
2248
|
)
|
|
2222
2249
|
|
|
2223
2250
|
req = self._build_request_async(
|
|
2224
2251
|
method="POST",
|
|
2225
|
-
path="/
|
|
2252
|
+
path="/v1/aave/supply",
|
|
2226
2253
|
base_url=base_url,
|
|
2227
2254
|
url_variables=url_variables,
|
|
2228
2255
|
request=request,
|
|
@@ -2236,6 +2263,7 @@ class AaveV3(BaseSDK):
|
|
|
2236
2263
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
2237
2264
|
request, False, False, "json", models.AaveSupplyRequest
|
|
2238
2265
|
),
|
|
2266
|
+
allow_empty_value=None,
|
|
2239
2267
|
timeout_ms=timeout_ms,
|
|
2240
2268
|
)
|
|
2241
2269
|
|
|
@@ -2251,8 +2279,8 @@ class AaveV3(BaseSDK):
|
|
|
2251
2279
|
hook_ctx=HookContext(
|
|
2252
2280
|
config=self.sdk_configuration,
|
|
2253
2281
|
base_url=base_url or "",
|
|
2254
|
-
operation_id="
|
|
2255
|
-
oauth2_scopes=
|
|
2282
|
+
operation_id="v1_aave_supply",
|
|
2283
|
+
oauth2_scopes=None,
|
|
2256
2284
|
security_source=self.sdk_configuration.security,
|
|
2257
2285
|
),
|
|
2258
2286
|
request=req,
|
|
@@ -2262,61 +2290,62 @@ class AaveV3(BaseSDK):
|
|
|
2262
2290
|
|
|
2263
2291
|
response_data: Any = None
|
|
2264
2292
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2265
|
-
return
|
|
2293
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2266
2294
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2267
|
-
response_data =
|
|
2268
|
-
|
|
2295
|
+
response_data = unmarshal_json_response(
|
|
2296
|
+
errors.HTTPValidationErrorData, http_res
|
|
2269
2297
|
)
|
|
2270
|
-
raise errors.HTTPValidationError(
|
|
2298
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
2271
2299
|
if utils.match_response(http_res, "4XX", "*"):
|
|
2272
2300
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2273
|
-
raise errors.APIError(
|
|
2274
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2275
|
-
)
|
|
2301
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2276
2302
|
if utils.match_response(http_res, "5XX", "*"):
|
|
2277
2303
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2278
|
-
raise errors.APIError(
|
|
2279
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2280
|
-
)
|
|
2304
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2281
2305
|
|
|
2282
|
-
|
|
2283
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2284
|
-
raise errors.APIError(
|
|
2285
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
2286
|
-
http_res.status_code,
|
|
2287
|
-
http_res_text,
|
|
2288
|
-
http_res,
|
|
2289
|
-
)
|
|
2306
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
2290
2307
|
|
|
2291
|
-
def
|
|
2308
|
+
def aave_borrow(
|
|
2292
2309
|
self,
|
|
2293
2310
|
*,
|
|
2294
|
-
token:
|
|
2311
|
+
token: str,
|
|
2295
2312
|
amount: Union[
|
|
2296
2313
|
models.AaveBorrowRequestAmount, models.AaveBorrowRequestAmountTypedDict
|
|
2297
2314
|
],
|
|
2298
2315
|
interest_rate_mode: models.InterestRateMode,
|
|
2299
|
-
chain: models.
|
|
2316
|
+
chain: models.AaveBorrowRequestChain,
|
|
2300
2317
|
sender: str,
|
|
2301
2318
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2319
|
+
estimate_gas: Optional[bool] = None,
|
|
2302
2320
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2303
2321
|
server_url: Optional[str] = None,
|
|
2304
2322
|
timeout_ms: Optional[int] = None,
|
|
2305
2323
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2306
|
-
) -> models.
|
|
2324
|
+
) -> models.TransactionResponse:
|
|
2307
2325
|
r"""Borrow
|
|
2308
2326
|
|
|
2309
2327
|
You will pay interest for your borrows.
|
|
2310
2328
|
|
|
2311
2329
|
Price changes in the assets may lead to some or all of your collateral being
|
|
2312
2330
|
liquidated, if the borrow position becomes unhealthy.
|
|
2331
|
+
<Info>
|
|
2332
|
+
**Required Allowances**
|
|
2333
|
+
|
|
2334
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2313
2335
|
|
|
2314
|
-
|
|
2336
|
+
- `AaveV3Pool`
|
|
2337
|
+
</Info>
|
|
2338
|
+
|
|
2339
|
+
|
|
2340
|
+
:param token: The symbol or address of the underlying asset to borrow..
|
|
2315
2341
|
:param amount: The amount of the asset to borrow
|
|
2316
|
-
:param interest_rate_mode: On AAVE there are 2 different interest modes.
|
|
2317
|
-
|
|
2342
|
+
:param interest_rate_mode: On AAVE there are 2 different interest modes.
|
|
2343
|
+
|
|
2344
|
+
A stable (but typically higher rate), or a variable rate.
|
|
2345
|
+
:param chain:
|
|
2318
2346
|
:param sender: The address of the transaction sender.
|
|
2319
2347
|
:param on_behalf_of: The address on behalf of whom the supply is made
|
|
2348
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
2320
2349
|
:param retries: Override the default retry configuration for this method
|
|
2321
2350
|
:param server_url: Override the default server URL for this method
|
|
2322
2351
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -2339,11 +2368,12 @@ class AaveV3(BaseSDK):
|
|
|
2339
2368
|
on_behalf_of=on_behalf_of,
|
|
2340
2369
|
chain=chain,
|
|
2341
2370
|
sender=sender,
|
|
2371
|
+
estimate_gas=estimate_gas,
|
|
2342
2372
|
)
|
|
2343
2373
|
|
|
2344
2374
|
req = self._build_request(
|
|
2345
2375
|
method="POST",
|
|
2346
|
-
path="/
|
|
2376
|
+
path="/v1/aave/borrow",
|
|
2347
2377
|
base_url=base_url,
|
|
2348
2378
|
url_variables=url_variables,
|
|
2349
2379
|
request=request,
|
|
@@ -2357,6 +2387,7 @@ class AaveV3(BaseSDK):
|
|
|
2357
2387
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
2358
2388
|
request, False, False, "json", models.AaveBorrowRequest
|
|
2359
2389
|
),
|
|
2390
|
+
allow_empty_value=None,
|
|
2360
2391
|
timeout_ms=timeout_ms,
|
|
2361
2392
|
)
|
|
2362
2393
|
|
|
@@ -2372,8 +2403,8 @@ class AaveV3(BaseSDK):
|
|
|
2372
2403
|
hook_ctx=HookContext(
|
|
2373
2404
|
config=self.sdk_configuration,
|
|
2374
2405
|
base_url=base_url or "",
|
|
2375
|
-
operation_id="
|
|
2376
|
-
oauth2_scopes=
|
|
2406
|
+
operation_id="v1_aave_borrow",
|
|
2407
|
+
oauth2_scopes=None,
|
|
2377
2408
|
security_source=self.sdk_configuration.security,
|
|
2378
2409
|
),
|
|
2379
2410
|
request=req,
|
|
@@ -2383,61 +2414,62 @@ class AaveV3(BaseSDK):
|
|
|
2383
2414
|
|
|
2384
2415
|
response_data: Any = None
|
|
2385
2416
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2386
|
-
return
|
|
2417
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2387
2418
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2388
|
-
response_data =
|
|
2389
|
-
|
|
2419
|
+
response_data = unmarshal_json_response(
|
|
2420
|
+
errors.HTTPValidationErrorData, http_res
|
|
2390
2421
|
)
|
|
2391
|
-
raise errors.HTTPValidationError(
|
|
2422
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
2392
2423
|
if utils.match_response(http_res, "4XX", "*"):
|
|
2393
2424
|
http_res_text = utils.stream_to_text(http_res)
|
|
2394
|
-
raise errors.APIError(
|
|
2395
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2396
|
-
)
|
|
2425
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2397
2426
|
if utils.match_response(http_res, "5XX", "*"):
|
|
2398
2427
|
http_res_text = utils.stream_to_text(http_res)
|
|
2399
|
-
raise errors.APIError(
|
|
2400
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2401
|
-
)
|
|
2428
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2402
2429
|
|
|
2403
|
-
|
|
2404
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
2405
|
-
raise errors.APIError(
|
|
2406
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
2407
|
-
http_res.status_code,
|
|
2408
|
-
http_res_text,
|
|
2409
|
-
http_res,
|
|
2410
|
-
)
|
|
2430
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
2411
2431
|
|
|
2412
|
-
async def
|
|
2432
|
+
async def aave_borrow_async(
|
|
2413
2433
|
self,
|
|
2414
2434
|
*,
|
|
2415
|
-
token:
|
|
2435
|
+
token: str,
|
|
2416
2436
|
amount: Union[
|
|
2417
2437
|
models.AaveBorrowRequestAmount, models.AaveBorrowRequestAmountTypedDict
|
|
2418
2438
|
],
|
|
2419
2439
|
interest_rate_mode: models.InterestRateMode,
|
|
2420
|
-
chain: models.
|
|
2440
|
+
chain: models.AaveBorrowRequestChain,
|
|
2421
2441
|
sender: str,
|
|
2422
2442
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2443
|
+
estimate_gas: Optional[bool] = None,
|
|
2423
2444
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2424
2445
|
server_url: Optional[str] = None,
|
|
2425
2446
|
timeout_ms: Optional[int] = None,
|
|
2426
2447
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2427
|
-
) -> models.
|
|
2448
|
+
) -> models.TransactionResponse:
|
|
2428
2449
|
r"""Borrow
|
|
2429
2450
|
|
|
2430
2451
|
You will pay interest for your borrows.
|
|
2431
2452
|
|
|
2432
2453
|
Price changes in the assets may lead to some or all of your collateral being
|
|
2433
2454
|
liquidated, if the borrow position becomes unhealthy.
|
|
2455
|
+
<Info>
|
|
2456
|
+
**Required Allowances**
|
|
2457
|
+
|
|
2458
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2459
|
+
|
|
2460
|
+
- `AaveV3Pool`
|
|
2461
|
+
</Info>
|
|
2462
|
+
|
|
2434
2463
|
|
|
2435
|
-
:param token:
|
|
2464
|
+
:param token: The symbol or address of the underlying asset to borrow..
|
|
2436
2465
|
:param amount: The amount of the asset to borrow
|
|
2437
|
-
:param interest_rate_mode: On AAVE there are 2 different interest modes.
|
|
2438
|
-
|
|
2466
|
+
:param interest_rate_mode: On AAVE there are 2 different interest modes.
|
|
2467
|
+
|
|
2468
|
+
A stable (but typically higher rate), or a variable rate.
|
|
2469
|
+
:param chain:
|
|
2439
2470
|
:param sender: The address of the transaction sender.
|
|
2440
2471
|
:param on_behalf_of: The address on behalf of whom the supply is made
|
|
2472
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
2441
2473
|
:param retries: Override the default retry configuration for this method
|
|
2442
2474
|
:param server_url: Override the default server URL for this method
|
|
2443
2475
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -2460,11 +2492,12 @@ class AaveV3(BaseSDK):
|
|
|
2460
2492
|
on_behalf_of=on_behalf_of,
|
|
2461
2493
|
chain=chain,
|
|
2462
2494
|
sender=sender,
|
|
2495
|
+
estimate_gas=estimate_gas,
|
|
2463
2496
|
)
|
|
2464
2497
|
|
|
2465
2498
|
req = self._build_request_async(
|
|
2466
2499
|
method="POST",
|
|
2467
|
-
path="/
|
|
2500
|
+
path="/v1/aave/borrow",
|
|
2468
2501
|
base_url=base_url,
|
|
2469
2502
|
url_variables=url_variables,
|
|
2470
2503
|
request=request,
|
|
@@ -2478,6 +2511,7 @@ class AaveV3(BaseSDK):
|
|
|
2478
2511
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
2479
2512
|
request, False, False, "json", models.AaveBorrowRequest
|
|
2480
2513
|
),
|
|
2514
|
+
allow_empty_value=None,
|
|
2481
2515
|
timeout_ms=timeout_ms,
|
|
2482
2516
|
)
|
|
2483
2517
|
|
|
@@ -2493,8 +2527,8 @@ class AaveV3(BaseSDK):
|
|
|
2493
2527
|
hook_ctx=HookContext(
|
|
2494
2528
|
config=self.sdk_configuration,
|
|
2495
2529
|
base_url=base_url or "",
|
|
2496
|
-
operation_id="
|
|
2497
|
-
oauth2_scopes=
|
|
2530
|
+
operation_id="v1_aave_borrow",
|
|
2531
|
+
oauth2_scopes=None,
|
|
2498
2532
|
security_source=self.sdk_configuration.security,
|
|
2499
2533
|
),
|
|
2500
2534
|
request=req,
|
|
@@ -2504,48 +2538,38 @@ class AaveV3(BaseSDK):
|
|
|
2504
2538
|
|
|
2505
2539
|
response_data: Any = None
|
|
2506
2540
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2507
|
-
return
|
|
2541
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2508
2542
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2509
|
-
response_data =
|
|
2510
|
-
|
|
2543
|
+
response_data = unmarshal_json_response(
|
|
2544
|
+
errors.HTTPValidationErrorData, http_res
|
|
2511
2545
|
)
|
|
2512
|
-
raise errors.HTTPValidationError(
|
|
2546
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
2513
2547
|
if utils.match_response(http_res, "4XX", "*"):
|
|
2514
2548
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2515
|
-
raise errors.APIError(
|
|
2516
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2517
|
-
)
|
|
2549
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2518
2550
|
if utils.match_response(http_res, "5XX", "*"):
|
|
2519
2551
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2520
|
-
raise errors.APIError(
|
|
2521
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2522
|
-
)
|
|
2552
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2523
2553
|
|
|
2524
|
-
|
|
2525
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2526
|
-
raise errors.APIError(
|
|
2527
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
2528
|
-
http_res.status_code,
|
|
2529
|
-
http_res_text,
|
|
2530
|
-
http_res,
|
|
2531
|
-
)
|
|
2554
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
2532
2555
|
|
|
2533
|
-
def
|
|
2556
|
+
def aave_repay(
|
|
2534
2557
|
self,
|
|
2535
2558
|
*,
|
|
2536
|
-
token:
|
|
2559
|
+
token: str,
|
|
2537
2560
|
amount: Union[
|
|
2538
2561
|
models.AaveRepayRequestAmount, models.AaveRepayRequestAmountTypedDict
|
|
2539
2562
|
],
|
|
2540
2563
|
interest_rate_mode: models.InterestRateMode,
|
|
2541
|
-
chain: models.
|
|
2564
|
+
chain: models.AaveRepayRequestChain,
|
|
2542
2565
|
sender: str,
|
|
2543
2566
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2567
|
+
estimate_gas: Optional[bool] = None,
|
|
2544
2568
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2545
2569
|
server_url: Optional[str] = None,
|
|
2546
2570
|
timeout_ms: Optional[int] = None,
|
|
2547
2571
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2548
|
-
) -> models.
|
|
2572
|
+
) -> models.TransactionResponse:
|
|
2549
2573
|
r"""Repay Loans
|
|
2550
2574
|
|
|
2551
2575
|
This endpoint allows users to repay a portion or the entirety of their borrowed
|
|
@@ -2556,13 +2580,24 @@ class AaveV3(BaseSDK):
|
|
|
2556
2580
|
risk of liquidation, ensuring a more secure borrowing experience. The endpoint
|
|
2557
2581
|
requires specifying the chain and the details of the repayment transaction,
|
|
2558
2582
|
including the amount and the asset to be repaid.
|
|
2583
|
+
<Info>
|
|
2584
|
+
**Required Allowances**
|
|
2585
|
+
|
|
2586
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2587
|
+
|
|
2588
|
+
- `AaveV3Pool`
|
|
2589
|
+
</Info>
|
|
2590
|
+
|
|
2559
2591
|
|
|
2560
|
-
:param token:
|
|
2592
|
+
:param token: The symbol of the underlying asset to repay..
|
|
2561
2593
|
:param amount: The amount of the asset to repay
|
|
2562
|
-
:param interest_rate_mode: On AAVE there are 2 different interest modes.
|
|
2563
|
-
|
|
2594
|
+
:param interest_rate_mode: On AAVE there are 2 different interest modes.
|
|
2595
|
+
|
|
2596
|
+
A stable (but typically higher rate), or a variable rate.
|
|
2597
|
+
:param chain:
|
|
2564
2598
|
:param sender: The address of the transaction sender.
|
|
2565
2599
|
:param on_behalf_of: The address on behalf of whom the supply is made
|
|
2600
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
2566
2601
|
:param retries: Override the default retry configuration for this method
|
|
2567
2602
|
:param server_url: Override the default server URL for this method
|
|
2568
2603
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -2585,11 +2620,12 @@ class AaveV3(BaseSDK):
|
|
|
2585
2620
|
on_behalf_of=on_behalf_of,
|
|
2586
2621
|
chain=chain,
|
|
2587
2622
|
sender=sender,
|
|
2623
|
+
estimate_gas=estimate_gas,
|
|
2588
2624
|
)
|
|
2589
2625
|
|
|
2590
2626
|
req = self._build_request(
|
|
2591
2627
|
method="POST",
|
|
2592
|
-
path="/
|
|
2628
|
+
path="/v1/aave/repay",
|
|
2593
2629
|
base_url=base_url,
|
|
2594
2630
|
url_variables=url_variables,
|
|
2595
2631
|
request=request,
|
|
@@ -2603,6 +2639,7 @@ class AaveV3(BaseSDK):
|
|
|
2603
2639
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
2604
2640
|
request, False, False, "json", models.AaveRepayRequest
|
|
2605
2641
|
),
|
|
2642
|
+
allow_empty_value=None,
|
|
2606
2643
|
timeout_ms=timeout_ms,
|
|
2607
2644
|
)
|
|
2608
2645
|
|
|
@@ -2618,8 +2655,8 @@ class AaveV3(BaseSDK):
|
|
|
2618
2655
|
hook_ctx=HookContext(
|
|
2619
2656
|
config=self.sdk_configuration,
|
|
2620
2657
|
base_url=base_url or "",
|
|
2621
|
-
operation_id="
|
|
2622
|
-
oauth2_scopes=
|
|
2658
|
+
operation_id="v1_aave_repay",
|
|
2659
|
+
oauth2_scopes=None,
|
|
2623
2660
|
security_source=self.sdk_configuration.security,
|
|
2624
2661
|
),
|
|
2625
2662
|
request=req,
|
|
@@ -2629,48 +2666,38 @@ class AaveV3(BaseSDK):
|
|
|
2629
2666
|
|
|
2630
2667
|
response_data: Any = None
|
|
2631
2668
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2632
|
-
return
|
|
2669
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2633
2670
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2634
|
-
response_data =
|
|
2635
|
-
|
|
2671
|
+
response_data = unmarshal_json_response(
|
|
2672
|
+
errors.HTTPValidationErrorData, http_res
|
|
2636
2673
|
)
|
|
2637
|
-
raise errors.HTTPValidationError(
|
|
2674
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
2638
2675
|
if utils.match_response(http_res, "4XX", "*"):
|
|
2639
2676
|
http_res_text = utils.stream_to_text(http_res)
|
|
2640
|
-
raise errors.APIError(
|
|
2641
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2642
|
-
)
|
|
2677
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2643
2678
|
if utils.match_response(http_res, "5XX", "*"):
|
|
2644
2679
|
http_res_text = utils.stream_to_text(http_res)
|
|
2645
|
-
raise errors.APIError(
|
|
2646
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2647
|
-
)
|
|
2680
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2648
2681
|
|
|
2649
|
-
|
|
2650
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
2651
|
-
raise errors.APIError(
|
|
2652
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
2653
|
-
http_res.status_code,
|
|
2654
|
-
http_res_text,
|
|
2655
|
-
http_res,
|
|
2656
|
-
)
|
|
2682
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
2657
2683
|
|
|
2658
|
-
async def
|
|
2684
|
+
async def aave_repay_async(
|
|
2659
2685
|
self,
|
|
2660
2686
|
*,
|
|
2661
|
-
token:
|
|
2687
|
+
token: str,
|
|
2662
2688
|
amount: Union[
|
|
2663
2689
|
models.AaveRepayRequestAmount, models.AaveRepayRequestAmountTypedDict
|
|
2664
2690
|
],
|
|
2665
2691
|
interest_rate_mode: models.InterestRateMode,
|
|
2666
|
-
chain: models.
|
|
2692
|
+
chain: models.AaveRepayRequestChain,
|
|
2667
2693
|
sender: str,
|
|
2668
2694
|
on_behalf_of: OptionalNullable[str] = UNSET,
|
|
2695
|
+
estimate_gas: Optional[bool] = None,
|
|
2669
2696
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2670
2697
|
server_url: Optional[str] = None,
|
|
2671
2698
|
timeout_ms: Optional[int] = None,
|
|
2672
2699
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2673
|
-
) -> models.
|
|
2700
|
+
) -> models.TransactionResponse:
|
|
2674
2701
|
r"""Repay Loans
|
|
2675
2702
|
|
|
2676
2703
|
This endpoint allows users to repay a portion or the entirety of their borrowed
|
|
@@ -2681,13 +2708,24 @@ class AaveV3(BaseSDK):
|
|
|
2681
2708
|
risk of liquidation, ensuring a more secure borrowing experience. The endpoint
|
|
2682
2709
|
requires specifying the chain and the details of the repayment transaction,
|
|
2683
2710
|
including the amount and the asset to be repaid.
|
|
2711
|
+
<Info>
|
|
2712
|
+
**Required Allowances**
|
|
2713
|
+
|
|
2714
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2715
|
+
|
|
2716
|
+
- `AaveV3Pool`
|
|
2717
|
+
</Info>
|
|
2684
2718
|
|
|
2685
|
-
|
|
2719
|
+
|
|
2720
|
+
:param token: The symbol of the underlying asset to repay..
|
|
2686
2721
|
:param amount: The amount of the asset to repay
|
|
2687
|
-
:param interest_rate_mode: On AAVE there are 2 different interest modes.
|
|
2688
|
-
|
|
2722
|
+
:param interest_rate_mode: On AAVE there are 2 different interest modes.
|
|
2723
|
+
|
|
2724
|
+
A stable (but typically higher rate), or a variable rate.
|
|
2725
|
+
:param chain:
|
|
2689
2726
|
:param sender: The address of the transaction sender.
|
|
2690
2727
|
:param on_behalf_of: The address on behalf of whom the supply is made
|
|
2728
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
2691
2729
|
:param retries: Override the default retry configuration for this method
|
|
2692
2730
|
:param server_url: Override the default server URL for this method
|
|
2693
2731
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -2710,11 +2748,12 @@ class AaveV3(BaseSDK):
|
|
|
2710
2748
|
on_behalf_of=on_behalf_of,
|
|
2711
2749
|
chain=chain,
|
|
2712
2750
|
sender=sender,
|
|
2751
|
+
estimate_gas=estimate_gas,
|
|
2713
2752
|
)
|
|
2714
2753
|
|
|
2715
2754
|
req = self._build_request_async(
|
|
2716
2755
|
method="POST",
|
|
2717
|
-
path="/
|
|
2756
|
+
path="/v1/aave/repay",
|
|
2718
2757
|
base_url=base_url,
|
|
2719
2758
|
url_variables=url_variables,
|
|
2720
2759
|
request=request,
|
|
@@ -2728,6 +2767,7 @@ class AaveV3(BaseSDK):
|
|
|
2728
2767
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
2729
2768
|
request, False, False, "json", models.AaveRepayRequest
|
|
2730
2769
|
),
|
|
2770
|
+
allow_empty_value=None,
|
|
2731
2771
|
timeout_ms=timeout_ms,
|
|
2732
2772
|
)
|
|
2733
2773
|
|
|
@@ -2743,8 +2783,8 @@ class AaveV3(BaseSDK):
|
|
|
2743
2783
|
hook_ctx=HookContext(
|
|
2744
2784
|
config=self.sdk_configuration,
|
|
2745
2785
|
base_url=base_url or "",
|
|
2746
|
-
operation_id="
|
|
2747
|
-
oauth2_scopes=
|
|
2786
|
+
operation_id="v1_aave_repay",
|
|
2787
|
+
oauth2_scopes=None,
|
|
2748
2788
|
security_source=self.sdk_configuration.security,
|
|
2749
2789
|
),
|
|
2750
2790
|
request=req,
|
|
@@ -2754,47 +2794,37 @@ class AaveV3(BaseSDK):
|
|
|
2754
2794
|
|
|
2755
2795
|
response_data: Any = None
|
|
2756
2796
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2757
|
-
return
|
|
2797
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2758
2798
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2759
|
-
response_data =
|
|
2760
|
-
|
|
2799
|
+
response_data = unmarshal_json_response(
|
|
2800
|
+
errors.HTTPValidationErrorData, http_res
|
|
2761
2801
|
)
|
|
2762
|
-
raise errors.HTTPValidationError(
|
|
2802
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
2763
2803
|
if utils.match_response(http_res, "4XX", "*"):
|
|
2764
2804
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2765
|
-
raise errors.APIError(
|
|
2766
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2767
|
-
)
|
|
2805
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2768
2806
|
if utils.match_response(http_res, "5XX", "*"):
|
|
2769
2807
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2770
|
-
raise errors.APIError(
|
|
2771
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2772
|
-
)
|
|
2808
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2773
2809
|
|
|
2774
|
-
|
|
2775
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2776
|
-
raise errors.APIError(
|
|
2777
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
2778
|
-
http_res.status_code,
|
|
2779
|
-
http_res_text,
|
|
2780
|
-
http_res,
|
|
2781
|
-
)
|
|
2810
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
2782
2811
|
|
|
2783
|
-
def
|
|
2812
|
+
def aave_withdraw(
|
|
2784
2813
|
self,
|
|
2785
2814
|
*,
|
|
2786
|
-
token:
|
|
2815
|
+
token: str,
|
|
2787
2816
|
amount: Union[
|
|
2788
2817
|
models.AaveWithdrawRequestAmount, models.AaveWithdrawRequestAmountTypedDict
|
|
2789
2818
|
],
|
|
2790
2819
|
recipient: str,
|
|
2791
|
-
chain: models.
|
|
2820
|
+
chain: models.AaveWithdrawRequestChain,
|
|
2792
2821
|
sender: str,
|
|
2822
|
+
estimate_gas: Optional[bool] = None,
|
|
2793
2823
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2794
2824
|
server_url: Optional[str] = None,
|
|
2795
2825
|
timeout_ms: Optional[int] = None,
|
|
2796
2826
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2797
|
-
) -> models.
|
|
2827
|
+
) -> models.TransactionResponse:
|
|
2798
2828
|
r"""Unstake
|
|
2799
2829
|
|
|
2800
2830
|
This endpoint facilitates the withdrawal of collateral from the Aave protocol.
|
|
@@ -2806,12 +2836,21 @@ class AaveV3(BaseSDK):
|
|
|
2806
2836
|
their liquidation threshold before proceeding with a withdrawal. This endpoint is
|
|
2807
2837
|
designed to provide a seamless and efficient way to manage your collateral within
|
|
2808
2838
|
the Aave ecosystem.
|
|
2839
|
+
<Info>
|
|
2840
|
+
**Required Allowances**
|
|
2841
|
+
|
|
2842
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2809
2843
|
|
|
2810
|
-
|
|
2844
|
+
- `AaveV3Pool`
|
|
2845
|
+
</Info>
|
|
2846
|
+
|
|
2847
|
+
|
|
2848
|
+
:param token: The symbol of the underlying asset to withdraw..
|
|
2811
2849
|
:param amount: The amount of the asset to withdraw
|
|
2812
2850
|
:param recipient: The address of the recipient of the withdrawn funds.
|
|
2813
|
-
:param chain:
|
|
2851
|
+
:param chain:
|
|
2814
2852
|
:param sender: The address of the transaction sender.
|
|
2853
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
2815
2854
|
:param retries: Override the default retry configuration for this method
|
|
2816
2855
|
:param server_url: Override the default server URL for this method
|
|
2817
2856
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -2833,11 +2872,12 @@ class AaveV3(BaseSDK):
|
|
|
2833
2872
|
recipient=recipient,
|
|
2834
2873
|
chain=chain,
|
|
2835
2874
|
sender=sender,
|
|
2875
|
+
estimate_gas=estimate_gas,
|
|
2836
2876
|
)
|
|
2837
2877
|
|
|
2838
2878
|
req = self._build_request(
|
|
2839
2879
|
method="POST",
|
|
2840
|
-
path="/
|
|
2880
|
+
path="/v1/aave/withdraw",
|
|
2841
2881
|
base_url=base_url,
|
|
2842
2882
|
url_variables=url_variables,
|
|
2843
2883
|
request=request,
|
|
@@ -2851,6 +2891,7 @@ class AaveV3(BaseSDK):
|
|
|
2851
2891
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
2852
2892
|
request, False, False, "json", models.AaveWithdrawRequest
|
|
2853
2893
|
),
|
|
2894
|
+
allow_empty_value=None,
|
|
2854
2895
|
timeout_ms=timeout_ms,
|
|
2855
2896
|
)
|
|
2856
2897
|
|
|
@@ -2866,8 +2907,8 @@ class AaveV3(BaseSDK):
|
|
|
2866
2907
|
hook_ctx=HookContext(
|
|
2867
2908
|
config=self.sdk_configuration,
|
|
2868
2909
|
base_url=base_url or "",
|
|
2869
|
-
operation_id="
|
|
2870
|
-
oauth2_scopes=
|
|
2910
|
+
operation_id="v1_aave_withdraw",
|
|
2911
|
+
oauth2_scopes=None,
|
|
2871
2912
|
security_source=self.sdk_configuration.security,
|
|
2872
2913
|
),
|
|
2873
2914
|
request=req,
|
|
@@ -2877,47 +2918,37 @@ class AaveV3(BaseSDK):
|
|
|
2877
2918
|
|
|
2878
2919
|
response_data: Any = None
|
|
2879
2920
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2880
|
-
return
|
|
2921
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
2881
2922
|
if utils.match_response(http_res, "422", "application/json"):
|
|
2882
|
-
response_data =
|
|
2883
|
-
|
|
2923
|
+
response_data = unmarshal_json_response(
|
|
2924
|
+
errors.HTTPValidationErrorData, http_res
|
|
2884
2925
|
)
|
|
2885
|
-
raise errors.HTTPValidationError(
|
|
2926
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
2886
2927
|
if utils.match_response(http_res, "4XX", "*"):
|
|
2887
2928
|
http_res_text = utils.stream_to_text(http_res)
|
|
2888
|
-
raise errors.APIError(
|
|
2889
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2890
|
-
)
|
|
2929
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2891
2930
|
if utils.match_response(http_res, "5XX", "*"):
|
|
2892
2931
|
http_res_text = utils.stream_to_text(http_res)
|
|
2893
|
-
raise errors.APIError(
|
|
2894
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2895
|
-
)
|
|
2932
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2896
2933
|
|
|
2897
|
-
|
|
2898
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
2899
|
-
raise errors.APIError(
|
|
2900
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
2901
|
-
http_res.status_code,
|
|
2902
|
-
http_res_text,
|
|
2903
|
-
http_res,
|
|
2904
|
-
)
|
|
2934
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
2905
2935
|
|
|
2906
|
-
async def
|
|
2936
|
+
async def aave_withdraw_async(
|
|
2907
2937
|
self,
|
|
2908
2938
|
*,
|
|
2909
|
-
token:
|
|
2939
|
+
token: str,
|
|
2910
2940
|
amount: Union[
|
|
2911
2941
|
models.AaveWithdrawRequestAmount, models.AaveWithdrawRequestAmountTypedDict
|
|
2912
2942
|
],
|
|
2913
2943
|
recipient: str,
|
|
2914
|
-
chain: models.
|
|
2944
|
+
chain: models.AaveWithdrawRequestChain,
|
|
2915
2945
|
sender: str,
|
|
2946
|
+
estimate_gas: Optional[bool] = None,
|
|
2916
2947
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2917
2948
|
server_url: Optional[str] = None,
|
|
2918
2949
|
timeout_ms: Optional[int] = None,
|
|
2919
2950
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2920
|
-
) -> models.
|
|
2951
|
+
) -> models.TransactionResponse:
|
|
2921
2952
|
r"""Unstake
|
|
2922
2953
|
|
|
2923
2954
|
This endpoint facilitates the withdrawal of collateral from the Aave protocol.
|
|
@@ -2929,12 +2960,21 @@ class AaveV3(BaseSDK):
|
|
|
2929
2960
|
their liquidation threshold before proceeding with a withdrawal. This endpoint is
|
|
2930
2961
|
designed to provide a seamless and efficient way to manage your collateral within
|
|
2931
2962
|
the Aave ecosystem.
|
|
2963
|
+
<Info>
|
|
2964
|
+
**Required Allowances**
|
|
2965
|
+
|
|
2966
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
2932
2967
|
|
|
2933
|
-
|
|
2968
|
+
- `AaveV3Pool`
|
|
2969
|
+
</Info>
|
|
2970
|
+
|
|
2971
|
+
|
|
2972
|
+
:param token: The symbol of the underlying asset to withdraw..
|
|
2934
2973
|
:param amount: The amount of the asset to withdraw
|
|
2935
2974
|
:param recipient: The address of the recipient of the withdrawn funds.
|
|
2936
|
-
:param chain:
|
|
2975
|
+
:param chain:
|
|
2937
2976
|
:param sender: The address of the transaction sender.
|
|
2977
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
2938
2978
|
:param retries: Override the default retry configuration for this method
|
|
2939
2979
|
:param server_url: Override the default server URL for this method
|
|
2940
2980
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -2956,11 +2996,12 @@ class AaveV3(BaseSDK):
|
|
|
2956
2996
|
recipient=recipient,
|
|
2957
2997
|
chain=chain,
|
|
2958
2998
|
sender=sender,
|
|
2999
|
+
estimate_gas=estimate_gas,
|
|
2959
3000
|
)
|
|
2960
3001
|
|
|
2961
3002
|
req = self._build_request_async(
|
|
2962
3003
|
method="POST",
|
|
2963
|
-
path="/
|
|
3004
|
+
path="/v1/aave/withdraw",
|
|
2964
3005
|
base_url=base_url,
|
|
2965
3006
|
url_variables=url_variables,
|
|
2966
3007
|
request=request,
|
|
@@ -2974,6 +3015,7 @@ class AaveV3(BaseSDK):
|
|
|
2974
3015
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
2975
3016
|
request, False, False, "json", models.AaveWithdrawRequest
|
|
2976
3017
|
),
|
|
3018
|
+
allow_empty_value=None,
|
|
2977
3019
|
timeout_ms=timeout_ms,
|
|
2978
3020
|
)
|
|
2979
3021
|
|
|
@@ -2989,8 +3031,8 @@ class AaveV3(BaseSDK):
|
|
|
2989
3031
|
hook_ctx=HookContext(
|
|
2990
3032
|
config=self.sdk_configuration,
|
|
2991
3033
|
base_url=base_url or "",
|
|
2992
|
-
operation_id="
|
|
2993
|
-
oauth2_scopes=
|
|
3034
|
+
operation_id="v1_aave_withdraw",
|
|
3035
|
+
oauth2_scopes=None,
|
|
2994
3036
|
security_source=self.sdk_configuration.security,
|
|
2995
3037
|
),
|
|
2996
3038
|
request=req,
|
|
@@ -3000,28 +3042,229 @@ class AaveV3(BaseSDK):
|
|
|
3000
3042
|
|
|
3001
3043
|
response_data: Any = None
|
|
3002
3044
|
if utils.match_response(http_res, "200", "application/json"):
|
|
3003
|
-
return
|
|
3045
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
3004
3046
|
if utils.match_response(http_res, "422", "application/json"):
|
|
3005
|
-
response_data =
|
|
3006
|
-
|
|
3047
|
+
response_data = unmarshal_json_response(
|
|
3048
|
+
errors.HTTPValidationErrorData, http_res
|
|
3007
3049
|
)
|
|
3008
|
-
raise errors.HTTPValidationError(
|
|
3050
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
3009
3051
|
if utils.match_response(http_res, "4XX", "*"):
|
|
3010
3052
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
3011
|
-
raise errors.APIError(
|
|
3012
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
3013
|
-
)
|
|
3053
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
3014
3054
|
if utils.match_response(http_res, "5XX", "*"):
|
|
3015
3055
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
3016
|
-
raise errors.APIError(
|
|
3017
|
-
|
|
3056
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
3057
|
+
|
|
3058
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
3059
|
+
|
|
3060
|
+
def aave_set_user_emode(
|
|
3061
|
+
self,
|
|
3062
|
+
*,
|
|
3063
|
+
category_id: int,
|
|
3064
|
+
chain: models.AaveSetUserEModeRequestChain,
|
|
3065
|
+
sender: str,
|
|
3066
|
+
estimate_gas: Optional[bool] = None,
|
|
3067
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
3068
|
+
server_url: Optional[str] = None,
|
|
3069
|
+
timeout_ms: Optional[int] = None,
|
|
3070
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
3071
|
+
) -> models.TransactionResponse:
|
|
3072
|
+
r"""Set User eMode
|
|
3073
|
+
|
|
3074
|
+
Set the user's efficiency mode (eMode) category on Aave.
|
|
3075
|
+
|
|
3076
|
+
Efficiency mode (eMode) allows borrowers to extract the highest borrowing power when
|
|
3077
|
+
collateral and borrowed assets are correlated in price, particularly for stablecoin
|
|
3078
|
+
pairs. Each eMode category has specific LTV and liquidation threshold settings.
|
|
3079
|
+
Setting category_id to 0 disables eMode, while other values enable specific eMode
|
|
3080
|
+
categories defined by the protocol.
|
|
3081
|
+
|
|
3082
|
+
:param category_id: The eMode category ID to set for the user. 0 = no eMode, 1+ = specific eMode category.
|
|
3083
|
+
:param chain:
|
|
3084
|
+
:param sender: The address of the transaction sender.
|
|
3085
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
3086
|
+
:param retries: Override the default retry configuration for this method
|
|
3087
|
+
:param server_url: Override the default server URL for this method
|
|
3088
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
3089
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
3090
|
+
"""
|
|
3091
|
+
base_url = None
|
|
3092
|
+
url_variables = None
|
|
3093
|
+
if timeout_ms is None:
|
|
3094
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
3095
|
+
|
|
3096
|
+
if server_url is not None:
|
|
3097
|
+
base_url = server_url
|
|
3098
|
+
else:
|
|
3099
|
+
base_url = self._get_url(base_url, url_variables)
|
|
3100
|
+
|
|
3101
|
+
request = models.AaveSetUserEModeRequest(
|
|
3102
|
+
category_id=category_id,
|
|
3103
|
+
chain=chain,
|
|
3104
|
+
sender=sender,
|
|
3105
|
+
estimate_gas=estimate_gas,
|
|
3106
|
+
)
|
|
3107
|
+
|
|
3108
|
+
req = self._build_request(
|
|
3109
|
+
method="POST",
|
|
3110
|
+
path="/v1/aave/set_user_emode",
|
|
3111
|
+
base_url=base_url,
|
|
3112
|
+
url_variables=url_variables,
|
|
3113
|
+
request=request,
|
|
3114
|
+
request_body_required=True,
|
|
3115
|
+
request_has_path_params=False,
|
|
3116
|
+
request_has_query_params=True,
|
|
3117
|
+
user_agent_header="user-agent",
|
|
3118
|
+
accept_header_value="application/json",
|
|
3119
|
+
http_headers=http_headers,
|
|
3120
|
+
security=self.sdk_configuration.security,
|
|
3121
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
3122
|
+
request, False, False, "json", models.AaveSetUserEModeRequest
|
|
3123
|
+
),
|
|
3124
|
+
allow_empty_value=None,
|
|
3125
|
+
timeout_ms=timeout_ms,
|
|
3126
|
+
)
|
|
3127
|
+
|
|
3128
|
+
if retries == UNSET:
|
|
3129
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
3130
|
+
retries = self.sdk_configuration.retry_config
|
|
3131
|
+
|
|
3132
|
+
retry_config = None
|
|
3133
|
+
if isinstance(retries, utils.RetryConfig):
|
|
3134
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
3135
|
+
|
|
3136
|
+
http_res = self.do_request(
|
|
3137
|
+
hook_ctx=HookContext(
|
|
3138
|
+
config=self.sdk_configuration,
|
|
3139
|
+
base_url=base_url or "",
|
|
3140
|
+
operation_id="v1_aave_set_user_emode",
|
|
3141
|
+
oauth2_scopes=None,
|
|
3142
|
+
security_source=self.sdk_configuration.security,
|
|
3143
|
+
),
|
|
3144
|
+
request=req,
|
|
3145
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
3146
|
+
retry_config=retry_config,
|
|
3147
|
+
)
|
|
3148
|
+
|
|
3149
|
+
response_data: Any = None
|
|
3150
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
3151
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
3152
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
3153
|
+
response_data = unmarshal_json_response(
|
|
3154
|
+
errors.HTTPValidationErrorData, http_res
|
|
3018
3155
|
)
|
|
3156
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
3157
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
3158
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
3159
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
3160
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
3161
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
3162
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
3163
|
+
|
|
3164
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
3165
|
+
|
|
3166
|
+
async def aave_set_user_emode_async(
|
|
3167
|
+
self,
|
|
3168
|
+
*,
|
|
3169
|
+
category_id: int,
|
|
3170
|
+
chain: models.AaveSetUserEModeRequestChain,
|
|
3171
|
+
sender: str,
|
|
3172
|
+
estimate_gas: Optional[bool] = None,
|
|
3173
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
3174
|
+
server_url: Optional[str] = None,
|
|
3175
|
+
timeout_ms: Optional[int] = None,
|
|
3176
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
3177
|
+
) -> models.TransactionResponse:
|
|
3178
|
+
r"""Set User eMode
|
|
3179
|
+
|
|
3180
|
+
Set the user's efficiency mode (eMode) category on Aave.
|
|
3181
|
+
|
|
3182
|
+
Efficiency mode (eMode) allows borrowers to extract the highest borrowing power when
|
|
3183
|
+
collateral and borrowed assets are correlated in price, particularly for stablecoin
|
|
3184
|
+
pairs. Each eMode category has specific LTV and liquidation threshold settings.
|
|
3185
|
+
Setting category_id to 0 disables eMode, while other values enable specific eMode
|
|
3186
|
+
categories defined by the protocol.
|
|
3187
|
+
|
|
3188
|
+
:param category_id: The eMode category ID to set for the user. 0 = no eMode, 1+ = specific eMode category.
|
|
3189
|
+
:param chain:
|
|
3190
|
+
:param sender: The address of the transaction sender.
|
|
3191
|
+
:param estimate_gas: Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.
|
|
3192
|
+
:param retries: Override the default retry configuration for this method
|
|
3193
|
+
:param server_url: Override the default server URL for this method
|
|
3194
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
3195
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
3196
|
+
"""
|
|
3197
|
+
base_url = None
|
|
3198
|
+
url_variables = None
|
|
3199
|
+
if timeout_ms is None:
|
|
3200
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
3201
|
+
|
|
3202
|
+
if server_url is not None:
|
|
3203
|
+
base_url = server_url
|
|
3204
|
+
else:
|
|
3205
|
+
base_url = self._get_url(base_url, url_variables)
|
|
3206
|
+
|
|
3207
|
+
request = models.AaveSetUserEModeRequest(
|
|
3208
|
+
category_id=category_id,
|
|
3209
|
+
chain=chain,
|
|
3210
|
+
sender=sender,
|
|
3211
|
+
estimate_gas=estimate_gas,
|
|
3212
|
+
)
|
|
3019
3213
|
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3214
|
+
req = self._build_request_async(
|
|
3215
|
+
method="POST",
|
|
3216
|
+
path="/v1/aave/set_user_emode",
|
|
3217
|
+
base_url=base_url,
|
|
3218
|
+
url_variables=url_variables,
|
|
3219
|
+
request=request,
|
|
3220
|
+
request_body_required=True,
|
|
3221
|
+
request_has_path_params=False,
|
|
3222
|
+
request_has_query_params=True,
|
|
3223
|
+
user_agent_header="user-agent",
|
|
3224
|
+
accept_header_value="application/json",
|
|
3225
|
+
http_headers=http_headers,
|
|
3226
|
+
security=self.sdk_configuration.security,
|
|
3227
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
3228
|
+
request, False, False, "json", models.AaveSetUserEModeRequest
|
|
3229
|
+
),
|
|
3230
|
+
allow_empty_value=None,
|
|
3231
|
+
timeout_ms=timeout_ms,
|
|
3027
3232
|
)
|
|
3233
|
+
|
|
3234
|
+
if retries == UNSET:
|
|
3235
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
3236
|
+
retries = self.sdk_configuration.retry_config
|
|
3237
|
+
|
|
3238
|
+
retry_config = None
|
|
3239
|
+
if isinstance(retries, utils.RetryConfig):
|
|
3240
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
3241
|
+
|
|
3242
|
+
http_res = await self.do_request_async(
|
|
3243
|
+
hook_ctx=HookContext(
|
|
3244
|
+
config=self.sdk_configuration,
|
|
3245
|
+
base_url=base_url or "",
|
|
3246
|
+
operation_id="v1_aave_set_user_emode",
|
|
3247
|
+
oauth2_scopes=None,
|
|
3248
|
+
security_source=self.sdk_configuration.security,
|
|
3249
|
+
),
|
|
3250
|
+
request=req,
|
|
3251
|
+
error_status_codes=["422", "4XX", "5XX"],
|
|
3252
|
+
retry_config=retry_config,
|
|
3253
|
+
)
|
|
3254
|
+
|
|
3255
|
+
response_data: Any = None
|
|
3256
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
3257
|
+
return unmarshal_json_response(models.TransactionResponse, http_res)
|
|
3258
|
+
if utils.match_response(http_res, "422", "application/json"):
|
|
3259
|
+
response_data = unmarshal_json_response(
|
|
3260
|
+
errors.HTTPValidationErrorData, http_res
|
|
3261
|
+
)
|
|
3262
|
+
raise errors.HTTPValidationError(response_data, http_res)
|
|
3263
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
3264
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
3265
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
3266
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
3267
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
3268
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
3269
|
+
|
|
3270
|
+
raise errors.APIError("Unexpected response received", http_res)
|