fetch_lifi_token_price_usd
Documentation for eth_defi.lifi.api.fetch_lifi_token_price_usd function.
- fetch_lifi_token_price_usd(chain_id, token_address='0x0000000000000000000000000000000000000000', api_timeout=30)
Fetch the USD price of a token using the LI.FI token endpoint.
Uses
GET /v1/tokenwhich returnspriceUSDfor any supported token.- Parameters
- Returns
Token price in USD
- Raises
LifiAPIError – If the API returns an error or price is unavailable
- Return type