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) |
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.markets | string[] | No | Filter which Hyperliquid venues are visible. '' is the default venue, 'xyz' is the HIP-3 venue. If omitted, all venues are shown. |
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