alpacahq / alpacahq/Alpaca-API

Portfolio History equity value sometimes incorrect temporarily

Đang mở
#273 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
173
Fork
17
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.