API Documentation

Simple REST API with comprehensive documentation and examples.

Quick Start

1. Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
2. Make a Request

Get market data for any stock ticker:

GET /api/get_market_data/{ticker}
3. Handle Response

Process the JSON response in your application:

{
"symbol": "AAPL",
"price": 150.25,
"change": 2.15,
...
}

Response Schema

data.quotes
An array of quote objects for the requested symbol(s).
array
data.quotes[].symbol
The ticker symbol of the stock.
string
data.quotes[].name
The name of the company.
string
data.quotes[].price
The current trading price of the stock.
number
data.quotes[].changesPercentage
The percentage change in the stock price.
number
data.quotes[].change
The absolute change in the stock price.
number
data.quotes[].dayLow
The lowest price of the stock during the current trading day.
number
data.quotes[].dayHigh
The highest price of the stock during the current trading day.
number
data.quotes[].yearHigh
The highest price of the stock over the past year.
number
data.quotes[].yearLow
The lowest price of the stock over the past year.
number
data.quotes[].marketCap
The market capitalization of the company.
number
data.quotes[].priceAvg50
The 50-day moving average of the stock price.
number
data.quotes[].priceAvg200
The 200-day moving average of the stock price.
number
data.quotes[].exchange
The stock exchange where the stock is traded.
string
data.quotes[].volume
The number of shares traded during the current trading day.
number
data.quotes[].avgVolume
The average daily trading volume.
number
data.quotes[].open
The opening price of the stock for the current trading day.
number
data.quotes[].previousClose
The closing price of the stock from the previous trading day.
number
data.quotes[].eps
The earnings per share of the company.
number
data.quotes[].pe
The price-to-earnings ratio of the stock.
number
data.quotes[].sharesOutstanding
The number of outstanding shares of the company's stock.
number
data.quotes[].timestamp
The timestamp of the latest price update.
number
data.quotes[].currency
The currency in which the stock price is denominated.
string
data.quotes[].earningsAnnouncement
The date and time of the next earnings announcement.
string
data.quotes[].image
A URL for the company's logo.
string
data.quotes[].dollarVolume24h
The total value of shares traded in the last 24 hours.
number
data.quotes[].volumeChange24h
The change in trading volume over the last 24 hours.
null
data.quotes[].fundingRate
The funding rate for perpetual contracts, if applicable.
null
data.history
Contains historical price data for the stock.
object
data.history.period
The time period for the historical data (e.g., '1d').
string
data.history.prices
An array of historical price entries.
array
data.history.prices[].symbol
The ticker symbol of the stock.
string
data.history.prices[].entries
An array of individual price points in time.
array
data.history.prices[].entries[].date
The date and time of the price entry.
string
data.history.prices[].entries[].price
The price of the stock at that specific date and time.
number
data.history.prices[].currency
The currency of the historical prices.
string
data.history.prices[].exchange
The exchange for the historical prices.
string
data.currency
The default currency for the data.
string
data.ratios
An array of financial ratios for the company.
array
data.ratios[].symbol
The ticker symbol of the stock.
string
data.ratios[].dividendYielTTM
The trailing twelve months dividend yield.
number
data.profiles
An array of company profile objects.
array
data.profiles[].symbol
The ticker symbol of the stock.
string
data.profiles[].companyName
The name of the company.
string
data.profiles[].currency
The currency used for financial reporting.
string
data.profiles[].cik
The Central Index Key (CIK) of the company.
string
data.profiles[].isin
The International Securities Identification Number (ISIN) of the stock.
string
data.profiles[].cusip
The CUSIP number of the stock.
string
data.profiles[].exchange
The primary stock exchange where the stock is listed.
string
data.profiles[].exchangeShortName
The short name of the stock exchange.
string
data.profiles[].industry
The industry in which the company operates.
string
data.profiles[].website
The official website of the company.
string
data.profiles[].description
A detailed description of the company's business.
string
data.profiles[].ceo
The name of the Chief Executive Officer (CEO).
string
data.profiles[].sector
The sector in which the company operates.
string
data.profiles[].country
The country where the company is headquartered.
string
data.profiles[].fullTimeEmployees
The number of full-time employees.
string
data.profiles[].phone
The company's phone number.
string
data.profiles[].address
The company's street address.
string
data.profiles[].city
The city where the company is headquartered.
string
data.profiles[].state
The state where the company is headquartered.
string
data.profiles[].zip
The postal code of the company's headquarters.
string
data.profiles[].dcfDiff
The difference in the discounted cash flow (DCF) analysis.
number
data.profiles[].dcf
The discounted cash flow (DCF) value.
number
data.profiles[].image
A URL for the company's logo.
string
data.profiles[].ipoDate
The date of the company's Initial Public Offering (IPO).
string
data.profiles[].defaultImage
Indicates if the image is a default one.
boolean
data.profiles[].isEtf
Indicates if the security is an Exchange-Traded Fund (ETF).
boolean
data.profiles[].isActivelyTrading
Indicates if the stock is actively being traded.
boolean
data.profiles[].isAdr
Indicates if the stock is an American Depositary Receipt (ADR).
boolean
data.profiles[].isFund
Indicates if the security is a fund.
boolean
data.profiles[].mktCap
The market capitalization of the company.
number
data.changes
An array containing historical price change information.
array
data.changes[].symbol
The ticker symbol of the stock.
string
data.changes[].absolute
Absolute price changes over different time periods.
object
data.changes[].absolute.1d
The absolute price change in the last day.
number
data.changes[].absolute.5d
The absolute price change in the last 5 days.
number
data.changes[].absolute.1m
The absolute price change in the last month.
number
data.changes[].absolute.3m
The absolute price change in the last 3 months.
number
data.changes[].absolute.6m
The absolute price change in the last 6 months.
number
data.changes[].absolute.ytd
The absolute price change year-to-date.
number
data.changes[].absolute.1y
The absolute price change in the last year.
number
data.changes[].absolute.5y
The absolute price change in the last 5 years.
number
data.changes[].absolute.max
The maximum absolute price change.
number
data.changes[].relative
Relative (percentage) price changes over different time periods.
object
data.changes[].relative.1d
The relative price change in the last day.
number
data.changes[].relative.5d
The relative price change in the last 5 days.
number
data.changes[].relative.1m
The relative price change in the last month.
number
data.changes[].relative.3m
The relative price change in the last 3 months.
number
data.changes[].relative.6m
The relative price change in the last 6 months.
number
data.changes[].relative.ytd
The relative price change year-to-date.
number
data.changes[].relative.1y
The relative price change in the last year.
number
data.changes[].relative.5y
The relative price change in the last 5 years.
number
data.changes[].relative.max
The maximum relative price change.
number
data.earningsCalendar
An array of upcoming earnings announcement dates.
array
data.afterHoursQuotes
An array of after-hours trading quotes.
array
data.afterHoursQuotes[].symbol
The ticker symbol of the stock.
string
data.afterHoursQuotes[].price
The after-hours trading price.
number
data.afterHoursQuotes[].timestamp
The timestamp of the after-hours price.
number
data.afterHoursChanges
An array of after-hours price changes.
array
data.afterHoursChanges[].symbol
The ticker symbol of the stock.
string
data.afterHoursChanges[].absolute
The absolute after-hours price change.
number
data.afterHoursChanges[].relative
The relative after-hours price change.
number
data.marketHours
An array of market hours information.
array
data.marketHours[].stockExchangeName
The name of the stock exchange.
string
data.marketHours[].stockMarketHours
The opening and closing hours of the stock market.
object
data.marketHours[].stockMarketHours.openingHour
The opening hour of the stock market.
string
data.marketHours[].stockMarketHours.closingHour
The closing hour of the stock market.
string
data.marketHours[].isTheStockMarketOpen
Indicates if the stock market is currently open.
boolean
data.marketHours[].isTheEuronextMarketOpen
Indicates if the Euronext market is currently open.
boolean
data.marketHours[].isTheForexMarketOpen
Indicates if the Forex market is currently open.
boolean
data.marketHours[].exchangeShortName
The short name of the exchange.
string
data.marketHours[].timezone
The timezone of the stock exchange.
string
data.exchangeInfo
Information about the stock exchange.
object
data.exchangeInfo.exchange
The name of the exchange.
string
data.exchangeInfo.name
The full name of the exchange.
string
data.exchangeInfo.openingHour
The opening hour of the exchange.
string
data.exchangeInfo.closingHour
The closing hour of the exchange.
string
data.exchangeInfo.timezone
The timezone of the exchange.
string
data.exchangeInfo.isMarketOpen
Indicates if the exchange is currently open.
boolean
source
Indicates whether the data is from the company ('company') or an estimation ('estimation').
string
reportDate
The date of the earnings report.
string
reportTime
The time of the earnings report (e.g., 'postmarket', 'unknown').
string
actualEps
The actual earnings per share reported. Can be null if it's an estimation for a future report.
number
endingFiscalQuarter
The end date of the fiscal quarter for the report.
string
expectedMove
The expected stock price movement following the earnings report. Can be null.
string
expectedMovePerc
The expected percentage of stock price movement. Can be null.
string
source
Indicates whether the data is from the company ('company') or an estimation ('estimation').
string
reportDate
The date of the earnings report.
string
reportTime
The time of the earnings report (e.g., 'postmarket', 'unknown').
string
actualEps
The actual earnings per share reported. Can be null if it's an estimation for a future report.
number
endingFiscalQuarter
The end date of the fiscal quarter for the report.
string
expectedMove
The expected stock price movement following the earnings report. Can be null.
string
expectedMovePerc
The expected percentage of stock price movement. Can be null.
string
postEarningsMove1D
The stock's price movement 1 day after the earnings report. Can be null.
string
postEarningsMove1W
The stock's price movement 1 week after the earnings report. Can be null.
string
postEarningsMove2W
The stock's price movement 2 weeks after the earnings report. Can be null.
string
postEarningsMove3D
The stock's price movement 3 days after the earnings report. Can be null.
string
preEarningsMove1D
The stock's price movement 1 day before the earnings report. Can be null.
string
preEarningsMove1W
The stock's price movement 1 week before the earnings report. Can be null.
string
preEarningsMove2W
The stock's price movement 2 weeks before the earnings report. Can be null.
string
preEarningsMove3D
The stock's price movement 3 days before the earnings report. Can be null.
string
streetMeanEst
The mean earnings per share estimate from analysts.
number
shortStraddle1W
The performance of a 1-week short straddle options strategy around earnings. Can be null.
string
shortStraddle1D
The performance of a 1-day short straddle options strategy around earnings. Can be null.
string
longStraddle1W
The performance of a 1-week long straddle options strategy around earnings. Can be null.
string
longStraddle1D
The performance of a 1-day long straddle options strategy around earnings. Can be null.
string
actualRevenue
The actual revenue reported by the company. Can be null for future estimates.
number
expectedRevenue
The consensus expected revenue.
number
symbol
Requested stock symbol
string
indicator
Technical indicator used (e.g. SMA, RSI)
string
inputParams
Parameters used in the calculation (periods, etc.)
object
latest
The most recent calculated value or object for complex indicators
number | object
full
Full array of historical calculated values
array
Rate Limits
  • Professional Plan: Unlimited requests
  • Response Time: < 100ms average
  • Concurrent Requests: Up to 100

Code Examples

cURL
curl -X POST https://quantiq.live/api/get_market_data/AAPL \ -F "apiKey=YOUR_API_KEY"
JavaScript
const formData = new FormData(); formData.append('apiKey', 'YOUR_API_KEY'); const response = await fetch( 'https://quantiq.live/api/get_market_data/AAPL', { method: 'POST', body: formData } ); const data = await response.json(); console.log(data);
Python
import requests form_data = { 'apiKey': 'YOUR_API_KEY' } response = requests.post( 'https://quantiq.live/api/get_market_data/AAPL', files=form_data ) data = response.json() print(data)
Error Codes

Authentication Errors

  • 401
    Missing or invalid API key
  • 403
    Subscription required or expired

Request Errors

  • 404
    Invalid ticker symbol
  • 500
    Internal server error
Historical Data Request

Fetch historical stock data using a POST request with form data:

POST /historical-data/{ticker}

Response Schema

currency
Currency code for historical prices
string
history
Array of historical price objects
array
history.date
Date of the historical price point
string
history.open
Opening price
number
history.high
Highest price
number
history.low
Lowest price
number
history.close
Closing price
number
history.volume
Volume traded
number

Code Examples

cURL
curl -X POST https://quantiq.live/api/historical-data/AAPL \ -F "apiKey=YOUR_API_KEY"
JavaScript
const formData = new FormData(); formData.append('apiKey', 'YOUR_API_KEY'); const response = await fetch( 'https://quantiq.live/api/historical-data/AAPL', { method: 'POST', body: formData } ); const data = await response.json(); console.log(data);
Python
import requests form_data = { 'apiKey': 'YOUR_API_KEY' } response = requests.post( 'https://quantiq.live/api/historical-data/AAPL', files=form_data ) data = response.json() print(data)
Technical Indicators

Calculate real-time technical indicators using Alpaca data:

GET /api/indicators/{indicator}?symbol=AAPL&period=14

Supported indicators: sma, ema, rsi, macd, bbands, vwap

Example: /api/indicators/rsi?symbol=TSLA&period=14