get_ticker
Fetch real-time cryptocurrency price data from Bithumb exchange to monitor market movements and make informed trading decisions.
Instructions
Get cryptocurrency ticker information (Public)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coinCode | Yes | Cryptocurrency symbol (e.g. BTC, ETH) |
Implementation Reference
- src/bitThumb/index.ts:57-61 (handler)Core handler implementing the get_ticker tool logic by constructing the endpoint parameter and calling the public Bithumb ticker API via requestPublic.public async getTicker(coinCode: string): Promise<IGetTicker> { const param = `${coinCode}_${this.paymentCurrency}`; const res = <IGetTicker>await this.requestPublic('ticker', param); return res; }
- src/index.ts:63-73 (registration)MCP tool registration defining the name, description, and input schema for listTools request.{ name: 'get_ticker', description: 'Get cryptocurrency ticker information (Public)', inputSchema: { type: 'object', properties: { coinCode: { type: 'string', description: 'Cryptocurrency symbol (e.g. BTC, ETH)' } }, required: ['coinCode'] } },
- src/index.ts:297-299 (handler)MCP CallToolRequestSchema handler case that extracts coinCode from arguments and delegates to bithumbApi.getTicker.case 'get_ticker': result = await this.bithumbApi.getTicker(args.coinCode as string); break;
- TypeScript interface defining the expected response structure for getTicker (output schema).export interface IGetTicker extends IBithumbResponse { data: Ticker; }
- src/bitThumb/index.ts:357-367 (helper)Helper function used by getTicker to perform the public GET request to Bithumb API and handle response.private async requestPublic( endpoint: getEndpointType, param?: string, ): Promise<IBithumbResponse> { const res = <AxiosResponse<IBithumbResponse>>await axios({ method: 'GET', url: `${this.hosts.publicHost}/${endpoint}/${param || ''}`, }); this.checkStatus(res); return res.data; }