IB API "goodAfterTime" is not working?

Discussion in 'Automated Trading' started by trend2009, Dec 5, 2019.

  1. I tried to send order with goodAfterTime="20191205 09:39:45". the order can not submitted. anyone successful using this field?

    btw, I can successfully use goodTillDate.
     
  2. You probably need a ISO-formatted date. Usually looks like YYYY-mm-ddTHH:MM:SSZ" for UTC
     
  3. southall

    southall

    I use "hour:min:sec timezone" on the same day

    eg: "10:00:00 GMT" ,

    i dont pass in a day if it is on the same day.
     
  4. d08

    d08

    '20191205 22:14:00 EST' would be the correct format for today. TIF field must be DAY or GTC.
     
  5. the tif field is "DAY". it did not work.
     
  6. tried it, did not work either. the ib api was downloaded 10 years ago, do not know if it is too old.
     
  7. my format is correct.
     
  8. d08

    d08

    Why would you use something that old, why not just update? I can confirm the format I posted works. Maybe you're posting it too close to the trade time or too close to the close. I believe it's not allowed in the last minute before the close and there's probably other limitations as well.
    Also, why not read the error messages that are returned?
     
    nooby_mcnoob likes this.
  9. Obvious reason is: if it's working, don't change! But it's not working, so maybe change?
     
    d08 likes this.
  10. I did not update api because the new api needs vc++ 12.0, which i am not familiar. I am still using vc++ 6.0. I think tws api version does not affect the execution because no matter what api version is used, IB only sees the text transmitted. the error message says "the correct format should be blah blah..." which I am already in correct format.
     
    #10     Dec 5, 2019