From 07e0f5833e6a97ba76405497dc0ec31f20a54013 Mon Sep 17 00:00:00 2001 From: Thaddeus Date: Tue, 6 Aug 2024 15:41:27 +0200 Subject: [PATCH] improvement: exclude binance futures trades with X==NA --- src/mappers/binance.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mappers/binance.ts b/src/mappers/binance.ts index 01c99a4..fd4efea 100644 --- a/src/mappers/binance.ts +++ b/src/mappers/binance.ts @@ -32,7 +32,7 @@ export class BinanceTradesMapper *map(binanceTradeResponse: BinanceResponse, localTimestamp: Date) { const binanceTrade = binanceTradeResponse.data - const isOffBookTrade = binanceTrade.X === 'INSURANCE_FUND' || binanceTrade.X === 'ADL' + const isOffBookTrade = binanceTrade.X === 'INSURANCE_FUND' || binanceTrade.X === 'ADL' || binanceTrade.X === 'NA' if (isOffBookTrade) { return } @@ -459,7 +459,7 @@ type BinanceTradeData = { q: string T: number m: true - X?: 'INSURANCE_FUND' | 'MARKET' | 'ADL' + X?: 'INSURANCE_FUND' | 'MARKET' | 'ADL' | 'NA' } type BinanceBookLevel = [string, string]