Tabnine Logo
NewOrderSingle.getClOrdID
Code IndexAdd Tabnine to your IDE (free)

How to use
getClOrdID
method
in
quickfix.fix50.NewOrderSingle

Best Java code snippets using quickfix.fix50.NewOrderSingle.getClOrdID (Showing top 1 results out of 315)

origin: org.quickfixj/quickfixj-examples-executor

public void onMessage(quickfix.fix50.NewOrderSingle order, SessionID sessionID)
    throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue {
  try {
    validateOrder(order);
    OrderQty orderQty = order.getOrderQty();
    Price price = getPrice(order);
    quickfix.fix50.ExecutionReport accept = new quickfix.fix50.ExecutionReport(
        genOrderID(), genExecID(), new ExecType(ExecType.FILL), new OrdStatus(
            OrdStatus.NEW), order.getSide(), new LeavesQty(order.getOrderQty()
            .getValue()), new CumQty(0));
    accept.set(order.getClOrdID());
    accept.set(order.getSymbol());
    sendMessage(sessionID, accept);
    if (isOrderExecutable(order, price)) {
      quickfix.fix50.ExecutionReport executionReport = new quickfix.fix50.ExecutionReport(
          genOrderID(), genExecID(), new ExecType(ExecType.FILL), new OrdStatus(
              OrdStatus.FILLED), order.getSide(), new LeavesQty(0), new CumQty(
              orderQty.getValue()));
      executionReport.set(order.getClOrdID());
      executionReport.set(order.getSymbol());
      executionReport.set(orderQty);
      executionReport.set(new LastQty(orderQty.getValue()));
      executionReport.set(new LastPx(price.getValue()));
      executionReport.set(new AvgPx(price.getValue()));
      sendMessage(sessionID, executionReport);
    }
  } catch (RuntimeException e) {
    LogUtil.logThrowable(sessionID, e.getMessage(), e);
  }
}
quickfix.fix50NewOrderSinglegetClOrdID

Popular methods of NewOrderSingle

  • <init>
  • get
  • getComponent
  • getField
  • getHeader
  • isSetField
  • setComponent
  • setField
  • getOrderQty
  • getSide
  • getSymbol
  • set
  • getSymbol,
  • set

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now