GET /providers
List available perpetual provider platforms.Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-lifi-api-key | header | string | Yes | API key |
x-lifi-integrator | header | string | No | Integrator identifier |
Response 200
Provider Fields
| Field | Type | Description |
|---|---|---|
key | string | Provider identifier (e.g. "hyperliquid", "lighter") |
name | string | Human-readable name |
logoURI | string | URL to provider logo |
signingMethod | string | Default signing method for the provider (e.g. "eip712", "wasmBlob") |
active | boolean | When false, the provider is announced but not yet selectable in clients. Gates whether the widget surfaces the provider for trading. |
setup | ProviderAction[] | Mandatory account-setup descriptors. The user MUST satisfy every entry before trading. An empty array means the provider has no setup gates. |
options | ProviderAction[] | Optional post-setup descriptors the user MAY tune (account mode, fee tier, etc.). Never gate trading. An empty array is valid. |
actions | ProviderAction[] | Trading and transfer actions advertised by the provider. |
categories | ProviderCategory[] | Trading categories within the provider. |
wsUrl | string? | WebSocket URL for streaming. Optional — absent for providers without WebSocket support. |
minDepositUsd | number? | Minimum deposit amount in USD that the provider’s deposit path will accept. Absent means no minimum is advertised. |
minOrderValueUsd | number? | Minimum order notional value in USD. Absent means no minimum is advertised. |
minReduceOrderValueUsd | number? | Minimum order notional value in USD for reduce-only orders, when the provider applies a lower floor than minOrderValueUsd. Absent means reduce-only orders use the same floor. |
ProviderCategory in categories describes a trading category within the provider:
| Field | Type | Description |
|---|---|---|
id | string | Category identifier (used as categoryId in MarketRef / MarketDisplay, e.g. "hyperliquid", "xyz", "spot") |
logoURI | string? | Category logo URL (optional) |
quoteAsset | Asset | null | Quote Asset for this category; null for the spot category, which has no single fixed quote |
tradeNotice | TradeNotice? | Optional provider advisory shown against markets in this category |
ProviderAction shape backs setup, options, and actions. Entries in setup and options additionally carry UI metadata (title, description) and a params array. Each params[] entry describes one input the widget collects before dispatching the action — its values array enumerates the legal value strings the action accepts, which is the source of truth for things like the mode values on accountMode and the tier values on accountType.
SDK: getProviders()
GET /markets
List the tradeable markets (instruments) for a provider. Returns static instrument metadata only — ids, base/quote assets, decimals, leverage caps, and margin. Live per-market data (mark price, previous-day price, 24h volume, open interest, funding) is served by/prices. Cached for one hour, since instrument metadata changes rarely.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | query | string | Yes | Provider identifier |
marketIds | query | string | No | Comma-separated list of provider market ids to filter (e.g., BTC,ETH). If omitted, every market is returned. |
x-lifi-api-key | header | string | Yes | API key |
x-lifi-integrator | header | string | No | Integrator identifier |
Response 200
Market carries static metadata only — live data lives on MarketPrice:
| Field | Type | Description |
|---|---|---|
providerId | string | Provider that owns the market (e.g., "hyperliquid") |
id | string | Provider’s canonical, stringified market id that uniquely identifies the trading instrument (e.g., "BTC", "xyz:PURR", "@142"; numeric on Lighter) |
categoryId | string | References a ProviderCategory by id (e.g., "hyperliquid", "xyz", "spot") |
baseAsset | Asset | Base leg of the market (see /assets) |
quoteAsset | Asset | Quote leg of the market |
szDecimals | number | Size decimal places |
maxLeverage | number? | Maximum allowed leverage (perps markets only) |
onlyIsolated | boolean? | Whether only isolated margin is supported (perps markets only) |
getMarkets()
GET /assets
List the underlying asset registry for a provider. An asset is a transferable balance unit (Lighter’sasset_id namespace), not a tradable market — markets reference assets as their base/quote legs. Providers whose ledger deltas already carry the asset symbol inline (Hyperliquid) return an empty array.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | query | string | Yes | Provider identifier |
x-lifi-api-key | header | string | Yes | API key |
x-lifi-integrator | header | string | No | Integrator identifier |
Response 200
Asset:
| Field | Type | Description |
|---|---|---|
providerId | string | Provider that owns the asset (e.g., "lighter") |
id | string | Provider-minted asset id (Lighter’s numeric asset_id stringified; Hyperliquid coin symbol) |
displaySymbol | string | UI-friendly base symbol (e.g., "USDC", "BTC") |
logoURI | string | URL to asset logo |
displayName | string? | Full asset name (e.g., "USD Coin") |
getAssets()
GET /prices
Get live per-market data for all markets: the midprice, markPrice, prevDayPrice, and volume24h for every market, plus openInterest and funding for perps. Intended for frequent polling; pair it with the static metadata from /markets. Cached for one second.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | query | string | Yes | Provider identifier |
marketIds | query | string | No | Comma-separated list of provider market ids to filter (e.g., BTC,ETH) |
x-lifi-api-key | header | string | Yes | API key |
x-lifi-integrator | header | string | No | Integrator identifier |
Response 200
MarketPrice:
| Field | Type | Description |
|---|---|---|
marketId | string | Provider market id |
price | string | Current mid price |
markPrice | string | Current mark price |
prevDayPrice | string? | Previous day’s price |
volume24h | string? | 24-hour trading volume in USD |
openInterest | string? | Total open interest in USD (perps markets only) |
funding | FundingInfo? | Current funding rate and next funding time (perps markets only) |
getPrices()
GET /ohlcv
Get OHLCV candle data for charts.Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | query | string | Yes | Provider identifier |
marketId | query | string | Yes | Provider market id |
interval | query | string | Yes | Candle interval: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w, 1M |
startTime | query | integer | No | Start timestamp (ms) |
endTime | query | integer | No | End timestamp (ms) |
limit | query | integer | No | Max candles (default 100, max 1000) |
x-lifi-api-key | header | string | Yes | API key |
x-lifi-integrator | header | string | No | Integrator identifier |
Response 200
Response 404
Market not found error.
SDK: getOhlcv()
GET /orderbook
Get current orderbook snapshot.Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | query | string | Yes | Provider identifier |
marketId | query | string | Yes | Provider market id |
depth | query | integer | No | Price levels (default 20, max 100) |
x-lifi-api-key | header | string | Yes | API key |
x-lifi-integrator | header | string | No | Integrator identifier |
Response 200
Response 404
Market not found error.
SDK: getOrderbook()
GET /meta
Get read-only platform metadata: the backendversion and the list of active platform-level notices (advisories shown to all users, independent of any provider or market). Cached for one minute.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-lifi-api-key | header | string | Yes | API key |
x-lifi-integrator | header | string | No | Integrator identifier |
Response 200
Meta:
| Field | Type | Description |
|---|---|---|
version | string | Backend version |
notices | Notice[] | Active platform-level advisories |
Notice:
| Field | Type | Description |
|---|---|---|
timestamp | number | Unix epoch milliseconds |
title | string | Notice title |
message | string | Notice body |
link | string? | URL the notice links to; rendered as a hyperlink when present |
GET /meta/terms
Get the current terms-of-service document and whether an address has accepted that version. When the address has not accepted,accepted is false and acceptedAt is omitted.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
address | query | string | Yes | Wallet address to check acceptance for |
x-lifi-api-key | header | string | Yes | API key |
x-lifi-integrator | header | string | No | Integrator identifier |
Response 200
TermsAcceptanceStatus:
| Field | Type | Description |
|---|---|---|
termsVersion | string | Backend-owned version identifier for the current terms |
content | string | Full current terms-of-service text |
accepted | boolean | Whether the queried address has accepted termsVersion |
acceptedAt | number? | Unix epoch milliseconds the address accepted; absent when not accepted |