Run IBridgePy examples

You will find 3 examples in the folder of IBridgePy/Strategies.

strategies_folder

  • example_get_historical_data.py

You can use this code to request historical data from IB, following IB’s restrictions.

  • example_get_real_time_prices.py

You can use this code to request real time prices from IB as long as you have the permission from IB to request.  Contact with IB to get information about their real time price packages.

  • example_place_order.py

This example is to show how to place a market order or a limit order to buy/sell some shares of a security.

How to run these programs?

1. Download IBridgePy to your local folder, following the download steps.

2. Complete the preparation steps.

3. Log in to IB TWS or IB Gateway if you have done so.

It is highly recommended that you try these examples using an IB paper account after you fully understand them!

4. When you are ready to run the code, click the green triangle.

DISCLAIMER
There is a risk of loss in stocks, futures, forex and options trading. Please trade with capital you can afford to lose. Past performance is not necessarily indicative of future results. Nothing in this computer program/code is intended to be a recommendation to buy or sell any stocks or futures or options market. All information and computer programs provided is for education and entertainment purpose only; accuracy and thoroughness cannot be guaranteed. Readers/users are solely responsible for how they use the information and for their results.
run_scripts

Need help?

Please contact us at ibridgepy@gmail.com