GET
/v2/aggs/ticker/{stocksTicker}/prev
Stocks Previous Day Bar (OHLC)
Previous trading day OHLC for a stock ticker.
Endpoint Details
| HTTP Method |
GET |
| Path |
/v2/aggs/ticker/{stocksTicker}/prev |
| Version |
v2 |
| Minimum Plan |
free |
Path Parameters
| Parameter |
Required |
Description |
Example |
stocksTicker |
Required |
The stock ticker symbol (e.g., AAPL, MSFT) |
AAPL |
Query Parameters
| Parameter |
Type |
Required |
Description |
api_key |
string |
Required |
Your API key for authentication |
adjusted |
boolean |
Optional
|
Whether aggregates are adjusted for splits (default: true) |
sort |
string |
Optional
|
Sort order (asc or desc, default: asc) |
limit |
integer |
Optional
|
Maximum number of results (default: 5000, max: 50000) |
Example Request
curl "https://mail.tradeiqai.com/api/v2/aggs/ticker/AAPL/prev?api_key=YOUR_API_KEY"
Note: Replace YOUR_API_KEY with your actual API key.
Response Attributes
| Attribute |
Type |
Description |
ok | boolean | Indicates if the request was successful (e.g., 1) |
data | object | Response data object |
data.status | string | Response status (typically "OK") (e.g., OK) |
data.results | array | Array of 1 items |
| Array items contain: |
data.results[].T | string | String value (e.g., AAPL) |
data.results[].v | integer | Integer (e.g., 34382285) |
data.results[].vw | double | Floating point number (e.g., 273.8928) |
data.results[].o | double | Floating point number (e.g., 274.885) |
data.results[].c | double | Floating point number (e.g., 273.68) |
data.results[].h | double | Floating point number (e.g., 275.37) |
data.results[].l | double | Floating point number (e.g., 272.94) |
data.results[].t | integer | Integer (e.g., 1770757200000) |
data.results[].n | integer | Integer (e.g., 515929) |
Example Response
{
"ok": true,
"data": {
"status": "OK",
"ticker": "AAPL",
"adjusted": true,
"results": [
{
"T": "AAPL",
"v": 34382285,
"vw": 273.89280000000002246451913379132747650146484375,
"o": 274.884999999999990905052982270717620849609375,
"c": 273.68000000000000682121026329696178436279296875,
"h": 275.3700000000000045474735088646411895751953125,
"l": 272.93999999999999772626324556767940521240234375,
"t": 1770757200000,
"n": 515929
}
]
}
}