|
|
@@ -120,8 +120,26 @@ async fn rest_get_server_time_test() {
|
|
|
trace!("htx--服务器时间戳--{}", req_data.data);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/*获取聚合行情*/
|
|
|
#[tokio::test]
|
|
|
+async fn rest_get_ticker_test() {
|
|
|
+ global::log_utils::init_log_with_trace();
|
|
|
+ proxy_handle();
|
|
|
+
|
|
|
+ let mut ret = get_rest();
|
|
|
+ let req_data = ret.get_ticker(json!({
|
|
|
+ "contract_type":"swap"
|
|
|
+ })
|
|
|
+ ).await;
|
|
|
+ trace!("htx--获取聚合行情--{:?}", req_data);
|
|
|
+ trace!("htx--获取聚合行情--{}", req_data.data);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/*合约信息*/
|
|
|
+#[tokio::test]
|
|
|
async fn rest_get_market_test() {
|
|
|
global::log_utils::init_log_with_trace();
|
|
|
proxy_handle();
|
|
|
@@ -131,8 +149,8 @@ async fn rest_get_market_test() {
|
|
|
"contract_code":"BTC-USDT"
|
|
|
})
|
|
|
).await;
|
|
|
- trace!("htx--获取聚合行情--{:?}", req_data);
|
|
|
- trace!("htx--获取聚合行情--{}", req_data.data);
|
|
|
+ trace!("htx--合约信息--{:?}", req_data);
|
|
|
+ trace!("htx--合约信息--{}", req_data.data);
|
|
|
}
|
|
|
|
|
|
|