lighter
БесплатноЗапускает вложенные скриптыНе проверенLighter.xyz (zklighter) perpetual and spot DEX — order placement, cancellation, modification, close-all positions, leverage, margin, withdrawals, fund…
от Starchild-ai-agent★ 34 звезды на GitHubОб этом скилле
Lighter.xyz (zklighter)
Lighter is a high-performance ZK-rollup DEX offering perpetual futures and spot trading with sub-second finality. It supports 220+ markets (perpetuals for crypto, stocks, forex, commodities; spot pairs like ETH/USDC). All orders are signed L2 transactions settled on the deployment's L1.
Networks — the user MUST pick one
Lighter runs as two independent deployments. They share the same API shape but have different hosts, accounts, API keys, contracts, markets and quote assets. Credentials from one do not work on the other.
LIGHTER_NETWORK |
App | REST base URL | Signing chain ID | L1 | Quote |
|---|---|---|---|---|---|
ethereum |
https://app.lighter.xyz | https://mainnet.zklighter.elliot.ai |
304 | Ethereum (1) | USDC |
robinhood |
https://robinhoodchain.lighter.xyz | https://api.rh.lighter.xyz |
466324 | Robinhood Chain (4663) | USDG |
Testnets: ethereum-testnet (https://testnet.zklighter.elliot.ai) and robinhood-testnet (https://api.rh-testnet.lighter.xyz).
Before the first Lighter call in a session, run lighter_get_network().
- If
selectedisfalse, stop and ask the user: "Are you on Lighter (app.lighter.xyz) or Lighter on Robinhood Chain (robinhoodchain.lighter.xyz)?" Do not guess — the wrong choice means wrong markets and failed signatures. - Then have them set
LIGHTER_NETWORK=ethereumorLIGHTER_NETWORK=robinhood(env var or credentials file). Aliases accepted:eth,mainnet,rh,robinhoodchain. - Every tool errors with a clear message until a network is selected. An explicit
LIGHTER_API_URLalso counts as a selection and takes precedence.
Network-specific notes:
- Robinhood Chain spot pairs are quoted in USDG (e.g.
META/USDG), not USDC. It also lists tokenized stocks (HOOD,SPY,QQQ) and fewer markets overall. Always checklighter_get_markets()rather than assuming a symbol exists. - Accounts are created by depositing in the respective app. Look up the account index against the selected network — an Ethereum wallet address may have an account on one deployment and not the other.
- Paper trading keeps a separate state file per network.
When to Use Lighter
- Market data — orderbook depth, recent trades, OHLCV candles, funding rates
- Exchange overview — 24h volume, open interest, mark/index prices
- Account queries — positions, balances, active orders, PnL, trade history
- Order management — place limit/market/stop/TP orders, cancel, modify, close-all
- Position management — set leverage, adjust isolated margin
- Fund management — withdraw assets, transfer between perp/spot buckets
- Funding analysis — compare funding rates across Binance, Bybit, Hyperliquid, Lighter
Symbol Convention
- Perp markets use bare tickers:
BTC,ETH,SOL,LIT - Spot markets use quote-qualified pairs:
ETH/USDC,LIT/USDC,LINK/USDC - The
/is the discriminator — no--market_typeflag needed - Numeric
market_idis also accepted as an escape hatch - Symbol resolution is automatic with a 5-minute cache
Human-Unit Auto-Scaling
Trading tools accept human-readable prices and amounts (e.g. amount=0.1, price=3200.50).
The tools automatically fetch market metadata and scale to integer ticks/lots.
Response includes effective_amount and effective_price showing what actually landed after rounding.
Account Setup Flow
Setting up Lighter trading requires two different values from different places:
Step 0: Pick the network
Ask which deployment they trade on and set LIGHTER_NETWORK accordingly (see Networks above). Everything below is per network.
Step 1: Get your Account Index
LIGHTER_ACCOUNT_INDEX is a number (e.g. 12345), not a key.
Ask the user for their Ethereum L1 wallet address (public address, e.g. 0xabc...), then look it up:
lighter_get_account(l1_address="0xabc...")
The response will contain the account index — that's the LIGHTER_ACCOUNT_INDEX.
If no account is found, the user needs to create one first by connecting their wallet and depositing in the app for the selected network (https://app.lighter.xyz or https://robinhoodchain.lighter.xyz).
Step 2: Get API Keys
LIGHTER_PRIVATE_KEY is a hex string — the L2 API private key.
The user generates this on the API keys page of the selected network's app (https://app.lighter.xyz/apikeys or https://robinhoodchain.lighter.xyz/apikeys):
- Go to the API keys page
- If using a sub-account, switch to it first
- Generate a new API key — the private key is shown only once
- Note the API key index number (this becomes
LIGHTER_API_KEY_INDEX)
See the lighter-python setup example for programmatic key generation (requires L1 wallet signature).
Step 3: Configure Credentials
Sanity check before saving:
LIGHTER_ACCOUNT_INDEX= numeric only (e.g.12345)- `LIGHTER_PRIVATE
Установить lighter в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
lighter_get_networklighter_get_marketslighter_get_orderbooklighter_get_recent_tradeslighter_get_candleslighter_get_exchange_statslighter_get_funding_rateslighter_get_asset_detailslighter_get_accountlighter_get_active_orderslighter_get_order_historylighter_get_trade_historylighter_get_pnllighter_create_orderlighter_cancel_orderlighter_cancel_all_orderslighter_modify_orderlighter_close_all_positionslighter_set_leveragelighter_adjust_marginlighter_withdrawlighter_transfer_fundslighter_paper_initlighter_paper_resetlighter_paper_statuslighter_paper_positionslighter_paper_orderlighter_paper_tradeslighter_paper_healthВложенные файлы
FAQ
Что делает скилл lighter?
Lighter.xyz (zklighter) perpetual and spot DEX — order placement, cancellation, modification, close-all positions, leverage, margin, withdrawals, fund transfers, orderbook depth, market data, candles, funding rates, account positions, balances, PnL, and trade history. Supports symbol resolution (BTC, ETH/USDC) and human-unit auto-scaling for prices and amounts. Triggers on: "lighter", "zklighter", "elliot", perpetual futures trading on lighter, lighter orderbook, lighter funding, lighter positions, lighter margin, "robinhood chain", "lighter on robinhood", robinhoodchain.lighter.xyz. Supports two separate deployments: Lighter on Ethereum and Lighter on Robinhood Chain — the user must pick one (LIGHTER_NETWORK). Do NOT use for CoinGecko price data, Hyperliquid, or general CEX trading.
Как установить скилл lighter?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lighter запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic