IB TWS DDE API help needed

Discussion in 'Automated Trading' started by TraDaToR, Oct 5, 2016.

  1. TraDaToR

    TraDaToR

    Hello,

    I used to submit orders everyday with the DDE API, and today after 2 years, I can't even send an order to my sim account...:confused:

    So apparently the sample spreadsheet has changed. Here is the kind of order command you send:

    =SMyname|ord!'id6?place?BUY_100_GE_STK_SMART_USD_MKT_~_DAY_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_NYSE' .

    Do you see something wrong?

    I can get market data in excel, so the problem isn't with my sim account. I have also reset the id number. Do you see some kind of new properties that would disable API order submission?

    Can someone provide a working order command like the one above?

    Thanks a lot in advance.
     
    Last edited: Oct 5, 2016
  2. TraDaToR

    TraDaToR

    Here is what used to work on futures. It doesn't anymore:

    =myname|ord!'id311?place?BUY_1_YM_FUT_201612_ECBOT_USD_LMT_18198_{}_DAY_{}_{\}_O_0_HelloWorld_1_{}_0_0_0_0_0_0'

    I think there is a new feature on TWS blocking my orders...
     
  3. JackRab

    JackRab

    Have you accidentally ticked the box "Read-Only API" in API settings of TWS?

    I used to have issues with the DDE API whenever a new version came along... maybe download the latest API sheets etc and copy paste any new macro's you made from old file to new?
     
    TraDaToR likes this.
  4. TraDaToR

    TraDaToR

    I get errors number 321 "server error when validating an API client request" and 337 " The date, time or timezone are invalid"...
     
  5. TraDaToR

    TraDaToR

    OK. After 4 hours and going to bed at 2am yesterday, I was finally able to place an order. I reinstalled the API and surprise , it worked. What is weird is that it is the first thing I did yesterday when I faced the problem...Whatever...

    Here I have a new problem. I wanted to place an OPG TIF order and entered extended attributes, the order was sent perfectly by their spreadsheet but here is the " CTRL" field I obtained:

    =Smyname|ord!'id1649393492?place?GOOG_STK_SMART_USD_ISLAND/

    How was TWS able to send my order? There is no LMT price, no action( BUY or SELL ), no TIF... I was used to copy this field to create my own spreadsheet, now I don't really understand how it works...Does someone have a sample working stock order with order attributes? Or explain how I am supposed to do it now...Thanks a lot in advance.
     
  6. TraDaToR

    TraDaToR

    Thanks for the read only tip, Jack. I didn't know it was there.;)
     
    JackRab likes this.
  7. d08

    d08

    Move to something more efficient and reliable like python (IbPy). Both the DDE and ActiveX methods break regularly and are littered with problems.
     
    Deuteronomy_24_7 and TraDaToR like this.