mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 14:33:53 +00:00
insert net_profit into the table
i really don't know why I forgot this lol
This commit is contained in:
parent
f2ae512e3f
commit
56fdf0a21f
|
@ -67,6 +67,7 @@ func (s *PositionService) Insert(
|
|||
base,
|
||||
quote,
|
||||
profit,
|
||||
net_profit,
|
||||
trade_id,
|
||||
exchange,
|
||||
side,
|
||||
|
@ -81,6 +82,7 @@ func (s *PositionService) Insert(
|
|||
:base,
|
||||
:quote,
|
||||
:profit,
|
||||
:net_profit,
|
||||
:trade_id,
|
||||
:exchange,
|
||||
:side,
|
||||
|
@ -96,6 +98,7 @@ func (s *PositionService) Insert(
|
|||
"base": position.Base,
|
||||
"quote": position.Quote,
|
||||
"profit": profit,
|
||||
"net_profit": netProfit,
|
||||
"trade_id": trade.ID,
|
||||
"exchange": trade.Exchange,
|
||||
"side": trade.Side,
|
||||
|
|
|
@ -54,7 +54,7 @@ func TestPositionService(t *testing.T) {
|
|||
Exchange: types.ExchangeBinance,
|
||||
Side: types.SideTypeSell,
|
||||
Time: types.Time(time.Now()),
|
||||
}, fixedpoint.NewFromFloat(10.9), fixedpoint.Zero)
|
||||
}, fixedpoint.NewFromFloat(10.9), fixedpoint.NewFromFloat(8.1))
|
||||
assert.NoError(t, err)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user