mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
bbgo: add more interface implementation for order executor
This commit is contained in:
parent
dc195e824b
commit
88696bc6d2
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user