From f1ce16eb985d9858abb24aeff6a37daa8f5296b0 Mon Sep 17 00:00:00 2001 From: wphan Date: Tue, 19 Dec 2023 10:01:36 -0800 Subject: [PATCH] update new orderSubscriber resync (#107) --- src/bots/fillerLite.ts | 6 +++++- src/bots/spotFiller.ts | 1 + src/bots/uncrossArbBot.ts | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bots/fillerLite.ts b/src/bots/fillerLite.ts index bf8d4c10..fb8008b9 100644 --- a/src/bots/fillerLite.ts +++ b/src/bots/fillerLite.ts @@ -56,7 +56,11 @@ export class FillerLiteBot extends FillerBot { this.orderSubscriber = new OrderSubscriber({ driftClient: this.driftClient, - subscriptionConfig: { type: 'websocket', skipInitialLoad: true }, + subscriptionConfig: { + type: 'websocket', + skipInitialLoad: true, + resyncIntervalMs: 10_000, + }, }); } diff --git a/src/bots/spotFiller.ts b/src/bots/spotFiller.ts index 1751aa6f..71a30a1e 100644 --- a/src/bots/spotFiller.ts +++ b/src/bots/spotFiller.ts @@ -278,6 +278,7 @@ export class SpotFillerBot implements Bot { type: 'websocket', skipInitialLoad: false, commitment: this.driftClient.opts?.commitment, + resyncIntervalMs: 10_000, }, }); } else { diff --git a/src/bots/uncrossArbBot.ts b/src/bots/uncrossArbBot.ts index 6a1166e5..dd1d4488 100644 --- a/src/bots/uncrossArbBot.ts +++ b/src/bots/uncrossArbBot.ts @@ -7,7 +7,6 @@ import { MarketType, PRICE_PRECISION, DLOBSubscriber, - UserMap, SlotSubscriber, MakerInfo, getUserStatsAccountPublicKey, @@ -112,6 +111,7 @@ export class UncrossArbBot implements Bot { commitment: 'processed'; type: 'websocket'; resubTimeoutMs?: number; + resyncIntervalMs?: number; }; if ( ( @@ -129,6 +129,7 @@ export class UncrossArbBot implements Bot { commitment: 'processed', type: 'websocket', resubTimeoutMs: 30000, + resyncIntervalMs: 10_000, }; }