I updated the title of your question so that it more accurately describes the context. I also moved your post out of the "Alerts and Notifications" topic and into the "Stock Scanners" topic.
On Thinkorswim, we can write code to read the Bid "price" or the Ask "price". (And even then we are restricted as to which tools we can apply such code). However there is nothing in the language which allows us to read the Bid "quantity" or the Ask "quantity".
You can view this information on various tools within Thinkorswim but there is no code we can write to access this data within the current version of the platform.