docstr: Foreign exchange currency pair.
  
  Args:
      pair: Shortcut for specifying symbol and currency, like 'EURUSD'.
      exchange: Destination exchange.
      symbol: Base currency.
      currency: Quote currency.
docstr_tok: ["Foreign","exchange","currency","pair",".","Args",":","pair",":","Shortcut","for","specifying","symbol","and","currency",",","like","'EURUSD","'",".","exchange",":","Destination","exchange",".","symbol",":","Base","currency",".","currency",":","Quote","currency","."]
code: def __init__(
      self,
      pair: str = "",
      exchange: str = "IDEALPRO",
      symbol: str = "",
      currency: str = "",
      **kwargs,
  ):
      """
      Foreign exchange currency pair.
  
      Args:
          pair: Shortcut for specifying symbol and currency, like 'EURUSD'.
          exchange: Destination exchange.
          symbol: Base currency.
          currency: Quote currency.
      """
      if pair:
          assert len(pair) == 6
          symbol = symbol or pair[:3]
          currency = currency or pair[3:]
      Contract.__init__(
          self,
          "CASH",
          symbol=symbol,
          exchange=exchange,
          currency=currency,
          **kwargs,
      )
  
imports: import datetime
  from dataclasses import dataclass, field
  from typing import List, NamedTuple, Optional
  import ib_insync.util
label_desc: Use image node_id 1 to create a new Forex object from inherited base classes: Contract with example: obj = Forex(pair, exchange, symbol, currency)