@@ -319,6 +319,73 @@ unsigned int FuturesClient<CT>::stream_liquidation_orders_all(std::string& buffe
319319 }
320320}
321321
322+ /* *
323+ BLVT Info Streams
324+ @param buffer - a reference of the string buffer to load responses to
325+ @param functor - a reference to the functor object to be called as callback
326+ @param token_name - token name
327+ @return an unsigned int representing success
328+ */
329+ template <typename CT>
330+ template <typename FT>
331+ unsigned int FuturesClient<CT>::stream_blvt_info(std::string& buffer, FT& functor, std::string token_name)
332+ {
333+ try
334+ {
335+ return static_cast <CT*>(this )->v_stream_blvt_info (buffer, functor, token_name);
336+ }
337+ catch (ClientException e)
338+ {
339+ e.append_to_traceback (std::string (__FUNCTION__));
340+ throw (e);
341+ }
342+ }
343+
344+ /* *
345+ BLVT NAV Kline/Candlestick Streams
346+ @param buffer - a reference of the string buffer to load responses to
347+ @param functor - a reference to the functor object to be called as callback
348+ @param token_name - token name
349+ @param interval - interval of klines
350+ @return an unsigned int representing success
351+ */
352+ template <typename CT>
353+ template <typename FT>
354+ unsigned int FuturesClient<CT>::stream_blvt_klines(std::string& buffer, FT& functor, std::string token_name, std::string interval)
355+ {
356+ try
357+ {
358+ return static_cast <CT*>(this )->v_stream_blvt_klines (buffer, functor, token_name, interval);
359+ }
360+ catch (ClientException e)
361+ {
362+ e.append_to_traceback (std::string (__FUNCTION__));
363+ throw (e);
364+ }
365+ }
366+
367+ /* *
368+ BLVT NAV Kline/Candlestick Streams
369+ @param buffer - a reference of the string buffer to load responses to
370+ @param functor - a reference to the functor object to be called as callback
371+ @param token_name - token name
372+ @return an unsigned int representing success
373+ */
374+ template <typename CT>
375+ template <typename FT>
376+ unsigned int FuturesClient<CT>::stream_composite_index_symbol(std::string& buffer, FT& functor, std::string token_name)
377+ {
378+ try
379+ {
380+ return static_cast <CT*>(this )->v_stream_composite_index_symbol (buffer, functor, token_name);
381+ }
382+ catch (ClientException e)
383+ {
384+ e.append_to_traceback (std::string (__FUNCTION__));
385+ throw (e);
386+ }
387+ }
388+
322389/* *
323390 CRTP of stream_userStream
324391*/
@@ -445,6 +512,39 @@ unsigned int FuturesClientCoin::v_stream_markprice_by_pair(const std::string& pa
445512 return this ->_ws_client ->running_streams [stream_query];
446513}
447514
515+ /* *
516+ CRTP of stream_blvt_info
517+ */
518+ template <typename FT>
519+ unsigned int FuturesClientCoin::v_stream_blvt_info (std::string& buffer, FT& functor, std::string token_name)
520+ {
521+ MissingEndpoint e{};
522+ e.append_to_traceback (std::string (__FUNCTION__));
523+ throw (e);
524+ }
525+
526+ /* *
527+ CRTP of stream_blvt_klines
528+ */
529+ template <typename FT>
530+ unsigned int FuturesClientCoin::v_stream_blvt_klines (std::string& buffer, FT& functor, std::string token_name, std::string interval)
531+ {
532+ MissingEndpoint e{};
533+ e.append_to_traceback (std::string (__FUNCTION__));
534+ throw (e);
535+ }
536+
537+ /* *
538+ CRTP of stream_composite_index_symbol
539+ */
540+ template <typename FT>
541+ unsigned int FuturesClientCoin::v_stream_composite_index_symbol (std::string& buffer, FT& functor, std::string token_name)
542+ {
543+ MissingEndpoint e{};
544+ e.append_to_traceback (std::string (__FUNCTION__));
545+ throw (e);
546+ }
547+
448548/* *
449549 CRTP of stream_kline_contract
450550*/
@@ -493,6 +593,79 @@ unsigned int FuturesClientCoin::v_stream_kline_markprice(const std::string& symb
493593 return this ->_ws_client ->running_streams [stream_query];
494594}
495595
596+
597+ /* *
598+ CRTP of stream_blvt_info
599+ */
600+ template <typename FT>
601+ unsigned int FuturesClientUSDT::v_stream_blvt_info (std::string& buffer, FT& functor, std::string token_name)
602+ {
603+ try
604+ {
605+ std::string stream_name = token_name + " @nav_Kline_" ;
606+ std::string stream_query = " /ws/" + stream_name;
607+ if (this ->_ws_client ->is_open (stream_query))
608+ {
609+ this ->_ws_client ->close_stream (stream_query);
610+ }
611+ this ->_ws_client ->_stream_manager <FT>(stream_name, stream_query, buffer, functor);
612+ return this ->_ws_client ->running_streams [stream_query];
613+ }
614+ catch (ClientException e)
615+ {
616+ e.append_to_traceback (std::string (__FUNCTION__));
617+ throw (e);
618+ }
619+ }
620+
621+ /* *
622+ CRTP of stream_blvt_klines
623+ */
624+ template <typename FT>
625+ unsigned int FuturesClientUSDT::v_stream_blvt_klines (std::string& buffer, FT& functor, std::string token_name, std::string interval)
626+ {
627+ try
628+ {
629+ std::string stream_name = token_name + " @nav_Kline_" + interval;
630+ std::string stream_query = " /ws/" + stream_name;
631+ if (this ->_ws_client ->is_open (stream_query))
632+ {
633+ this ->_ws_client ->close_stream (stream_query);
634+ }
635+ this ->_ws_client ->_stream_manager <FT>(stream_name, stream_query, buffer, functor);
636+ return this ->_ws_client ->running_streams [stream_query];
637+ }
638+ catch (ClientException e)
639+ {
640+ e.append_to_traceback (std::string (__FUNCTION__));
641+ throw (e);
642+ }
643+ }
644+
645+ /* *
646+ CRTP of stream_composite_index_symbol
647+ */
648+ template <typename FT>
649+ unsigned int FuturesClientUSDT::v_stream_composite_index_symbol (std::string& buffer, FT& functor, std::string token_name)
650+ {
651+ try
652+ {
653+ std::string stream_name = token_name + " @compositeIndex" ;
654+ std::string stream_query = " /ws/" + stream_name;
655+ if (this ->_ws_client ->is_open (stream_query))
656+ {
657+ this ->_ws_client ->close_stream (stream_query);
658+ }
659+ this ->_ws_client ->_stream_manager <FT>(stream_name, stream_query, buffer, functor);
660+ return this ->_ws_client ->running_streams [stream_query];
661+ }
662+ catch (ClientException e)
663+ {
664+ e.append_to_traceback (std::string (__FUNCTION__));
665+ throw (e);
666+ }
667+ }
668+
496669/* *
497670 CRTP of v_stream_userStream
498671*/
0 commit comments