diff --git a/src/index.ts b/src/index.ts index b817de1..6b16267 100644 --- a/src/index.ts +++ b/src/index.ts @@ -165,13 +165,19 @@ const main = async () => { commitment: stateCommitment, }); + const bulkAccountLoader = new BulkAccountLoader( + connection, + stateCommitment, + ORDERBOOK_UPDATE_INTERVAL + ); + driftClient = new DriftClient({ connection, wallet, programID: clearingHousePublicKey, accountSubscription: { - type: 'websocket', - resubTimeoutMs: 60000, + type: 'polling', + accountLoader: bulkAccountLoader, }, env: driftEnv, userStats: true,