Short Inventory Refill

What it does
Restores short inventory when the short side has nearly run out of position to close. After eligible short CLOSE fills, it can place configured long and short seeds so the pair can keep running two-way without a manual refill.

Why this exists

In hedge mode, long and short grids run independently. When short CLOSE orders keep filling, the short position shrinks. That is normal profit-taking, but a very small short position leaves fewer short CLOSE opportunities.
Short Inventory Refill handles that low-inventory state after grid activity. It can add one long seed and one short seed using the configured USD amount for each side.
It does not seed from startup state alone. A pair that starts below the threshold waits for a later eligible short CLOSE fill, or for missed short CLOSE fills found after reconnect.
This feature is short-mode only. Long rows can inherit shortInventoryRefill from defaults, but long mode does not evaluate it.
For all config fields, see Config Reference.

How it works

Short Inventory Refill checks after eligible short grid CLOSE fills.
CheckPasses when
Trigger sourceA short grid CLOSE fill was processed live, or replayed after reconnect
Short inventoryThe short position value is positive and at or below triggerShortPositionUsd
Confirmation countconsecutiveTriggers qualifying checks have happened in a row
CooldownNo refill attempt started for this symbol during cooldownMinutes
Profit LockProfit Lock is not controlling the symbol
When all checks pass:
  1. The bot pauses that symbol.
  2. It places the long seed.
  3. After the long seed is confirmed, it places the short seed.
  4. It restarts the symbol from the refreshed position.
If the long seed cannot be confirmed, the short seed is not placed. If the long seed succeeds but the short seed fails, the bot records a partial refill and restarts the symbol for operator follow-up.

Configuration placement

You can place the block globally under defaults:
"defaults": {
  "shortInventoryRefill": {
    "enabled": false,
    "triggerShortPositionUsd": 100,
    "consecutiveTriggers": 2,
    "seedUsd": {
      "long": 250,
      "short": 250
    },
    "cooldownMinutes": 15
  }
}
The feature stays off until you set enabled to true. Only enabled short-mode rows can act on the inherited block. Long-mode rows ignore it.
Use modes.short instead if you want the setting to live with short-side defaults.
Pair-level opt-out still works:
"pairs": {
  "HYPEUSDT": [
    { "enabled": true, "mode": "long" },
    {
      "enabled": true,
      "mode": "short",
      "shortInventoryRefill": { "enabled": false }
    }
  ]
}

Consecutive triggers

consecutiveTriggers is a debounce count for qualifying short CLOSE checks.
ValueBehavior
1The first eligible low-inventory check can trigger a refill
2Two eligible checks in a row must both stay at or below threshold
3Three eligible checks in a row must stay at or below threshold
It is not a timer and it is not a candle count. The count resets when the short position recovers above the threshold, when no short position remains, when the feature is disabled, or while cooldown is active.

Worked example

Settings: triggerShortPositionUsd = 100, consecutiveTriggers = 2, seedUsd.long = 250, seedUsd.short = 300, cooldownMinutes = 15.
Starting position: $180 short and $500 long on HYPEUSDT.
EventShort after fillConsecutive countResult
First short CLOSE fill$951 of 2No refill yet
Second short CLOSE fill$702 of 2Refill can activate
Refill amount:
SeedAmount
Long seed$250
Short seed$300
After the refill, the symbol resumes from the refreshed position. Cooldown then prevents another refill for 15 minutes.

Cooldown

After a refill attempt starts, the symbol enters cooldown for cooldownMinutes. Completed, partial, and failed attempts all count once the refill event starts.
Checks during cooldown do not build the next consecutiveTriggers count. After cooldown clears, the symbol must qualify again.

Interaction with other features

FeatureInteraction
Profit LockSkips while Profit Lock controls the symbol.
Short Size GuardMay change future short order size after the symbol resumes.
Hedge ThrottleMay widen future short spacing after the symbol resumes.
RebalancerResumes from refreshed inventory after a position-changing refill.
Exo IndicatorContinues to control indicator-based OPEN amplification.
Long Bias GuardLong-mode only. It does not trigger or block Short Inventory Refill.

Tuning tips

If you want...Adjust this
Earlier refillRaise triggerShortPositionUsd
Later refillLower triggerShortPositionUsd
More confirmation before refillingRaise consecutiveTriggers to 2 or 3
Larger inventory refillRaise seedUsd.long, seedUsd.short, or both
Fewer refill attemptsRaise cooldownMinutes
Faster recovery after a refillLower cooldownMinutes carefully

Troubleshooting

SymptomLikely cause
Feature never triggersNo eligible short CLOSE fill happened, short is above threshold, cooldown is active, Profit Lock is active, or enabled: false at the effective scope
Pair starts below threshold but does not refillStartup state alone does not trigger refill. A later short CLOSE fill is required
First low-inventory fill does not refillconsecutiveTriggers is greater than 1, so another qualifying check is required
Refill happens once and then stopsCooldown is active for that symbol
Long side appears to inherit the configThat is normal when configured under defaults. Long mode ignores this feature
No effect after a config editSave the config, then restart the bot so it runs with the new settings