from django.http import JsonResponse
from .engine import generate_signal

def get_signal(request, symbol):
    signal = generate_signal(symbol)
    return JsonResponse({'symbol': symbol, 'signal': signal})