2
0

mkt.go 641 B

1234567891011121314151617181920212223
  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. Order(oid string, nested bool) (Order, error)
  13. Orders(status string, from time.Time, until time.Time, nested bool) ([]Order, error)
  14. Portfolio() (Portfolio, error)
  15. PortfolioHistory() ([]PortfolioRecord, error)
  16. Quotes(symbols ...string) (map[string]Quote, error)
  17. HistoricalBars(symbol string, interval time.Duration, from *time.Time) ([]Bar, error)
  18. }