Go lang wrapper for interactive brokers Client Portal (CP) web gateway
go get -u github.com/sachinbhutani/goibcp
TODO
- Tickle
- Logout
- Validate SSO
- Authentication Status
- Reauthenticate
- Entity Info
- Account Performance
- Account Balance Summary
- Portfolio Accounts
- List of Subaccounts
- Account Information
- Account Summary
- Account Ledger
- Brokerage Accounts
- Update Selected Account
- PnL for selected Account
- Portfolio Accounts
- List of Subaccounts
- Account Information
- Account Allocation
- Portfolio Positions
- Position by conid per account
- Invalidate Cache
- Account Summary
- Account Ledger
- Position by conid
- List of Trades
- Live Order
- Place Order
- Place Order (Support Bracket Order)
- Place Order Reply
- Preview Order
- Modify Order
- Delete Order
- Market Data
- Market Data Cancel (Single)
- Market Data Cancel (All)
- Market Data History
- Contract Info
- Search by Symbol Name
- Get strikes for options/warrants
- Get available conids of future/option/warrant/cash/CFD
- Secdef by Conid
- Security Futures by Symbol
- get lists of available scanners
- run scanner
- PnL for the selected account
Could not connect to IB CP Gateway, Ensure the CP gateway is running and logged in before connecting
- Ensure the client portal gateway is running at the configured host and destination
- Ensure you have logged in to the portal
- default link for the portal will be https://localhost:5000/.
- Follow the getting started instructions at https://interactivebrokers.github.io/cpwebapi/index.html
Please refer to the interactive brokers CP Web gateway FAQq in common question section at https://interactivebrokers.github.io/cpwebapi/faq.html
Since the gateway is running on your premises the certificate needs to be created/self-signed by you, or officially signed by a 3rd party. The gateway is similar to another webserver such as Tomcat which doesn’t provide a certificate along with the release.
https://www.sslshopper.com/article-how-to-create-a-self-signed-certificate-using-java-keytool.html