Retrieves currency exchange rate data for given pair(s). 
        Accepts both where pair='eurusd, gbpusd' and where pair in ('eurusd', 'gpbusd, usdaud')
498834
def get_xchange_rate(self, pairs, items=None):
        
        response = self.select('yahoo.finance.xchange', items).where(['pair', 'in', pairs])
        return response
355826
def get_previous_price_list(self, currency, start_date, end_date):
        
        start = start_date.strftime('%Y-%m-%d')
        end = end_date.strftime('%Y-%m-%d')
        url = (
            'https://api.coindesk.com/v1/bpi/historical/close.json'
            '?start={}&end={}&currency={}'.format(
                   start, end, currency
               )
        )
        response = requests.get(url)
        if response.status_code == 200:
            data = self._decode_rates(response)
            price_dict = data.get('bpi', {})
            return price_dict
        return {}
1255746
function selectCurrency($val = '', $subset = 'EC') {
    $ec_currencies = array('CAD', 'EUR', 'GBP', 'JPY', 'USD', 'AUD', 'CHF', 'CZK', 'DKK', 'HKD', 'HUF', 'NOK', 'NZD', 'PLN', 'SEK', 'SGD', 'THB', 'MXN', 'ILS', 'PHP', 'TWD', 'BRL', 'MYR', 'TKD');
    $dp_currencies = array('CAD', 'EUR', 'GBP', 'JPY', 'USD', 'AUD');
    $paypalSupportedCurrencies = ($subset == 'EC') ? $ec_currencies : $dp_currencies;

    // if using Pro 2.0 (UK), only the 6 currencies are supported.
    $paypalSupportedCurrencies = (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'Payflow-UK') ? $dp_currencies : $paypalSupportedCurrencies;

    $my_currency = substr(MODULE_PAYMENT_PAYPALWPP_CURRENCY, 5);
    if (MODULE_PAYMENT_PAYPALWPP_CURRENCY == 'Selected Currency') {
      $my_currency = ($val == '') ? $_SESSION['currency'] : $val;
    }

    if (!in_array($my_currency, $paypalSupportedCurrencies)) {
      $my_currency = (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'Payflow-UK') ? 'GBP' : 'USD';
    }
    return $my_currency;
  }
1072616
public static CurrencyUnit getCurrency(CurrencyQuery query) {
        return Optional.ofNullable(MONETARY_CURRENCIES_SINGLETON_SPI()).orElseThrow(
                () -> new MonetaryException("No MonetaryCurrenciesSingletonSpi loaded, check your system setup."))
                .getCurrency(query);
    }
175524
private void parseCurrencyData(LocaleID id, String code, JsonObject root) {
    NumberData data = getNumberData(id);
    data.currencySymbols = new LinkedHashMap<>();
    data.narrowCurrencySymbols = new LinkedHashMap<>();
    data.currencyDisplayName = new LinkedHashMap<>();
    data.currencyDisplayNames = new LinkedHashMap<>();
    JsonObject currencies = resolve(root, "numbers", "currencies");
    for (String currencyCode : objectKeys(currencies)) {
      JsonObject node = resolve(currencies, currencyCode);

      data.currencyDisplayName.put(currencyCode, string(node, "displayName"));
      String symbol = string(node, "symbol");
      String narrowSymbol = string(node, "symbol-alt-narrow");
      narrowSymbol = narrowSymbol.equals("") ? symbol : narrowSymbol;
      data.currencySymbols.put(currencyCode, symbol);
      data.narrowCurrencySymbols.put(currencyCode, narrowSymbol);

      Map<String, String> displayNames = new LinkedHashMap<>();
      for (String key : objectKeys(node)) {
        if (key.startsWith("displayName-count")) {
          displayNames.put(key, node.get(key).getAsString());
        }
      }
      data.currencyDisplayNames.put(currencyCode, displayNames);
    }
  }
410264
function getCurrencySettings(locale, localeData) {
  const currencyInfo = localeData.main(`numbers/currencies`);
  let currentCurrency = '';

  // find the currency currently used in this country
  const currencies =
    localeData.get(`supplemental/currencyData/region/${localeData.attributes.territory}`) ||
    localeData.get(`supplemental/currencyData/region/${localeData.attributes.language.toUpperCase()}`);

  if (currencies) {
    currencies.some(currency => {
      const keys = Object.keys(currency);
      return keys.some(key => {
        if (currency[key]._from && !currency[key]._to) {
          return currentCurrency = key;
        }
      });
    });

    if (!currentCurrency) {
      throw new Error(`Unable to find currency for locale "${locale}"`);
    }
  }

  let currencySettings = [undefined, undefined];

  if (currentCurrency) {
    currencySettings = [currencyInfo[currentCurrency].symbol, currencyInfo[currentCurrency].displayName];
  }

  return currencySettings;
}
783682
def query_rates(self, pairs=[]):
        '''  '''
        # If no pairs, TrueFx will use the ones given the last time
        payload = {'id': self._session}
        if pairs:
            payload['c'] = _clean_pairs(pairs)
        response = requests.get(self._api_url, params=payload)

        mapped_data = _fx_mapping(response.content.split('\n')[:-2])
        return Series(mapped_data) if len(mapped_data) == 1 \
            else DataFrame(mapped_data)
733140
def get_base(self, option):
        
        if option:
            if option.isupper():
                if len(option) > 3:
                    return getattr(settings, option), True
                elif len(option) == 3:
                    return option, True
            raise ImproperlyConfigured("Invalid currency code found: %s" % option)
        for attr in ('CURRENCIES_BASE', 'SHOP_DEFAULT_CURRENCY'):
            try:
                return getattr(settings, attr), True
            except AttributeError:
                continue
        return 'USD', False
695728
def currencies(self):
        """"""
        return [m.currency.code for m in self.monies() if m.amount]
1170796
function Money(knwlInstance) {
    var isoTypes =
        [
            {
                iso: 'EUR',
                match: '^euro?s?$'
            }
        ,
            {
                iso: 'USD',
                match: '^usd?s?$'
            }
        ]


    var formats = [
        '^(?!0\.00)[0-9]{1,3}(,[0-9]{3})*(\.[0-9][0-9])?$', // EUR,USD
        '^(?!0,00)[0-9]{1,3}(\.[0-9]{3})*(,[0-9][0-9])?$' // inverted EUR, USD
    ]



    this.calls = function() {
        var words = knwlInstance.words.get('linkWords');              // get the String as an array of linked Words
        var results = [];                                         // prepare results
        var typeFound = {
            index: null
        }
        var quantityFound = {
            index: null
        }

        words.forEach( function(word) {                           // check each word



            formats.some( function(format){
                 var regEx = new RegExp(format);
                 var regExRes = regEx.exec(word);
                 if( regExRes != null) {
                     quantityFound.index = 0;
                     quantityFound.quantity = regExRes[0];
                     return true;
                 }
            });
            isoTypes.some( function(type){
                 regEx = new RegExp(type.match);
                 var regExRes = regEx.exec(word);
                 typeFound.value = type.iso;
                 if( regExRes != null) {
                     typeFound.index = 0;
                     return true;
                 }
            });


            if (quantityFound.index === 0 ){
                if (typeFound.index === 1){
                    results.push(
                        {type: typeFound.value,
                        quantity: quantityFound.quantity,
                        value: typeFound.value + ' ' + quantityFound.quantity
                        });
                }
            }

            if (quantityFound.index === 1 ){
                if (typeFound.index === 0){
                    results.push(
                        {type: typeFound.value,
                        quantity: quantityFound.quantity,
                        value: typeFound.value + ' ' + quantityFound.quantity
                        });
                }
            }


            quantityFound.index++;
            typeFound.index++;
        });

        return results;
    };
}
21813
private CurrencyData getCurrencyData(String code) {
    CurrencyData data = currencies.get(code);
    if (data == null) {
      data = new CurrencyData();
      data.setCode(code);
      currencies.put(code, data);
    }
    return data;
  }
398197
def ask(currency_code, price, amount, limit = nil, counter_currency_code = "jpy")
            return trade(currency_code, price, amount, "ask", limit, counter_currency_code)
        end
616182
def get_currencys(self, site='Pro', _async=False):
        
        assert site in ['Pro', 'HADAX']
        params = {}
        path = f'/v1{"/" if site == "Pro" else "/hadax/"}common/currencys'
        return api_key_get(params, path, _async=_async)
1332955
def get_block_currencies():
    
    return ['btc', 'ltc', 'ppc', 'dash', 'doge', 'ric']
    currencies = []
    for currency, data in crypto_data.items():
        if type(data) is list:
            continue
        block_services = data.get('services', {}).get('get_block', [])
        if len(block_services) > 0 and not all([x.get_block.by_latest for x in block_services]):

            currencies.append(currency)

    return currencies
1325634
def get_available_currencies():
    """"""
    r = requests.get(API_CURRENCIES)
    if r.status_code != requests.codes.ok:
        raise CryptonatorException(
            ("An error occurred while getting available currencies "
             "({} from Cryptonator).").format(r.status_code)
        )

    return [currency['code'] for currency in r.json()['rows']]
522643
public CurrencyUnit getCurrency(CurrencyQuery query) {
        Set<CurrencyUnit> currencies = getCurrencies(query);
        if (currencies.isEmpty()) {
            return null;
        }
        if (currencies.size() == 1) {
            return currencies.iterator().next();
        }
        throw new MonetaryException("Ambiguous request for CurrencyUnit: " + query + ", found: " + currencies);
    }
626852
@Override
  public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException {

    String marketName = DSXAdapters.currencyPairToMarketName(currencyPair);

    int numberOfItems = -1;
    try {
      if (args != null) {
        numberOfItems =
            (Integer)
                args[0]; // can this really be args[0] if we are also using args[0] as a string//
        // below??
      }
    } catch (ArrayIndexOutOfBoundsException e) {
      // ignore, can happen if no argument given.
    }
    DSXTrade[] dsxTrades;

    String accountType = null;
    try {
      if (args != null) {
        accountType = (String) args[1];
      }
    } catch (ArrayIndexOutOfBoundsException e) {
      // ignore, can happen if no argument given.
    }

    if (numberOfItems == -1) {
      dsxTrades = getDSXTrades(marketName, FULL_SIZE, accountType).getTrades(marketName);
    } else {
      dsxTrades = getDSXTrades(marketName, numberOfItems, accountType).getTrades(marketName);
    }
    return DSXAdapters.adaptTrades(dsxTrades, currencyPair);
  }