Base URLs
Authentication
An API key is optional. It is the only way to receive a fee identity other than the platform default:- No API key — every request uses the default
lififee structure. This is a supported configuration, not a fallback. - A valid API key — LI.FI validates the key against the Partner Service and uses its
integrationIdas your fee identity for the request. - An invalid API key, or a valid key with no integration mapping — the request is rejected before any fee or order is built.
- A temporary Partner Service communication failure while a key is supplied — the request falls back to the default
lififee structure. It never usesx-lifi-integratoras a substitute identity.
x-lifi-integrator value with no proof of ownership: the API key, not the header, decides fee identity.
Register at the LI.FI Partner Portal to get an API key.
Pass the following headers:
x-lifi-integrator is an assertion, not a credential
x-lifi-integrator only checks a claim against the identity your API key already established:
- Matches the authenticated identity — accepted.
- Differs from the authenticated identity — rejected with a stable error.
- Sent with no API key — has no effect. Without a key there is no authenticated identity to match, so the request uses the default
lififee structure.
x-lifi-integrator only when both apiKey and integrator are set. See Getting Started for the key-only, key-plus-assertion, and no-key configurations.
Hyperliquid builder fee
Hyperliquid requires an explicit builder fee approval before LI.FI can route orders through the account. If your authenticated identity has no matching approval, order requests fail with a setup-required error and never fall back to a fee-free order. Complete theapproveBuilderFee setup step first.
Request Format
- All
POSTrequest bodies useapplication/json - Query parameters are used for
GETrequests - String numeric values (prices, sizes, amounts) avoid floating-point precision issues
Response Format
Successful responses return JSON with appropriate HTTP status codes:Response Headers
All responses include thex-lifi-requestid header for request correlation and debugging:
Include the
x-lifi-requestid value when reporting issues to LI.FI support. This ID is logged server-side and allows us to trace your specific request.Error Format
All errors follow the same structure with numeric error codes (2000+ range):HTTP Error Status Codes
Rate Limits
Rate limits are counted per one-minute window against the caller’s identity, in this order: the Partner-Service integration id an API key maps to, then the raw API-key id when the key has no integration mapping, then the hashed client IP for requests with no API key. Contact LI.FI support for rate limit details and higher tier access.Endpoints Overview
Market Data (Public)
Account
Account-level reads (account summary, positions, orders, fills, activity, single order) are served by the SDK directly from each provider, not by LI.FI HTTP endpoints. Use@lifi/perps-sdk: getAccount, getPositions, getOrders, getFills, getActivity, getOrder. See SDK / Account.