@@ -618,7 +618,7 @@ public class EvmManager : IEvmManager
|
||||
{
|
||||
var chain = ChainService.GetChain(chainName);
|
||||
var web3 = new Web3(chain.RpcUrl);
|
||||
var quantity = await GmxService.QuantityInPosition(web3, publicAddress, ticker);
|
||||
var quantity = await _gmxV2Service.QuantityInPosition(web3, publicAddress, ticker);
|
||||
return quantity;
|
||||
}
|
||||
|
||||
|
||||
@@ -1372,4 +1372,9 @@ public class GmxV2Service
|
||||
{
|
||||
return $"{account}-{market}-{collateralToken}-{(isLong ? "true" : "false")}";
|
||||
}
|
||||
|
||||
public async Task<decimal> QuantityInPosition(Web3 web3, string publicAddress, Enums.Ticker ticker)
|
||||
{
|
||||
return (await GetTrade(web3, publicAddress, ticker)).Status == Enums.TradeStatus.Filled ? 1 : 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user