This is more of a feedback/improvement request. Not sure where else to submit this.
I’ve noticed that many of the collection (group) queries are formatted as nested objects instead of arrays. This is pretty uncommon in my experience and more difficult to work with. Is there any change of getting and implementation that uses arrays for collection responses?
Here’s the example request to demo the reponse:
https://data.alpaca.markets/v2/stocks/quotes/latest?symbols=AAPL,TSLA,VTI
response:
{
"quotes": {
"TSLA": {
"t": "2022-08-04T17:42:24.920312936Z",
"ax": "V",
"ap": 940,
"as": 1,
"bx": "V",
"bp": 924.4,
"bs": 1,
"c": [
"R"
],
"z": "C"
},
"AAPL": {
"t": "2022-08-04T17:42:26.629657067Z",
"ax": "V",
"ap": 165.45,
"as": 1,
"bx": "V",
"bp": 165.43,
"bs": 1,
"c": [
"R"
],
"z": "C"
},
"VTI": {
"t": "2022-08-04T17:42:13.343985473Z",
"ax": "V",
"ap": 218,
"as": 3,
"bx": "V",
"bp": 191.4,
"bs": 1,
"c": [
"R"
],
"z": "B"
}
}
}
I believe the common expectation for a response like this would be:
{
"quotes": [
{
"symbol": "TSLA",
"t": "2022-08-04T17:42:24.920312936Z",
"ax": "V",
"ap": 940,
"as": 1,
"bx": "V",
"bp": 924.4,
"bs": 1,
"c": [
"R"
],
"z": "C"
},
{
"symbol": "AAPL",
"t": "2022-08-04T17:42:26.629657067Z",
"ax": "V",
"ap": 165.45,
"as": 1,
"bx": "V",
"bp": 165.43,
"bs": 1,
"c": [
"R"
],
"z": "C"
},
{
"symbol": "VTI",
"t": "2022-08-04T17:42:13.343985473Z",
"ax": "V",
"ap": 218,
"as": 3,
"bx": "V",
"bp": 191.4,
"bs": 1,
"c": [
"R"
],
"z": "B"
}
]
}
Cheers!