INNER CODE UNIT · Python
get_spread
Spoofkapoof/TradingViewMCPServer · tradingview_mcp/server.py:199
def get_spread(pair: str) -> float:
"""Get typical spread for a pair."""
return TYPICAL_SPREADS.get(pair, DEFAULT_SPREAD)
# ===== MCP TOOLS: SERVER MANAGEMENT =====
@mcp.tool()
def health_check() -> dict:
"""
Check server health and API connectivity status.
Returns:
Server health information including version, cache stats, and API status
"""
# Check API key configuration
api_key_configured = bool(api_client.api_key)