How long does a Web API session last?

IBKR's Web API makes use of two nested sessions.

  • The first session layer grants "read-only" access to your account structure but does not permit use of any /iserver endpoints. At this stage, no trading or consumption of paid market data is possible, though you may still access portfolio data. This first layer is a prerequisite for the second.
  • The second session layer is the "brokerage session". A brokerage session can be created only after you have obtained read-only access to the Web API. The brokerage session permits requests to all /iserver endpoints and effectively confers "write" access.
Powered by IBot
Why are my requests to /iserver endpoints failing, while others succeed?
How can I download option chain historical data with API?
What options are available for 3rd party applications that aren't compatible with IBKR's linked account structure?
How can I tell if I have an active brokerage session in the Web API?