@neabyte/chart-to-image
Version:
Convert trading charts to images using Node.js canvas with advanced features: 6 chart types, VWAP/EMA/SMA indicators, custom colors, themes, hide elements, scaling, and PNG/JPEG export formats.
62 lines (61 loc) • 1.66 kB
TypeScript
import { ChartConfig } from '../core/config.js';
export interface CLIArgs {
symbol?: string;
symbols?: string[];
timeframe?: string;
exchange?: string;
output?: string;
width?: number;
height?: number;
theme?: 'light' | 'dark';
chartType?: string;
backgroundColor?: string;
textColor?: string;
customColors?: string;
levels?: string;
hideTitle?: boolean;
hideTimeAxis?: boolean;
hideGrid?: boolean;
showVWAP?: boolean;
showEMA?: boolean;
emaPeriod?: number;
showSMA?: boolean;
smaPeriod?: number;
showBollingerBands?: boolean;
bbPeriod?: number;
bbStandardDeviations?: number;
bbUpperColor?: string;
bbMiddleColor?: string;
bbLowerColor?: string;
bbBackgroundColor?: string;
bbBackgroundOpacity?: number;
autoScale?: boolean;
scaleX?: number;
scaleY?: number;
minScale?: number;
maxScale?: number;
fetch?: boolean;
limit?: number;
compare?: string;
layout?: 'side-by-side' | 'grid';
columns?: number;
rows?: number;
gap?: number;
timeframes?: string;
title?: string;
watermark?: string;
watermarkPosition?: string;
watermarkColor?: string;
watermarkSize?: number;
watermarkOpacity?: number;
batch?: unknown[];
help?: boolean;
}
export declare function parseArgs(): CLIArgs;
export declare function validateArgs(args: CLIArgs): boolean;
export declare function showHelp(): void;
export declare function argsToConfig(args: CLIArgs): ChartConfig;
export declare function executeFromArgs(args: CLIArgs): Promise<{
success: boolean;
error?: string;
}>;