fetch_settlement_prices
Documentation for eth_defi.tokenised_fund.securitize.settlement.fetch_settlement_prices function.
- fetch_settlement_prices(hypersync_client, feed, end_block, attempts=3)
Fetch the settlement NAV timeline with Hypersync.
Hypersync is a hard requirement: there is no RPC or archive-state fallback. The repository’s Hypersync client disables internal retries, so a rate-limited request is retried here. Each wait lasts until the server-stated
resets_in, because a shared API key’s quota is usually only available right after its 60-second window resets.- Parameters
hypersync_client (ThrottledHypersyncClient) – Hypersync client for
feed.chain_id, created witheth_defi.hypersync.utils.configure_hypersync_from_env().feed (eth_defi.tokenised_fund.securitize.settlement.SecuritizeSettlementFeed) – Reviewed settlement feed.
end_block (int) – Inclusive last block to read.
attempts (int) – Maximum Hypersync attempts when rate limited.
- Returns
Deposit settlement prices sorted by block number.
- Raises
RuntimeError – If Hypersync stays rate limited after all attempts, or If Hypersync returns no deposit settlement although
end_blockis at or after the known first settlement. An incomplete index must abort the scan rather than rewrite priced history as unpriced rows.- Return type
list[eth_defi.tokenised_fund.securitize.settlement.SecuritizeSettlementPrice]