c4a12725cdb5
Linear regression intercept
The Linear Regression Intercept endpoint (LINEARREGINTERCEPT) calculates the y-intercept of a linear regression line for a given dataset. It returns the value where the regression line crosses the y-axis, providing a numerical reference point for understanding the starting position of a trend over a specified period. This can be useful for users needing to establish baseline values in their data analysis.
Query parameters
Symbol ticker of the instrument. E.g. AAPL, EUR/USD, ETH/BTC, ...
Filter by international securities identification number (ISIN). ISIN access is activating in the <a href="https://twelvedata.com/account/add-ons">Data add-ons</a> section
The FIGI of an instrument for which data is requested. This parameter is available on the <a href="https://twelvedata.com/pricing">Ultra</a> plan (individual) and the <a href="https://twelvedata.com/pricing-business">Enterprise</a> plan (business) and above.
The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href="https://twelvedata.com/account/add-ons">Data add-ons</a> section
Interval between two consecutive points in time series
Number of data points to retrieve. Supports values in the range from 1 to 5000. Default 30 when no date parameters are set, otherwise set to maximum
Exchange where instrument is traded
Market Identifier Code (MIC) under ISO 10383 standard
The country where the instrument is traded, e.g., United States or US
The asset class to which the instrument belongs
Timezone at which output datetime will be displayed. Supports:
<ul> <li>1. <code>Exchange</code> for local exchange time</li> <li>2. <code>UTC</code> for datetime at universal UTC standard</li> <li>3. Timezone name according to the IANA Time Zone Database. E.g. <code>America/New_York</code>, <code>Asia/Singapore</code>. Full list of timezones can be found <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" target="blank">here</a></li> </ul> <p>Interval Limitation: The timezone parameter is only applicable for intraday intervals (less than 1 day). For intervals of 1day, 1week, or 1month, the timezone parameter is ignored, and data is strictly returned in the Exchange local time.</p> <i>Take note that the IANA Timezone name is case-sensitive</i>Can be used separately and together with end_date. Format 2006-01-02 or 2006-01-02T15:04:05
Default location:
<ul> <li>Forex and Cryptocurrencies - <code>UTC</code></li> <li>Stocks - where exchange is located (e.g. for AAPL it will be <code>America/New_York</code>)</li> </ul> Both parameters take into account if <code>timezone</code> parameter is provided.<br/> If <code>timezone</code> is given then, <code>start_date</code> and <code>end_date</code> will be used in the specified locationExamples:
<ul> <li>1. <code>&symbol=AAPL&start_date=2019-08-09T15:50:00&…</code><br/> Returns all records starting from 2019-08-09T15:50:00 New York time up to current date</li> <li>2. <code>&symbol=EUR/USD&timezone=Asia/Singapore&start_date=2019-08-09T15:50:00&…</code><br/> Returns all records starting from 2019-08-09T15:50:00 Singapore time up to current date</li> <li>3. <code>&symbol=ETH/BTC&timezone=Europe/Zurich&start_date=2019-08-09T15:50:00&end_date=2019-08-09T15:55:00&...</code><br/> Returns all records starting from 2019-08-09T15:50:00 Zurich time up to 2019-08-09T15:55:00</li> </ul>The ending date and time for data selection, see start_date description for details.
Specifies the exact date to get the data for. Could be the exact date, e.g. 2021-10-27, or in human language today or yesterday
Sorting order of the output
Returns quotes that include pre-market and post-market data. Only for the Pro plan (individual) and Venture plan (business) and above. Available at the 1min, 5min, 15min, and 30min intervals for US equities. Open, high, low, close values are supplied without volume
The format of the response data
The separator used in the CSV response data
Specifies the number of decimal places for floating values. Should be in range [0, 11] inclusive. By default, the number of decimal places is automatically determined based on the values provided
A boolean parameter to include the previous closing price in the time_series data. If true, adds previous bar close price value to the current object
Adjusting mode for prices
Price type on which technical indicator is calculated
Number of periods to average over. Takes values in the range from 1 to 800
Specify if OHLC values should be added in the output
Response
Example response
{
"meta": {
"symbol": "AAPL",
"interval": "1min",
"currency": "USD",
"exchange_timezone": "America/New_York",
"exchange": "NASDAQ",
"mic_code": "XNAS",
"type": "Common Stock",
"indicator": {
"name": "LINEARREGINTERCEPT - Linear Regression Intercept",
"series_type": "close",
"time_period": 9
}
},
"values": [
{
"datetime": "2019-08-09 15:59:00",
"linearregintercept": "202.03082",
"open": "148.73500",
"high": "148.86000",
"low": "148.73000",
"close": "148.85001",
"volume": "624277"
}
],
"status": "ok"
}