# APIError: Potential wash trade detected. use complex orders

**URL:** <https://forum.alpaca.markets/t/apierror-potential-wash-trade-detected-use-complex-orders/13441>\
**Category:** Alpaca Trading\
**Created:** [January 12, 2024, 5:48am UTC](https://forum.alpaca.markets/t/apierror-potential-wash-trade-detected-use-complex-orders/13441 "2024-01-12T05:48:32Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Roi\_Bel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/roi_bel/32/5872_2.png) [@Roi\_Bel](https://forum.alpaca.markets/u/Roi_Bel)\
**Post date:** [February 22, 2024, 1:21pm UTC](https://forum.alpaca.markets/t/apierror-potential-wash-trade-detected-use-complex-orders/13441/5 "2024-02-22T13:21:17Z")

</div>

I have the same error and it’s extremely frustrating. Before markets open, if I que a long trade for a stock and a few moments later I decide to cancel that trade by trading a short for the same amount as my long so that they cancel eachother out, it detects it as a wash trade even though markets haven’t been open yet.  
I really hope they fix this, I’m not sure what else I can do

---

_[View the full topic](https://forum.alpaca.markets/t/apierror-potential-wash-trade-detected-use-complex-orders/13441)._
