Lighter API

Lighter decentralised perpetuals exchange integration.

This package contains two Lighter integration surfaces.

The public vault-data surface extracts Lighter pool data via public endpoints, mirroring the Hyperliquid integration and GRVT integration:

  • Pool listing via the public /api/v1/publicPoolsMetadata endpoint

  • Per-pool share price history from /api/v1/account

  • DuckDB storage for daily metrics

  • Bridge into the ERC-4626 pipeline (VaultDatabase pickle + uncleaned Parquet)

No authentication is required for this vault-data path – all data comes from public endpoints.

The guarded Lagoon/Safe surface supports the manual mainnet custody lifecycle:

  • Guard whitelisting for Lighter deposit / withdraw / withdrawPendingBalance L1 calls

  • Safe-owned changePubKey API-key registration

  • Lagoon-vault helpers for USDC deposits, secure Lighter withdrawals and pending-balance claims

  • Account valuation via public Lighter account NAV fields

  • Small manual ETH perpetual round trips through the optional Lighter SDK

Tutorials

For architecture details, API endpoint reference, DuckDB schema, and fee model documentation, see README-lighter-vaults.md.

eth_defi.lighter.vault

Lighter pool data extraction and analysis.

eth_defi.lighter.valuation

Lighter account valuation.

eth_defi.lighter.daily_metrics

Lighter daily pool metrics with DuckDB storage.

eth_defi.lighter.vault_data_export

Export Lighter pool data into the ERC-4626 pipeline format.

eth_defi.lighter.session

HTTP session management for Lighter API.

eth_defi.lighter.constants

Constants for the Lighter integration.

eth_defi.lighter.api

Lighter API helpers for manual trading workflows.

eth_defi.lighter.deployment

Lighter guard whitelisting and library deployment.

eth_defi.lighter.lagoon

Lagoon vault helpers for Lighter L1 custody.

eth_defi.lighter.pubkey

Lighter API-key registration (changePubKey) for a Safe-controlled account.

eth_defi.lighter.testing

Anvil-fork test helpers for the Lighter guard integration.

Guard integration

For depositing into and withdrawing from Lighter through an asset-managed Gnosis Safe governed by GuardV0 / TradingStrategyModuleV0, see eth_defi.lighter.deployment and the README-lighter-guard.md architecture and security notes.