Skip to content

quocble/IBTrader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IBTrader

IBTrader is live trading agent for Interactive Brokers. IB's API is queue-based asynchronous and is difficult to use for general purpose trading algorithm. We provide an easier abstraction that is similar to Quantopian's API.

API

These functions are implemented for you. To buy/sell, simply send target %, other types order can be easily implemented based on this api.

# agent/base_algo.py

class BaseAlgorithm:
  def order_target_percent(self, symbol, percent:float, limit):
    pass
  def run_on_trading_day(self, func):
    pass
  def updatePosition(self):
    pass
  def updateAccountSummary(self):
    pass

Example

See agent/rfs_v1.py for real example.

How to run

Startup your IB Client, and enable API

run

python agent/rfs_v1.py

About

IBTrader is live trading agent for Interactive Brokers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages