post_market_buy
Execute a market buy order on Bithumb cryptocurrency exchange to purchase specified cryptocurrency units at current market prices for trading operations.
Instructions
Place a market buy order (Private)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | Yes | Quantity to buy | |
| orderCurrency | Yes | Cryptocurrency symbol (e.g. BTC, ETH) |
Implementation Reference
- src/bitThumb/index.ts:282-292 (handler)The main handler function implementing the post_market_buy tool logic. It constructs parameters for a market buy order and delegates to the internal requestTrade method using the 'market_buy' endpoint.public async postMarketBuy( units: number, orderCurrency: string, ): Promise<IPostMarketBuy> { const param = { units, order_currency: orderCurrency, }; const res = <IPostMarketBuy>await this.requestTrade('market_buy', param); return res; }
- src/index.ts:237-246 (registration)MCP tool registration including name, description, and input schema for 'post_market_buy'.name: 'post_market_buy', description: 'Place a market buy order (Private)', inputSchema: { type: 'object', properties: { units: { type: 'number', description: 'Quantity to buy' }, orderCurrency: { type: 'string', description: 'Cryptocurrency symbol (e.g. BTC, ETH)' } }, required: ['units', 'orderCurrency'] }
- src/index.ts:378-380 (handler)Dispatcher in the CallTool handler that invokes the bithumbApi.postMarketBuy method.case 'post_market_buy': result = await this.bithumbApi.postMarketBuy(args.units as number, args.orderCurrency as string); break;
- TypeScript interface defining the expected response structure for postMarketBuy (output schema).import { IBithumbResponse } from './bithumb-response.interface.js'; export interface IPostMarketBuy extends IBithumbResponse { order_id: string; }
- src/index.ts:239-245 (schema)Input schema/JSON Schema for validating tool arguments.inputSchema: { type: 'object', properties: { units: { type: 'number', description: 'Quantity to buy' }, orderCurrency: { type: 'string', description: 'Cryptocurrency symbol (e.g. BTC, ETH)' } }, required: ['units', 'orderCurrency']