get_lifi_headers

Documentation for eth_defi.lifi.api.get_lifi_headers function.

get_lifi_headers()

Get HTTP headers for LI.FI API requests.

Reads the optional LIFI_API_KEY environment variable. If not set, logs a warning and returns headers without authentication. Without an API key, the rate limit is 10 requests per second.

Returns

Headers dict, possibly containing x-lifi-api-key

Return type

dict