|
@@ -17,14 +17,13 @@ type Market interface {
|
|
|
IsMarketOpened() bool
|
|
|
Time() Clock
|
|
|
|
|
|
- LatestBar(symbol string) (*Bar, error)
|
|
|
-
|
|
|
Buy(ctx context.Context, symbol string, ratio float64) (Order, error)
|
|
|
Sell(ctx context.Context, symbol string, ratio float64) (Order, error)
|
|
|
CancelOrder(id string) error
|
|
|
|
|
|
Orders() ([]Order, error)
|
|
|
Portfolio() (Portfolio, error)
|
|
|
+ PortfolioHistory() ([]PortfolioRecord, error)
|
|
|
|
|
|
Cash() (float64, error)
|
|
|
Equity() (float64, error)
|