Stock Metrics
Retrieves performance metrics for a stock.
Endpoint
GET
/data/v1/stock_metrics/:tickerParameters
api_key string
required
Your authentication key needed to make requests.
benchmark string
Benchmark for comparison. E.g. for the S&P 500 Total Return Index use ^SP500TR.
period float
Defines period of returns in years from latest available date. By default metrics provided for longest possible period available.
format string
default: json
Defines return format of response. Options are json or csv. Default is json.
Example Request
cURL
curl -X GET "https://sensaai.com/data/v1/stock_metrics/mmm?api_key=API_KEY"
Response
Returns a list of performance metrics if a stock ticker was provided. Returns an error otherwise.
[
{
"metric": "Start Period",
"MMM": "2000-01-03"
},
{
"metric": "End Period",
"MMM": "2023-10-19"
},
{
"metric": "Risk-Free Rate ",
"MMM": "0.0%"
},
{
"metric": "Cumulative Return ",
"MMM": "251.62%"
},
{
"metric": "CAGR﹪",
"MMM": "5.42%"
},
{
"metric": "Sharpe",
"MMM": "0.34"
},
...more metrics
]
Table of Contents