Question

I'm attempting to run Interactive Broker's included code sample.

http://www.interactivebrokers.com/download/JavaAPIGettingStarted.pdf

On about page 42 it details how to pull market data feeds. My question is, has anyone successfully put in the parameters needed to pull currency pair data??

 public synchronized void reqMktData(int tickerId, Contract contract, String genericTickList, boolean snapshot)

I cannot find the valid inputs that will correct the errors I'm seeing from the client.

Parameters needed

List of values inside Contract class are here : https://www.interactivebrokers.com/en/software/api/apiguide/java/contract.htm

STK == "stock" , should this be set to CASH for Forex data?

IDEALPRO == the exchange according to this page : http://ibkb.interactivebrokers.com/tag/fx-trader

USD.JPY = SYMBOL (this here is a guess on my part)

USD == "underlying currency" , here I am guessing again.. seems the currency needs to match the transaction currency.

the pair in the format Transaction Currency.Settlement Currency (example: EUR.USD). The Underlying column will display only the Transaction Currency.

dialog box of inputs

Was it helpful?

Solution

After scouring IB's forum I have found something that works for FX data feeds. You need to put the TransactionCurrency as the Symbol, and the SettlementCurrency as the underlying in the dialog box.

correct dialog box

Here is the resulting data feed

resulting data feed

OTHER TIPS

As I can remember, I used: CASH, IDEALPRO, EUR.USD, USD

You can see all parameters example in the TradeStation client. Just find the needed instrument and look at it's properties.

And remember that not all parameters must be necessarily filled

At the worst, show the error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top