alpacahq / alpacahq/Alpaca-API

Allow changing side of position (long/short) in a single order

Đang mở
#90 3 bình luận 9 reaction 0 người được giao Xem trên GitHub
feature request
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
174
Fork
17
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello!

I have some algorithms that are always in the market. They are either long or short 100% of the time. If I am currently long, I would like to be able to place a single order to liquidate my position _and_ go short (and vice versa from short to long). Currently, if I try to do this I get the following error

```insufficient qty available for order (requested: 2, available: 1)```

On Slack, @umitanuki said

> yes that’s correct and we are aware some other brokers allow to do so (and we discussed a LOT when designing the current one). there are also people who wants to avoid accidental overbuy/sell. Feel free to make a feature request and we keep refining

I understand some folks don't want to overbuy/sell, and I also see from #85 that some folks want even more error checking when it comes to situations like this. However, would it be possible to add an option to do _no_ checking and to simply allow going from long to short or short to long in a single order?

Without this, I have to submit two orders when going e.g. short to long. I like to submit all of my orders in the morning, right before the market opens. That isn't possible currently if I switch the side of a position, and I have to wait until the market opens to get the second order in.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.