v1

latestOpenAPI 3.0.32026-07-263871106.2 KB
Positions

Get position PnL data (open and closed positions with on-the-fly calculation)

Returns positions for a specific pool and user with calculated PnL values. Includes SOL-denominated amounts when SOL price is available (omitted otherwise). Results can be filtered by status (open/closed) and are paginated.

Arguments

  • pool_address - The address of the pool
  • user - The user address
  • status - Filter by status: "open", "closed", or omit for all (default: all)
  • page - Page number starting from 1 (default: 1)

Returns

  • 200 - Paginated list of positions with PnL data in USD and SOL
get/positions/{pool_address}/pnl

Path parameters

pool_addressstring required

Query parameters

userstring required

The user's wallet address

status'open' | 'closed' | 'all'

Filter positions by status: "open", "closed", or "all" (default: "all")

pageinteger

Page number for pagination (minimum: 1, default: 1)

page_sizeinteger

Page size for pagination (minimum: 1, maximum: 100, default: 20)

Response

hasNextboolean required
pageinteger required
pageSizeinteger required
{"stackTrail":"components:schemas:GetPoolPositionPnLResponse:properties:rewardTokenX","oasType":"schema","type":"unknown"}
rewardTokenXPricestring required
{"stackTrail":"components:schemas:GetPoolPositionPnLResponse:properties:rewardTokenY","oasType":"schema","type":"unknown"}
rewardTokenYPricestring required
{"stackTrail":"components:schemas:GetPoolPositionPnLResponse:properties:solPrice","oasType":"schema","type":"unknown"}
{"stackTrail":"components:schemas:GetPoolPositionPnLResponse:properties:tokenX","oasType":"schema","type":"unknown"}
tokenXPricestring required
{"stackTrail":"components:schemas:GetPoolPositionPnLResponse:properties:tokenY","oasType":"schema","type":"unknown"}
tokenYPricestring required
totalCountinteger required