mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
rebalance on order filled
This commit is contained in:
parent
762a09042a
commit
7b121b10be
|
@ -113,6 +113,9 @@ func (s *Strategy) Run(ctx context.Context, _ bbgo.OrderExecutor, session *bbgo.
|
|||
|
||||
s.activeOrderBook = bbgo.NewActiveOrderBook("")
|
||||
s.activeOrderBook.BindStream(session.UserDataStream)
|
||||
s.activeOrderBook.OnFilled(func(order types.Order) {
|
||||
s.rebalance(ctx)
|
||||
})
|
||||
|
||||
session.UserDataStream.OnStart(func() {
|
||||
if s.OnStart {
|
||||
|
|
Loading…
Reference in New Issue
Block a user