2
0

mkt.go 742 B

1234567891011121314151617181920212223242526
  1. package sentio
  2. import (
  3. "time"
  4. )
  5. type MKT interface {
  6. IsOpen() bool
  7. Cooldown() uint8
  8. Connect(done chan struct{}) (chan MarketConnection, error)
  9. Subscribe(symbols ...string) error
  10. Account() (MarketAccount, error)
  11. CreateOrder(symbol string, quantity uint, sl float64) (Order, error)
  12. UpdateOrder(orderID string, sl float64) error
  13. CloseOrder(orderID string) (Order, error)
  14. Order(orderID string, nested bool) (Order, error)
  15. Orders(status string, from time.Time, until time.Time, nested bool) ([]Order, error)
  16. Portfolio() (Portfolio, error)
  17. PortfolioHistory() ([]PortfolioRecord, error)
  18. Quotes(symbols ...string) (map[string]Quote, error)
  19. HistoricalBars(symbol string, interval time.Duration, from *time.Time) ([]Bar, error)
  20. }