REGISTER_API_KEY. Public provider metadata calls this an SDK signer: the Lighter plugin owns key generation, persistence, WASM loading, signing, and read-only token lifecycle (see Authentication). Applications do not instantiate a signer or pass a key store separately.
Provider instances
The Lighter chain is LI.FI chain id
ChainId.LTR, the routing destination for existing accounts (LIGHTER_USDC). Ethereum is where the account-opening bridge deposit runs (ETHEREUM_USDC). lighter-rh uses Robinhood Chain for both (ROBINHOOD_USDG).
Both providers expose the same normalized SDK contract but keep endpoints, caches, credentials, signing configuration, and asset registries isolated.
localStorage for its signing key and read-only token. Pass storage to a provider factory only for SSR, tests, or a different persistence backend. Authenticated WebSocket channels automatically reuse resolveAuthToken from the co-registered REST provider; a custom resolver is only needed for a standalone WebSocket client. A PerpsClient user passes perps.client to PerpsWsClient.
WASM signer
The Lighter signer is a 12.9 MB WASM binary downloaded on first use. CallloadLighterWasm() early to warm it up before the first trade. It needs no bundler configuration and runs client-side only (in Next.js, load it with a dynamic import and ssr: false). Under a Content Security Policy, script-src must include 'wasm-unsafe-eval'; 'unsafe-eval' is not required.
Authentication and rate limits
Authenticated reads (getOrders, getOrder, getFills, getActivity, getPortfolioHistory) resolve a bearer token in this order: the persisted long-lived read-only token, then a read-only token created on first use with the registered API key and persisted, then a standard token (read and write, at most 8 hours) while read-only token creation fails.
The authenticated data reads throw SetupRequired when no token resolves, and the SDK sends no request to Lighter. They throw Unauthorized when Lighter rejects the token, and AccountNotFound when the wallet has no Lighter account. getPositions and getWithdrawableBalances need no token, so their only access code is AccountNotFound. getAccount is a status read: when the wallet has no locally stored API key that matches the registered key, it returns a zero fee tier and apiKeyRegistered: false. When the keys match, getAccount reads the fee tier with the resolved token and throws Unauthorized if Lighter rejects the token. getAccount throws AccountNotFound for a wallet with no Lighter account. getAvailableToTrade reads through getAccount, so it throws the same two codes. See Account access.
Topics
- Signing Model — WASM signing, the native key versus the L1 wallet, and dual-authorized setup
- Deposits — provider-owned deposit discovery for Lighter mainnet and Robinhood Chain
- Setup — the steps in sequence order with their signer and relay, the required Plus or Premium account tier, and the account mode choice
- Trading — trading and account actions
- Withdrawals — per-asset/per-category balance discovery and settlement paths
- WebSocket Protocol — channel mapping and provider-owned authentication
Defaults and constraints
- Default margin mode:
CROSSwhenmarginModeis omitted fromplaceOrderorupdateLeverage. Isolated-only markets rejectCROSS; see Margin modes. - Trade signing: trading actions are authorized by the plugin’s
SDKsigner with no per-trade wallet popup. A fast withdrawal also needs one wallet signature; see Withdrawals. - Order fields:
priceis required. - Withdrawal destination: the account owner address only.
- Mainnet deposit: Ethereum mainnet USDC plus ETH for gas.
- Robinhood deposit: Robinhood Chain USDG plus native gas.
- Key slot: the backend selects the slot and sends it in
wasmSignParams.api_key_index; re-registering that slot replaces the prior key. - Account tier: Plus or Premium is required on both Lighter Core and Robinhood Chain: Lighter accepts orders routed through an integrator only from those tiers. The
accountTypesetup step is a choice, and Plus is the recommended option.
Account figures
PerpsClient.getAccountSummary() builds the AccountSummary totals for Lighter from these venue fields:
See Withdrawals for the per-asset and per-category figures
getWithdrawableBalances() reads.
Candle intervals
The provider supports these OHLCV intervals:1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d. Requesting any other interval, including 1w, raises a validation error.
Related pages
- SDK / Providers — provider discovery and deposit-flow descriptors
- SDK / Withdrawal — withdrawable-balance discovery and submission
- SDK / Streaming — normalized WebSocket subscriptions
- SDK / Actions — authorization-step variants