get_candlestick
Retrieve candlestick chart data for cryptocurrency trading analysis on Bithumb exchange. Specify currency pairs and time intervals to access historical price patterns and market trends.
Instructions
Get Candlestick data (Public)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderCurrency | Yes | Cryptocurrency symbol (e.g. BTC, ETH) | |
| paymentCurrency | Yes | Payment currency (KRW or BTC) | |
| chartIntervals | Yes | Chart interval |
Implementation Reference
- src/bitThumb/index.ts:113-133 (handler)Core implementation of GetCandlestick: fetches raw candlestick data from Bithumb public API endpoint and maps it to structured IGetCandlestickData array.public async GetCandlestick( orderCurrency: string, paymentCurrency: currencyType, chartIntervals: Time, ): Promise<IGetCandlestickData[]> { const endpoint = `/candlestick/${orderCurrency}_${paymentCurrency}`; const res = <IGetCandlestick>( await this.requestPublic(endpoint, chartIntervals) ); const candleData: IGetCandlestickData[] = res.data.map((candle) => ({ timestamp: candle[0], opening_price: candle[1], closing_price: candle[2], max_price: candle[3], min_price: candle[4], volume: candle[5], })); return candleData; }
- src/index.ts:312-318 (handler)MCP server tool handler for 'get_candlestick': extracts arguments and calls bithumbApi.GetCandlestick.case 'get_candlestick': result = await this.bithumbApi.GetCandlestick( args.orderCurrency as string, args.paymentCurrency as currencyType, // Cast to expected type args.chartIntervals as Time // Cast to expected type ); break;
- src/index.ts:113-124 (registration)Tool registration in MCP server: defines name, description, and input schema for 'get_candlestick'.name: 'get_candlestick', description: 'Get Candlestick data (Public)', inputSchema: { type: 'object', properties: { orderCurrency: { type: 'string', description: 'Cryptocurrency symbol (e.g. BTC, ETH)' }, paymentCurrency: { type: 'string', enum: ['KRW', 'BTC'], description: 'Payment currency (KRW or BTC)' }, // Assuming KRW/BTC based on standard usage chartIntervals: { type: 'string', enum: ['1m', '3m', '5m', '10m', '30m', '1h', '6h', '12h', '24h'], description: 'Chart interval' } // Assuming standard intervals }, required: ['orderCurrency', 'paymentCurrency', 'chartIntervals'] } },
- TypeScript interface defining the structure of processed candlestick data returned by the tool.export interface IGetCandlestickData { timestamp: number; opening_price: string; closing_price: string; max_price: string; min_price: string; volume: string; }
- TypeScript interface for raw Bithumb API candlestick response.export interface IGetCandlestick extends IBithumbResponse { /** [timestamp, opening amount, closing amount, max price, min price, volume] */ data: [number, string, string, string, string, string][]; }