- GetOrderSize
@@ -8,4 +8,6 @@ type RiskManager interface {
GetBalance() (float64, float64)
GetPnL() (float64, float64)
GetProfitRate() float64
+
+ GetOrderSize() float64
}
@@ -60,8 +60,8 @@ func CreateOrder(
return sentio.ErrTooSmallOrder
- var ratio = .96
- if ratio <= 0 {
+ var ratio float64
+ if ratio = rm.GetOrderSize(); ratio <= 0 {
return sentio.ErrRiskManagementPrevent