DN AI Trading Beginner Series · Article 23 · Reviewed 8 November 2026
What matters
If your bot says you hold one position and the exchange says something else, treat the exchange’s authoritative order, fill and position records as the source to reconcile against. Do not let the bot keep creating exposure while the mismatch is unexplained.
Position drift is not one bug. It can come from partial fills, manual trades, liquidation, fees, stale state, leverage or margin-mode differences, or a bot that missed an execution update.
Automated trading systems often maintain their own local idea of account state. That state may be derived from webhook signals, order acknowledgements, websocket events, REST queries or the bot’s own database. The exchange maintains the actual trading account.
When those two views diverge, the safest response is not to guess which side is “close enough.” Stop new exposure, fetch the authoritative trading records and rebuild the position from what actually happened.
This guide follows DN’s AI Trading Bot Kill Switch, Decision Evidence Map and stale-data checklist.
What position drift looks like
| Bot view | Exchange view | Likely question |
|---|---|---|
| Long 0.50 BTC | Long 0.35 BTC | Was there a partial exit, fee effect or manual close? |
| Flat | Long 0.10 BTC | Did an entry fill after the bot stopped tracking it? |
| Long | Short | Did the bot reverse, hedge or misread position mode? |
| One open trade | Several fills | Did the bot collapse multiple executions into one local record? |
1. A partial fill changed the real position
An order can be accepted without being fully executed. Binance’s current Spot documentation separates original quantity, executed quantity, cumulative quote quantity and order status. A bot that treats acceptance as a full fill can immediately drift from reality.
Reconcile using actual fills, not the original requested quantity.
2. You traded manually on the exchange
Manual closes, reductions or additions can invalidate the bot’s local position record. 3Commas explicitly documents an exit error that can occur when a position was manually closed on the exchange or liquidated before the bot attempted to exit it.
If you intervene manually, assume the bot’s state may need to be rebuilt before automation resumes.
3. A stop, liquidation or exchange-side event changed the position
A bot can miss an exchange-side event if it relies on only one delivery path. A stop order may execute, a liquidation may occur, or another account-level event may alter exposure.
Use the exchange’s order and execution history to verify what actually happened. The bot’s last successful message is not enough.
4. The bot missed an execution update
Real-time streams can disconnect. REST calls can time out. A consumer can restart between two events. If the bot’s state machine misses a fill update and never performs a later reconciliation, its local position can remain wrong indefinitely.
Binance recommends user-data streams for continuous order-status monitoring while also exposing query endpoints for current open orders and historical order status. That combination illustrates a robust pattern: streams for speed, authoritative queries for reconciliation.
5. A duplicate retry created extra exposure
If a bot retries an order after an ambiguous timeout, it can accidentally create a second instruction unless the venue’s idempotency behavior is understood and the original order is reconciled first.
The fix is not merely “use client order IDs.” Identifier rules differ by venue and endpoint. Before retrying, establish whether the first instruction exists and whether it executed.
6. Fees, funding or quantity precision changed the effective amount
Position quantity can differ from a simple requested quantity because of fees, precision rules, contract specifications or derivatives accounting. For spot trading, commissions may be deducted in an asset that affects the final balance. For derivatives, funding and contract sizing can complicate what a naive local model thinks “position size” means.
Do not compare numbers until both systems are using the same unit and product definition.
7. Position mode, leverage or margin mode does not match
One-way versus hedge mode, isolated versus cross margin, and product-specific leverage rules can change how positions are represented. A bot built for one account mode can misinterpret another.
Before computing drift, record the exact venue, product, symbol, position mode, margin mode and leverage context.
8. The bot is reading stale state
A local cache or delayed API response can make a correct exchange state look wrong. Check the timestamp and source of every record before deciding that the position changed unexpectedly.
This is why position reconciliation should include both value and time. “0.35 BTC” without knowing when that value was observed is incomplete evidence.
Do not repair drift by sending the opposite order blindly
If the bot thinks it is long 0.50 BTC but the exchange is actually long 0.35 BTC, blindly selling 0.50 BTC can reverse the account into a short position. The first action should be to stop new exposure and reconcile.
TradingView’s strategy order-fill alerts are generated by its broker emulator. They can be useful for simulated strategy logic, but they are not proof that an external exchange account has the same position. External execution needs its own authoritative evidence.
DN Position Drift Reconciler
Enter a simple bot-reported position and exchange-reported position. The tool calculates the declared difference and gives a reconciliation prompt. It does not connect to your exchange or verify either number.
Educational inspection aid only. A numerical match does not prove the records are complete, current or authentic.
A safer reconciliation sequence
- Pause new orders.
- Record the bot’s current local state without changing it.
- Fetch exchange-side open orders, fills and current positions.
- Compare identifiers and timestamps.
- Explain every difference with a fill, cancellation, manual action, fee, liquidation or state update.
- Only then decide whether to cancel, reduce, close or resume.
Tools and platforms
DN currently tracks live automation products including 3Commas and alert workflows from TradingView. 3Commas remains operational and currently offers exchange-connected bots, Signal Bot workflows and AI-assisted strategy tooling. TradingView continues to support webhook alerts for external applications.
Affiliate disclosure: Decentralised News may earn a commission from qualifying sign-ups through marked links, at no additional cost to you. Affiliate relationships do not change the reconciliation framework used here.
Sources and methodology
- Binance Developer Docs — Spot API Glossary
- Binance Developer Docs — Account and Order History
- 3Commas — Exit Signal Was Not Executed
- TradingView — Alerts and Order Fill Events
- TradingView — Webhook Alerts
Method: DN reviewed current official documentation available on 8 November 2026 and mapped common sources of position-state divergence into a beginner-focused reconciliation checklist. This article does not test any reader account or certify a platform’s execution accuracy.
FAQ
Which number should I trust: the bot or the exchange?
For live account exposure, reconcile against the exchange’s authoritative current position, orders and fills. The bot’s local record is evidence to compare, not the final authority.
Can I just restart the bot?
Not safely if the mismatch is unexplained. A restart may preserve, erase or rebuild state differently depending on the software. Reconcile the account first.
Why can a bot show flat when the exchange has a position?
The bot may have missed a fill, lost an execution update, restarted with incomplete state, or interpreted an acknowledgement as a rejection. Historical fills and current positions should resolve the question.
Should I close the exchange position immediately?
Not automatically. First determine what the real position is and whether working orders remain. A blind close can overshoot or reverse exposure.