fetch_arcadia_vaults
Documentation for eth_defi.erc_4626.vault_protocol.arcadia.offchain_metadata.fetch_arcadia_vaults function.
- fetch_arcadia_vaults(chain_id, *, cache_path=PosixPath('/home/runner/.tradingstrategy/cache/arcadia'), api_url='https://api.arcadia.finance/v1/api/pools', now_=None)
Fetch the complete Arcadia tranche index once per chain and day.
Requests use a 30-second timeout. A failed refresh preserves a valid older index and delays further requests for five minutes. Without an index, adapters can still generate copy from their onchain metadata.
- Parameters
chain_id (int) – EVM chain ID, passed as the API’s
chain_idparameter.cache_path (pathlib.Path) – Directory for atomic JSON response caches.
api_url (str) – Official pools endpoint, overridable for testing.
now – Optional naive UTC clock for deterministic expiry tests.
now_ (Optional[datetime.datetime]) –
- Returns
Tranche index, or
Nonewhen no valid response is available.- Return type
Optional[dict[eth_typing.evm.HexAddress, eth_defi.erc_4626.vault_protocol.arcadia.offchain_metadata.ArcadiaVaultMetadata]]