Alerts are not accessible from the TWS API.
Can I play an audible alert in Excel API?
Powered by IBot
What order types are supported in the TWS API?
Can I get alerts via SMS?
Can I disable warnings in the mobile app?
Is the IBIS 'Research Essentials' Subscription Bundle available via API?