Skip to content

DCA and execution

DCA safety orders: define the fill gates

A partial predecessor, a repeated completion and a cancelled remainder show when the next DCA safety order may activate—and when it must wait.

Ivory gates line two parallel rails on a black surface, with a lime sphere at an open gate and ivory spheres waiting before closed gates.
Illustration for dca and execution; examples in this article are educational.

DCA bot safety-order dependencies determine which earlier event must be confirmed before a later averaging purchase may be submitted. A sequential fill gate waits for a specified predecessor outcome; a concurrent policy can authorize several eligible levels independently. Neither a crossed price nor an accepted order proves that the predecessor filled. Define partial-fill, cancellation and duplicate-event rules before the ladder runs.

The price ladder answers where additions might occur. Its dependency rules answer when each instruction gains permission to exist. Two bots with identical prices and quantities can therefore submit different orders during the same market move.

Name the event that opens the next gate

“After Safety 1” needs a more precise definition. It could mean after Safety 1 becomes eligible, after submission, after exchange acceptance, after its first execution, or after its entire authorized quantity is acquired. Those events are not interchangeable.

A strict sequential policy might require Safety 1 to fill completely before Safety 2 can be evaluated. A concurrent policy might evaluate every unused level whose conditions are satisfied, subject to shared capital and order limits. Neither is inherent in the term safety order.

There are documented products that preplace several instructions: the OKX Spot DCA explanation includes an example with three limit-buy safety orders placed after the initial trade fills. That establishes the behavior of that example, not a universal dependency rule or a KLINEO capability.

An active-order limit is another dimension. A limit of one simultaneous averaging order may resemble a sequential ladder, but it does not specify whether a cancelled or rejected order frees the slot for the next step. A slot can become free without the predecessor filling. The current KLINEO safety-order guide distinguishes simultaneous order count from full ladder capital; inspect the supported settings rather than inferring a fill gate from the count alone.

Work through a partial predecessor

Consider a hypothetical unleveraged spot deal in ABC/USDT. The base purchase is complete. The proposed ladder uses fixed ABC quantities and fixed buy-limit prices:

StepABC requestedLimit, USDT per ABCMaximum purchase amount before fees
Base, already filled1100100 USDT
Safety 1296192 USDT
Safety 2392276 USDT
Safety 3488352 USDT
Entire plan10—920 USDT

The table is an invented instruction set, not a market observation or recommended allocation. Actual limit fills may occur at better prices or remain unfilled. Fees, exchange increments and leverage are excluded. The amount schedule is supplied; the volume-scale guide handles how such schedules can be calculated.

Now assume Safety 1 has an accepted order for two ABC, with only 0.5 ABC confirmed filled. The controller's selected price and other conditions qualify Safety 2 and Safety 3. This stipulates eligibility, not executions at any of the listed prices.

Policy declared before the dealSafety 2 nowSafety 3 nowWhat still needs confirmation
Full predecessor fill requiredBlockedBlockedSafety 1's remaining 1.5 ABC must fill before Safety 2 can qualify
First predecessor fill is sufficientMay qualify onceBlocked until Safety 2 meets its own gateSafety 1's remainder still exists and consumes capital
Independent level eligibilityMay qualify onceMay qualify onceEach level still needs its own admission and exchange outcome

The partial fill does not resolve Safety 1's remaining 1.5 ABC. Its maximum unfilled purchase amount is 1.5 × 96 = 144 USDT. Safety 2 and Safety 3 together represent another 276 + 352 = 628 USDT. Moving those later levels from waiting to accepted orders changes current commitments; it does not create extra budget or establish that 628 USDT has been spent.

The base-entry rule comes even earlier. If the initial purchase itself is incomplete, state whether any safety order may become eligible at all. The partial base-entry guide examines that opening boundary. A rule for a partially filled safety order cannot silently stand in for the base-order activation policy.

Consume one completion once

Suppose the strict policy is selected and Safety 1 later reaches its full two ABC. One evaluation sees the completion and opens Safety 2. A second evaluation receives the same completion and attempts to open Safety 2 again.

If both purchases execute for three ABC at the assumed 92 price, Safety 2 buys six ABC for 552 USDT instead of three ABC for 276 USDT. The duplicate adds 276 USDT of gross purchases. The error is a repeated authorization, even though both orders use valid prices and quantities.

Repeated status evidence is realistic. Bybit's private order-stream documentation warns that a fill and cancellation race can produce two messages whose order status is Filled. The second message is not another purchase or another permission to advance a ladder.

Give the economic step a stable identity that includes the account, environment, instrument, deal and ladder revision. Record that Safety 2's authorization has been claimed before a worker submits it. Two workers must not both turn the same waiting step into a new intent. Freeze the approved parameters with that identity so a later revision cannot reinterpret an old completion.

This applies the general request-identity approach described in AWS's guide to safe retries. A database claim does not make remote submission indivisible with local storage. If the exchange response is lost, retain an unresolved attempt and reconcile it; a restart must not assume the step was never sent. The trading-idempotency guide develops that recovery boundary.

Cancellation is a branch in the dependency plan

A full-fill gate can remain closed indefinitely if the predecessor finishes cancelled with a partial acquisition. For example, Safety 2 might buy 0.8 of its planned three ABC before its remaining 2.2 ABC are cancelled. A terminal order status alone does not satisfy the declared full-quantity condition.

Choose the supported response explicitly: retain a blocked ladder, authorize a replacement for the verified remainder, or approve a skip that names which successor may proceed. A skip is a changed trading decision, not evidence of a completed purchase. Preserve the original step numbers and revision so sizing and budget rules remain interpretable. The cancelled-safety-order guide covers that reconciliation.

Use actual execution totals when assessing a fill gate. Binance Spot's execution-report specification separates current order status, last executed quantity and cumulative filled quantity. A repeated cumulative value is the same known total, not an incremental fill. If a step uses several replacement orders, reconcile their unique executions together; one replacement's Filled status does not prove the original step quantity is complete.

Test the dependency graph as a sequence

Before accepting the plan, write one expected outcome for each case:

  • For a fill-dependent policy, the predecessor is accepted but has no fills: its named fill gate remains closed.
  • It fills partially: only the explicitly chosen partial-fill policy applies.
  • Its completion arrives twice or two workers evaluate it: the successor gains one authorization.
  • The successor's submission times out: its unresolved attempt blocks duplicate submission while reconciliation continues.
  • The predecessor is cancelled or rejected: the documented exception path applies; terminal does not automatically mean complete.
  • The deal begins closing: waiting additions are disallowed, and existing or uncertain purchases are reconciled with the exit.

Also check for impossible dependencies, such as two steps each waiting for the other to fill. A ladder that can never progress is an operational defect even if its price table looks sensible.

At the end of a deal, a small remaining holding may be below a venue's tradable minimum. The dust-residual closure guide explains why such inventory needs its own resolution. It should not be mistaken for permission to reopen an averaging branch after closure has begun.

A dependency gate controls the order of permitted actions. It cannot guarantee liquidity, a recovery in price or a loss ceiling. Keep the actual inventory, unresolved instructions and maximum remaining commitments visible throughout the sequence.

Editorial method: Prepared with AI assistance using primary venue documentation and an original hypothetical dependency worksheet. No live execution test or claim that KLINEO implements every illustrated policy is presented.

Keep the context with the example.

Each worked example is illustrative, with its sources and assumptions in the article. Read our editorial standards for authorship, verification and corrections.