Fetch closed position to get last pnl realized
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user