Lighter icon

Lighter

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

Account → Get Position Funding

AI-generated

Summary

Fetch position funding records from the Lighter DEX API.

Inputs

  • accountIndex — The account index to query funding history for. Defaults to 0 if omitted.
  • positionFundingLimit — Maximum number of position funding records to return. Defaults to 50 if omitted.
  • positionFundingMarketIndex — Filter results by market index. Use -1 (default) to return funding for all markets; specify a non-negative index to filter to a specific market.

Output shape

The API response as JSON, containing an array of position funding records with timestamps, funding rates, and associated market/account metadata.

Requires lighterApi credentials. Authentication is handled via an optional authToken added to request headers if configured in the credentials setup.

Examples

Example 1: Get the 20 most recent position funding entries for account index 3, filtered to market index 0.

accountIndex: 3, positionFundingLimit: 20, positionFundingMarketIndex: 0

Links

Discussion