Search code examples
interactive-brokersibpy

How to get buying power and cash available of my account with IBPy


How do I the get buying power and cash available of my account with IBPy? I'm not seeing anything obvious in IBPy docs.


Solution

  • AFter lots of trial and error and conversations with tech support.

    the key bit is to have the response handlers already registered before you call connect(). There isnt a direct function to call and get the answer. One has to first call reqAccountUpdates(). And then the server will respond with messages of type AccountUpdateValue and each message will have key and value attributes . reqAccountUpdates()