bbgo: add more interface implementation for order executor

This commit is contained in:
c9s 2022-09-14 15:54:43 +08:00
parent dc195e824b
commit 88696bc6d2
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -310,3 +310,14 @@ func (e *GeneralOrderExecutor) Session() *ExchangeSession {
func (e *GeneralOrderExecutor) Position() *types.Position {
return e.position
}
// This implements PositionReader interface
func (e *GeneralOrderExecutor) CurrentPosition() *types.Position {
return e.position
}
// This implements PositionResetter interface
func (e *GeneralOrderExecutor) ResetPosition() error {
e.position.Reset()
return nil
}