Installation
Configuration
Initialize the Perps SDK client:DEFAULT_API_URL (https://develop.li.quest/v1/perps) by default. Override with apiUrl if needed:
Configuration Options
Provider Configuration
Theproviders option accepts two shapes. Pass an array of provider plugins (preferred for new code) to bind each DEX’s read surface to the client — looked up at runtime via client.getProvider(key):
ProviderConfigs object for per-provider tuning:
Storage for the agent / API-key signer is configured on the provider plugin (e.g.
hyperliquidProvider({ storage })), not on createPerpsClient.Request Interceptor
TherequestInterceptor option lets you modify request options before each API call. This is useful for adding custom headers, logging, or integrating with authentication systems:
Get your integrator name and API key from the LI.FI Partner Portal. Both are required for API access.
Quick Start
Fetch available providers and assets:Request Cancellation
All service functions accept an optionaloptions parameter with an AbortSignal for cancelling in-flight requests:
fetch is aborted and the promise rejects with an AbortError.
Next steps
- Providers / Hyperliquid — Signing Model — Agent provisioning, key storage, and the two-part signing scheme
- Concepts / Action Pattern — The create -> sign -> submit pattern
- Providers / Hyperliquid — Setup, signing model, and provider-specific details
- SDK / Trading — All order types, features, and a full end-to-end example
- SDK / Assets — Prices, orderbooks, and charts