# Cancellation of limiti orders and disconnection

**URL:** <https://forum.alpaca.markets/t/cancellation-of-limiti-orders-and-disconnection/171>\
**Category:** Alpaca Account Troubleshooting\
**Created:** [August 19, 2019, 7:55pm UTC](https://forum.alpaca.markets/t/cancellation-of-limiti-orders-and-disconnection/171 "2019-08-19T19:55:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OranS](https://avatars.discourse-cdn.com/v4/letter/o/d9b06d/32.png) [@OranS](https://forum.alpaca.markets/u/OranS)\
**Post date:** [August 19, 2019, 7:55pm UTC](https://forum.alpaca.markets/t/cancellation-of-limiti-orders-and-disconnection/171/1 "2019-08-19T19:55:52Z")

</div>

Hello everyone ,  
I’m having hard time trading in the paper API.  
I’m using python 3.6 with the API library.  
I keep getting my limit sell orders canceled as soon as they triggered in addition im having connection problems at the same time.  
The error i’m getting is below:  
Error in data transfer  
…  
…  
…  
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason  
i believe this issue is related somehow to the socket trying to read data and failing to do so.  
did it happen to someone here also and know how to solve it? thanks.

---

<div class="post-metadata">

**Author:** ![hitoshi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/hitoshi/32/69_2.png) [@hitoshi](https://forum.alpaca.markets/u/hitoshi)\
**Post date:** [August 24, 2019, 4:35am UTC](https://forum.alpaca.markets/t/cancellation-of-limiti-orders-and-disconnection/171/2 "2019-08-24T04:35:49Z")

</div>

Could you upgrade to the latest SDK v0.38?

> **[alpacahq/alpaca-trade-api-python](https://github.com/alpacahq/alpaca-trade-api-python/releases/tag/v0.38)**
>
> Python client for Alpaca's trade API. Contribute to alpacahq/alpaca-trade-api-python development by creating an account on GitHub.

This should solve most of such error, but let us know if you still see the issue.

---

<div class="post-metadata">

**Author:** ![Amichay\_Oren](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/amichay_oren/32/292_2.png) [@Amichay\_Oren](https://forum.alpaca.markets/u/Amichay_Oren)\
**Post date:** [January 9, 2020, 6:55am UTC](https://forum.alpaca.markets/t/cancellation-of-limiti-orders-and-disconnection/171/3 "2020-01-09T06:55:07Z")

</div>

I still see this issue (yesterday, ~8 minutes from market close). I’m using the latest Python SDK:

alpaca-trade-api 0.42

a resolution is much appreciated,

Amichay
