Skip to main content
For more details about how fees work, fee collection on different chains, and setting up fee wallets, see the Monetizing the integration guide.
When using the LI.FI SDK, you can monetize your integration by collecting fees from the transactions processed through your application. The SDK supports fee configuration in two ways: globally when creating the SDK client, or per-request through route options.

Global fee configuration

The recommended approach is to configure fees globally when creating your SDK client using createClient. This ensures all requests use the same fee configuration automatically:
With this configuration, all route requests, quotes, and contract calls will automatically include the specified fee without needing to add it to each individual request.

Per-request fee configuration

Alternatively, you can configure fees on a per-request basis. This is useful when you need different fee rates for different types of transactions or users. The fee parameter can be added to the options object when requesting routes or quotes.

Basic route request with fees

Quote request with fees