fetch_accountable_vaults

Documentation for eth_defi.erc_4626.vault_protocol.accountable.offchain_metadata.fetch_accountable_vaults function.

fetch_accountable_vaults(cache_path=PosixPath('/home/runner/.tradingstrategy/cache/accountable'), api_base_url='https://yield.accountable.capital/api', now_=None, max_cache_duration=datetime.timedelta(days=2))

Fetch and cache all Accountable offchain vault metadata.

  • Fetches all vaults from the listing endpoint across all chains

  • Fetches detail for each vault to get strategy descriptions

  • Single JSON cache file for all Accountable vaults (~7 total)

  • Multiprocess safe via file lock

Parameters
  • cache_path (pathlib.Path) – Directory for cache files (default ~/.tradingstrategy/cache/accountable/)

  • api_base_url (str) – Accountable API base URL

  • now – Override current time (for testing)

  • max_cache_duration (datetime.timedelta) – How long before refreshing cache (default 2 days)

  • now_ (Optional[datetime.datetime]) –

Returns

Dict mapping checksummed vault address to AccountableVaultMetadata

Return type

dict[str, eth_defi.erc_4626.vault_protocol.accountable.offchain_metadata.AccountableVaultMetadata]