|
|
@@ -221,6 +221,18 @@ async fn test_cancel_orders() {
|
|
|
trace!(?kucoin_cancel_orders);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+// 测试设置自动追加保证金
|
|
|
+#[tokio::test]
|
|
|
+#[instrument(level = "TRACE")]
|
|
|
+async fn test_set_auto_deposit_status() {
|
|
|
+ global::log_utils::init_log_with_trace();
|
|
|
+
|
|
|
+ let mut kucoin_swap_exchange: Box<dyn Platform> = test_new_exchange(ExchangeEnum::KucoinSwap, SYMBOL).await;
|
|
|
+ let kucoin_set_auto_deposit_status = kucoin_swap_exchange.set_auto_deposit_status(true).await;
|
|
|
+ trace!(?kucoin_set_auto_deposit_status);
|
|
|
+}
|
|
|
+
|
|
|
// 测试指令下单
|
|
|
#[tokio::test]
|
|
|
#[instrument(level = "TRACE")]
|
|
|
@@ -245,7 +257,7 @@ async fn test_command_order() {
|
|
|
command.limits_open.insert("888888".to_string(), vec!["100".to_string(), "kd".to_string(), "0.18".to_string(), "888888".to_string()]);
|
|
|
command.limits_close.insert("999999".to_string(), vec!["100".to_string(), "kk".to_string(), "0.25".to_string(), "999999".to_string()]);
|
|
|
// command.check.insert("888888".to_string(), vec!["999999".to_string(), "94647166466789377".to_string()]);
|
|
|
- kucoin_swap_exchange.command_order(command).await;
|
|
|
+ kucoin_swap_exchange.command_order(command, Default::default()).await;
|
|
|
|
|
|
|
|
|
loop {
|