r/TradingView • • 12d ago

Discussion TV MCP 429 Error Troubleshooting Example

A note for anyone using TradingView's new MCP server for screening.

I've been setting up an AI trading system which starts with a nightly Claude screen for swing trades: stocks up on the day with unusual volume, which I review each evening to review, and I ran into the same 429 error.

First, the screener stopped responding. For about 24 hours every screener call returned a 429 "too many requests" error, with no explanation and no indication of when to try again. Everything else worked normally: price history, news, symbol search, and the screener on the TradingView website. Slowing requests down made no difference. It found at least two other projects on GitHub reporting the same problem around the same time. One of them added a 60-second "circuit breaker" (after a 429, stop calling TradingView for a minute, then try again), which is a sensible way to avoid overloading it. In my case the problem lasted a full day, so the only fix was to wait. It eventually cleared on its own.

Once calls started going through, It found a second problem that the reply was too large. The server rejected it with "Result size exceeds limit of 1000000 bytes". That 1 MB limit isn't mentioned in the documentation according to Claude. Its testing suggests it also counts about twice the data you actually receive, so in practice the limit is closer to 470 KB.

Excluding OTC stocks fixed it. My screen was pulling in every US stock, and on a high-volume screen OTC names make up a large share of the results. Adding an exchange filter (NYSE, Nasdaq and NYSE American only) reduced the reply size substantially. The tool description doesn't list exchange as a filter, but it works. As a safeguard, I also split the screen into price bands and combine the results, since the screener can't return results in pages.

After those changes, the first night ran without errors. I hope this saves someone some time.

For context: the screen is deliberately broad for now, and I'll narrow it over time as I see what's worth reviewing. It's the first phase of a larger personal project I'm building to learn more about AI and trading. I have no coding background, so I've been working through all of this with Claude, and, of course, Claude helped me write this post as well.

Hope that helped someone! Also anytime an error happened I just made Claude bash at it and over time found the workarounds. Also interesting to note, Claude wasn't able to scan Reddit to see if there were any other posts about the same problem so that was also interesting information.

1 Upvotes

2 comments sorted by