Fetch closed position to get last pnl realized

This commit is contained in:
2025-10-05 23:31:17 +07:00
parent 1b060fb145
commit dac0a9641f
14 changed files with 749 additions and 23 deletions

View File

@@ -75,4 +75,22 @@ public interface IEvmManager
/// <param name="chain">The blockchain chain</param>
/// <param name="publicAddress">The public address</param>
void ClearBalancesCache(Chain chain, string publicAddress);
/// <summary>
/// Gets the position history for a specific ticker and account from GMX
/// </summary>
/// <param name="account">The trading account</param>
/// <param name="ticker">The ticker to get history for</param>
/// <param name="fromDate">Optional start date for filtering</param>
/// <param name="toDate">Optional end date for filtering</param>
/// <param name="pageIndex">Page index for pagination (default: 0)</param>
/// <param name="pageSize">Page size for pagination (default: 20)</param>
/// <returns>Position history response with actual GMX PnL data</returns>
Task<List<Position>> GetPositionHistory(
Account account,
Ticker ticker,
DateTime? fromDate = null,
DateTime? toDate = null,
int pageIndex = 0,
int pageSize = 20);
}