Add start and enddate when fetching the position history
This commit is contained in:
@@ -989,7 +989,9 @@ public class EvmManager : IEvmManager
|
||||
account.Key,
|
||||
pageIndex,
|
||||
pageSize,
|
||||
ticker.ToString());
|
||||
ticker.ToString(),
|
||||
fromDate,
|
||||
toDate);
|
||||
|
||||
// Map the result to the Position domain object
|
||||
return result;
|
||||
|
||||
@@ -589,15 +589,22 @@ namespace Managing.Infrastructure.Evm.Services
|
||||
return queryString.ToString();
|
||||
}
|
||||
|
||||
public async Task<List<Position>> GetGmxPositionHistoryAsync(string account, int pageIndex = 0,
|
||||
int pageSize = 20, string? ticker = null)
|
||||
public async Task<List<Position>> GetGmxPositionHistoryAsync(
|
||||
string account,
|
||||
int pageIndex = 0,
|
||||
int pageSize = 20,
|
||||
string? ticker = null,
|
||||
DateTime? fromDate = null,
|
||||
DateTime? toDate = null)
|
||||
{
|
||||
var payload = new
|
||||
{
|
||||
account,
|
||||
pageIndex,
|
||||
pageSize,
|
||||
ticker
|
||||
ticker,
|
||||
fromDateTime = fromDate?.ToString("O"), // ISO 8601 format
|
||||
toDateTime = toDate?.ToString("O") // ISO 8601 format
|
||||
};
|
||||
|
||||
var response = await GetGmxServiceAsync<GetGmxPositionHistoryResponse>("/position-history", payload);
|
||||
|
||||
Reference in New Issue
Block a user