@@ -134,11 +134,11 @@ pub struct OriginalTicker {
#[derive(Serialize, Deserialize, Debug)]
pub struct DealRecord {
// 参考价
- pub refPrice: Decimal,
+ pub refPrice: String,
// 挂单价
- pub regPrice: Decimal,
+ pub regPrice: String,
// 买单最优挂单数量
- pub num: Decimal,
+ pub num: String,
// 触发时间
pub triggerTime: i64,
// 机器名称
@@ -1278,9 +1278,9 @@ fn paras_limit_command (robot_name: String, time: i64, ref_ap: Decimal, ref_bp:
ref_price = ref_bp;
}
let deal_recode = DealRecord {
- refPrice: ref_price,
- regPrice: price,
- num: amount,
+ refPrice: ref_price.to_string(),
+ regPrice: price.to_string(),
+ num: amount.to_string(),
triggerTime: time,
robotName: robot_name.clone(),
side: side.to_string(),