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
| Option | Type | Required | Description |
|---|---|---|---|
integrator | string | Yes | Integrator identifier |
apiKey | string | Yes | API key for authenticated requests |
apiUrl | string | No | Base API URL (defaults to DEFAULT_API_URL) |
storage | StorageAdapter | No | Custom storage adapter for agent keys (see Signing Modes) |
disableVersionCheck | boolean | No | Disable SDK version update check (useful in development) |
requestInterceptor | RequestInterceptor | No | Modify fetch options before each request |
providers | object | No | Provider-specific configuration (see below) |
Provider Configuration
Theproviders option allows provider-specific tuning:
| Provider | Option | Type | Description |
|---|---|---|---|
hyperliquid.venues | string[] | No | Filter which Hyperliquid venues are visible. '' is the default venue, 'xyz' is the HIP-3 venue. If omitted, all venues are shown. |
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
- Concepts / Signing Modes — USER vs USER_AGENT, agent key storage and management
- Concepts / Action Pattern — The create -> sign -> submit pattern
- Providers / Hyperliquid — Prerequisites, 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