GET /api/v1/trades

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/lighter/api/v1/tradesCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Cursor-paginated public trade history for a market.

Parameters

nameintypedescription
market_idqueryintoptionalMarket ID (0 = ETH).
example: 0
sort_byquerystrrequiredSort field (timestamp, trade_id).
example: timestamp
sort_dirquerystroptionalSort direction (asc, desc).
cursorquerystroptionalPagination cursor from previous response.
limitqueryintoptionalNumber of trades (1..100).
example: 5

Response

type: object
data key: trades
cursor key: next_cursor
pagination: cursor
sample: {
  "code": "int",
  "next_cursor": "str",
  "trades": "array[5]"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/lighter/api/v1/trades?market_id=0&sort_by=timestamp&limit=5"