Below are the API endpoints available for retrieving stock historical data, indicators, and screening.
Important Note: All API requests must include a valid key (API Key) in the query parameters.
Example: https://www.stockdata.app/price?key=demo&symbol=AAPL&interval=1d
Get the **latest** price data for a specified stock symbol at a given interval.
| Parameter | Type | Required | Description | Example Value |
|---|---|---|---|---|
key |
String | Yes | Your API key. | demo |
symbol |
String | Yes | Stock symbol (e.g., AAPL). | AAPL |
interval |
String | Yes | Data time interval. Valid values: 5m, 60m, 1d, 1wk, 1mo. |
1d |
GET https://www.stockdata.app/price?key=demo&symbol=AAPL&interval=1d
GET https://www.stockdata.app/price?key=demo&symbol=AAPL&interval=60m
{
"date": "2023-01-04",
"open": 126.89,
"high": 128.60,
"low": 125.08,
"close": 126.36,
"adj close": 126.36
}
Get historical **price data** (open, high, low, close, adjusted close) for a specified stock symbol at a given interval.
| Parameter | Type | Required | Description | Example Value |
|---|---|---|---|---|
key |
String | Yes | Your API key. | demo |
symbol |
String | Yes | Stock symbol (e.g., AAPL). | AAPL |
interval |
String | Yes | Data time interval. Valid values: 5m, 60m, 1d, 1wk, 1mo. |
1d |
start |
Date String | No | Data start date (YYYY-MM-DD format). | 2023-01-01 |
end |
Date String | No | Data end date (YYYY-MM-DD format). Defaults to the current date. | 2023-12-31 |
days |
Integer | No | Get data for the specified number of past days from the current date. Mutually exclusive with start/end, max records approx 90 days. |
30 |
GET https://www.stockdata.app/history?key=demo&symbol=AAPL&interval=1d&days=5
GET https://www.stockdata.app/history?key=demo&symbol=AAPL&interval=60m&start=2023-05-01&end=2023-05-02
[
{
"date": "2023-01-03",
"open": 130.28,
"high": 130.89,
"low": 124.10,
"close": 125.46,
"adj close": 125.46
},
{
"date": "2023-01-04",
"open": 126.89,
"high": 128.60,
"low": 125.08,
"close": 126.36,
"adj close": 126.36
}
]
Get technical indicator data for a specified stock symbol at a given interval. You can choose to return all indicators or specify particular ones.
| Parameter | Type | Required | Description | Example Value |
|---|---|---|---|---|
key |
String | Yes | Your API key. | demo |
symbol |
String | Yes | Stock symbol (e.g., AAPL). Supports comma-separated multiple symbols. | AAPL |
interval |
String | Yes | Data time interval. Valid values: 5m, 60m, 1d, 1wk, 1mo. |
1d |
fields |
String | Yes | Comma-separated list of indicator names (e.g., RSI_14,MACD_12_26_9). | RSI_14,ADX_14 |
start |
Date String | No | Data start date (YYYY-MM-DD format). | 2023-01-01 |
end |
Date String | No | Data end date (YYYY-MM-DD format). Defaults to the current date. | 2023-12-31 |
date |
Date String | No | Get data for a specific date (YYYY-MM-DD format). Mutually exclusive with start/end/days. |
2023-06-15 |
days |
Integer | No | Get data for the specified number of past days from the current date. Mutually exclusive with start/end/date. |
30 |
GET https://www.stockdata.app/indicators?key=demo&symbol=AAPL&interval=1d&fields=RSI_14,MACD_12_26_9&date=2023-06-15
GET https://www.stockdata.app/indicators?key=demo&symbol=AAPL&interval=1wk&days=100&fields=RSI_14
[
{
"symbol": "AAPL",
"interval": "1d",
"fields": ["rsi_14", "macd_12_26_9"],
"data": [
{
"date": "2023-06-14",
"RSI_14": 65.23,
"MACD_12_26_9": 2.15
},
{
"date": "2023-06-15",
"RSI_14": 68.10,
"MACD_12_26_9": 2.30
}
]
}
]
Screen stocks based on specified filter conditions (technical indicators or company information).
| Parameter | Type | Required | Description | Example Value |
|---|---|---|---|---|
key |
String | Yes | Your API key. | demo |
interval |
String | Yes | Data time interval. Valid values: 5m, 60m, 1d, 1wk, 1mo. |
1d |
[indicator_name][operator] |
Numeric | Yes | Technical indicator name and operator. E.g.: RSI_14>70.
Supported operators: >, <, =.
Supported indicators include all indicators from the available indicator name list. |
RSI_14>70, MACD_12_26_9<0 |
[info_field][operator] |
String/Numeric | Yes | Company information field and operator. E.g.: sector=Technology, marketCap>1000000000.
Supported operators: >, <, =.
Supported fields include all fields from the information field scope list. |
sector=Technology, fullTimeEmployees>1000 |
GET https://www.stockdata.app/screener?key=demo&interval=1d&RSI_14>70&SMA_50
GET https://www.stockdata.app/screener?key=demo&interval=1d§or=Technology&marketCap>=100000000000
GET https://www.stockdata.app/screener?key=demo&interval=1wk&MACD_12_26_9>0&industry=Software
[
{
"symbol": "AAPL",
"RSI_14": 72.5,
"SMA_50": 320.15,
"SMA_200": 305.22
}
]
Get company information for a specified stock symbol.
| Parameter | Type | Required | Description | Example Value |
|---|---|---|---|---|
key |
String | Yes | Your API key. | demo |
symbol |
String | Yes | Stock symbol (e.g., AAPL). | AAPL |
{
"_id": "65f4d8a7e3b9c1d2f0e7a4b3",
"symbol": "AAPL",
"address1": "One Apple Park Way",
"city": "Cupertino",
"state": "CA",
"zip": "95014",
"country": "United States",
"phone": "408-996-1010",
"website": "https://www.apple.com",
"industry": "Consumer Electronics",
"sector": "Technology",
"longBusinessSummary": "Apple Inc. designs, manufactures, and markets smartphones, personal computers, tablets, wearables, and accessories worldwide.",
"fullTimeEmployees": 164000,
"marketCap": 2800000000000,
"currentPrice": 175.00,
"volume": 75000000
}
VALID_FIELDS)allowedFunctionNames)