-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get pre-market-price from tws by using IB. #19
Comments
Hi @SunHxiao, You will need to disable RTH (Regular Trading Hours) in the script and possibly change in your IB Gateway settings. How can I trade stocks during the pre-market or post market? But first, I would try and set High-Frequency-Trading-Model-with-IB/models/hft_model_1.py Lines 240 to 254 in a19d2a6
Hope this helps, |
Hi, there. |
@SunHxiao, My script? Or the owner's, Jame's, HFT script? To run it, you need to make sure you have IB Gateway installed and Paper Trade Account setup because you certainly do not want to run it on a funded Live Account without fulling understanding what the algorithm does. In fact, make sure any Algo is ran on a Paper Trading Account and does as expected for some time before running it on a Live Account. As for installation, there is a green 'Clone or Download' button at the Repository main page. I also recommend installing a Python 3 Virtual Environment or use Anaconda to setup the environment. I would look for videos on how to set up the Python environment if you are not familiar doing it. Hope this helps. |
Hi @twopirllc. |
Hey @SunHxiao, If you are limited to 50 simultaneous API historical data requests, then you need to throttle or stagger your requests to stay under 50. Here are the IB API Message Codes. Unfortunately Error 162 has no Additional Notes about it. Play around with your code some more and you'll figure it out. Good luck, |
I would like to get the pre-market-price -> the price between 8 -9.30.
By the way, I don't know how to get the price.
Would you please inform me about it?
I will wait for your favorable reply.
Thanks.
The text was updated successfully, but these errors were encountered: