fetch_lifi_native_token_prices

Documentation for eth_defi.lifi.api.fetch_lifi_native_token_prices function.

fetch_lifi_native_token_prices(chain_ids, api_timeout=30)

Fetch native token USD prices for multiple chains.

Makes one API call per chain to the LI.FI token endpoint.

Parameters
  • chain_ids (list[int]) – List of chain IDs to fetch prices for

  • api_timeout (float) – API request timeout in seconds per request

Returns

Dict mapping chain_id to native token price in USD

Raises

LifiAPIError – If any API call fails

Return type

dict[int, decimal.Decimal]