Merge pull request #500 from drift-labs/master

staging for get vamm l2 latest slot
This commit is contained in:
moosecat
2025-08-21 10:21:34 -07:00
committed by GitHub
2 changed files with 9 additions and 3 deletions

View File

@@ -186,7 +186,9 @@ export class DLOBSubscriberIO extends DLOBSubscriber {
this.driftClient.getMMOracleDataForPerpMarket( this.driftClient.getMMOracleDataForPerpMarket(
marketArgs.marketIndex marketArgs.marketIndex
), ),
true true,
undefined,
new BN(this.slotSource.getSlot())
); );
bestBid = bestBid =
@@ -362,7 +364,11 @@ export class DLOBSubscriberIO extends DLOBSubscriber {
includeVamm = false; includeVamm = false;
} }
const l2 = this.getL2({ ...l2FuncArgs, includeVamm }); const l2 = this.getL2({
...l2FuncArgs,
includeVamm,
latestSlot: new BN(this.slotSource.getSlot()),
});
const { markPrice, bestBidPrice, bestAskPrice, spreadPct, spreadQuote } = const { markPrice, bestBidPrice, bestAskPrice, spreadPct, spreadQuote } =
COMMON_MATH.calculateSpreadBidAskMark(l2); COMMON_MATH.calculateSpreadBidAskMark(l2);
const slot = l2.slot; const slot = l2.slot;