Lighter icon

Lighter

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

Trade → Get Trades

AI-generated

Summary

Fetch trades for a market with optional account filtering, limit, and sorting.

Inputs

  • tradeMarketIndex — The market index (0 = ETH-USD, etc.)
  • tradeLimit — Maximum number of trades to return
  • tradeAccountIndex — Filter by account index (-1 for all accounts; only applied if >= 0)
  • tradeSortBy — Field to sort trades by (timestamp, price, or size)
  • tradeSortDir — Sort direction for trades (descending or ascending)

Output shape

Array of trade objects from the Lighter API

Each item is a JSON payload containing the trade data returned from /api/v1/trades

Links

Discussion