fetch_royco_vaults
Documentation for eth_defi.erc_4626.vault_protocol.royco.offchain_metadata.fetch_royco_vaults function.
- fetch_royco_vaults(cache_path=PosixPath('/home/runner/.tradingstrategy/cache/royco'), api_base_url='https://api.royco.org/api/v1', api_key=None, now_=None, max_cache_duration=datetime.timedelta(days=2))
Fetch and cache Royco offchain vault metadata.
- Parameters
cache_path (pathlib.Path) – Directory for cache files.
api_base_url (str) – Royco API base URL.
api_key (Optional[str]) – Royco API key. Defaults to
ROYCO_API_KEYorROYCO_DEMO.now – Override current time for tests.
max_cache_duration (datetime.timedelta) – How long before refreshing cache.
now_ (Optional[datetime.datetime]) –
- Returns
Metadata mapped by checksummed vault address.
- Return type
dict[eth_typing.evm.HexAddress, eth_defi.erc_4626.vault_protocol.royco.offchain_metadata.RoycoOffchainVaultMetadata]