# Some buy operations are recognized as sell and fail to import from XTB report (updated with solution)

**URL:** <https://community.mycapitally.com/t/some-buy-operations-are-recognized-as-sell-and-fail-to-import-from-xtb-report-updated-with-solution/423>\
**Category:** Issues\
**Tags:** imports\
**Created:** [December 25, 2024, 11:18am UTC](https://community.mycapitally.com/t/some-buy-operations-are-recognized-as-sell-and-fail-to-import-from-xtb-report-updated-with-solution/423 "2024-12-25T11:18:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakub](https://community.mycapitally.com/letter_avatar_proxy/v4/letter/j/166534/32.png) [@Jakub](https://community.mycapitally.com/u/Jakub)\
**Post date:** [December 25, 2024, 11:18am UTC](https://community.mycapitally.com/t/some-buy-operations-are-recognized-as-sell-and-fail-to-import-from-xtb-report-updated-with-solution/423/1 "2024-12-25T11:18:51Z")

</div>

Hi, I’ve found a problem with XTB import and I think I have a solution.

When importing transactions from XTB report, I had some warnings that sell operations “Zakup akcji/ETF” are not supported. I think the problem occurs because of subsequent rows lookup that doesn’t check if they’re the same type.

 ![image](https://community.mycapitally.com/uploads/default/original/1X/8d3b081916d133bbd4b86249b116eef32df7a01f.jpeg)

Ensuring it’s the same type in preset editor seems to help.

 ![image](https://community.mycapitally.com/uploads/default/original/1X/34f56bede95eb25c6a4af7f7134c3af018b759f5.png)

I think these “Typ” conditions should be added to both buy and sell lookups in XTB import preset.

---

<div class="post-metadata">

**Author:** ![rafal](https://community.mycapitally.com/user_avatar/community.mycapitally.com/rafal/32/18_2.png) [@rafal](https://community.mycapitally.com/u/rafal)\
**Post date:** [December 31, 2024, 11:37am UTC](https://community.mycapitally.com/t/some-buy-operations-are-recognized-as-sell-and-fail-to-import-from-xtb-report-updated-with-solution/423/2 "2024-12-31T11:37:46Z")

</div>

Thanks, didn’t think two different operations could be on the same timestamp. I’ve fixed it differently, as this way all Fees will be accounted only to the first transction.

It’ll be available in the next version (`1.46.7`) - let me know if it works for you.

---

<div class="post-metadata">

**Author:** ![Jakub](https://community.mycapitally.com/letter_avatar_proxy/v4/letter/j/166534/32.png) [@Jakub](https://community.mycapitally.com/u/Jakub)\
**Post date:** [February 11, 2025, 9:41pm UTC](https://community.mycapitally.com/t/some-buy-operations-are-recognized-as-sell-and-fail-to-import-from-xtb-report-updated-with-solution/423/3 "2025-02-11T21:41:49Z")

</div>

I had to delete and re-import my transactions, because I apparently messed up something and there was negative balance on one stock. It works now, thanks!
