Skip to content
markpaper

src/markets/index.ts

v0.2.1 · 688 B

Download file
// Market meta: fail-closed decoding of orderBooks / orderBookDetails, `*/USDG` duplicates, TTL cache.

export {
  assertMarketsSane,
  createMarketCache,
  DEFAULT_META_FAILED_BACKOFF_MS,
  DEFAULT_META_TTL_MS,
  type MarketCache,
  type MarketCacheEvent,
  type MarketCacheOptions,
} from './cache.js';

export {
  markPrices,
  type ParseOrderBookDetailsOptions,
  parseOrderBookDetails,
  parseOrderBooks,
  symbolByMarketId,
} from './parse.js';

export {
  baseMarkets,
  baseSymbolOf,
  isUsdgDuplicate,
  marketByBaseSymbol,
  orphanUsdgDuplicates,
  USDG_SUFFIX,
} from './symbols.js';
export { type LighterMarket, LighterMetaError, type LighterOrderBookRow } from './types.js';
All files