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., 38784789) |
data.results[].vw | double | Floating point number (e.g., 291.6015) |
data.results[].o | double | Floating point number (e.g., 296.03) |
data.results[].c | double | Floating point number (e.g., 291.13) |
data.results[].h | double | Floating point number (e.g., 297.14) |
data.results[].l | double | Floating point number (e.g., 289.62) |
data.results[].t | integer | Integer (e.g., 1781294400000) |
data.results[].n | integer | Integer (e.g., 830860) |
Example Response
{
"ok": true,
"data": {
"status": "OK",
"ticker": "AAPL",
"adjusted": true,
"results": [
{
"T": "AAPL",
"v": 38784789,
"vw": 291.601499999999987267074175179004669189453125,
"o": 296.029999999999972715158946812152862548828125,
"c": 291.1299999999999954525264911353588104248046875,
"h": 297.1399999999999863575794734060764312744140625,
"l": 289.6200000000000045474735088646411895751953125,
"t": 1781294400000,
"n": 830860
}
]
}
}