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

@@ -961,4 +961,22 @@ public class EvmManager : IEvmManager
{
return await GetCandles(ticker, startDate, timeframe, false);
}
public async Task<List<Position>> GetPositionHistory(
Account account,
Ticker ticker,
DateTime? fromDate = null,
DateTime? toDate = null,
int pageIndex = 0,
int pageSize = 20)
{
var result = await _web3ProxyService.GetGmxPositionHistoryAsync(
account.Key,
pageIndex,
pageSize,
ticker.ToString());
// Map the result to the Position domain object
return result;
}
}