curl -X GET "https://stocks-dev.up.railway.app/api/v1/health"
const response = await fetch('/api/v1/health');
const data = await response.json();
import requests
response = requests.get('https://stocks-dev.up.railway.app/api/v1/health')
data = response.json()
{
"status": "healthy",
"timestamp": "2024-01-19T15:30:00Z",
"version": "1.0.0",
"uptime": 86400,
"services": {
"yfinance": {
"status": "operational",
"last_check": "2024-01-19T15:29:45Z",
"response_time": 245
},
"fmp": {
"status": "operational",
"last_check": "2024-01-19T15:29:50Z",
"response_time": 156,
"api_key_valid": true
}
},
"tools": {
"total": 32,
"yfinance_tools": 6,
"fmp_tools": 26
},
"environment": {
"python_version": "3.11.7",
"platform": "linux",
"memory_usage": {
"used": "245MB",
"available": "1.2GB"
}
}
}
API Documentation
Health Check
Check the health and status of the Financial MCP Server
GET
/
api
/
v1
/
health
curl -X GET "https://stocks-dev.up.railway.app/api/v1/health"
const response = await fetch('/api/v1/health');
const data = await response.json();
import requests
response = requests.get('https://stocks-dev.up.railway.app/api/v1/health')
data = response.json()
{
"status": "healthy",
"timestamp": "2024-01-19T15:30:00Z",
"version": "1.0.0",
"uptime": 86400,
"services": {
"yfinance": {
"status": "operational",
"last_check": "2024-01-19T15:29:45Z",
"response_time": 245
},
"fmp": {
"status": "operational",
"last_check": "2024-01-19T15:29:50Z",
"response_time": 156,
"api_key_valid": true
}
},
"tools": {
"total": 32,
"yfinance_tools": 6,
"fmp_tools": 26
},
"environment": {
"python_version": "3.11.7",
"platform": "linux",
"memory_usage": {
"used": "245MB",
"available": "1.2GB"
}
}
}
Verify that the Financial MCP Server is running properly and check the status of all integrated services.
Response
string
Overall health status: “healthy”, “degraded”, or “unhealthy”
string
Current server timestamp
string
Server version information
number
Server uptime in seconds
object
Status of individual services
Show services properties
Show services properties
object
object
object
curl -X GET "https://stocks-dev.up.railway.app/api/v1/health"
const response = await fetch('/api/v1/health');
const data = await response.json();
import requests
response = requests.get('https://stocks-dev.up.railway.app/api/v1/health')
data = response.json()
{
"status": "healthy",
"timestamp": "2024-01-19T15:30:00Z",
"version": "1.0.0",
"uptime": 86400,
"services": {
"yfinance": {
"status": "operational",
"last_check": "2024-01-19T15:29:45Z",
"response_time": 245
},
"fmp": {
"status": "operational",
"last_check": "2024-01-19T15:29:50Z",
"response_time": 156,
"api_key_valid": true
}
},
"tools": {
"total": 32,
"yfinance_tools": 6,
"fmp_tools": 26
},
"environment": {
"python_version": "3.11.7",
"platform": "linux",
"memory_usage": {
"used": "245MB",
"available": "1.2GB"
}
}
}
Status Codes
Overall Status
- healthy: All services operational
- degraded: Some services experiencing issues
- unhealthy: Critical services down
Service Status
- operational: Service working normally
- degraded: Service slow or intermittent issues
- down: Service unavailable
Use Cases
- Monitoring: Automated health checks
- Troubleshooting: Diagnose service issues
- Load Balancing: Route traffic to healthy instances
- Alerting: Set up monitoring alerts
- Maintenance: Check status before deployments
Monitoring Best Practices
- Regular Checks: Poll every 30-60 seconds
- Alert Thresholds: Alert on “degraded” or “unhealthy”
- Response Time: Monitor service response times
- Uptime Tracking: Track availability metrics
- Dependency Monitoring: Watch external service status
Notes
- No authentication required for health checks
- Endpoint designed for high-frequency monitoring
- Includes both internal and external service dependencies
- Response times are rolling averages over the last 5 minutes
- Memory usage updated every minute