浏览代码

MarketAccount

Alexey Kim 2 周之前
父节点
当前提交
fe4f68bbbd
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 1 2
      market.go
  2. 9 0
      market_account.go

+ 1 - 2
market.go

@@ -25,8 +25,7 @@ type Market interface {
 	Portfolio() (Portfolio, error)
 	PortfolioHistory() ([]PortfolioRecord, error)
 
-	Cash() (float64, error)
-	Equity() (float64, error)
+	Account() (MarketAccount, error)
 	MaxBudget() float64
 	Cooldown() uint8
 }

+ 9 - 0
market_account.go

@@ -0,0 +1,9 @@
+package sentio
+
+type MarketAccount interface {
+	GetId() string
+	GetName() string
+
+	Cash() (float64, error)
+	Equity() (float64, error)
+}