From 6a8293c18ac974c9d5f6b4386afc2ae486e4ca0e Mon Sep 17 00:00:00 2001 From: Thaddeus Date: Sun, 16 Jan 2022 21:53:20 +0100 Subject: [PATCH] fix: do not user Deribit raw channels when not authenticated but .100ms ones instead --- src/realtimefeeds/deribit.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/realtimefeeds/deribit.ts b/src/realtimefeeds/deribit.ts index 6a440ad..1228d00 100644 --- a/src/realtimefeeds/deribit.ts +++ b/src/realtimefeeds/deribit.ts @@ -15,16 +15,13 @@ export class DeribitRealTimeDataFeed extends RealTimeFeedBase { } return filter.symbols.map((symbol) => { - let suffix = this.channelsWithIntervals.includes(filter.channel as any) ? '.raw' : '' - if (hasCredentials === false && filter.channel === 'book') { - // deribit requires authentications for raw book data feed - suffix = '.100ms' - } + const suffix = this.channelsWithIntervals.includes(filter.channel as any) ? (hasCredentials ? '.raw' : '.100ms') : '' return `${filter.channel}.${symbol}${suffix}` }) }) .flatMap((f) => f) + return [ { jsonrpc: '2.0',