Quoting Orders
LI.FI intent enables efficient quoting and inventory management—broadcast liquidity and pricing, compete on your terms, and respond to market changes instantly.
The order server will deliver quotes to intent issuers. These are based on the available inventory provided by solvers. To avoid the need for solvers to respond to every individual quote request, the order server allows solvers to regularly push their inventory to the order server in the format of quote chunks
.
This approach significantly reduces the overhead for solvers and improves the efficiency of the quoting process.
The following code chunk provides an example implementation of quoting between USDC and USDC between Ethereum and Base.
Prices are specified in an abstract intermediary that has to be consistent between your quotes. We recommended using USDC with 18 decimals. Everything is integer priced. Make sure that your decimals are correct. The final quote will be derived as:
It is important to factor token decimals into your quotes; otherwise, assets will be priced incorrectly. For example, for a 1000 USDC to Ether swap with the price of $1500 USDC per Ether:
Note that the decimals are inversely represented. If a USDC quote is provided with 18 decimals, then an Ether quote should have decimals, while another USDC quote should have decimals. A token with 8 decimals should have its quote with decimals.
It is important that solvers update their quotes periodically as market conditions change, with correct expiry dates. If your quotes expire, the order server will stop using them to match user requests.
To avoid sending short-lived quotes, the order server will overwrite existing quotes when a new one is received. This allows you to have long-lived quotes and only update them as markets evolve. Alternatively, you can send very short-lived quotes and preemptively update your quotes every second.
By broadcasting quotes in this manner, solvers can:
- Efficiently communicate their available liquidity across multiple chain and token pairs.
- Set their own pricing and fee structure.
- Define limits on transaction sizes they’re willing to process.
- Update their quotes as market conditions change.
- The order server then uses these broadcast quotes to match incoming user requests without needing to query solvers in real-time for every request, resulting in faster quote responses for users and reduced operational overhead for solvers.
Submit quotes to /quotes/submit
.
Chain & Asset Support
The order server uses quotes to determine supported chains and assets. This allows solvers to add support for new chains and assets simply by producing quotes for them.
Authentication (WIP)
While authentication is not necessary to subscribe to the order server’s WebSocket events, it is required to use some of the order server’s API services. All solvers must be authenticated with the order server to be able to push their inventory. Without authentication, the order server won’t be able to offer your quotes to users. Authentication is handled via API tokens that provide secure access to the order server’s protected API services.
Obtaining API Access
To get your API token, please reach out to the order server team.
Using Your API Token
If you have an API token, it must be included in all requests to the order server for reputation purposes:
- For HTTP requests: Include the token in the request headers as
x-api-key: YOUR_API_TOKEN