alpacahq / alpacahq/alpaca-trade-api-js
[Bug]: Cannot open bracket order starting with sell stop
- 主要语言
- TypeScript
- 星标
- 601
- 派生
- 155
- 平均合并
- 21 小时 14 分钟
- 30 天内合并 PR
- 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 还没有评估数据。