@@ -540,9 +540,9 @@ std::shared_ptr<tigeropen::push::pb::QuoteBasicData> TIGER_API::PushClientImpl::
540540 return nullptr ;
541541 }
542542
543- tigeropen::push::pb::SocketCommon_QuoteType quoteType = quote_data.type ();
544- if (quoteType != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_ALL &&
545- quoteType != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BASIC) {
543+ tigeropen::push::pb::SocketCommon_QuoteType quote_type = quote_data.type ();
544+ if (quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_ALL &&
545+ quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BASIC) {
546546 return nullptr ;
547547 }
548548
@@ -551,7 +551,7 @@ std::shared_ptr<tigeropen::push::pb::QuoteBasicData> TIGER_API::PushClientImpl::
551551 auto builder = std::make_shared<tigeropen::push::pb::QuoteBasicData>();
552552 // Set required fields
553553 builder->set_symbol (quote_data.symbol ());
554- builder->set_type (tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BASIC );
554+ builder->set_type (quote_type );
555555 builder->set_timestamp (quote_data.timestamp ());
556556 builder->set_latestprice (quote_data.latestprice ());
557557 builder->set_latesttime (quote_data.latesttime ());
@@ -627,14 +627,15 @@ std::shared_ptr<tigeropen::push::pb::QuoteBBOData> TIGER_API::PushClientImpl::co
627627 }
628628
629629 tigeropen::push::pb::SocketCommon_QuoteType quote_type = quote_data.type ();
630- if (quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BBO) {
630+ if (quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_ALL &&
631+ quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BBO) {
631632 return nullptr ;
632633 }
633634
634635 // Create and initialize builder
635636 auto builder = std::make_shared<tigeropen::push::pb::QuoteBBOData>();
636637 builder->set_symbol (quote_data.symbol ());
637- builder->set_type (tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BBO );
638+ builder->set_type (quote_type );
638639 builder->set_timestamp (quote_data.timestamp ());
639640 builder->set_bidprice (quote_data.bidprice ());
640641 builder->set_bidsize (quote_data.bidsize ());
0 commit comments