From cf9ae4e2ad15588957b9e4e53a3cdf1fddd14409 Mon Sep 17 00:00:00 2001 From: soulmachine Date: Wed, 19 Jan 2022 08:18:24 +0000 Subject: [PATCH] Filled gate prev_seq_id --- crypto-msg-parser/src/exchanges/gate/gate_spot_current.rs | 2 +- crypto-msg-parser/src/exchanges/gate/gate_swap.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crypto-msg-parser/src/exchanges/gate/gate_spot_current.rs b/crypto-msg-parser/src/exchanges/gate/gate_spot_current.rs index 779d3831..d3612322 100644 --- a/crypto-msg-parser/src/exchanges/gate/gate_spot_current.rs +++ b/crypto-msg-parser/src/exchanges/gate/gate_spot_current.rs @@ -157,7 +157,7 @@ fn parse_l2_update(msg: &str) -> Result, SimpleError> { msg_type: MessageType::L2Event, timestamp: result.t, seq_id: Some(result.u as u64), - prev_seq_id: None, + prev_seq_id: Some(result.U as u64 - 1), asks: if let Some(asks) = result.a { asks.iter().map(parse_order).collect() } else { diff --git a/crypto-msg-parser/src/exchanges/gate/gate_swap.rs b/crypto-msg-parser/src/exchanges/gate/gate_swap.rs index 576edc11..0b3d07e5 100644 --- a/crypto-msg-parser/src/exchanges/gate/gate_swap.rs +++ b/crypto-msg-parser/src/exchanges/gate/gate_swap.rs @@ -414,7 +414,10 @@ fn parse_l2_update(market_type: MarketType, msg: &str) -> Result