From 8bb6d12f2adfb0124c2feb57da3e09bfc51a0a7c Mon Sep 17 00:00:00 2001 From: nkaz001 Date: Mon, 22 May 2023 10:25:00 -0400 Subject: [PATCH] Fix incorrect trade message processing --- hftbacktest/__init__.py | 2 +- hftbacktest/data/utils/binancefutures.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hftbacktest/__init__.py b/hftbacktest/__init__.py index fa07fe9..9c52630 100644 --- a/hftbacktest/__init__.py +++ b/hftbacktest/__init__.py @@ -128,7 +128,7 @@ 'correct' ) -__version__ = '1.6.0' +__version__ = '1.6.1' # JIT'ed latency models diff --git a/hftbacktest/data/utils/binancefutures.py b/hftbacktest/data/utils/binancefutures.py index df1609d..cbdc798 100644 --- a/hftbacktest/data/utils/binancefutures.py +++ b/hftbacktest/data/utils/binancefutures.py @@ -68,6 +68,8 @@ def convert( if data is not None: evt = data['e'] if evt == 'trade': + if data['X'] != 'MARKET': + continue # event_time = data['E'] transaction_time = data['T'] price = data['p']