alpacahq / alpacahq/Alpaca-API

Buy Limit order misinterpreted as Sell order

オープン
#271 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
173
フォーク
17
PR マージ指標
30日以内にマージされた PR はありません

説明

**Describe the bug**
This morning I placed two market orders to buy two call contracts per order (POST on /v2/orders). The orders did not go through, both yielding status 403 “code”:40310000,“message”:“insufficient underlying qty available for covered call (required: 200, available: 0)”

It seems as though these orders were processed as sell orders instead of buy orders. The code was working properly before and I did not change it. I switched to paper trading and the issue was resolved. I switched back to live trading and the code worked properly again. With no changes made to the code.

What happened? It may have been a fluke but this is absolutely unacceptable. I lost out on money today because the API was not working properly. How do I make sure this never happens ever again?

**To Reproduce**
I was not able to reproduce the error (as I described above)

**Expected behavior**
A limit order is placed to BUY the contracts (not sell)

**Output**
Error entering position: failed to place order (status 403): {"available_qty":"0","code":40310000,"message":"insufficient underlying qty available for covered call (required: 200, available: 0)","required_qty":"200","symbol":"CLSK250110C00012000","underlying_asset_id":"8f33ee14-9d35-490c-b33f-6fbb2d163c13"}

Error entering position: failed to place order (status 403): {"available_qty":"0","code":40310000,"message":"insufficient underlying qty available for covered call (required: 200, available: 0)","required_qty":"200","symbol":"SBUX250110C00096000","underlying_asset_id":"0a7deac5-2d75-4e54-9f66-51c1c6fad55b"}

**Desktop:**
- OS: arch linux

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。