瀏覽代碼

MKT

- draft
Alexey Kim 1 周之前
父節點
當前提交
65812929ab
共有 1 個文件被更改,包括 23 次插入0 次删除
  1. 23 0
      mkt.go

+ 23 - 0
mkt.go

@@ -0,0 +1,23 @@
+package sentio
+
+import (
+	"context"
+	"time"
+)
+
+type MKT interface {
+	IsOpen() bool
+	Cooldown() uint8
+
+	Account() (MarketAccount, error)
+
+	CreateOrder(ctx context.Context, symbol string, quantity uint, sl float64) (Order, error)
+	UpdateOrder(ctx context.Context, orderID string, sl float64) error
+	CloseOrder(ctx context.Context, orderID string) (Order, error)
+
+	Orders(ctx context.Context, status string, nested bool) ([]Order, error)
+	Portfolio() (Portfolio, error)
+	PortfolioHistory() ([]PortfolioRecord, error)
+	Quotes(ctx context.Context, symbols ...string) (map[string]Quote, error)
+	HistoricalBars(symbol string, interval time.Duration, from *time.Time) ([]Bar, error)
+}