Merge pull request #500 from drift-labs/master
staging for get vamm l2 latest slot
This commit is contained in:
Submodule drift-common updated: d97d5d7799...de78e923d2
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user