Lighter Market Tool icon

Lighter Market Tool

Query Lighter market data - prices, orderbooks, funding rates, stats for AI agents

Lighter Market Tool

AI-generated

Summary

Query Lighter market data by executing a specified action against the Lighter DEX API.

Inputs

  • action (required) — The action to perform
  • marketIndex — Market index (0=BTC, 1=ETH, 2=SOL). Required for orderbook and trades.
  • limit — Number of results to return; default applied per action

Output shape

ai_tool

Returns a LangChain DynamicStructuredTool instance. Invoking the tool with the specified parameters produces action-specific structured JSON output from the Lighter DEX API.

Examples

Example 1: getMarkets

Call without marketIndex or limit to retrieve all available markets with 24h stats.

Example 2: getOrderbook

Provide marketIndex (e.g., 0 for BTC-PERP) to retrieve orderbook depth with top 5 bid/ask levels.

Example 3: getFundingRates

Call without marketIndex to retrieve funding rates for all markets.

Links

Discussion