Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
accept interface return concrete fill
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkolbrich committed Sep 29, 2017
1 parent f706b87 commit b797f83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/backtest/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

// ExecutionHandler is the basic interface for executing orders
type ExecutionHandler interface {
ExecuteOrder(OrderEvent, DataHandler) (FillEvent, error)
ExecuteOrder(OrderEvent, DataHandler) (*Fill, error)
}

// Exchange is a basic execution handler implementation
Expand All @@ -17,7 +17,7 @@ type Exchange struct {
}

// ExecuteOrder executes an order event
func (e *Exchange) ExecuteOrder(order OrderEvent, data DataHandler) (FillEvent, error) {
func (e *Exchange) ExecuteOrder(order OrderEvent, data DataHandler) (*Fill, error) {
// fetch latest known data event for the symbol
latest := data.Latest(order.GetSymbol())

Expand Down

0 comments on commit b797f83

Please sign in to comment.