Skip to content

Commit

Permalink
makerBidAskTwapCrank: ignore markets with settlement and delisted status
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan committed Oct 11, 2024
1 parent ce1183d commit ceb5ccc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/bots/makerBidAskTwapCrank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ function buildCrankIntervalToMarketIds(driftClient: DriftClient): {
const driftMarkets: DriftMarketInfo[] = [];

for (const perpMarket of driftClient.getPerpMarketAccounts()) {
if (isOneOfVariant(perpMarket.status, ['settlement', 'delisted'])) {
logger.info(
`markTwapCrank skipping market ${
perpMarket.marketIndex
} with status ${getVariant(perpMarket.status)}`
);
continue;
}

driftMarkets.push({
marketType: 'perp',
marketIndex: perpMarket.marketIndex,
Expand Down

0 comments on commit ceb5ccc

Please sign in to comment.