title: Sample call to Interactive Brokers for a currency pair?
body: <p>I'm attempting to run Interactive Broker's included code sample.</p>
  
  <p><a href="http://www.interactivebrokers.com/download/JavaAPIGettingStarted.pdf" rel="nofollow noreferrer">http://www.interactivebrokers.com/download/JavaAPIGettingStarted.pdf</a></p>
  
  <p>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??</p>
  
  <pre><code> public synchronized void reqMktData(int tickerId, Contract contract, String genericTickList, boolean snapshot)
  </code></pre>
  
  <p>I cannot find the valid inputs that will correct the errors I'm seeing from the client.</p>
  
  <p><strong>Parameters needed</strong></p>
  
  <p>List of values inside Contract class are here : <a href="https://www.interactivebrokers.com/en/software/api/apiguide/java/contract.htm" rel="nofollow noreferrer">https://www.interactivebrokers.com/en/software/api/apiguide/java/contract.htm</a> </p>
  
  <p>STK == "stock" , should this be set to CASH for Forex data?</p>
  
  <p>IDEALPRO == the exchange according to this page : <a href="http://ibkb.interactivebrokers.com/tag/fx-trader" rel="nofollow noreferrer">http://ibkb.interactivebrokers.com/tag/fx-trader</a></p>
  
  <p>USD.JPY = SYMBOL (this here is a guess on my part)</p>
  
  <p>USD == "underlying currency" , here I am guessing again.. seems the currency needs to match the transaction currency.</p>
  
  <p><em>the pair in the format Transaction Currency.Settlement Currency (example: EUR.USD).  The Underlying column will display only the Transaction Currency.</em> </p>
  
  <p><img src="https://i.stack.imgur.com/R8B79.png" alt="dialog box of inputs"></p>