Stock Beta API Documentation
A free stock beta API.
We created this API to support our own applications and decided to share it with the world. This API is a beta calculator used in finance. It returns the beta of a dynamic ticker and a dynamic index based on inputted observation and frequency parameters. The following documentation describes how to use our free Stock Beta API.
API Parameters
-
ticker | Required
The ticker symbol you wish to select. Use Yahoo Finance to find active tickers. For international tickers, simply append the exchange identifier found HERE to the end of the ticker.
-
index | Required
Also a ticker symbol for use as the index in the beta calculation. Refer to the "ticker" parameter for sources to find index tickers.
-
interval | Required
Accepted values: 1d, 1wk, 1mo. Returns the end of day [1d], end of week [1wk], or end of month [1mo] data type.
-
observations | Required
A unit that represents the number of intervals you are seeking. For a ten day history use '10'. For a 2 month history use '2'. Will take a value up to 99999. The API will return a lesser amount if there is insufficient data available. For example, if you request 2000 observations but there are only 1000 observations available, the API will return only 1000 observations.
Outputs
-
JSON | Default
Status, status message, and returned data. Status 200 is successful while status 400 is unsuccessful. Data will supply error message or the data requested from the API.
-
No others at this time.
Examples
-
Google's beta with the S&P 500 scope of 10 months using monthly data.
https://api.newtonanalytics.com/stock-beta/?ticker=goog&index=^GSPC&interval=1mo&observations=10
-
Google's beta with Nasdaq's Technology Sector scope of 100 days using daily data.
https://api.newtonanalytics.com/stock-beta/?ticker=goog&index=^NDXT&interval=1d&observations=100