开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date

Re: Non-Acknowledgment of Orders.

 

开云体育

From a first test, it looks like it wants a requestId, implying I have to request it first(?) On the other had, I do see a single callback, but with the error message the reqId is unknow.

Raoul


On 21-06-2021 16:51, Nick wrote:

execDetails is always generated, you don't have to request it. Something is missing in your code to receive the execDetails.


On 6/21/2021 10:44 AM, Raoul Suurmeijer wrote:
After getting more into the details, I didn't realize that the algo has to call the reqExecutions method first before receiving the callback on execDetails. Initially I thought execDetails was called automatically after executing the last order.







Re: Non-Acknowledgment of Orders.

Nick
 

execDetails is always generated, you don't have to request it. Something is missing in your code to receive the execDetails.

On 6/21/2021 10:44 AM, Raoul Suurmeijer wrote:
After getting more into the details, I didn't realize that the algo has to call the reqExecutions method first before receiving the callback on execDetails. Initially I thought execDetails was called automatically after executing the last order.


Re: Non-Acknowledgment of Orders.

 

开云体育

After getting more into the details, I didn't realize that the algo has to call the reqExecutions method first before receiving the callback on execDetails. Initially I thought execDetails was called automatically after executing the last order.

But then, what would be the trigger for calling reqExecutions? What would be the right moment? And then the callback sends all orders that were executed this current session.

Any suggestions?


Regards,

Raoul


On 18-06-2021 23:13, Raoul Suurmeijer wrote:

Thanks for pointing that out! I never knew. My trades are mkt orders with the ES E-mini and always saw correct callbacks with orderstatus though, including all order updates. But it's true, the manual has a small note near the bottom of this page:

  • There are not guaranteed to be orderStatus callbacks for every change in order status. For example with market orders when the order is accepted and executes immediately, there commonly will not be any corresponding orderStatus callbacks. For that reason it is recommended to monitor the??function in addition to?.

And while I now go through the API mailing archive, I noticed others have pointed this out as well. Ok, that means a little refactoring the code, it's a minor impact.

Thanks!

Regards,

Raoul



On 18-06-2021 21:52, Nick wrote:

It is documented that you are not guaranteed to get order status messages. You will always get exec details though.

You can request open orders but you also need to monitor executions since if the order has filled it will no longer be open.

You also get portfolio updates when an order fills.

There's no single right way to reconcile orders, everyone finds a method that works for them.

On 6/18/2021 3:42 PM, Craig Carr wrote:
For the second time this year, today I sent an order and received no order status messages.
Does anybody have any strategies for dealing with this situation?
Could one send a request open orders and try and reconcile that with my view of the orders?
Thanks in advance.


AlgoTrader

 

Hi All,

First of all, I want to thank this community for the immense support it has provided to new coders like me.? As a thank you, I have provided the code to an algorithmic trader that I have developed in Python using the IBKR API.? It is currently written to trade momentum using a trend-following strategy, but you can tweak it to do whatever you like.? Feel free to message me with any questions or requests to customize the code to your particular strategy.

I will also be writing an algo trader to trade wheel options strategy soon as well.? Feel free to message me if you want to collaborate on that project.

Here is the code:

https://github.com/ebtrader/algotrader_ebtrader/blob/master/algotrader.py

Regards,
Javed Siddique


Re: Compiling Python trading program as an executable (.exe)

 

Ace
Could you pls share your setup on how you do this w anaconda and ib in sync so can figure it out w pex?



On Jun 18, 2021 at 5:40 PM, <Ace> wrote:

Thanks guys!

What I have is a day trading Python program that I launch with the Anaconda Powershell prompt. It reads an Excel parameter file and uses several librairies like ib_insync, talib, math, text_to_speech,...it trades through the IB TWS Python API.

Can pex really find all of these things by itself and package it in just one file?
How will the self-contained executable be launched, and does it need some kind of environment?
Or it's just like clicking a regular .exe file from a directory?

Thank you!
A


Re: OCA group + conditional orders + MIDPOINT order

 

Correction, MIDPRICE order, not MIDPOINT.


Re: Compiling Python trading program as an executable (.exe)

 

Thanks guys!

What I have is a day trading Python program that I launch with the Anaconda Powershell prompt. It reads an Excel parameter file and uses several librairies like ib_insync, talib, math, text_to_speech,...it trades through the IB TWS Python API.

Can pex really find all of these things by itself and package it in just one file?
How will the self-contained executable be launched, and does it need some kind of environment?
Or it's just like clicking a regular .exe file from a directory?

Thank you!
A


Re: Non-Acknowledgment of Orders.

Craig Carr
 

On this particular order, I also got no "OpenOrder" update. Do people generally assume the the "OpenOrder" event is reliable?
I don't see anything in the documentation indicating it isn't.


Re: Non-Acknowledgment of Orders.

Craig Carr
 

Thanks Nick, I wasn't aware of that.
Another thing to program around...


Re: Non-Acknowledgment of Orders.

 

开云体育

Thanks for pointing that out! I never knew. My trades are mkt orders with the ES E-mini and always saw correct callbacks with orderstatus though, including all order updates. But it's true, the manual has a small note near the bottom of this page:

  • There are not guaranteed to be orderStatus callbacks for every change in order status. For example with market orders when the order is accepted and executes immediately, there commonly will not be any corresponding orderStatus callbacks. For that reason it is recommended to monitor the??function in addition to?.

And while I now go through the API mailing archive, I noticed others have pointed this out as well. Ok, that means a little refactoring the code, it's a minor impact.

Thanks!

Regards,

Raoul



On 18-06-2021 21:52, Nick wrote:

It is documented that you are not guaranteed to get order status messages. You will always get exec details though.

You can request open orders but you also need to monitor executions since if the order has filled it will no longer be open.

You also get portfolio updates when an order fills.

There's no single right way to reconcile orders, everyone finds a method that works for them.

On 6/18/2021 3:42 PM, Craig Carr wrote:
For the second time this year, today I sent an order and received no order status messages.
Does anybody have any strategies for dealing with this situation?
Could one send a request open orders and try and reconcile that with my view of the orders?
Thanks in advance.


TWS API data for Delisted and non-Active stocks.

Aquiles Páez
 

Hi,?

Can anyone confirm if TWS API does not provide data for delisted and/or non-Active stocks??

Thanks in advance!?


Re: Non-Acknowledgment of Orders.

Nick
 

开云体育

It is documented that you are not guaranteed to get order status messages. You will always get exec details though.

You can request open orders but you also need to monitor executions since if the order has filled it will no longer be open.

You also get portfolio updates when an order fills.

There's no single right way to reconcile orders, everyone finds a method that works for them.

On 6/18/2021 3:42 PM, Craig Carr wrote:

For the second time this year, today I sent an order and received no order status messages.
Does anybody have any strategies for dealing with this situation?
Could one send a request open orders and try and reconcile that with my view of the orders?
Thanks in advance.


Non-Acknowledgment of Orders.

Craig Carr
 

For the second time this year, today I sent an order and received no order status messages.
Does anybody have any strategies for dealing with this situation?
Could one send a request open orders and try and reconcile that with my view of the orders?
Thanks in advance.


Re: more IB problems

 

The problems you experience have origin in your own behaviour/code. My algos have been trading now since beginning of 2020 every day the stock market was open the whole market hours and I didn't experience a single time that a session was ended
prematurely or any other connection related problem. I trade both the UK and the US session.

During the weekends it is another story. There are often times when you can not connect to IB (usually because of maintenance) or that you can connect but some API calls return wrong or no data at all.


Re: more IB problems

 

I just noticed that a configuration for a Flex Report I created and then edited a few times yesterday on the web site was missing many changes as of today even though I remember saving it after each edit and getting a confirmation. So there could be some hiccups on client portal site indeed. Either way, if you have significant persistent problems the status monitoring link I quoted should be the first thing to check.


OCA group + conditional orders + MIDPOINT order

 

This combination appears to not work. I've conditional exit orders submitted - conditional MIDPOINT "stop" + conditional MIDPOINT "limit". The LMT order stays blue and doesn't execute. As soon as I removed the OCA group, the order started filling. What's so special about conditional MIDPOINT orders in OCA groups?
In previous versions, there was a message that this was not supported. In latest versions that is not present, so I am assuming this should be functional?


Re: more IB problems

Stuart Cracraft
 

Thanks for the headsup.

On Jun 18, 2021, at 5:17 AM, ds-avatar <dimsal.public@...> wrote:

IB current systems status can be monitored online here:

I have logged in today and a few times tomorrow with no problem (though I usually do so with a direct account link from TWS to save the trouble of manually logging in).

Admittedly IB has problems from time to time but nothing exceptionally serious in my experience since July 2019 when they botched their 2-factor authentication and couldn't get it back to work for quite a few days if memory serves me well.


Re: more IB problems

YSS
 

I'm sorry why would they be hacked?

You got logged out due to inactivity probably or at the daily reset.


Re: Requesting Historical Data

 

also, consider?reqHistoricalData with?with keepUpToDate = true:??

as a result, you don't need to update your candles.

?

?


Re: more IB problems

 

Sorry, "yesterday" instead of "tomorrow".