Skip to main content

getProviders

Returns all available perpetual DEX platforms, including their setup and options descriptors, trading actions, and categories.
import { createPerpsClient, getProviders } from '@lifi/perps-sdk';

const client = createPerpsClient({ integrator: 'my-app', apiKey: 'your-api-key' });
const { providers } = await getProviders(client);

for (const provider of providers.filter((p) => p.active)) {
  console.log(provider.key, provider.name);
  console.log('  categories:', provider.categories.map((c) => c.id));
  console.log('  actions:', provider.actions.map((a) => a.type));
}
// hyperliquid Hyperliquid
//   categories: ['hyperliquid', 'xyz', 'flx', 'spot', ...]
//   actions: ['placeOrder', 'cancelOrder', 'modifyOrder', ...]

Parameters

ParameterTypeRequiredDescription
clientPerpsSDKClientYesSDK client from createPerpsClient()
optionsSDKRequestOptionsNoRequest options (e.g., signal for cancellation)

Returns

ProvidersResponse{ providers: Provider[] }: Each Provider:
FieldTypeDescription
keystringUnique provider identifier (used in query params)
namestringDisplay name
logoURIstringURL to provider logo image
signingMethodSigningMethodDefault signing method for the provider — see SigningMethod below.
activebooleanWhen false, the provider is announced but not yet selectable in clients. Filter on this before rendering provider pickers.
setupProviderAction[]Mandatory account-setup descriptors with their allowed signers and UI metadata. The user MUST satisfy every entry before trading. An empty array means the provider has no setup gates.
optionsProviderAction[]Optional post-setup descriptors the user MAY tune (e.g. accountMode, accountType). Never gate trading. An empty array is valid.
actionsProviderAction[]Trading/operational actions with their allowed signers
categoriesProviderCategory[]Trading categories within the provider (e.g., perps, spot, xyz)
wsUrlstring?WebSocket endpoint for streaming (see Streaming)
minDepositUsdnumber?Minimum deposit amount in USD that the provider’s deposit path will accept. Absent means no minimum is advertised.
minOrderValueUsdnumber?Minimum order notional value in USD. Absent means no minimum is advertised.
minReduceOrderValueUsdnumber?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.
Each ProviderCategory:
FieldTypeDescription
idstringCategory identifier (referenced as categoryId in MarketRef)
logoURIstring?URL to the category logo
quoteAssetAsset | nullQuote asset for this category (null for the spot category, which has no single fixed quote)
tradeNoticeTradeNotice?Optional advisory ({ level: 'info' | 'warn', message }) shown against the category’s markets
Each ProviderAction:
FieldTypeDescription
typeActionTypeAction type string
signersPerpsSigner[]Allowed signers — see PerpsSigner below
signingMethodSigningMethodHow the SDK must sign this action — see SigningMethod below. Most actions match the provider’s dominant pattern (Hyperliquid: eip712, Lighter: wasmBlob), but on-chain bridge actions like deposit are evmTx regardless of provider.
The same ProviderAction shape backs setup, options, and actions — which array it sits in carries the categorisation. Entries in setup and options additionally populate the presentation/ordering fields the widget renders in its setup and options modals:
FieldTypeDescription
titlestring?Short user-facing label rendered in the modal
descriptionstring?One-paragraph explanation rendered under the title
paramsParam[]?Input descriptors the widget collects before dispatching. Each Param describes one input; its values array enumerates the legal value strings the action accepts (the source of truth for things like the mode values on accountMode).
sequencenumber?Ascending order in which the user satisfies setup steps (lower runs first)

PerpsSigner

Identifies which key signs a given action. Surfaced per-action in ProviderAction.signers.
ValueDescription
USERThe user’s L1 wallet. Used for one-time setup actions and protocol-required user-signed actions only — Hyperliquid: APPROVE_AGENT, APPROVE_BUILDER_FEE, ACCOUNT_MODE (when the user-side signature is required), WITHDRAWAL, SEND_ASSET. Lighter: DEPOSIT and the REGISTER_API_KEY EIP-191 countersignature.
AGENTAn SDK-managed agent keypair approved by the user. Signs every Hyperliquid trading action so trades execute without wallet popups.
API_KEYA provider-native API key managed by the SDK (Lighter — all trading actions)

SigningMethod

Identifies the structural shape of the ActionStep returned by createAction. The SDK uses this to dispatch to the correct signer. The wire-level values are camelCase strings; the SDK exports them as the SigningMethod enum (keys: EIP712, WASM_BLOB, EVM_TX).
Wire valueSigningMethod keyActionStep variantDescription
eip712EIP712Eip712ActionStepEIP-712 typed data + ECDSA signature (Hyperliquid and other EVM dexes)
wasmBlobWASM_BLOBWasmBlobActionStepOpaque blob signed by a provider-supplied WASM signer (Lighter and zk-rollup dexes)
evmTxEVM_TXEvmTxActionStepPlain EVM transaction (used for on-chain bridge deposits)
Use provider.setup to dynamically build the setup UI and provider.options for post-setup tuning controls. See Hyperliquid / Setup for the full flow.
API Reference: GET /providers