@@ -14,7 +14,7 @@ use crate::{
1414} ;
1515
1616// price {{{
17- pub async fn price ( client : & v_exchanges_adapters:: Client , pair : Pair , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < f64 > {
17+ pub ( super ) async fn price ( client : & v_exchanges_adapters:: Client , pair : Pair , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < f64 > {
1818 let symbol = format ! ( "{}-{}" , pair. base( ) , pair. quote( ) ) ;
1919 let params = json ! ( {
2020 "symbol" : symbol,
@@ -53,7 +53,7 @@ pub struct TickerData {
5353//,}}}
5454
5555// prices {{{
56- pub async fn prices ( client : & v_exchanges_adapters:: Client , pairs : Option < Vec < Pair > > , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < BTreeMap < Pair , f64 > > {
56+ pub ( super ) async fn prices ( client : & v_exchanges_adapters:: Client , pairs : Option < Vec < Pair > > , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < BTreeMap < Pair , f64 > > {
5757 let options = vec ! [ KucoinOption :: HttpUrl ( KucoinHttpUrl :: Spot ) ] ;
5858 let response: AllTickersResponse = client. get ( "/api/v1/market/allTickers" , & json ! ( { } ) , options) . await ?;
5959
@@ -128,7 +128,13 @@ pub struct TickerInfo {
128128//,}}}
129129
130130// klines {{{
131- pub async fn klines ( client : & v_exchanges_adapters:: Client , symbol : Symbol , tf : KucoinTimeframe , range : RequestRange , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < Klines > {
131+ pub ( super ) async fn klines (
132+ client : & v_exchanges_adapters:: Client ,
133+ symbol : Symbol ,
134+ tf : KucoinTimeframe ,
135+ range : RequestRange ,
136+ _recv_window : Option < std:: time:: Duration > ,
137+ ) -> ExchangeResult < Klines > {
132138 let kucoin_symbol = format ! ( "{}-{}" , symbol. pair. base( ) , symbol. pair. quote( ) ) ;
133139
134140 // Convert from v_utils format (1h, 1d, 1w) to Kucoin API format (1hour, 1day, 1week)
@@ -194,7 +200,7 @@ pub struct KlineResponse {
194200//,}}}
195201
196202// exchange_info {{{
197- pub async fn exchange_info ( client : & v_exchanges_adapters:: Client , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < ExchangeInfo > {
203+ pub ( super ) async fn exchange_info ( client : & v_exchanges_adapters:: Client , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < ExchangeInfo > {
198204 let options = vec ! [ KucoinOption :: HttpUrl ( KucoinHttpUrl :: Spot ) ] ;
199205 let response: SymbolsResponse = client. get ( "/api/v2/symbols" , & json ! ( { } ) , options) . await ?;
200206
@@ -299,7 +305,7 @@ pub mod futures {
299305 }
300306
301307 // price {{{
302- pub async fn price ( client : & v_exchanges_adapters:: Client , pair : Pair , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < f64 > {
308+ pub ( in crate :: kucoin ) async fn price ( client : & v_exchanges_adapters:: Client , pair : Pair , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < f64 > {
303309 // Kucoin futures symbol format: XBTUSDTM (base + quote + "M" for perpetual)
304310 let base = to_kucoin_futures_base ( pair. base ( ) . as_ref ( ) ) ;
305311 let symbol = format ! ( "{}{}M" , base, pair. quote( ) ) ;
@@ -340,7 +346,7 @@ pub mod futures {
340346 //,}}}
341347
342348 // prices {{{
343- pub async fn prices ( client : & v_exchanges_adapters:: Client , pairs : Option < Vec < Pair > > , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < BTreeMap < Pair , f64 > > {
349+ pub ( in crate :: kucoin ) async fn prices ( client : & v_exchanges_adapters:: Client , pairs : Option < Vec < Pair > > , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < BTreeMap < Pair , f64 > > {
344350 let options = vec ! [ KucoinOption :: HttpUrl ( KucoinHttpUrl :: Futures ) ] ;
345351 let response: ContractsActiveResponse = client. get ( "/api/v1/contracts/active" , & json ! ( { } ) , options) . await ?;
346352
@@ -395,7 +401,7 @@ pub mod futures {
395401 //,}}}
396402
397403 // klines {{{
398- pub async fn klines (
404+ pub ( in crate :: kucoin ) async fn klines (
399405 client : & v_exchanges_adapters:: Client ,
400406 symbol : Symbol ,
401407 tf : KucoinTimeframe ,
@@ -467,7 +473,7 @@ pub mod futures {
467473 //,}}}
468474
469475 // exchange_info {{{
470- pub async fn exchange_info ( client : & v_exchanges_adapters:: Client , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < ExchangeInfo > {
476+ pub ( in crate :: kucoin ) async fn exchange_info ( client : & v_exchanges_adapters:: Client , _recv_window : Option < std:: time:: Duration > ) -> ExchangeResult < ExchangeInfo > {
471477 let options = vec ! [ KucoinOption :: HttpUrl ( KucoinHttpUrl :: Futures ) ] ;
472478 let response: ContractsActiveResponse = client. get ( "/api/v1/contracts/active" , & json ! ( { } ) , options) . await ?;
473479
0 commit comments