Stock Quote
curl --request GET \
--url https://stocks-dev.up.railway.app/api/v1/stock/{symbol}import requests
url = "https://stocks-dev.up.railway.app/api/v1/stock/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://stocks-dev.up.railway.app/api/v1/stock/{symbol}', 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}",
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}"
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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stocks-dev.up.railway.app/api/v1/stock/{symbol}")
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>",
"price": 123,
"change": 123,
"changesPercentage": 123,
"dayLow": 123,
"dayHigh": 123,
"yearHigh": 123,
"yearLow": 123,
"marketCap": 123,
"volume": 123,
"avgVolume": 123,
"exchange": "<string>",
"source": "<string>",
"timestamp": "<string>"
}Stock Data
Stock Quote
Get real-time stock price and basic information
GET
/
api
/
v1
/
stock
/
{symbol}
Stock Quote
curl --request GET \
--url https://stocks-dev.up.railway.app/api/v1/stock/{symbol}import requests
url = "https://stocks-dev.up.railway.app/api/v1/stock/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://stocks-dev.up.railway.app/api/v1/stock/{symbol}', 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}",
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}"
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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stocks-dev.up.railway.app/api/v1/stock/{symbol}")
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>",
"price": 123,
"change": 123,
"changesPercentage": 123,
"dayLow": 123,
"dayHigh": 123,
"yearHigh": 123,
"yearLow": 123,
"marketCap": 123,
"volume": 123,
"avgVolume": 123,
"exchange": "<string>",
"source": "<string>",
"timestamp": "<string>"
}Overview
Retrieve current stock price, market data, and key metrics for any publicly traded stock. This endpoint provides comprehensive real-time information powered by Financial Modeling Prep.This endpoint uses FMP as the primary data source for reliability. A YFinance alternative is available at
/api/v1/stock/{symbol}/yfinance.Parameters
string
required
Stock ticker symbol (e.g., AAPL, MSFT, GOOGL, TSLA)
Response
string
The stock ticker symbol
number
Current stock price in USD
number
Price change from previous close
number
Percentage change from previous close
number
Lowest price during current trading day
number
Highest price during current trading day
number
52-week high price
number
52-week low price
number
Market capitalization in USD
number
Current day trading volume
number
Average trading volume
string
Stock exchange (e.g., NASDAQ, NYSE)
string
Data source identifier (“FMP”)
string
ISO timestamp of the response
Examples
curl "https://stocks-dev.up.railway.app/api/v1/stock/AAPL"
import requests
response = requests.get("https://stocks-dev.up.railway.app/api/v1/stock/AAPL")
data = response.json()
print(f"Apple Stock: ${data['price']}")
print(f"Change: {data['change']} ({data['changesPercentage']:.2f}%)")
print(f"Market Cap: ${data['marketCap']:,}")
const response = await fetch('https://stocks-dev.up.railway.app/api/v1/stock/AAPL');
const data = await response.json();
console.log(`Apple Stock: $${data.price}`);
console.log(`Change: ${data.change} (${data.changesPercentage.toFixed(2)}%)`);
console.log(`Market Cap: $${data.marketCap.toLocaleString()}`);
<?php
$response = file_get_contents('https://stocks-dev.up.railway.app/api/v1/stock/AAPL');
$data = json_decode($response, true);
echo "Apple Stock: $" . $data['price'] . "\n";
echo "Change: " . $data['change'] . " (" . $data['changesPercentage'] . "%)\n";
echo "Market Cap: $" . number_format($data['marketCap']) . "\n";
?>
Response Example
{
"symbol": "AAPL",
"price": 201.08,
"change": 0.08,
"changesPercentage": 0.039801,
"dayLow": 200.62,
"dayHigh": 203.22,
"yearHigh": 260.1,
"yearLow": 169.21,
"marketCap": 3003290664000,
"priceAvg50": 202.6222,
"priceAvg200": 223.33345,
"volume": 70534466,
"avgVolume": 62515124,
"exchange": "NASDAQ",
"open": 201.895,
"previousClose": 201,
"eps": 7.09,
"pe": 28.36,
"sharesOutstanding": 14935800000,
"timestamp": "2025-06-28T18:42:12.471731",
"source": "FMP"
}
Error Responses
Invalid Symbol (404)
Invalid Symbol (404)
{
"detail": "404: Failed to fetch quote for INVALID"
}
Rate Limited (429)
Rate Limited (429)
{
"error": "Rate limit exceeded",
"detail": "Too many requests. Please try again later.",
"retry_after": 60
}
Server Error (500)
Server Error (500)
{
"error": "Internal server error",
"detail": "Unable to fetch stock data at this time"
}
MCP Protocol Usage
For AI agents using the Model Context Protocol:{
"method": "tools/call",
"params": {
"name": "fmp_get_stock_quote",
"arguments": {
"symbol": "AAPL"
}
}
}
Alternative Endpoints
YFinance Quote
/api/v1/stock/{symbol}/yfinanceUses YFinance library (may be rate limited)Company Overview
/api/v1/stock/{symbol}/overviewDetailed company information and metricsRate Limits
| Plan | Requests/Day | Requests/Minute |
|---|---|---|
| Free | 250 | 5 |
| Starter | 1,000 | 20 |
| Professional | 10,000 | 100 |
Use Cases
Portfolio Tracking
Portfolio Tracking
Monitor real-time prices for portfolio holdings and calculate current values.
Trading Applications
Trading Applications
Display current market data and price movements for trading decisions.
Financial Dashboards
Financial Dashboards
Create live financial dashboards with current stock prices and market data.
AI Financial Analysis
AI Financial Analysis
Provide real-time market data to AI agents for financial analysis and recommendations.
Related Endpoints
- Company Overview - Detailed company information
- Historical Data - Historical price data
- Market Gainers - Top performing stocks