fetch_lifi_status

Documentation for eth_defi.lifi.api.fetch_lifi_status function.

fetch_lifi_status(tx_hash, from_chain_id=None, to_chain_id=None, api_timeout=30)

Fetch the status of a cross-chain transfer from the LI.FI API.

Uses GET /v1/status to check whether a bridge transaction has been delivered on the destination chain.

The response contains a status field with one of:

  • PENDING — transfer in progress

  • DONE — transfer completed successfully

  • FAILED — transfer unsuccessful

  • NOT_FOUND — transaction hash not recognised yet

  • INVALID — hash not tied to a known bridge

Parameters
  • tx_hash (str) – Transaction hash on the source chain (hex string)

  • from_chain_id (int | None) – Source chain ID (speeds up lookup)

  • to_chain_id (int | None) – Destination chain ID (speeds up lookup)

  • api_timeout (float) – API request timeout in seconds

Returns

Full status response dict from LI.FI API

Raises

LifiAPIError – If the HTTP request fails

Return type

dict