Documentation ¶
Index ¶
- type Controller
- func (c *Controller) Account() (model.Account, error)
- func (c *Controller) Cancel(order model.Order) error
- func (c *Controller) Order(symbol string, id int64) (model.Order, error)
- func (c *Controller) OrderLimit(side model.SideType, symbol string, size, limit float64) (model.Order, error)
- func (c *Controller) OrderMarket(side model.SideType, symbol string, size float64) (model.Order, error)
- func (c *Controller) OrderOCO(side model.SideType, symbol string, size, price, stop, stopLimit float64) ([]model.Order, error)
- func (c *Controller) Position(symbol string) (asset, quote float64, err error)
- func (c *Controller) Start()
- func (c *Controller) Stop()
- type DataFeed
- type Feed
- type FeedConsumer
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { Results map[string]*summary // contains filtered or unexported fields }
func NewController ¶
func NewController(ctx context.Context, exchange exchange.Exchange, storage *ent.Client, orderFeed *Feed, notifier notification.Notifier) *Controller
func (*Controller) OrderLimit ¶
func (*Controller) OrderMarket ¶
func (*Controller) Position ¶
func (c *Controller) Position(symbol string) (asset, quote float64, err error)
func (*Controller) Start ¶
func (c *Controller) Start()
func (*Controller) Stop ¶
func (c *Controller) Stop()
type Feed ¶
type Feed struct { OrderFeeds map[string]*DataFeed SubscriptionsBySymbol map[string][]Subscription }
func NewOrderFeed ¶
func NewOrderFeed() *Feed
type FeedConsumer ¶
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.