Basic Concepts - Voyz/ibind GitHub Wiki
Core Functionality
IBind's core functionality consists of two client classes:
-
IbkrClient- for IBKR REST APIUsing the
IbkrClientrequires constructing it with appropriate arguments, then calling the API methods. -
IbkrWsClient- for IBKR WebSocket APIUsing the
IbkrWsClientinvolves handling three areas:- Managing its lifecycle. It is asynchronous and it will run on a separate thread, hence we need to construct it, start it and then manage its lifecycle on the originating thread.
- Subscribing and unsubscribing. It is subscription-based, hence we need to specify which channels we want to subscribe to and remember to unsubscribe later.
- Consuming data. It uses a queue system, hence we need to access these queues and consume their data.
Their usage differs substantially. Users are encouraged to familiarise themselves with the IbkrClient class first.
Client Portal Gateway Dependency
You need to have a running Java-based Client Portal Gateway in order to successfully communicate with the IBKR CP Web API.
We recommend using IBeam to automate and simplify starting the Gateway and keeping it alive.
IBeam (the authentication tool) is also built and maintained by the authors of IBind (this Python client library), and the two projects are meant to support one another.
Next
Learn about the IbkrClient.