Skip to main content
Glama

get_candlestick

Retrieve candlestick chart data for cryptocurrency trading analysis from the 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
NameRequiredDescriptionDefault
orderCurrencyYesCryptocurrency symbol (e.g. BTC, ETH)
paymentCurrencyYesPayment currency (KRW or BTC)
chartIntervalsYesChart interval

Implementation Reference

  • Core handler function that executes the get_candlestick tool logic: constructs the API endpoint, calls the public request, maps raw candlestick data 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; }
  • MCP tool dispatch handler: extracts arguments and invokes the Bithumb API's GetCandlestick method upon tool call.
    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)
    Registers the 'get_candlestick' tool in the MCP server with name, description, and input schema validation.
    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 raw response structure from Bithumb candlestick API (extends IBithumbResponse).
    import { IBithumbResponse } from './bithumb-response.interface.js'; export interface IGetCandlestick extends IBithumbResponse { /** [timestamp, opening amount, closing amount, max price, min price, volume] */ data: [number, string, string, string, string, string][]; }
  • TypeScript interface for the processed candlestick data returned by the handler (one candle object).
    export interface IGetCandlestickData { timestamp: number; opening_price: string; closing_price: string; max_price: string; min_price: string; volume: string; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zereight/bithumb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server