fetch_asseto_registry

Documentation for eth_defi.tokenised_fund.asseto.offchain_metadata.fetch_asseto_registry function.

fetch_asseto_registry(*, cache_path=PosixPath('/home/runner/.tradingstrategy/cache/asseto/registry-cache.json'), now_=None, max_stale_age=datetime.timedelta(days=7))

Fetch Asseto’s registry with a safe persisted stale fallback.

The daily scheduler always calls this helper once per due Asseto item. A malformed, empty or duplicate snapshot cannot replace an existing cache. On failure, the cache can only rebuild existing adapters and callers must not use it for metadata writes.

Parameters
  • cache_path (pathlib.Path) – JSON cache path. Override in tests or isolated operator runs.

  • now – Naive UTC timestamp override for deterministic tests.

  • max_stale_age (datetime.timedelta) – Maximum cache age eligible for degraded adapter construction.

  • now_ (Optional[datetime.datetime]) –

Returns

Fresh, stale or failed registry result.

Return type

eth_defi.tokenised_fund.asseto.offchain_metadata.AssetoOffchainRegistryResult