Helper functions for easier IBKR trade automation using ib_insync.
Project description
#EasyIBKR
A helper module which makes automating trades using IBKR and Python MUCH easier through helper functions which sort through the confusing syntax elements.
Note: This build is based on ib_insync, though this may be updated to the newer maintained async version
HOW TO USE:
first, run the connect() function. By default it uses the params TWS API sets for you (make sure to set up your TWS to work with API!!), however you can change this by calling the function with params;
connect(ip,port,clientId)
-------Getting Information-------
getLiquidity() -> returns your account summary getValue() -> returns your total account value (cash + positions)
getCurrentBasics(ticker) -> returns a list of [bid,ask,last,open] for the specified ticker
getHistoricals(ticker,duration,size,toShow,endDateTime) duration is how far back to go size is the bar size toShow is what point in the bar to show (open,close,high,low,midpoint) endDateTime is the last date to get data for, by default it goes until the latest it can
-------Placing Trades--------
placeLimit(ticker,quantity,short,limit) short -> a boolean, if True then places a short trade, if False, long limit -> limit price
placeBracket(ticker,qty,short,limit,stopLoss,takeProfit) same as Limit but we can specify stopLoss and takeProfit limit prices, orders are One-Cancels-Order
Installation
pip install easyIBKR
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easyibkr-0.1.1.tar.gz.
File metadata
- Download URL: easyibkr-0.1.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5f41633994f8a6169d8d9a37db9863150494b242081c45f47136ab77e5ff367
|
|
| MD5 |
ea0bab4117ede702028e2deaab8a2379
|
|
| BLAKE2b-256 |
1c03c4755d645f88f1defad6f43c8b66de67cedc48082ea4ad5538826bbf03f2
|
File details
Details for the file easyibkr-0.1.1-py3-none-any.whl.
File metadata
- Download URL: easyibkr-0.1.1-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1396bc9065db4b228dfd5a2657b9877d3bdb3c77ef5cb9bee4268c50b99327d3
|
|
| MD5 |
5482dae0bda4c9b2eae0fdf378de5462
|
|
| BLAKE2b-256 |
2c1fbf83bb8ba4f68a9c4085b782ac0e6a23d870b8a399a532317eee82d70ebd
|