Stock Overview
curl --request GET \
--url https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overviewimport requests
url = "https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview', 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://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview",
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://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview")
.asString();require 'uri'
require 'net/http'
url = URI("https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"companyName": "<string>",
"industry": "<string>",
"sector": "<string>",
"marketCap": 123,
"employees": 123,
"description": "<string>",
"website": "<string>",
"headquarters": "<string>",
"founded": "<string>",
"ceo": "<string>",
"exchange": "<string>",
"financialMetrics": {
"peRatio": 123,
"pegRatio": 123,
"priceToBook": 123,
"priceToSales": 123,
"dividendYield": 123,
"beta": 123,
"eps": 123,
"revenue": 123,
"grossMargin": 123,
"operatingMargin": 123,
"netMargin": 123,
"roe": 123,
"roa": 123,
"debtToEquity": 123,
"currentRatio": 123
},
"analystData": {
"recommendationMean": 123,
"recommendationKey": "<string>",
"numberOfAnalystOpinions": 123,
"targetHighPrice": 123,
"targetLowPrice": 123,
"targetMeanPrice": 123,
"targetMedianPrice": 123
},
"timestamp": "<string>"
}Stock Data
Stock Overview
Get comprehensive company information and overview data
GET
/
api
/
v1
/
stock
/
{symbol}
/
overview
Stock Overview
curl --request GET \
--url https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overviewimport requests
url = "https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview', 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://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview",
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://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview")
.asString();require 'uri'
require 'net/http'
url = URI("https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"companyName": "<string>",
"industry": "<string>",
"sector": "<string>",
"marketCap": 123,
"employees": 123,
"description": "<string>",
"website": "<string>",
"headquarters": "<string>",
"founded": "<string>",
"ceo": "<string>",
"exchange": "<string>",
"financialMetrics": {
"peRatio": 123,
"pegRatio": 123,
"priceToBook": 123,
"priceToSales": 123,
"dividendYield": 123,
"beta": 123,
"eps": 123,
"revenue": 123,
"grossMargin": 123,
"operatingMargin": 123,
"netMargin": 123,
"roe": 123,
"roa": 123,
"debtToEquity": 123,
"currentRatio": 123
},
"analystData": {
"recommendationMean": 123,
"recommendationKey": "<string>",
"numberOfAnalystOpinions": 123,
"targetHighPrice": 123,
"targetLowPrice": 123,
"targetMeanPrice": 123,
"targetMedianPrice": 123
},
"timestamp": "<string>"
}Endpoint
GET /api/v1/stock/{symbol}/overview
curl "https://stocks-dev.up.railway.app/api/v1/stock/{symbol}/overview"
import requests
response = requests.get("https://stocks-dev.up.railway.app/api/v1/stock/AAPL/overview")
data = response.json()
const response = await fetch('https://stocks-dev.up.railway.app/api/v1/stock/AAPL/overview');
const data = await response.json();
Parameters
string
required
Stock symbol (e.g., AAPL, MSFT, GOOGL)
Response
string
Stock symbol
string
Full company name
string
Company industry classification
string
Market sector
number
Market capitalization
number
Number of employees
string
Company business description
string
Company website URL
string
Company headquarters location
string
Company founding year
string
Chief Executive Officer name
string
Stock exchange listing
object
Key financial ratios and metrics
Show Financial Metrics
Show Financial Metrics
number
Price-to-Earnings ratio
number
Price/Earnings to Growth ratio
number
Price-to-Book ratio
number
Price-to-Sales ratio
number
Annual dividend yield percentage
number
Stock volatility relative to market
number
Earnings per share (trailing 12 months)
number
Annual revenue
number
Gross profit margin percentage
number
Operating profit margin percentage
number
Net profit margin percentage
number
Return on Equity percentage
number
Return on Assets percentage
number
Debt-to-Equity ratio
number
Current assets to current liabilities ratio
object
Analyst recommendations and targets
Show Analyst Data
Show Analyst Data
string
Response timestamp in ISO format
Example Response
{
"symbol": "AAPL",
"companyName": "Apple Inc.",
"industry": "Consumer Electronics",
"sector": "Technology",
"marketCap": 3120000000000,
"employees": 164000,
"description": "Apple Inc. designs, manufactures, and markets smartphones, personal computers, tablets, wearables, and accessories worldwide. The company serves consumers, and small and mid-sized businesses; and the education, enterprise, and government markets.",
"website": "https://www.apple.com",
"headquarters": "Cupertino, CA",
"founded": "1976",
"ceo": "Timothy D. Cook",
"exchange": "NASDAQ",
"financialMetrics": {
"peRatio": 29.85,
"pegRatio": 2.41,
"priceToBook": 45.67,
"priceToSales": 7.98,
"dividendYield": 0.44,
"beta": 1.29,
"eps": 6.73,
"revenue": 391035000000,
"grossMargin": 0.4413,
"operatingMargin": 0.2887,
"netMargin": 0.2531,
"roe": 1.4740,
"roa": 0.2865,
"debtToEquity": 1.96,
"currentRatio": 0.93
},
"analystData": {
"recommendationMean": 2.0,
"recommendationKey": "buy",
"numberOfAnalystOpinions": 38,
"targetHighPrice": 250.0,
"targetLowPrice": 180.0,
"targetMeanPrice": 220.5,
"targetMedianPrice": 225.0
},
"timestamp": "2025-06-28T18:42:12.471731"
}
{
"symbol": "MSFT",
"companyName": "Microsoft Corporation",
"industry": "Software—Infrastructure",
"sector": "Technology",
"marketCap": 2890000000000,
"employees": 221000,
"description": "Microsoft Corporation develops, licenses, and supports software, services, devices, and solutions worldwide. The company operates in three segments: Productivity and Business Processes, Intelligent Cloud, and More Personal Computing.",
"website": "https://www.microsoft.com",
"headquarters": "Redmond, WA",
"founded": "1975",
"ceo": "Satya Nadella",
"exchange": "NASDAQ",
"financialMetrics": {
"peRatio": 32.12,
"pegRatio": 1.89,
"priceToBook": 12.45,
"priceToSales": 11.23,
"dividendYield": 0.72,
"beta": 0.91,
"eps": 12.05,
"revenue": 211915000000,
"grossMargin": 0.6897,
"operatingMargin": 0.4204,
"netMargin": 0.3651,
"roe": 0.4321,
"roa": 0.1876,
"debtToEquity": 0.47,
"currentRatio": 1.77
},
"analystData": {
"recommendationMean": 1.8,
"recommendationKey": "buy",
"numberOfAnalystOpinions": 42,
"targetHighPrice": 480.0,
"targetLowPrice": 350.0,
"targetMeanPrice": 415.2,
"targetMedianPrice": 420.0
},
"timestamp": "2025-06-28T18:42:12.471731"
}
Error Responses
{
"error": "Invalid symbol",
"message": "Symbol 'INVALID' not found",
"code": 404
}
{
"error": "Rate limit exceeded",
"message": "Too many requests. Please try again later.",
"code": 429,
"retryAfter": 60
}
{
"error": "Internal server error",
"message": "Unable to fetch company data",
"code": 500
}
Use Cases
Investment Research
Investment Research
Get comprehensive company information for fundamental analysis:
# Research Apple's fundamentals
response = requests.get("https://api.example.com/api/v1/stock/AAPL/overview")
data = response.json()
# Check valuation metrics
pe_ratio = data["financialMetrics"]["peRatio"]
price_to_book = data["financialMetrics"]["priceToBook"]
# Analyst sentiment
recommendation = data["analystData"]["recommendationKey"]
target_price = data["analystData"]["targetMeanPrice"]
Portfolio Analysis
Portfolio Analysis
Analyze holdings across different sectors and industries:
portfolio = ["AAPL", "MSFT", "GOOGL", "TSLA"]
sector_allocation = {}
for symbol in portfolio:
overview = get_stock_overview(symbol)
sector = overview["sector"]
sector_allocation[sector] = sector_allocation.get(sector, 0) + 1
Screening & Filtering
Screening & Filtering
Filter stocks based on financial metrics:
def screen_stocks(symbols, min_pe=None, max_pe=None, min_roe=None):
filtered_stocks = []
for symbol in symbols:
overview = get_stock_overview(symbol)
metrics = overview["financialMetrics"]
if min_pe and metrics["peRatio"] < min_pe:
continue
if max_pe and metrics["peRatio"] > max_pe:
continue
if min_roe and metrics["roe"] < min_roe:
continue
filtered_stocks.append(symbol)
return filtered_stocks
Company Comparison
Company Comparison
Compare multiple companies side by side:
def compare_companies(symbols):
comparison = {}
for symbol in symbols:
overview = get_stock_overview(symbol)
comparison[symbol] = {
"name": overview["companyName"],
"sector": overview["sector"],
"market_cap": overview["marketCap"],
"pe_ratio": overview["financialMetrics"]["peRatio"],
"roe": overview["financialMetrics"]["roe"],
"recommendation": overview["analystData"]["recommendationKey"]
}
return comparison
Rate Limits
This endpoint is subject to the same rate limits as other stock data endpoints:
- YFinance: No official limits, but may be rate limited by Yahoo Finance
- FMP: Based on your plan (250-10,000+ requests per day)
Data Sources
Primary: YFinance
- Comprehensive company information
- Financial metrics and ratios
- Analyst recommendations
- Real-time data updates
Fallback: FMP
- Professional-grade data
- Consistent API structure
- Additional financial metrics
- Reliable uptime
Related Endpoints
Stock Quote
Get real-time price and basic information
Historical Data
Access historical price and volume data
Financial Statements
Detailed income, balance sheet, and cash flow
Key Metrics
Advanced financial ratios and metrics