Map tickers to stock IDs
curl --request GET \
--url https://api.linqalpha.com/v1/map_tickers \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.linqalpha.com/v1/map_tickers"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.linqalpha.com/v1/map_tickers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linqalpha.com/v1/map_tickers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://api.linqalpha.com/v1/map_tickers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.linqalpha.com/v1/map_tickers")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linqalpha.com/v1/map_tickers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": null,
"payload": [
{
"raw_ticker": "AAPL",
"stock_id": "BBG001S5N8V8"
},
{
"raw_ticker": "GOOGL",
"stock_id": "BBG009S39JY5"
},
{
"raw_ticker": "MSFT",
"stock_id": "BBG001S5TD05"
},
{
"raw_ticker": "AMZN",
"stock_id": "BBG001S5PQL7"
},
{
"raw_ticker": "TSLA",
"stock_id": "BBG001SQKGD7"
},
{
"raw_ticker": "NVDA",
"stock_id": "BBG001S5TZJ6"
},
{
"raw_ticker": "META",
"stock_id": "BBG001SQCQC5"
}
]
}{
"error": {
"code": "TICKERS_MISSING",
"msg": "tickers query parameter is required",
"message": "tickers query parameter is required"
},
"payload": null
}{
"error": {
"code": "API_KEY_MISSING",
"msg": "header does not contain api key",
"message": "header does not contain api key"
},
"payload": null
}{
"error": {
"code": "SERVER_ERROR",
"message": "An unexpected error occurred on the server."
},
"payload": null
}Basic
Map Tickers
Accepts a list of ticker strings via query parameters and returns their corresponding stock IDs (BBG IDs).
GET
/
v1
/
map_tickers
Map tickers to stock IDs
curl --request GET \
--url https://api.linqalpha.com/v1/map_tickers \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.linqalpha.com/v1/map_tickers"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.linqalpha.com/v1/map_tickers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linqalpha.com/v1/map_tickers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://api.linqalpha.com/v1/map_tickers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.linqalpha.com/v1/map_tickers")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linqalpha.com/v1/map_tickers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": null,
"payload": [
{
"raw_ticker": "AAPL",
"stock_id": "BBG001S5N8V8"
},
{
"raw_ticker": "GOOGL",
"stock_id": "BBG009S39JY5"
},
{
"raw_ticker": "MSFT",
"stock_id": "BBG001S5TD05"
},
{
"raw_ticker": "AMZN",
"stock_id": "BBG001S5PQL7"
},
{
"raw_ticker": "TSLA",
"stock_id": "BBG001SQKGD7"
},
{
"raw_ticker": "NVDA",
"stock_id": "BBG001S5TZJ6"
},
{
"raw_ticker": "META",
"stock_id": "BBG001SQCQC5"
}
]
}{
"error": {
"code": "TICKERS_MISSING",
"msg": "tickers query parameter is required",
"message": "tickers query parameter is required"
},
"payload": null
}{
"error": {
"code": "API_KEY_MISSING",
"msg": "header does not contain api key",
"message": "header does not contain api key"
},
"payload": null
}{
"error": {
"code": "SERVER_ERROR",
"message": "An unexpected error occurred on the server."
},
"payload": null
}Was this page helpful?
⌘I