File tree 1 file changed +7
-1
lines changed
pkg/strategy/liquiditymaker
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ type Strategy struct {
41
41
42
42
LiquidityUpdateInterval types.Interval `json:"liquidityUpdateInterval"`
43
43
44
- AdjustmentUpdateInterval types.Interval `json:"adjustmentUpdateInterval"`
44
+ AdjustmentUpdateInterval types.Interval `json:"adjustmentUpdateInterval"`
45
+ MaxAdjustmentOrderQuantity fixedpoint.Value `json:"maxAdjustmentOrderQuantity"`
45
46
46
47
NumOfLiquidityLayers int `json:"numOfLiquidityLayers"`
47
48
LiquiditySlideRule * bbgo.SlideRule `json:"liquidityScale"`
@@ -171,6 +172,11 @@ func (s *Strategy) placeAdjustmentOrders(ctx context.Context) {
171
172
var adjOrders []types.SubmitOrder
172
173
173
174
posSize := s .Position .Base .Abs ()
175
+
176
+ if ! s .MaxAdjustmentOrderQuantity .IsZero () {
177
+ posSize = fixedpoint .Min (posSize , s .MaxAdjustmentOrderQuantity )
178
+ }
179
+
174
180
tickSize := s .Market .TickSize
175
181
176
182
if s .Position .IsShort () {
You can’t perform that action at this time.
0 commit comments