Urgent.News

What's breaking now, across thousands of outlets.

AI

Connecting an AI trading agent to TradingView alerts without losing signals

Disclosure: I work on HookWatch , a hosted TradingView webhook reliability layer. Everything below works without it, and the code is MIT on GitHub. A lot of people are wiring LLM agents to TradingView right now: an alert fires, the agent looks at the signal plus context (position, news, PnL), decides, and places an order. The first version usually looks like this: @app.post ( " /webhook " ) async…

When connecting an AI trading agent to TradingView alerts, losing signals can occur due to the time limit imposed by TradingView. If the receiving server takes longer than three seconds to respond, the request is cancelled. Additionally, TradingView only accepts HTTP ports 80 and 443, without IPv6 support or custom headers, and expects the body to be text/plain or valid JSON.

To prevent signal loss, split the webhook handler from the agent. The handler should perform essential tasks, such as verifying a secret in the JSON body, deduplicating alerts using a unique alert_id, timestamping and enqueuing the signal, and returning a 200 status within milliseconds. The agent can then run in a separate consumer, processing signals from the queue.

After the agent proposes a decision, enforce a risk gate by checking for maximum signal age, position limits, and size limits. Parse the agent's response into a fixed schema to ensure proper handling.

To address potential downtime issues, separate the ingress layer from the agent. Use a fast ACK to handle the 3-second limit, and have the ingress layer write alerts to a durable queue (e.g., Redis Streams, SQS, or a Postgres durable dedupe) for reliable delivery. Set up a dead-letter queue to monitor any signals that keep failing, allowing you to identify and address any missed alerts.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

The Future of AI Companies

Em tempos onde a IA é o assunto mais discutido no mundo da tecnologia, com uma corrida entre as maiores empresas de tecnologia entre o melhor e mais completo serviço de IA e a discussão do impacto…

An 80GB H100, and only 3B of the model could keep up with conversation

📝 Originally published (in Japanese) at forge.workstyle.tech . I used to think that 80 GB of VRAM would be enough to chat with a large model.

  • An 80GB H100 GPU insufficient for full 35B model
  • 3B-parameter model used for each token generation
  • MoE mechanism enabled 35B model with 3B weights per token

More from Monday 12 October →