Skip to main content
GET
https://stocks-dev.up.railway.app
/
api
/
v1
/
market
/
sectors
Sector Performance
curl --request GET \
  --url https://stocks-dev.up.railway.app/api/v1/market/sectors
{
  "sectors": [
    {
      "sector": "<string>",
      "changesPercentage": 123,
      "change": 123,
      "currentValue": 123,
      "volume": 123,
      "marketCap": 123,
      "numberOfStocks": 123,
      "topPerformers": [
        {
          "symbol": "<string>",
          "name": "<string>",
          "changesPercentage": 123
        }
      ]
    }
  ],
  "period": "<string>",
  "source": "<string>",
  "timestamp": "<string>"
}

Overview

Retrieve performance data for all major market sectors. This endpoint provides real-time sector performance metrics including price changes, volume, and key statistics, helping investors identify sector rotation trends and investment opportunities.
Sector performance analysis is crucial for understanding market dynamics, identifying rotation patterns, and making strategic asset allocation decisions across different industries.

Parameters

period
string
default:"1d"
Performance period: “1d”, “5d”, “1m”, “3m”, “6m”, “1y”, “ytd”

Response

sectors
array
Array of sector performance data
period
string
Performance period analyzed
source
string
Data source identifier (“FMP”)
timestamp
string
ISO timestamp of the response

Examples

curl "https://stocks-dev.up.railway.app/api/v1/market/sectors?period=1d"

Response Example

{
  "sectors": [
    {
      "sector": "Technology",
      "changesPercentage": 2.45,
      "change": 15.67,
      "currentValue": 654.23,
      "volume": 125000000,
      "marketCap": 15420000000000,
      "numberOfStocks": 287,
      "topPerformers": [
        {
          "symbol": "NVDA",
          "name": "NVIDIA Corporation",
          "changesPercentage": 8.92
        },
        {
          "symbol": "AMD",
          "name": "Advanced Micro Devices",
          "changesPercentage": 6.45
        },
        {
          "symbol": "MSFT",
          "name": "Microsoft Corporation",
          "changesPercentage": 3.21
        }
      ]
    },
    {
      "sector": "Healthcare",
      "changesPercentage": 1.23,
      "change": 8.45,
      "currentValue": 695.12,
      "volume": 85000000,
      "marketCap": 8750000000000,
      "numberOfStocks": 156,
      "topPerformers": [
        {
          "symbol": "JNJ",
          "name": "Johnson & Johnson",
          "changesPercentage": 2.85
        },
        {
          "symbol": "PFE",
          "name": "Pfizer Inc.",
          "changesPercentage": 2.34
        }
      ]
    },
    {
      "sector": "Energy",
      "changesPercentage": -1.87,
      "change": -12.34,
      "currentValue": 647.89,
      "volume": 65000000,
      "marketCap": 3210000000000,
      "numberOfStocks": 89,
      "topPerformers": [
        {
          "symbol": "XOM",
          "name": "Exxon Mobil Corporation",
          "changesPercentage": 0.45
        }
      ]
    }
  ],
  "period": "1d",
  "source": "FMP",
  "timestamp": "2025-06-28T20:45:15.123456"
}

Understanding Sector Analysis

Major Market Sectors:
  • Technology: Software, hardware, semiconductors, internet
  • Healthcare: Pharmaceuticals, biotech, medical devices
  • Financial Services: Banks, insurance, investment firms
  • Consumer Discretionary: Retail, automotive, entertainment
  • Consumer Staples: Food, beverages, household products
  • Energy: Oil, gas, renewable energy
  • Industrials: Manufacturing, aerospace, defense
  • Materials: Chemicals, metals, mining
  • Utilities: Electric, gas, water utilities
  • Real Estate: REITs, property development
  • Communication Services: Telecom, media, internet services
Economic Cycle Patterns:
  • Early Cycle: Technology, Consumer Discretionary outperform
  • Mid Cycle: Industrials, Materials gain momentum
  • Late Cycle: Energy, Financials typically lead
  • Recession: Utilities, Consumer Staples show resilience
  • Economic Indicators: GDP growth, inflation, interest rates
  • Market Sentiment: Risk-on vs risk-off behavior
  • Regulatory Changes: Policy impacts on specific sectors
  • Technological Disruption: Innovation affecting industries

Use Cases

Asset Allocation

Portfolio Strategy
  • Sector rotation timing
  • Diversification decisions
  • Risk management

Market Analysis

Trend Identification
  • Economic cycle positioning
  • Leadership analysis
  • Momentum assessment

ETF Selection

Sector Investing
  • Sector ETF choices
  • Thematic investing
  • Tactical allocation

Risk Assessment

Portfolio Risk
  • Sector concentration
  • Correlation analysis
  • Defensive positioning

Sector Analysis Tips

Strong Sector Indicators:
  • Consistent outperformance over multiple periods
  • High relative volume and participation
  • Leadership from quality companies
  • Supportive fundamental trends
Investment Strategies:
  • Follow sector rotation patterns
  • Use sector ETFs for broad exposure
  • Monitor relative strength vs market
  • Consider defensive sectors during uncertainty
Sector Considerations:
  • Sector concentration risk in portfolios
  • Cyclical vs secular trends
  • Regulatory and policy impacts
  • Global economic dependencies

Error Responses

{
  "error": "Invalid period parameter",
  "detail": "Period must be one of: 1d, 5d, 1m, 3m, 6m, 1y, ytd"
}
{
  "error": "Market data unavailable",
  "detail": "Markets are currently closed. Data may be delayed."
}

MCP Protocol Usage

For AI agents using the Model Context Protocol:
{
  "method": "tools/call",
  "params": {
    "name": "fmp_get_sector_performance",
    "arguments": {
      "random_string": "dummy"
    }
  }
}