Hi, I noticed that Alpaca has different logic for determining the open price of a day compared to every other provider that I checked. For example, let’s consider AAPL on Sep 8, 2022.
Alpaca’s APIs report the open price to be 154.49. All the financial websites that I checked (e.g. Nasdaq) report the open price to be 154.64. Why is Alpaca different?
I did some digging into the raw trade events. Here are the interesting ones:
{
"t": "2022-09-08T13:30:00.19411456Z",
"x": "P",
"p": 154.64,
"s": 75,
"c": [
"@",
"Q"
],
"i": 6994,
"z": "C"
},
{
"t": "2022-09-08T13:30:01.381157959Z",
"x": "Q",
"p": 154.49,
"s": 550148,
"c": [
"@",
"O",
"X"
],
"i": 4436,
"z": "C"
},
{
"t": "2022-09-08T13:30:01.382083822Z",
"x": "Q",
"p": 154.49,
"s": 550148,
"c": [
"@",
"Q"
],
"i": 4438,
"z": "C"
}
According to the UTP specification, condition Q means “Market Center Official Open” and condition O means “Opening Prints” (AKA opening trade, if I understood correctly). So, the above events show that
- A market open event came in with price 154.64.
- The opening trade event came in with price 154.49.
- Another market open event came in with price 154.49.
Why are there two market open events and why does Alpaca use the second one while other providers use the first one?