Lighter

Perpetuals trading on zkLighter via Thirdfy provider actions. CCTP funding, API key signing, and integrator fee readiness.

Category: Trading

Lighter perpetuals are exposed through the governed action catalog under provider lighter. Orders are signed with a Lighter API key through the Thirdfy signer sidecar, not by ERC-7710 Gator grants.

Credential model

LayerModel
Exchange ordersLighter API key (lighter_api_key credential: privateKey, apiKeyIndex 4–254, accountIndex)
FundingCCTP deposit intent from Base, Arbitrum, or Avalanche USDC (minimum 5 USDC)
EVM funding txsMay use agent_wallet for source-chain USDC movement before CCTP
ReadsL1 address or Lighter account index

Discovery

curl "https://api.thirdfy.com/api/v1/agent/actions/catalog"
SurfaceExample
MCPgetProviderActions { provider: "lighter" }
CLIthirdfy-agent actions --provider lighter, then thirdfy-agent venue readiness lighter

Use it

Ask your agent:

Using Thirdfy, check whether my agent is ready to trade on Lighter and show the top of the ETH order book. Do not place any order.

Check the venue. Readiness reports funding, credentials, approvals and the blockers that stop an order.

MCP
CLI
getVenueReadiness { venue: "lighter" }

Trimmed result from a real read on 2026-10-08, for an account just under the deposit minimum:

{
  "venue": "lighter",
  "ready": false,
  "fundingReady": false,
  "credentialsReady": true,
  "approvalsReady": true,
  "nextAction": "LIGHTER_DEPOSIT_REQUIRED",
  "minimumDepositUsd": 5,
  "blockingReasons": ["LIGHTER_DEPOSIT_REQUIRED"],
  "setupStatus": {
    "accountIndex": 123456,
    "account": { "collateral": "4.989094" },
    "integrator": { "enabled": true, "approvalRequired": false, "approvalSufficient": true }
  }
}

Signed in with Thirdfy, leave out agentKey: the connected agent is used. With an agent API key, add agentKey.

ready is true only when blockingReasons is empty. Take accountIndex from setupStatus; order writes need it.

One read. Market IDs and decimals come from search_lighter_markets (ETH is marketId 0, with 4 size and 2 price decimals). The order book takes the marketId:

MCP
CLI
REST
agentRun { action: "get_lighter_order_book", params: { marketId: 0, limit: 3 } }

Trimmed result from a real read on 2026-10-08:

{
  "success": true,
  "book": {
    "total_asks": 3,
    "asks": [
      { "order_index": 281477972765933, "remaining_base_amount": "0.2347", "price": "2527.43" }
    ],
    "total_bids": 3,
    "bids": [
      { "order_index": 562946850168280, "remaining_base_amount": "128.7512", "price": "2527.36" }
    ]
  }
}

What to check: the book shows human prices and sizes as strings. Order writes take integers scaled by the market decimals, so convert before you send one.

One write. A limit buy on ETH:

MCP
CLI
agentRun { action: "place_lighter_perps_order", params: { accountIndex: 123456, apiKeyIndex: 4, marketId: 0, baseAmount: 50, price: 260000, isAsk: false, orderType: "limit" } }

Replace accountIndex with yours and apiKeyIndex with your registered key (4 to 254). With 4 size decimals, baseAmount: 50 is 0.005 ETH. With 2 price decimals, price: 260000 is a worst price of 2600.00. isAsk: false buys. Check the order clears minBaseAmount and minQuoteAmount from search_lighter_markets. Run thirdfy-agent preflight with the same flags to check the params before you send it.

Readiness checklist

  • Source-chain USDC funded for CCTP when margin is not already on Lighter.
  • Onboarding complete (complete_lighter_onboarding or setup/status actions).
  • API key registered (create_lighter_api_key then register_lighter_api_key).
  • Integrator approval when Thirdfy partner monetization is active (approve_lighter_integrator). Unfunded integrator treasury returns LIGHTER_INTEGRATOR_ACCOUNT_UNFUNDED and orders proceed without integrator fee attachment.
  • Preflight before live writes (delegationStatus too when you act for delegated wallets; it needs an agent API key).
  • LIGHTER_SIGNER_URL or LIGHTER_SIGNER_BINARY_PATH configured on the API for signed writes.

Run mode

SettingUse
runMode: agent_walletThe one run mode, and the default. The agent's managed wallet runs complete_lighter_onboarding (Base CCTP and the Ethereum changePubKey) and order writes with its registered Lighter API key.
signer: userThirdfy prepares the transaction and your own wallet signs it. Build it with /build-tx (CLI --signer user). runMode: self is an old name for this.

runMode thirdfy and hybrid are retired: they still run, as agent_wallet, and the reply lists them in deprecations[]. Gator delegation and acting for many wallets work as before, but they are not run modes.

Use the Lighter actions by name, for example place_lighter_perps_order.

MCP sequence (summary)

  1. getProviderActions { provider: "lighter" }
  2. get_lighter_funding_status and market discovery reads
  3. Onboarding or get_lighter_setup_status
  4. approve_lighter_integrator when integrator monetization is active and approval is missing
  5. Orders via walletExecute (or executeIntent with an agent API key)

See Thirdfy MCP for the full recommended sequence.

Hosted deploy

Lighter perps brains are on EarnOrg (docs.earnorg.com). EarnOrg hosts the Hermes runtime; Thirdfy governs execution through the lighter provider.