@@ -525,9 +525,9 @@ std::shared_ptr<tigeropen::push::pb::QuoteBasicData> TIGER_API::PushClientImpl::
525525 return nullptr ;
526526 }
527527
528- tigeropen::push::pb::SocketCommon_QuoteType quoteType = quote_data.type ();
529- if (quoteType != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_ALL &&
530- quoteType != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BASIC) {
528+ tigeropen::push::pb::SocketCommon_QuoteType quote_type = quote_data.type ();
529+ if (quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_ALL &&
530+ quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BASIC) {
531531 return nullptr ;
532532 }
533533
@@ -536,7 +536,7 @@ std::shared_ptr<tigeropen::push::pb::QuoteBasicData> TIGER_API::PushClientImpl::
536536 auto builder = std::make_shared<tigeropen::push::pb::QuoteBasicData>();
537537 // Set required fields
538538 builder->set_symbol (quote_data.symbol ());
539- builder->set_type (tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BASIC );
539+ builder->set_type (quote_type );
540540 builder->set_timestamp (quote_data.timestamp ());
541541 builder->set_latestprice (quote_data.latestprice ());
542542 builder->set_latesttime (quote_data.latesttime ());
@@ -612,14 +612,15 @@ std::shared_ptr<tigeropen::push::pb::QuoteBBOData> TIGER_API::PushClientImpl::co
612612 }
613613
614614 tigeropen::push::pb::SocketCommon_QuoteType quote_type = quote_data.type ();
615- if (quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BBO) {
615+ if (quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_ALL &&
616+ quote_type != tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BBO) {
616617 return nullptr ;
617618 }
618619
619620 // Create and initialize builder
620621 auto builder = std::make_shared<tigeropen::push::pb::QuoteBBOData>();
621622 builder->set_symbol (quote_data.symbol ());
622- builder->set_type (tigeropen::push::pb::SocketCommon::QuoteType::SocketCommon_QuoteType_BBO );
623+ builder->set_type (quote_type );
623624 builder->set_timestamp (quote_data.timestamp ());
624625 builder->set_bidprice (quote_data.bidprice ());
625626 builder->set_bidsize (quote_data.bidsize ());
0 commit comments