Lighter icon

Lighter

Interact with Lighter (zkLighter) DEX API - High-performance perpetuals trading

Trade → Get Recent Trades

AI-generated

Summary

Fetch recent trades for a market

Inputs

  • tradeMarketIndex — The market index (0 = ETH-USD, etc.)
  • tradeLimit — Maximum number of trades to return

Output shape

Array of trade objects returned from the Lighter API endpoint /api/v1/recentTrades

Each item is pushed as json paired data; no auth token is required for the request itself beyond the lighterApi credentials for base URL selection.

Examples

Example 1: Retrieve the 50 most recent trades for the default market

Set tradeMarketIndex to 0 (default) and tradeLimit to 50

Links

Discussion