Skip to content

IBind Configuration

voyz edited this page Apr 25, 2024 · 8 revisions

IBind can be configured through two manners:

Constructor Parameters

IbkrClient constructor parameters

IbkrClient has three main areas that can be configured in through its constructor parameters:

  • account ID
  • URL
  • CAcerts

IbkrClient Account ID

Many of the IBKR API endpoints require an account ID to be specified.

In most cases this value will be the constant for a particular user, hence both the IbkrClient and IbkrWsClient allow to store the account ID by specifying the account_id parameter upon construction.

IbkrClient(account_id='DU12345678')

Note:

  • This value can be set as an environment variable IBIND_ACCOUNT_ID, which will be read automatically upon construction.
  • All API methods that require the account ID to be specified provide an optional account_id parameter allowing you to override this class field on case-by-case basis.

Environment variables