GET
/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}
Stocks Aggregates (Custom Bars)
Aggregated OHLCV bars for a stock ticker over a custom range.
Endpoint Details
| HTTP Method |
GET |
| Path |
/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to} |
| Version |
v2 |
| Minimum Plan |
free |
Path Parameters
| Parameter |
Required |
Description |
Example |
stocksTicker |
Required |
The stock ticker symbol (e.g., AAPL, MSFT) |
AAPL |
multiplier |
Required |
The size of the timespan multiplier |
1 |
timespan |
Required |
The size of the aggregate time window (minute, hour, day, week, month, quarter, year) |
day |
from |
Required |
Source currency code (e.g., USD) |
USD |
to |
Required |
Target currency code (e.g., EUR) |
EUR |
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/range/1/day/USD/EUR?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 | object|array | Empty array |
Example Response
{
"ok": true,
"data": {
"status": "OK",
"ticker": "AAPL",
"queryCount": null,
"resultsCount": null,
"adjusted": true,
"results": []
}
}