Skip to content
All library documents

A Balance-Based Spot Copy-Trading Bot

Article FMZ digest · Author: 发明者量化-小小梦

Summary

This article presents a simple cryptocurrency spot copy-trading bot that monitors one reference account and mirrors its trades in other accounts. Its detection method compares the reference account’s total base-asset holdings, including frozen balances, with the previous observation. An increase is treated as a buy and a decrease as a sell; the bot sends an order of the corresponding size to each follower, then updates its stored reference balance.

The example checks account balances on a polling loop, displays reference and follower account data, and rejects futures accounts. A simulated-exchange demonstration is reported in which a manually placed reference trade was detected and copied. The approach is intended as an introductory example and has important limits: balance changes are only an indirect signal of trades, and the article does not address how to distinguish deposits, withdrawals, transfers, or other balance changes. It also provides no analysis of price differences, order failures, execution timing, or live performance.

Key ideas

  • The bot infers reference trades from changes in total spot holdings.
  • It mirrors the inferred buy or sell amount across configured follower accounts.
  • The method stores the latest reference balance as the baseline for the next comparison.
  • A balance-change signal can misclassify activity that is not a trade.
  • The reported demonstration uses simulated accounts and does not establish live results.

Tags

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