Authentication
All endpoints require the following headers unless otherwise noted:Bearer token (JWT) for end-user authentication. Format:
Bearer YOUR_JWT_TOKENYour Magic secret key for application-level authentication.
Get Quote
Get a LiFi quote for a cross-chain or same-chain token transfer.cURL
Query Parameters
Source chain. Values:
ETH, ARB, POL, SOL, STRK, INKDestination chain. Values:
ETH, ARB, POL, SOL, STRK, INKSource token. Values:
ETH, WETH, USDC, USDC.E, POL, SOLDestination token. Values:
ETH, WETH, USDC, USDC.E, POL, SOLAmount in smallest units (e.g.,
1000000 for 1 USDC).Slippage tolerance between 0 and 1 (e.g.,
0.005 for 0.5%).Route preference. Values:
FASTEST, CHEAPESTExecute Quote
Execute a LiFi quote by approving (if needed) and sending the transaction.cURL
Request Parameters
The full quote object returned from
GET /lifi/quote.Response Fields
Whether the transaction was submitted successfully.
The transaction hash on the source chain.
Check Transfer Status
Check the status of a LiFi cross-chain transfer.cURL
Query Parameters
Transaction hash on the source chain.
Bridge tool key from the quote response (e.g.,
stargate).Source chain code.
Destination chain code.
This endpoint does not require authentication.
Wait for Transfer
Poll LiFi status until the transfer completes or fails. This is a long-running endpoint.cURL
Query Parameters
Transaction hash on the source chain.
Bridge tool key from the quote response.
Source chain code.
Destination chain code.
Polling interval in seconds. Range: 5—60.
Maximum wait time in seconds. Range: 30—600.
This endpoint does not require authentication.
Alchemy Sponsored Transfer
Send a gas-sponsored transfer via Alchemy wallet APIs. Currently available on testnet chains only.cURL
Request Parameters
The chain to execute on. Values:
ETH, ARB, POLNetwork type. Currently only
testnet is supported. Values: mainnet, testnetThe token to transfer. Values:
ETH, POL, USDCThe total amount to send (transfer + fee) as a decimal string.
The recipient wallet address.
Fee in basis points deducted from the total amount. Range: 1—9999. (100 bps = 1%)
Optional address to receive the fee. Defaults to a configured fee address.
Response Fields
Whether the sponsored transfer completed successfully.
The user operation hash for tracking.
The total amount sent (transfer + fee).
The amount received by the destination address.
The fee deducted from the total amount.
The fee rate in basis points.