Skip to content
Prev 10555 / 15274 Next

IBrokers : quotes from futures combo and reqIds

reqMktData() when given a BAG contract returns the spreads on the bid and the ask. It also returns some size information, which I assume is the spread on the sizes when the spread on the bid/ask changes, although I am not sure about this aspect.

Attached is a short working example in Java based on the "ExampleBase" series of examples included in the IB API source code. ?Just replace the hard-coded IP address to one wihch works for you. ?This example creates an ES calendar spread, and then calls reqMktData() on the BAG contract; the rest of the program simply prints the bid/ask spread to stdout.

sm


--
Stergios Marinopoulos


Thanks,


Olivier
reqMkData() is requesting the following generic tick types by default: 
"100,101,104,106,165,221,225,236", (and this is documented in IBroker's reqMktData() 
DOH!!!) where
165: Miscellaneous Stats 221: Mark Price225: Auction values236: Shortable
sense for this BAG contract is the spreads between bid, ask, or last. So when you call 
reqMktData() set tickGenerics="". But when I try it, however, nothing seems to be 
happen.
to be used in order to receive the (Java equivalent) tickPrice() events. Maybe someone 
with experience with those arguments can chime in.
writing data to a file as expected, but then the error below is produced and quote data 
is no longer written to the file.
examples if interested.)
returned object as the contract to IBrokers's equivalent of reqMktData() and data should 
start streaming.
Une messagerie gratuite, garantie ? vie et des services en plus, ?a vous tente ?
Je cr?e ma bo?te mail www.laposte.net

_______________________________________________
R-SIG-Finance at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go. 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Example9.java
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20120729/a38fcb29/attachment.pl>