fetch_symbiotic_vault_metadata
Documentation for eth_defi.erc_4626.vault_protocol.symbiotic.offchain_metadata.fetch_symbiotic_vault_metadata function.
- fetch_symbiotic_vault_metadata(vault_address, *, cache_path=PosixPath('/home/runner/.tradingstrategy/cache/symbiotic'), api_base_url='https://api.github.com/repos/symbioticfi/metadata-mainnet/contents', now_=None, max_cache_duration=datetime.timedelta(days=2))
Fetch official offchain metadata for a Symbiotic Ethereum vault.
The official repository stores directory names as EIP-55 checksum addresses. A vault response may refer to an optional curator record, which is fetched at the same time so callers can display a curator name.
- Parameters
vault_address (str) – Symbiotic Ethereum vault address.
cache_path (pathlib.Path) – Directory for this module’s per-vault JSON cache files.
api_base_url (str) – Official contents API base URL, overridable for tests.
now – Naive UTC current time override for deterministic cache tests.
max_cache_duration (datetime.timedelta) – Cache time-to-live.
now_ (Optional[datetime.datetime]) –
- Returns
Vault metadata, or
Nonewhen no official record exists or the API cannot be reached.- Return type
Optional[eth_defi.erc_4626.vault_protocol.symbiotic.offchain_metadata.SymbioticVaultMetadata]