API reference
API documentation
A read-only JSON API over the same market data this site renders. Successful responses use the { data, meta } envelope; failures use { error: { code, message } }.
- Base URL
- http://localhost:3000
- Methods
- GET only
- Format
- JSON, UTF-8
- Rate limit
- 60 requests per 60 seconds, per IP address and endpoint
These are API examples. This site is served as static files.
MARKET_DATA_PROVIDER=fmp together with FMP_API_KEY. The meta.provider field of every response says which source answered.List quotes
/api/quotesReturns one page of instruments as a flat array, with total, page and pageSize in meta. Every screener filter below works here too; values that cannot be parsed are ignored.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| sector | query | string | Optional | Exact sector name: Technology, Healthcare, Financials, Consumer Discretionary, Consumer Staples, Industrials, Energy, Materials, Utilities, Real Estate. |
| sort | query | string | Optional | Sort field: marketCap (default), price, changePercent, volume or symbol. |
| order | query | string | Optional | Sort order: desc (default) or asc. |
| page | query | number | Optional | Page number, starting at 1. |
| pageSize | query | number | Optional | Rows per page: 20 by default, 100 at most. |
Request
curl -s "http://localhost:3000/api/quotes?pageSize=3"Response sample
200application/json
{
"data": [
{
"symbol": "NWRB",
"name": "Northwind Robotics",
"exchange": "NASDAQ",
"sector": "Technology",
"industry": "Industrial Automation",
"price": 733.8,
"change": -16.52,
"changePercent": -2.2,
"previousClose": 750.32,
"open": 750.03,
"dayHigh": 751.29,
"dayLow": 731.5,
"volume": 3471317,
"avgVolume": 2962633,
"marketCap": 982258754565,
"peRatio": 60.35,
"eps": 12.16,
"dividendYield": null,
"week52High": 963.99,
"week52Low": 583.89,
"afterHoursPrice": 731,
"afterHoursChangePercent": -0.38,
"updatedAt": "2026-11-12T21:00:00.000Z"
}
],
"meta": {
"provider": "demo",
"generatedAt": "2026-11-12T21:00:04.512Z",
"disclaimer": "Demo dataset: fictional issuers and simulated prices. Not investment advice.",
"total": 20,
"page": 1,
"pageSize": 3
}
}The sample is shortened to one row.
Get a quote
/api/quotes/{symbol}Returns the full quote for one instrument or index. An unknown symbol returns 404 not_found.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| symbol | path | string | Required | Instrument or index symbol, for example NWRB. Matching ignores case. |
Request
curl -s "http://localhost:3000/api/quotes/NWRB"Response sample
200application/json
{
"data": {
"symbol": "NWRB",
"name": "Northwind Robotics",
"exchange": "NASDAQ",
"sector": "Technology",
"industry": "Industrial Automation",
"price": 733.8,
"change": -16.52,
"changePercent": -2.2,
"previousClose": 750.32,
"open": 750.03,
"dayHigh": 751.29,
"dayLow": 731.5,
"volume": 3471317,
"avgVolume": 2962633,
"marketCap": 982258754565,
"peRatio": 60.35,
"eps": 12.16,
"dividendYield": null,
"week52High": 963.99,
"week52Low": 583.89,
"afterHoursPrice": 731,
"afterHoursChangePercent": -0.38,
"updatedAt": "2026-11-12T21:00:00.000Z"
},
"meta": {
"provider": "demo",
"generatedAt": "2026-11-12T21:00:04.512Z",
"disclaimer": "Demo dataset: fictional issuers and simulated prices. Not investment advice."
}
}Get candles
/api/candles/{symbol}Returns OHLCV candles, oldest first. The 1D range uses 30-minute intervals; every other range uses daily candles. An unknown range returns 400 bad_request.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| symbol | path | string | Required | Instrument or index symbol, for example NWRB. Matching ignores case. |
| range | query | string | Optional | One of 1D, 5D, 1M, 6M, 1Y, 5Y. Defaults to 1M. |
Request
curl -s "http://localhost:3000/api/candles/NWRB?range=1M"Response sample
200application/json
{
"data": [
{
"time": "2026-11-11",
"open": 757.4,
"high": 761.18,
"low": 743.92,
"close": 750.32,
"volume": 3531710
},
{
"time": "2026-11-12",
"open": 750.03,
"high": 751.29,
"low": 731.5,
"close": 733.8,
"volume": 3471317
}
],
"meta": {
"provider": "demo",
"generatedAt": "2026-11-12T21:00:04.512Z",
"disclaimer": "Demo dataset: fictional issuers and simulated prices. Not investment advice.",
"symbol": "NWRB",
"range": "1M"
}
}The sample is shortened to two candles; 1M returns 22.
Screen instruments
/api/screenerFilters, sorts and pages instruments with the same parameters as the screener page. The result carries rows together with total, page and pageSize; values that cannot be parsed are ignored.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| sector | query | string | Optional | Exact sector name: Technology, Healthcare, Financials, Consumer Discretionary, Consumer Staples, Industrials, Energy, Materials, Utilities, Real Estate. |
| minMarketCap, maxMarketCap | query | number | Optional | Market capitalisation bounds in USD. |
| minPrice, maxPrice | query | number | Optional | Price bounds in USD. |
| minChangePercent, maxChangePercent | query | number | Optional | Daily change bounds in percentage points: -3 means -3%. |
| minVolume | query | number | Optional | Minimum daily volume in shares. |
| profitableOnly | query | string | Optional | Set to 1 to keep only instruments with EPS above 0. |
| sort | query | string | Optional | Sort field: marketCap (default), price, changePercent, volume or symbol. |
| order | query | string | Optional | Sort order: desc (default) or asc. |
| page | query | number | Optional | Page number, starting at 1. |
| pageSize | query | number | Optional | Rows per page: 20 by default, 100 at most. |
Request
curl -s "http://localhost:3000/api/screener?profitableOnly=1&pageSize=5"Response sample
200application/json
{
"data": {
"rows": [
{
"symbol": "NWRB",
"name": "Northwind Robotics",
"exchange": "NASDAQ",
"sector": "Technology",
"industry": "Industrial Automation",
"price": 733.8,
"change": -16.52,
"changePercent": -2.2,
"previousClose": 750.32,
"open": 750.03,
"dayHigh": 751.29,
"dayLow": 731.5,
"volume": 3471317,
"avgVolume": 2962633,
"marketCap": 982258754565,
"peRatio": 60.35,
"eps": 12.16,
"dividendYield": null,
"week52High": 963.99,
"week52Low": 583.89,
"afterHoursPrice": 731,
"afterHoursChangePercent": -0.38,
"updatedAt": "2026-11-12T21:00:00.000Z"
}
],
"total": 17,
"page": 1,
"pageSize": 5
},
"meta": {
"provider": "demo",
"generatedAt": "2026-11-12T21:00:04.512Z",
"disclaimer": "Demo dataset: fictional issuers and simulated prices. Not investment advice.",
"total": 17,
"page": 1,
"pageSize": 5
}
}The sample is shortened to one row.
Authentication
Demo mode needs no key. When the server sets the API_KEY environment variable, every request must send the same value in the X-API-Key header; anything else receives 401 unauthorized.
curl -s "http://localhost:3000/api/quotes/NWRB" \
-H "X-API-Key: your-key-here"Error codes
Failed requests return a matching HTTP status and one error object. Branch on code; the message is written for people and may change.
{
"error": {
"code": "not_found",
"message": "A human-readable explanation."
}
}| HTTP status | Code | When it happens |
|---|---|---|
| 400 | bad_request | A parameter value is not allowed, for example an unknown candle range. |
| 401 | unauthorized | API_KEY is configured and the request has no matching X-API-Key header. |
| 404 | not_found | The symbol does not exist in the dataset. |
| 405 | method_not_allowed | The API is read-only: /api/quotes answers POST with this code. |
| 429 | rate_limited | More than 60 requests in 60 seconds from one IP address to one endpoint. The response includes Retry-After in seconds. |
See the same data in the product
The market overview, quote pages and screener read the same provider as these endpoints.