Symptom: When a futures limit buy gets filled in pieces, the bot doesn't
recognize the (partial) fill. It keeps treating the order as still open/NEW
and buys again — repeatedly opening the same size at the same price.
Restarting the bot doesn't help; it re-buys because the executed fills aren't
picked up from history.
Root cause (exchange-connector, src/exchange/exchanges/kraken/index.ts):
• mapOrderStatus() doesn't map the Kraken Futures statuses: ENTERED_BOOK,
partiallyFilled (camelCase — the map only has "partially filled" WITH a
space), untouched → they all fall through to NEW.
• The primary getOrder() path (getOrderStatus) and getAllOpenOrders() pass the
raw order status straight through and never derive PARTIALLY_FILLED/FILLED
from filled vs quantity. Only the getOrderEvents fallback path does that.
So a partially filled order is reported as NEW even though executedQty > 0,
and main-app (which keys off status PARTIALLY_FILLED/FILLED) never records
the fill → duplicate buys.
Still present in the latest exchange-connector 1.16.2
Thanks for the detailed report. Are you using the cloud or self hosted version?
Normally I use the cloud‑hosted version, but to identify the exact issue I installed the self‑hosted version and used Claude to examine that part of the code. I am now applying a fix in the self‑hosted environment to see whether it resolves the problem.
Hi @discord2020 — thanks for the excellent report, and for going the extra mile to install the self-hosted version and trace it in the code. Your diagnosis was spot on.
This is now fixed in exchange-connector 1.16.3. As you found, Kraken Futures reports a resting order as ENTERED_BOOK / partiallyFilled / untouched even when part of it has filled, and those statuses weren’t being mapped — so a partial fill was reported as NEW, the fill was never recorded, and the bot re-opened the same size. Both order paths (getOrderStatus and getAllOpenOrders) now derive PARTIALLY_FILLED / FILLED from the executed vs. ordered quantity, so the fill is picked up and the duplicate buys stop.
- Self-hosted (what you’re testing on now): the fix is already published — no need to hand-patch. Pin
exchange-connectorto1.16.3and pull it, e.g.docker compose pull exchange-connector && docker compose up -d, or use Admin → Services to upgrade it. - Cloud (your normal setup): it will go live with our next deployment — nothing for you to do there.
If you still see a duplicate buy after updating, let us know the bot ID and we’ll dig in. Thanks again for the great write-up.