Examples of DDF_Exchange


Examples of com.barchart.feed.ddf.symbol.enums.DDF_Exchange

   
    final Time expire = xmlTimeDecode(tag, SYMBOL_EXPIRE, XML_PASS);

    // month code for exp of futures contract
    final DDF_TimeZone zone = DDF_TimeZone.fromCode(zoneCode);
    final DDF_Exchange exchange = DDF_Exchange.fromCode(exchCode);
    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(baseCode);
    final long priceStepMantissa = xmlDecimalDecode(frac, tag,
        PRICE_TICK_INCREMENT, XML_STOP);
    final String pricePointString = xmlStringDecode(tag, PRICE_POINT_VALUE,
        XML_PASS);
View Full Code Here

Examples of com.barchart.feed.ddf.symbol.enums.DDF_Exchange

    final Time expire = xmlTimeDecode(ats, SYMBOL_EXPIRE, XML_PASS);

    //

    final DDF_TimeZone zone = DDF_TimeZone.fromCode(zoneCode);
    final DDF_Exchange exchange = DDF_Exchange.fromCode(exchCode);
    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(baseCode);
    final long priceStepMantissa = xmlDecimalDecode(frac, ats,
        PRICE_TICK_INCREMENT, XML_STOP);
    final String pricePointString = xmlStringDecode(ats, PRICE_POINT_VALUE,
        XML_PASS);
View Full Code Here

Examples of com.barchart.feed.ddf.symbol.enums.DDF_Exchange

   
    /* price currency */
    builder.setCurrencyCode("USD");
   
    /* market originating exchange identifier */
    final DDF_Exchange exchange = DDF_Exchange.fromCode(
        xmlByteDecode(ats, EXCHANGE_DDF, XML_PASS));
    builder.setExchangeCode(exchange.name());
   
    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(
        xmlByteDecode(ats, BASE_CODE_DDF, XML_STOP));
   
    /* price step / increment size / tick size */
 
View Full Code Here

Examples of com.barchart.feed.ddf.symbol.enums.DDF_Exchange

    final String ddf_expire_year = xmlStringDecode(ats,
        SYMBOL_DDF_EXPIRE_YEAR, XML_PASS);

    final DDF_TimeZone zone = DDF_TimeZone.fromCode(zoneCode);

    final DDF_Exchange exchange = DDF_Exchange.fromCode(exchCode);

    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(baseCode);

    final long priceStepMantissa = xmlDecimalDecode(frac, ats,
        PRICE_TICK_INCREMENT, XML_STOP);

    final String pricePointString = xmlStringDecode(ats, PRICE_POINT_VALUE,
        XML_PASS);

    PriceValue pricePoint = ValueBuilder.newPrice(0);

    if (pricePointString != null) {

      try {
        pricePoint = ValueBuilder.newPrice(Double
            .valueOf(pricePointString));
      } catch (Exception e) {
      }

    }

    final PriceValue priceStep = newPrice(priceStepMantissa,
        frac.decimalExponent);

    /* GENERIC */

    set(InstrumentField.ID, newText(symbolUni));
    set(InstrumentField.SYMBOL, newText(symbolUni));
    set(InstrumentField.DESCRIPTION, newText(symolComment));
    set(InstrumentField.TYPE, CodeCFI.fromCode(codeCFI));
    set(InstrumentField.EXCHANGE_ID, newText(exchange.name()));
    set(InstrumentField.FRACTION, frac.fraction);
    set(InstrumentField.PRICE_STEP, priceStep);
    set(InstrumentField.PRICE_POINT, pricePoint);

    // TODO
View Full Code Here

Examples of com.barchart.feed.ddf.symbol.enums.DDF_Exchange

    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(baseCode);
    setFraction(frac);

    // FIXME, MDEX ddfexchange code missing
    final byte exchCode = xmlByteDecode(tag, EXCHANGE_DDF, XML_PASS);
    final DDF_Exchange exch = DDF_Exchange.fromCode(exchCode);
    setExchange(exch);

    final byte modeCode = xmlByteDecode(tag, QUOTE_MODE, XML_PASS);
    final DDF_QuoteMode mode = DDF_QuoteMode.fromCode(modeCode);
    setMode(mode);
View Full Code Here

Examples of com.barchart.feed.ddf.symbol.enums.DDF_Exchange

    xmlAsciiEncode(exchangeExtra, tag, EXCHANGE_EXTRA);

    final DDF_Fraction frac = getFraction();
    xmlByteEncode(frac.baseCode, tag, FRACTION_DDF);

    final DDF_Exchange exch = getExchange();
    xmlByteEncode(exch.code, tag, EXCHANGE_DDF);

    final DDF_QuoteMode mode = getMode();
    if (mode.isKnown()) {
      xmlByteEncode(mode.code, tag, QUOTE_MODE);
View Full Code Here

Examples of com.barchart.feed.ddf.symbol.enums.DDF_Exchange

    final String ddf_expire_year = xmlStringDecode(tag,
        SYMBOL_DDF_EXPIRE_YEAR, XML_PASS);

    final DDF_TimeZone zone = DDF_TimeZone.fromCode(zoneCode);

    final DDF_Exchange exchange = DDF_Exchange.fromCode(exchCode);

    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(baseCode);

    final long priceStepMantissa = xmlDecimalDecode(frac, tag,
        PRICE_TICK_INCREMENT, XML_STOP);

    final String pricePointString = xmlStringDecode(tag, PRICE_POINT_VALUE,
        XML_PASS);

    PriceValue pricePoint = ValueBuilder.newPrice(0);

    if (pricePointString != null) {

      try {
        pricePoint = ValueBuilder.newPrice(Double
            .valueOf(pricePointString));
      } catch (Exception e) {
      }

    }

    final PriceValue priceStep = newPrice(priceStepMantissa,
        frac.decimalExponent);

    /* GENERIC */

    set(InstrumentField.ID, newText(symbolUni));
    set(InstrumentField.SYMBOL, newText(symbolUni));
    set(InstrumentField.DESCRIPTION, newText(symolComment));
    set(InstrumentField.TYPE, CodeCFI.fromCode(codeCFI));
    set(InstrumentField.EXCHANGE_ID, newText(exchange.name()));
    set(InstrumentField.FRACTION, frac.fraction);
    set(InstrumentField.PRICE_STEP, priceStep);
    set(InstrumentField.PRICE_POINT, pricePoint);

    // TODO
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.