getStockPriceHistory
curl --request GET \
--url https://alphainsider.com/api/getStockPriceHistoryconst options = {method: 'GET'};
fetch('https://alphainsider.com/api/getStockPriceHistory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getStockPriceHistory"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getStockPriceHistory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://alphainsider.com/api/getStockPriceHistory"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"response": [
{
"stock_price_id": "SnNPDVnCo_yrwLTtagsx4",
"stock_id": "v3lhjrwEhNuAOxPT29oxO",
"bid": "406.010000000000000",
"ask": "406.010000000000000",
"last": "406.010000000000000",
"created_at": "2020-08-24T14:00:00.000Z"
},
{
"stock_price_id": "ztdNu8H_Eyjmn3eIb_Deo",
"stock_id": "v3lhjrwEhNuAOxPT29oxO",
"bid": "402.660000000000000",
"ask": "402.660000000000000",
"last": "402.660000000000000",
"created_at": "2020-08-24T15:00:00.000Z"
}
]
}{
"success": false,
"response": "Request failed."
}Stocks
getStockPriceHistory
Get stock price history.
GET
/
getStockPriceHistory
getStockPriceHistory
curl --request GET \
--url https://alphainsider.com/api/getStockPriceHistoryconst options = {method: 'GET'};
fetch('https://alphainsider.com/api/getStockPriceHistory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getStockPriceHistory"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getStockPriceHistory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://alphainsider.com/api/getStockPriceHistory"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"response": [
{
"stock_price_id": "SnNPDVnCo_yrwLTtagsx4",
"stock_id": "v3lhjrwEhNuAOxPT29oxO",
"bid": "406.010000000000000",
"ask": "406.010000000000000",
"last": "406.010000000000000",
"created_at": "2020-08-24T14:00:00.000Z"
},
{
"stock_price_id": "ztdNu8H_Eyjmn3eIb_Deo",
"stock_id": "v3lhjrwEhNuAOxPT29oxO",
"bid": "402.660000000000000",
"ask": "402.660000000000000",
"last": "402.660000000000000",
"created_at": "2020-08-24T15:00:00.000Z"
}
]
}{
"success": false,
"response": "Request failed."
}Query Parameters
AlphaInsider stock identifier, or SYMBOL:EXCHANGE in requests.
Start date.
End timestamp for the current period or range.
Number of results to return.
⌘I