import type { GetPositionPnlHistoryParams, PositionPnlPoint } from "@0xmonaco/types"; export interface UsePositionPnlHistoryParams extends GetPositionPnlHistoryParams { /** Position UUID to chart; pass null/undefined to defer fetching */ positionId: string | null | undefined; } export interface UsePositionPnlHistoryReturn { /** Forward-filled PnL state samples, oldest first */ data: PositionPnlPoint[]; /** True while a fetch is in flight */ loading: boolean; /** Last fetch error, if any */ error: Error | null; /** Re-run the fetch with the current parameters */ refetch: () => Promise; }