alpacahq / alpacahq/alpaca-trade-api-js
[Bug]: Cannot open bracket order starting with sell stop
- 主要言語
- TypeScript
- スター
- 601
- フォーク
- 155
- 平均マージ
- 21時間 14分
- マージ済み PR(30日)
- 10
説明
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
When I call the alpaca api with
```
{
symbol: 'SPY',
qty: 35,
side: 'sell',
type: 'stop',
order_class: 'bracket',
stop_price: 455.67,
time_in_force: 'day',
take_profit: { limit_price: 455 },
stop_loss: { stop_price: 455.96 }
}
```
It returned an error:
```
{ code: 42210000, message: 'bracket orders must be entry orders' }
```
### Expected Behavior
_No response_
### SDK Version I encountered this issue in
@alpacahq/alpaca-trade-api ^3.0.1
### Steps To Reproduce
```markdown
Call:
alpaca.createOrder({
symbol: 'SPY',
qty: 35,
side: 'sell',
type: 'stop',
order_class: 'bracket',
stop_price: 455.67,
time_in_force: 'day',
take_profit: { limit_price: 455 },
stop_loss: { stop_price: 455.96 }
})
```
```
### Filled out the Steps to Reproduce section?
- [X] I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.
### Anything else?
_No response_
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。