/** * SEC failures-to-deliver bi-monthly file URL. * Accepts either YYYYMMDD (auto-converted by half: day<=15 -> 'a', else 'b') * or a literal YYYYMM[ab] period key. * * Verified pattern (2026-04): files ship as ZIP archives containing a single * pipe-delimited text file with the same name minus extension. */ export declare function buildFtdUrl(periodKey: string): string; /** * Reg SHO Threshold List URLs. Two sources (NYSE + Nasdaq); we merge into a * unified set of tickers that are currently on either threshold list. * * Verified pattern (2026-04): Nasdaq accepts YYYYMMDD; NYSE expects ISO * YYYY-MM-DD and returns 400 with "Type mismatch error: Expected type * LocalDate" otherwise. */ export declare function buildThresholdUrls(dateYYYYMMDD: string): { nasdaq: string; nyse: string; }; export interface RawFtdRow { settlementDate: string; cusip: string; symbol: string; quantityFails: number; description: string; price: number | null; } export declare function parseFtdFile(text: string): RawFtdRow[]; export declare function parseThresholdFile(text: string): Set; export declare function recentBiMonthlyDates(now: Date, count: number): string[]; export interface FtdRow { date: string; ftdShares: number; ftdValue: number; onThresholdList: boolean; } /** * Fetch one ticker's failures-to-deliver across the most recent N bi-monthly * SEC FTD files, plus its current threshold-list status. FTD shares + value * are summed per period (each SEC FTD file may have multiple rows per ticker * for different settlement dates within the period). */ export declare function getFailuresToDeliver(ticker: string, periodsBack: number, now?: Date): Promise;