Skip to content
All library documents

A Fixed-Price Buy-Then-Sell Bot for Bitcoin

Article Strategy library · Author: Zero

Summary

This simple trading bot places a limit buy at a configured price, then monitors the account for an increase in the BTC balance and submits a limit sell for the detected amount at a higher configured price. It checks that the buy price is below the sell price and that the account has enough balance for the intended purchase. The published example uses BTC/USD on Bitfinex with hourly backtest settings covering September to October 2019.

The method is a single-entry, fixed-target approach rather than a repeated grid or signal-driven system. The document provides parameters and source logic, but reports no trading results or evidence that either order would fill. Its operation depends on available funds, exchange behavior, and the account balance change used to detect a purchase. It does not describe a stop-loss, so a falling market or an unfilled sell order can leave the acquired asset exposed. Fees, slippage, partial fills, and order management are not addressed.

Key ideas

  • The bot submits a limit buy at a configured price and amount.
  • It checks that the planned buy price is below the sell price and that the account has enough balance.
  • After detecting an increase in BTC holdings, it submits a limit sell for the detected amount.
  • The example provides hourly BTC/USD backtest settings but no performance results.
  • No stop-loss is described, and order fills, fees, and partial executions are not addressed.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.