¿ªÔÆÌåÓý

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

Re: orderReference missing in flex reports

 

If you put the "level of detail" at "executions" in the "trades" part, and add "order reference", you should be able to find "Order references" you need in the Flex reports.


Happy New Year for all API users!


orderReference missing in flex reports

James Smith
 

I set order reference through the API. It is visible in the JClient in
Portfolio in Order Ref. column. It is also visible in Trade Log in the
column Order Ref. But it is missing in Flex Reports. The column Order
Reference is empty for Level of Detail set to Orders, or filled with
"--" for Level of Detail set to Execution. How to overcome this?


Re: Looking for an EXCEL DDE API Interactive Brokers GURU

 

...and I know there are others, but these guys really have their game down, they're very reasonably priced, AND, if options are your thing,? they give you some wonderful 3d graphics, too.....

?


Re: Looking for an EXCEL DDE API Interactive Brokers GURU

 
Edited

"to build a simple Excel spreadsheet that pulls live data from IB"...

I built a TWS quote monitor page utilizing the fields I wished to use in an OpenOffice Calc spreadsheet, and periodically export that data to a .CSV file, for copy/paste into OO_Calc. My "project" -- much as you have described -- is to develop a Java application to print an .XML file in real time, to which OO_Calc can be (easily!!) attached. (I got some very compassionate offers of assistance, but what I thought was a "time-out" to put a little more polish on the spreadsheet ended up to be a real scrub-up/"next level" sort of campaign, with which I'm *only now,* just about, done....!!! Woot! "Phew!")

You could do about the same thing (spreadsheet-with-RTdata-front-end), by running your .CSV-eating spreadsheet through this guy's

?

or even his


?

He gets good reviews (for software and for service) on the IB website and on EliteTrader.com, and (I think) is a regular TWSAPI reader, so he may have responded to you offlist.

But first, I would go with the "Hey! Hit IB's DDE webinar, first!" advice, if you hadn't already. If you *wish* to deal with DDE, it really is a pretty trivial matter for Excel. FWIW, though, I would *not* go with DDE, as its use was limited, and therefore its lifespan will be, too. Not where I'd want to be, when the lights go out.


Re: Looking for an EXCEL DDE API Interactive Brokers GURU

 

Go to the Education portion of the main IB website and download their 1-hour seminar on using the Excel DDE API.?It's free, costs one hour of your life, and has a lot of info for starting out.?It's under Education > Previously Recorded > API tab.?Following link *may* work.?



If you want more than that, feel free to drop me a line.?

Happy New Year, everyone!

--Joe


Re: EClientSocket needs EReaderSignal (java)

Russell Brown
 

You need to implement the eclientsocket interface to use each function of the socket.

example:

class myclient implements eclientsocket

... declare each interface method following

--------------------------------------------

On Tue, 12/29/15, andreasschober <no_reply@...> wrote:

Subject: [TWS API] Re: EClientSocket needs EReaderSignal (java)
To: TWSAPI@...
Date: Tuesday, December 29, 2015, 2:49 PM

Thanks for your
suggestion, there isnt a specific reason other than i wanted
to understand what this EReaderSignal is for!

Much appreciated your help
Andy


Re: EClientSocket needs EReaderSignal (java)

rholowczak
 

What is the rest of the error message (should be a full stack trace)?
What client are you working with TWS or IB Gateway? What versions of those are being used? Are you connected to IB under your own account or edemo? ?Are you certain you are building against the version 9.71 API?
What JDK are you using? What OS are you using? What contract specification did you use?

There are dozens of reasons why an application like this will not run so the more information you supply the better chance anyone has of helping you.

I just uploaded a second version of the full source code that works with the IB API 9.72 (see the (new) last page of my Tutorial for the full code: Programming Interactive Brokers Java API in a Console Application - Real Time Data). You'll need JDK 1.8, IB API 9.72. ? This is very quick&dirty implementation and should not be used for any real work.

The major difference between 9.71 and 9.72 is how the EReader is implemented. In 9.71 all of the functionality of the EReader was included in the "client". ?In 9.72 the work of the client (all of the methods to connect and kick off requests) is separated form the EReader (that reads incoming messages).




Re: EClientSocket needs EReaderSignal (java)

andreasschober
 

...actually just having tried your code with (Realtime) with v9.71 i get an EOF exception.

What happens after you send client.connect()..
shouldnt there be a routine for handling the incoming data?

Rgds

java.io.EOFException


Re: EClientSocket needs EReaderSignal (java)

 

I would agree with the advice to avoid the 9.72 API at the moment.



I¡¯m involved in contributing to the API development effort on GitHub, and I¡¯m hoping to persuade IB to change this rather odd design, that forces the client to create objects that are only of internal relevance to the API. I haven¡¯t yet had any feedback on my proposal, which I submitted quite some time ago, so I¡¯m not optimistic that they¡¯ll listen to my concerns, but I¡¯m still hoping they¡¯ll appreciate the benefits of it.



To answer your question, the EReaderSignal is of no significance at all to the API client: it is only used internally to the API for synchronising access to a queue of messages. There is absolutely no reason I can see for the client to have to create this object.



Richard



From: TWSAPI@... [mailto:TWSAPI@...] On Behalf Of andreasschober
Sent: 29 December 2015 19:49
To: TWSAPI@...
Subject: [TWS API] Re: EClientSocket needs EReaderSignal (java)





Thanks for your suggestion, there isnt a specific reason other than i wanted to understand what this EReaderSignal is for!



Much appreciated your help

Andy













[Non-text portions of this message have been removed]


Re: EClientSocket needs EReaderSignal (java)

andreasschober
 

Thanks for your suggestion, there isnt a specific reason other than i wanted to understand what this EReaderSignal is for!

Much appreciated your help
Andy





Re: EClientSocket needs EReaderSignal (java)

Stuart Brisgel
 

¿ªÔÆÌåÓý

Will pay for that ... Just don't want to program it :)?

Sent from my iPhone

On Dec 29, 2015, at 12:48 PM, rholowczak <no_reply@...> wrote:

?

Is there a specific reason you want/need to use the 9.72 API (which appears to me to still be a Beta version)?

If you are just starting out trying to learn how the API works, you might want to stick with the more stable 9.71.


Re: EClientSocket needs EReaderSignal (java)

rholowczak
 

Is there a specific reason you want/need to use the 9.72 API (which appears to me to still be a Beta version)?
If you are just starting out trying to learn how the API works, you might want to stick with the more stable 9.71.


Re: EClientSocket needs EReaderSignal (java)

Stuart Brisgel
 

¿ªÔÆÌåÓý

Would love to pay someone to make it :)?

Sent from my iPhone

On Dec 29, 2015, at 12:19 PM, rholowczak <no_reply@...> wrote:

?

I'll be updating my tutorials over the winter break and will use the latest TWS API (the tutorials were developed using version 9.71)?


Re: EClientSocket needs EReaderSignal (java)

rholowczak
 

I'll be updating my tutorials over the winter break and will use the latest TWS API (the tutorials were developed using version 9.71)?


Looking for an EXCEL DDE API Interactive Brokers GURU

 

Hello Yall



End of the year which means get all those projects done that you have always wanted.? This is more of the same as we are looking for someone to build a simple excel sheet that pulls live data from IB.? Any recommendations or people interested?


Thanks



EClientSocket needs EReaderSignal (java)

andreasschober
 

Hi Im trying to get a simple code to work but dont understand how to implement EClientSocket,


which needes EWraper and also EReaderSignal as input.


I looked at other codes and EClientsocket is alwas calledwith "this"


.. EClientSocket client = new EClientSocket(this) ....




Have a look at this code from Prof H.




It doesnt seem to work either with the new 9.72 version of TWS.



Thanks

for your input


Andy




Re: TWS 50/sec limit

 

Ok everyone, we have beat that subject into the ground and?there is a solution. I however, am not a skilled developer and need help with the code. Can all interested parties jump back over to my original subject, "Building an options trading algo using TWS. Need some help!?"? In that topic,?I have detailed the trade entry portion. Is someone interested in developing the entire system for a fee?


Re: Stale quantity in open order event

 

Well, although there may be something specific to this situation that can be improved, I expect that with asynchronous communication buffered in both directions (which is usually more performant than a synchronized API) and possibly multiple servers, to some degree you may always receive status messages that were already en route before you changed the order, for example.


Re: TWS 50/sec limit

Nick
 

It is good you point this out. I should have been clear that my post was directed to the OP's claim that he could not download an option chain due to a fault in TWS.

Regarding "Disconnects are caused by an error in your program." - I suppose we could debate the meaning of "error" but I have no desire for that. I was trying to say that if he was getting a disconnect then he should be looking at his program for the cause, not TWS.

Regarding "TWS does not disconnect for pacing violations." - This was directed at his assertion that a large option chain reply was causing a pacing violation and that in turn was causing the disconnection. I was trying to say that pacing violations do not apply to replies sent by TWS. Although there are some pacing violations that don't cause disconnects (historical requests return a pacing violation error message) I should not have made an unqualified declaration.

So, thanks for being thorough and making things clear for those who may read these posts in the future. I will put effort into making posts that stand on their own.

On 12/25/2015 2:20 AM, Dmitry Shevkoplyas shevkoplyas@... [TWSAPI] wrote:
@Nick news1000,

I'm not sure how important it is, but the above exercise with java demo app
also shows that it is actually TWS who initiate the disconnect when client
brakes some rules (number of realtime subscribed tickers or exceed request
rate limits).

So then statement "Disconnects are caused by an error in your program."
seems to be not 100% right since there's no language/functionality scope
error - I mean the program itself is clean and does not crash nor does it
any wrong calls, but rather logical error (pacing) related to timing can
occur due to some reason ant then disconnect will be caused by TWS.

And then 2nd statement "TWS does not disconnect for pacing violations." is
not true. What I saw in described java demo app was:

*case-1: requested too many contracts simultaneously*
TWS does disconnect client when it brakes a limit (number of simultaneously
subscribed tickers).
TWS also brings nice modal popup alert with explanation as of why you've
been kicked out :)

*case-2: sent too many requests/second*
Then to check if similar disconnect (by TWS) happens in case of request
pacing I modified the demo app to send some bulk (about 950:)
reqContractDetails and saw similar behaviour: client kicked out by TWS
after 3 error/notes:


Re: Stale quantity in open order event

 

The last bad openOrder/status (450 ms since quan change request) is immediately followed by a good one with a filled status.? While manual changes are very rare, I do not want to start guessing which openOrder/status events should be ignored.? I have opened a ticket with IB.




From: "tron001@... [TWSAPI]"
To: TWSAPI@...
Sent: Saturday, December 26, 2015 11:22 PM
Subject: [TWS API] Re: Stale quantity in open order event

?
Frank, if you need to deal with unexpected arbitrary manual changes, your situation may be more complicated. However your example mentioned times of 45ms and 60ms, which are not really likely to be manual changes, unless you are really fast at typing. ;-)

In terms of your example, I was expecting "you" to know the "new" quantity, which would of course allow you?
sort out any openOrder and orderStatus messages which might refer to a different quantity.

By the way, was the message in step 6 an orderStatus message with fillled+remaining = old quantity, or was remaining already zero, yet the status not given as 'filled"? That would be strange.