Пример #1
0
 void onTradeReport (
     MamdaSubscription*      subscription,
     MamdaTradeListener&     listener,
     const MamaMsg&          msg,
     const MamdaTradeReport& event,
     const MamdaTradeRecap&  recap)
 {
     cout << "Trade ("     << subscription->getSymbol ()
          << ":"           << recap.getTradeCount ()
          << "):  "        << event.getTradeVolume ()
          << " @ "         << event.getTradePrice().getAsString()
          << " (seq#: "    << event.getEventSeqNum ()
          << "; time: "    << event.getEventTime().getAsString()
          << "; acttime: " << event.getActivityTime().getAsString()
          << "; partId: "  << event.getTradePartId ()
          << "; qual: "    << event.getTradeQual ()
          << "; cond: "    << event.getTradeQualNative ()
          << "; irreg: "   << event.getIsIrregular () << ")\n"
          << flush;
 }
 void onTradeReport (
     MamdaSubscription*      subscription,
     MamdaTradeListener&     listener,
     const MamaMsg&          msg,
     const MamdaTradeReport& event,
     const MamdaTradeRecap&  recap)
 {
     cout << "Trade ("       << recap.getSymbol ()
          << " ("            << recap.getPartId () << ")"
          << ":"             << recap.getTradeCount ()
          << "):  "          << event.getTradeVolume ()
          << " @ "           << event.getTradePrice().getAsString()
          << " (seq#: "      << event.getEventSeqNum ()
          << "; partId: "    << event.getTradePartId ()
          << "; srcTime: "   << event.getSrcTime().getAsString()
          << "; lineTime: "  << event.getLineTime().getAsString()
          << "; tradeTime: " << event.getEventTime().getAsString()
          << "; acttime: "   << event.getActivityTime().getAsString()
          << "; qual: "      << event.getTradeQual ()
          << "; bid: "       << mQuoteListener.getBidPrice().getAsString()
          << "; ask; "       << mQuoteListener.getAskPrice().getAsString()
          << ")\n";
 }