Fix bots + positions managements
This commit is contained in:
@@ -720,6 +720,21 @@ public class EvmManager : IEvmManager
|
||||
return await GetTrade(account.Key, chainName, ticker);
|
||||
}
|
||||
|
||||
public async Task<List<Position>> GetPositions(Account account)
|
||||
{
|
||||
if (account.IsPrivyWallet)
|
||||
{
|
||||
var result = await _web3ProxyService.GetGmxServiceAsync<GetGmxPositionsResponse>(
|
||||
"/positions",
|
||||
new { account = account.Key });
|
||||
|
||||
|
||||
return GmxV2Mappers.Map(result.Positions);
|
||||
}
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
public async Task<Trade> GetTrade(string reference, string chainName, Ticker ticker)
|
||||
{
|
||||
@@ -757,7 +772,7 @@ public class EvmManager : IEvmManager
|
||||
var result = await _web3ProxyService.GetGmxServiceAsync<GetGmxTradesResponse>("/trades",
|
||||
new { account = account.Key, ticker = ticker.ToString() });
|
||||
|
||||
return result.Trades;
|
||||
return GmxV2Mappers.Map(result.Trades);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user