Skip to main content
GET
https://stocks-dev.up.railway.app
/
api
/
v1
/
stock
/
{symbol}
Stock Quote
curl --request GET \
  --url https://stocks-dev.up.railway.app/api/v1/stock/{symbol}
{
  "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

symbol
string
required
Stock ticker symbol (e.g., AAPL, MSFT, GOOGL, TSLA)

Response

symbol
string
The stock ticker symbol
price
number
Current stock price in USD
change
number
Price change from previous close
changesPercentage
number
Percentage change from previous close
dayLow
number
Lowest price during current trading day
dayHigh
number
Highest price during current trading day
yearHigh
number
52-week high price
yearLow
number
52-week low price
marketCap
number
Market capitalization in USD
volume
number
Current day trading volume
avgVolume
number
Average trading volume
exchange
string
Stock exchange (e.g., NASDAQ, NYSE)
source
string
Data source identifier (“FMP”)
timestamp
string
ISO timestamp of the response

Examples

curl "https://stocks-dev.up.railway.app/api/v1/stock/AAPL"

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

{
  "detail": "404: Failed to fetch quote for INVALID"
}
{
  "error": "Rate limit exceeded",
  "detail": "Too many requests. Please try again later.",
  "retry_after": 60
}
{
  "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 metrics

Rate Limits

PlanRequests/DayRequests/Minute
Free2505
Starter1,00020
Professional10,000100

Use Cases

Monitor real-time prices for portfolio holdings and calculate current values.
Display current market data and price movements for trading decisions.
Create live financial dashboards with current stock prices and market data.
Provide real-time market data to AI agents for financial analysis and recommendations.