|
@@ -60,8 +60,13 @@ func CreateOrder(
|
|
|
return sentio.ErrTooSmallOrder
|
|
|
}
|
|
|
|
|
|
+ ratio := .9
|
|
|
+ if action == sentio.Action_BUY || action == sentio.Action_SELL {
|
|
|
+ ratio = .4
|
|
|
+ }
|
|
|
+
|
|
|
// create a new order
|
|
|
- if size = uint(math.Floor(account.GetCash() * .9 / bid)); size < 1 {
|
|
|
+ if size = uint(math.Floor(account.GetCash() * ratio / bid)); size < 1 {
|
|
|
return sentio.ErrTooSmallOrder
|
|
|
}
|
|
|
|