mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
max: apply margin settings struct
This commit is contained in:
parent
eccee460ca
commit
e5e505d65e
|
@ -29,6 +29,8 @@ var marketDataLimiter = rate.NewLimiter(rate.Every(2*time.Second), 10)
|
|||
var log = logrus.WithField("exchange", "max")
|
||||
|
||||
type Exchange struct {
|
||||
types.MarginSettings
|
||||
|
||||
client *maxapi.RestClient
|
||||
key, secret string
|
||||
}
|
||||
|
@ -155,7 +157,9 @@ func (e *Exchange) QueryMarkets(ctx context.Context) (types.MarketMap, error) {
|
|||
}
|
||||
|
||||
func (e *Exchange) NewStream() types.Stream {
|
||||
return NewStream(e.key, e.secret)
|
||||
stream := NewStream(e.key, e.secret)
|
||||
stream.MarginSettings = e.MarginSettings
|
||||
return stream
|
||||
}
|
||||
|
||||
func (e *Exchange) QueryOrder(ctx context.Context, q types.OrderQuery) (*types.Order, error) {
|
||||
|
|
|
@ -18,6 +18,7 @@ import (
|
|||
//go:generate callbackgen -type Stream
|
||||
type Stream struct {
|
||||
types.StandardStream
|
||||
types.MarginSettings
|
||||
|
||||
key, secret string
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user