mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +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,
|
base,
|
||||||
quote,
|
quote,
|
||||||
profit,
|
profit,
|
||||||
|
net_profit,
|
||||||
trade_id,
|
trade_id,
|
||||||
exchange,
|
exchange,
|
||||||
side,
|
side,
|
||||||
|
@ -81,6 +82,7 @@ func (s *PositionService) Insert(
|
||||||
:base,
|
:base,
|
||||||
:quote,
|
:quote,
|
||||||
:profit,
|
:profit,
|
||||||
|
:net_profit,
|
||||||
:trade_id,
|
:trade_id,
|
||||||
:exchange,
|
:exchange,
|
||||||
:side,
|
:side,
|
||||||
|
@ -96,6 +98,7 @@ func (s *PositionService) Insert(
|
||||||
"base": position.Base,
|
"base": position.Base,
|
||||||
"quote": position.Quote,
|
"quote": position.Quote,
|
||||||
"profit": profit,
|
"profit": profit,
|
||||||
|
"net_profit": netProfit,
|
||||||
"trade_id": trade.ID,
|
"trade_id": trade.ID,
|
||||||
"exchange": trade.Exchange,
|
"exchange": trade.Exchange,
|
||||||
"side": trade.Side,
|
"side": trade.Side,
|
||||||
|
|
|
@ -54,7 +54,7 @@ func TestPositionService(t *testing.T) {
|
||||||
Exchange: types.ExchangeBinance,
|
Exchange: types.ExchangeBinance,
|
||||||
Side: types.SideTypeSell,
|
Side: types.SideTypeSell,
|
||||||
Time: types.Time(time.Now()),
|
Time: types.Time(time.Now()),
|
||||||
}, fixedpoint.NewFromFloat(10.9), fixedpoint.Zero)
|
}, fixedpoint.NewFromFloat(10.9), fixedpoint.NewFromFloat(8.1))
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user