mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
print balance
This commit is contained in:
parent
2932230fdb
commit
638fd1bb99
|
@ -95,6 +95,14 @@ var rootCmd = &cobra.Command{
|
|||
stream := max.NewStream(key, secret)
|
||||
stream.Subscribe(types.BookChannel, symbol, types.SubscribeOptions{})
|
||||
|
||||
stream.OnOrderUpdate(func(order types.Order) {
|
||||
log.Infof("order: %+v", order)
|
||||
})
|
||||
|
||||
stream.OnBalanceSnapshot(func(balances types.BalanceMap) {
|
||||
log.Infof("balances: %+v",balances)
|
||||
})
|
||||
|
||||
streambook := types.NewStreamBook(symbol)
|
||||
streambook.BindStream(stream)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user