alpacahq / alpacahq/alpaca-py

[Bug]: Stock Split Updates are not handled in bracket orders

Abierto
#469 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
1.5k
Forks
398
Merge medio
1 d 16 h
PR fusionados (30 d)
6

Descripción

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When I make a bracket order of NVDA stock with the below options

**1. Order type as 'BUY'
2. Market Buy amount as $1190.00
3. Limit Sell amount as $1210.00
4. Stop loss as $1185.00
5. For 5 shares**

And when the stock split happens during off-hours or weekends (assuming 1:10 split)

The order is not updated fully updated and only the share counts are updated as below

**1. Order type as 'BUY'
2. Market Buy amount as $1190.00
3. Limit Sell amount as $1210.00
4. Stop loss as $1185.00
5. For 50 shares**

Which results in selling 5 shares when the market opens at $119.5 (assuming that the price before split was $1195 when the market opened) as the stop loss condition has met

### Expected Behavior

I would expect my conditions as well to get updated along with the stock split numbers as below (assuming 1:10 split)

**1. Order type as 'BUY'
2. Market Buy amount as $119.00
3. Limit Sell amount as $121.00
4. Stop loss as $118.50
5. For 50 shares**

### SDK Version I encountered this issue in

0.23.0

### Steps To Reproduce

```markdown
1. Place a bracket order for XX stock with order type as 'BUY' along with limit sell and stop loss
2. Wait for the stock to get split (either +ve or -ve)
3. The limit sell and stop loss amounts has to be updated along with the number of shares
```

### 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?

Tested in live market

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.