Copying Spot Trades by Comparing Account Balances
Summary
The document describes a simple cryptocurrency spot trade-following bot. It treats one exchange account as the reference and periodically compares its current token balance, including frozen holdings, with the previous reading. An increase signals a buy and a decrease signals a sell; the bot then submits the corresponding amount on each follower account and updates its stored reference balance. It also displays account balances and checks that the configured accounts are spot accounts.
The article reports a demonstration using three independent simulated exchange accounts: one reference and two followers. A manually placed trade was detected and copied. The approach is a basic polling method, so it detects net balance changes rather than individual orders. Deposits, withdrawals, transfers, or other balance changes could be mistaken for trades, while rapid transactions between polls could be combined or missed. The example does not explain safeguards for execution failures, differing account balances, order sizing, or exchange-specific constraints, and it is presented for study rather than as a production-ready system.
Key ideas
- The bot infers trades by comparing the reference account’s current token balance with its prior balance.
- A positive balance change triggers follower buys, while a negative change triggers follower sells.
- The design polls account data and stores a fresh baseline after copying a detected change.
- The reported demonstration uses one reference account and two follower accounts on a simulation platform.
- Balance polling can confuse trades with transfers and does not preserve the sequence of individual orders.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.