curl
curl -sS "https://api.stockcontext.com/v1/tools/stock_reference" \
-H "X-API-Key: $STOCKCONTEXT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"catalog":"capabilities","schema":2}'import requests
url = "https://api.stockcontext.com/v1/tools/stock_reference"
payload = {
"catalog": "capabilities",
"schema": 2
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({catalog: 'capabilities', schema: 2})
};
fetch('https://api.stockcontext.com/v1/tools/stock_reference', 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.stockcontext.com/v1/tools/stock_reference",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'catalog' => 'capabilities',
'schema' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stockcontext.com/v1/tools/stock_reference"
payload := strings.NewReader("{\n \"catalog\": \"capabilities\",\n \"schema\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stockcontext.com/v1/tools/stock_reference")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"catalog\": \"capabilities\",\n \"schema\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stockcontext.com/v1/tools/stock_reference")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"catalog\": \"capabilities\",\n \"schema\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"catalog": "capabilities",
"tools": [
{
"tool": "stock_financials",
"params": [
{
"name": "schema",
"kind": "enum",
"choices": [
1,
2
],
"default": 2
}
]
},
{
"tool": "stock_flag",
"params": [
{
"name": "schema",
"kind": "enum",
"choices": [
1,
2
],
"default": 2
}
]
}
]
},
"meta": {
"schema_version": "2"
}
}
Discovery
Reference catalogs
Self-describing catalogs: refusal tokens, shapes, units, concepts, and filing forms.
POST
/
v1
/
tools
/
stock_reference
curl
curl -sS "https://api.stockcontext.com/v1/tools/stock_reference" \
-H "X-API-Key: $STOCKCONTEXT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"catalog":"capabilities","schema":2}'import requests
url = "https://api.stockcontext.com/v1/tools/stock_reference"
payload = {
"catalog": "capabilities",
"schema": 2
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({catalog: 'capabilities', schema: 2})
};
fetch('https://api.stockcontext.com/v1/tools/stock_reference', 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.stockcontext.com/v1/tools/stock_reference",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'catalog' => 'capabilities',
'schema' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stockcontext.com/v1/tools/stock_reference"
payload := strings.NewReader("{\n \"catalog\": \"capabilities\",\n \"schema\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stockcontext.com/v1/tools/stock_reference")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"catalog\": \"capabilities\",\n \"schema\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stockcontext.com/v1/tools/stock_reference")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"catalog\": \"capabilities\",\n \"schema\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"catalog": "capabilities",
"tools": [
{
"tool": "stock_financials",
"params": [
{
"name": "schema",
"kind": "enum",
"choices": [
1,
2
],
"default": 2
}
]
},
{
"tool": "stock_flag",
"params": [
{
"name": "schema",
"kind": "enum",
"choices": [
1,
2
],
"default": 2
}
]
}
]
},
"meta": {
"schema_version": "2"
}
}
Authorizations
Body
application/json
Request body for stock_reference.
Catalog to return.
Available options:
refusal_tokens, refusal_reasons, operating_rules, concepts, units, shapes, filing_forms, 8k_items, capabilities, form4_codes, fields, coverage Optional text filter for catalogs that support search.
Required string length:
1 - 128Optional operating-rule filter.
Required string length:
1 - 128Response schema selector. Omit (or send 2) for the schema-2 envelope, the default; 1 selects the frozen legacy wire. Boolean values are rejected by the API boundary.
Available options:
1, 2 Response
Read self-describing reference catalogs. Envelope-level schema; captured examples remain authoritative for full nested payload detail.
Schema-2 envelope. The OpenAPI schema is structural; captured examples are authoritative for full nested payload detail.