Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

lighter

БесплатноЗапускает вложенные скриптыНе проверен

Lighter.xyz (zklighter) perpetual and spot DEX — order placement, cancellation, modification, close-all positions, leverage, margin, withdrawals, fund…

Starchild-ai-agentот 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 selected is false, 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=ethereum or LIGHTER_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_URL also 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 check lighter_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_type flag needed
  • Numeric market_id is 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):

  1. Go to the API keys page
  2. If using a sub-account, switch to it first
  3. Generate a new API key — the private key is shown only once
  4. 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
Полный SKILL.md на GitHub

Установить lighter в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

lighter_get_network
lighter_get_markets
lighter_get_orderbook
lighter_get_recent_trades
lighter_get_candles
lighter_get_exchange_stats
lighter_get_funding_rates
lighter_get_asset_details
lighter_get_account
lighter_get_active_orders
lighter_get_order_history
lighter_get_trade_history
lighter_get_pnl
lighter_create_order
lighter_cancel_order
lighter_cancel_all_orders
lighter_modify_order
lighter_close_all_positions
lighter_set_leverage
lighter_adjust_margin
lighter_withdraw
lighter_transfer_funds
lighter_paper_init
lighter_paper_reset
lighter_paper_status
lighter_paper_positions
lighter_paper_order
lighter_paper_trades
lighter_paper_health

Вложенные файлы

__init__.pyclient.pylogo.pngreferences/api-reference.mdtools.py

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить lighter с