@@ -467,9 +467,9 @@ class TestPushClient {
467467
468468 void connected_callback () {
469469 ucout << " Connected to push server" << std::endl;
470- push_client->subscribe_position (push_client->get_client_config ().account );
471- push_client->subscribe_order (push_client->get_client_config ().account );
472- push_client->subscribe_asset (push_client->get_client_config ().account );
470+ push_client->subscribe_position (utility::conversions::to_utf8string ( push_client->get_client_config ().account ) );
471+ push_client->subscribe_order (utility::conversions::to_utf8string ( push_client->get_client_config ().account ) );
472+ push_client->subscribe_asset (utility::conversions::to_utf8string ( push_client->get_client_config ().account ) );
473473 // push_client->query_subscribed_symbols();
474474 push_client->subscribe_quote (symbols);
475475 // push_client->subscribe_kline(symbols);
@@ -479,7 +479,7 @@ class TestPushClient {
479479
480480 void position_changed_callback (const tigeropen::push::pb::PositionData& data) {
481481 ucout << " Position changed:" << std::endl;
482- ucout << " - symbol: " << data.symbol () << std::endl;
482+ ucout << " - symbol: " << utility::conversions::to_string_t ( data.symbol () ) << std::endl;
483483 ucout << " - positionqty: " << data.positionqty () << std::endl;
484484 }
485485
@@ -489,7 +489,7 @@ class TestPushClient {
489489 // "status":"PendingSubmit","replaceStatus":"NONE","cancelStatus":"NONE","outsideRth":true,"canModify":true,"canCancel":true,"name":"PDD Holdings","source":"openapi","openTime":"1732177851000","timestamp":"1732177851874"}}
490490 ucout << " Order changed:" << std::endl;
491491 ucout << " - id: " << data.id () << std::endl;
492- ucout << " - status: " << data.status () << std::endl;
492+ ucout << " - status: " << utility::conversions::to_string_t ( data.status () ) << std::endl;
493493 ucout << " - avgfillprice: " << data.avgfillprice () << std::endl;
494494 }
495495
@@ -504,44 +504,44 @@ class TestPushClient {
504504
505505 void tick_changed_callback (const TradeTick& data) {
506506 ucout << " TradeTick changed: " << std::endl;
507- ucout << " - data: " << data.to_string () << std::endl;
507+ ucout << " - data: " << utility::conversions::to_string_t ( data.to_string () ) << std::endl;
508508 }
509509
510510 void full_tick_changed_callback (const tigeropen::push::pb::TickData& data) {
511511 ucout << " Full TickData changed: " << std::endl;
512- ucout << " - symbol: " << data.symbol () << std::endl;
512+ ucout << " - symbol: " << utility::conversions::to_string_t ( data.symbol () ) << std::endl;
513513 ucout << " - tick size: " << data.ticks_size () << std::endl;
514514 }
515515
516516 void query_subscribed_symbols_changed_callback (const tigeropen::push::pb::Response& data) {
517517 ucout << " QuerySubscribedSymbols changed: " << std::endl;
518- ucout << " - data: " << data.msg () << std::endl;
518+ ucout << " - data: " << utility::conversions::to_string_t ( data.msg () ) << std::endl;
519519 }
520520
521521 void quote_changed_callback (const tigeropen::push::pb::QuoteBasicData& data) {
522522 ucout << " BasicQuote changed: " << std::endl;
523- ucout << " - symbol: " << data.symbol () << std::endl;
523+ ucout << " - symbol: " << utility::conversions::to_string_t ( data.symbol () ) << std::endl;
524524 ucout << " - latestPrice: " << data.latestprice () << std::endl;
525525 ucout << " - volume: " << data.volume () << std::endl;
526526 }
527527
528528 void quote_bbo_changed_callback (const tigeropen::push::pb::QuoteBBOData& data) {
529529 ucout << " BBOQuote changed: " << std::endl;
530- ucout << " - symbol: " << data.symbol () << std::endl;
530+ ucout << " - symbol: " << utility::conversions::to_string_t ( data.symbol () ) << std::endl;
531531 ucout << " - bidPrice: " << data.bidprice () << std::endl;
532532 ucout << " - askPrice: " << data.askprice () << std::endl;
533533 }
534534
535535 void quote_depth_changed_callback (const tigeropen::push::pb::QuoteDepthData& data) {
536536 ucout << " QuoteDepth changed: " << std::endl;
537- ucout << " - symbol: " << data.symbol () << std::endl;
537+ ucout << " - symbol: " << utility::conversions::to_string_t ( data.symbol () ) << std::endl;
538538 ucout << " - ask price size: " << data.ask ().price_size () << std::endl;
539539 ucout << " - bid price size: " << data.bid ().price_size () << std::endl;
540540 }
541541
542542 void kline_changed_callback (const tigeropen::push::pb::KlineData& data) {
543543 ucout << " Kline changed: " << std::endl;
544- ucout << " - symbol: " << data.symbol () << std::endl;
544+ ucout << " - symbol: " << utility::conversions::to_string_t ( data.symbol () ) << std::endl;
545545 ucout << " - open: " << data.open () << std::endl;
546546 ucout << " - high: " << data.high () << std::endl;
547547 ucout << " - low: " << data.low () << std::endl;
@@ -575,9 +575,9 @@ class TestPushClient {
575575 push_client->unsubscribe_kline (symbols);
576576 push_client->unsubscribe_quote_depth (symbols);
577577 push_client->unsubscribe_tick (symbols);
578- push_client->unsubscribe_asset (config.account );
579- push_client->unsubscribe_position (config.account );
580- push_client->unsubscribe_order (config.account );
578+ push_client->unsubscribe_asset (utility::conversions::to_utf8string ( config.account ) );
579+ push_client->unsubscribe_position (utility::conversions::to_utf8string ( config.account ) );
580+ push_client->unsubscribe_order (utility::conversions::to_utf8string ( config.account ) );
581581 push_client->disconnect ();
582582 }
583583
0 commit comments