getStocks
curl --request GET \
--url https://alphainsider.com/api/getStocksconst options = {method: 'GET'};
fetch('https://alphainsider.com/api/getStocks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getStocks"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getStocks",
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/getStocks"
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_id": "9ot8fZX7romhU2Q8kV97r",
"figi_composite": "BBG000N9MNX3",
"symbol": "TSLA",
"name": "Tesla, Inc. Common Stock",
"sector": "Manufacturing",
"security": "stock",
"exchange": "XNAS",
"stock": "TSLA",
"peg": "USD",
"provider": "polygon",
"slippage": "0.000000000000000",
"fee": "0.000000000000000",
"links": {
"finviz": "https://www.finviz.com/quote.ashx?t=TSLA",
"trading_view": "https://www.tradingview.com/symbols/NASDAQ-TSLA/",
"yahoo_finance": "https://finance.yahoo.com/quote/TSLA",
"google_finance": "https://www.google.com/finance/quote/TSLA:NASDAQ"
},
"stock_status": "active",
"bid": "217.88",
"ask": "217.96",
"last": "217.96"
}
]
}{
"success": false,
"response": "Request failed."
}Stocks
getStocks
Get stock information.
GET
/
getStocks
getStocks
curl --request GET \
--url https://alphainsider.com/api/getStocksconst options = {method: 'GET'};
fetch('https://alphainsider.com/api/getStocks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getStocks"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getStocks",
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/getStocks"
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_id": "9ot8fZX7romhU2Q8kV97r",
"figi_composite": "BBG000N9MNX3",
"symbol": "TSLA",
"name": "Tesla, Inc. Common Stock",
"sector": "Manufacturing",
"security": "stock",
"exchange": "XNAS",
"stock": "TSLA",
"peg": "USD",
"provider": "polygon",
"slippage": "0.000000000000000",
"fee": "0.000000000000000",
"links": {
"finviz": "https://www.finviz.com/quote.ashx?t=TSLA",
"trading_view": "https://www.tradingview.com/symbols/NASDAQ-TSLA/",
"yahoo_finance": "https://finance.yahoo.com/quote/TSLA",
"google_finance": "https://www.google.com/finance/quote/TSLA:NASDAQ"
},
"stock_status": "active",
"bid": "217.88",
"ask": "217.96",
"last": "217.96"
}
]
}{
"success": false,
"response": "Request failed."
}Query Parameters
Array of stock IDs. ["stock:exchange"] or ["stock_id"]
Maximum array length:
100AlphaInsider stock identifier, or SYMBOL:EXCHANGE in requests.
⌘I