Update account/position and platform summary
This commit is contained in:
@@ -46,13 +46,13 @@ public class PositionTests : BaseTests
|
||||
// _ = new GetAccountPositioqwnInfoListOutputDTO().DecodeOutput(hexPositions).d
|
||||
//
|
||||
var openTrade = await _exchangeService.GetTrade(_account, "", Ticker.GMX);
|
||||
var position = new Position(Guid.NewGuid(), "", TradeDirection.Long, Ticker.GMX, MoneyManagement,
|
||||
var position = new Position(Guid.NewGuid(), 1, TradeDirection.Long, Ticker.GMX, MoneyManagement,
|
||||
PositionInitiator.User,
|
||||
DateTime.UtcNow, new User())
|
||||
{
|
||||
Open = openTrade
|
||||
};
|
||||
var command = new ClosePositionCommand(position);
|
||||
var command = new ClosePositionCommand(position, 1);
|
||||
_ = _tradingService.Setup(m => m.GetPositionByIdentifierAsync(It.IsAny<Guid>())).ReturnsAsync(position);
|
||||
_ = _tradingService.Setup(m => m.GetPositionByIdentifierAsync(It.IsAny<Guid>())).ReturnsAsync(position);
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace Managing.Application.Tests
|
||||
|
||||
private static Position GetFakeShortPosition()
|
||||
{
|
||||
return new Position(Guid.NewGuid(), "FakeAccount", TradeDirection.Short, Ticker.BTC, null,
|
||||
return new Position(Guid.NewGuid(), 1, TradeDirection.Short, Ticker.BTC, null,
|
||||
PositionInitiator.PaperTrading, DateTime.UtcNow, new User())
|
||||
{
|
||||
Open = new Trade(DateTime.Now, TradeDirection.Short, TradeStatus.Filled,
|
||||
@@ -230,7 +230,7 @@ namespace Managing.Application.Tests
|
||||
|
||||
private static Position GetSolanaLongPosition()
|
||||
{
|
||||
return new Position(Guid.NewGuid(), "FakeAccount", TradeDirection.Long, Ticker.BTC, null,
|
||||
return new Position(Guid.NewGuid(), 1, TradeDirection.Long, Ticker.BTC, null,
|
||||
PositionInitiator.PaperTrading, DateTime.UtcNow, new User())
|
||||
{
|
||||
Open = new Trade(DateTime.Now, TradeDirection.Long, TradeStatus.Filled,
|
||||
@@ -250,7 +250,7 @@ namespace Managing.Application.Tests
|
||||
|
||||
private static Position GetFakeLongPosition()
|
||||
{
|
||||
return new Position(Guid.NewGuid(), "FakeAccount", TradeDirection.Long, Ticker.BTC, null,
|
||||
return new Position(Guid.NewGuid(), 1, TradeDirection.Long, Ticker.BTC, null,
|
||||
PositionInitiator.PaperTrading, DateTime.UtcNow, new User())
|
||||
{
|
||||
Open = new Trade(DateTime.Now, TradeDirection.Short, TradeStatus.Filled,
|
||||
|
||||
Reference in New Issue
Block a user