INNER CODE UNIT · Python
get_server_stats
Spoofkapoof/TradingViewMCPServer · tradingview_mcp/server.py:991
def get_server_stats() -> dict:
"""
Get server statistics including API usage and cache performance.
Returns:
Server statistics
"""
return {"status": "online", **api_client.get_stats()}
# ===== MCP RESOURCES =====
@mcp.resource("forex://pairs")
def list_forex_pairs() -> str:
"""List all available forex pairs with categories."""
pairs_data = list_available_pairs()