alpacahq / alpacahq/Alpaca-API

Portfolio History equity value sometimes incorrect temporarily

Aperta
#273 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
173
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Describe the bug**
At 8 PM ET every trading day, the current equity value is supposed to be added to the day-level Portfolio History. A new timestamp and value is indeed added but the value is a duplicate of the previous value, not the current equity value. At some later point, the value gets updated to the correct one but it is incorrect for some amount of time.

**To Reproduce**
Steps to reproduce the behavior:
1. `https://paper-api.alpaca.markets/v2/account/portfolio/history?period=3D&timeframe=1D&intraday_reporting=extended_hours&pnl_reset=per_day`
2. Wait until after 8 PM ET.
3. Make the same request as in step 1.

**Expected behavior**
Comparing the before and after responses, there should be a new timestamp and value. The value should be different than the previous value, not the same.

**Screenshots**
At the time of this bug report, it is 2:22 AM ET. The API returns the following:
```json
{
"timestamp": [
1738717200,
1738803600,
1738890000
],
"equity": [
505508.7,
504599.02,
504599.02
],
"profit_loss": [
-1140.52,
-909.68,
0
],
"profit_loss_pct": [
-0.0023,
-0.0018,
0
],
"base_value": 506649.22,
"base_value_asof": "2025-02-03",
"timeframe": "1D"
}
```

Notice how the last two equity values are the same.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.