mkt.go 594 B

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