This is an interesting question. If I understand it correctly, you would like to use API to set alerts which pop up on TWS when the condition is met. That could actually be useful. I don't see anything in the API that can do that. The closest that I can see is to create a Conditional Order but set transmit to OFF. This way, the order will pop up on TWS, but will not be submitted. Maybe post this question on https://groups.io/g/twsapi and see if others have any better ideas.
The question is, at least for me - Let's say I use third party data (let's say twitter feed or something) and want to create alerts when certain conditions hit. How do I push those alerts to be displayed on TWS via API?
Can you push the alerts to RSS from Twitter? TWS supports RSS. EDIT: https://rss.app/blog/how-to-create-rss-feeds-from-twitter-PMsbbO Many other programs that do this available.