Skip to content

Commit

Permalink
update new orderSubscriber resync (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan authored Dec 19, 2023
1 parent 733c24e commit f1ce16e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/bots/fillerLite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
});
}

Expand Down
1 change: 1 addition & 0 deletions src/bots/spotFiller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ export class SpotFillerBot implements Bot {
type: 'websocket',
skipInitialLoad: false,
commitment: this.driftClient.opts?.commitment,
resyncIntervalMs: 10_000,
},
});
} else {
Expand Down
3 changes: 2 additions & 1 deletion src/bots/uncrossArbBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
MarketType,
PRICE_PRECISION,
DLOBSubscriber,
UserMap,
SlotSubscriber,
MakerInfo,
getUserStatsAccountPublicKey,
Expand Down Expand Up @@ -112,6 +111,7 @@ export class UncrossArbBot implements Bot {
commitment: 'processed';
type: 'websocket';
resubTimeoutMs?: number;
resyncIntervalMs?: number;
};
if (
(
Expand All @@ -129,6 +129,7 @@ export class UncrossArbBot implements Bot {
commitment: 'processed',
type: 'websocket',
resubTimeoutMs: 30000,
resyncIntervalMs: 10_000,
};
}

Expand Down

0 comments on commit f1ce16e

Please sign in to comment.