Skip to content
All library documents

Scheduled Crypto Dollar-Cost Averaging with Limit Orders

Code Quant course library

Summary

The document sketches a scheduled accumulation strategy for a crypto trading pair. A broker object stores an exchange connection, symbol, investment amount, latest bid and ask, and most recent order identifier. A scheduler periodically refreshes quotes, checks order status, and calls the investment routine. When its weekday and hour conditions are met, the routine converts a fixed cash amount into asset quantity, rounds down to a stated minimum increment, and attempts a limit buy at the current ask, with repeated attempts after errors.

The example includes a periodic order-status check and notification hook, but does not implement cancellation and replacement behavior in that check. The code contains inconsistent references to variables outside the broker object, and its scheduled frequency does not itself ensure that the intended weekday and hour conditions are evaluated as described. It supplies no backtest or evidence of returns. Order sizing, exchange constraints, exception handling, credentials, and scheduling logic would need review before live use.

Key ideas

  • The strategy attempts fixed-cash purchases of a crypto asset on selected weekdays and at a selected hour.
  • Order quantity is calculated from the investment amount and ask price, then rounded down to a minimum increment.
  • The example submits limit buy orders at the current ask and retries after exceptions.
  • Separate scheduled jobs refresh quotes and check the latest order status.
  • The example has implementation gaps and provides no evidence of performance or reliable live execution.

Tags

From a private course collection; the original is not published.