Skip to content

Commit

Permalink
fix: do not user Deribit raw channels when not authenticated but .100…
Browse files Browse the repository at this point in the history
…ms ones instead
  • Loading branch information
thaaddeus committed Jan 16, 2022
1 parent aca140e commit 6a8293c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/realtimefeeds/deribit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 6a8293c

Please sign in to comment.