alpacahq / alpacahq/alpaca-trade-api-js

getSnapshot previous close price discrepancy[Bug]:

Open
#226 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
601
Forks
155
Avg merge
21h 14m
Merged PRs (30d)
10

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When I do
```
const snapshot = await alpaca.getSnapshot
const previousClose = snapshot?.PrevDailyBar?.ClosePrice;
```

the previousClose price is not consistent with numbers I get from other sources, like Yahoo Finance or Nasdaq website

### Expected Behavior

I would expect theses numbers to match up since it is referencing yesterday's market data-- there should be no discrepancy

### SDK Version I encountered this issue in

@alpacahq/alpaca-trade-api: ^2.15.0

### Steps To Reproduce

```markdown
1) call `alpaca.getSnapshot('BITQ')`
2) look at the value for PrevDailyBar.ClosePrice
```

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.