post_market_buy
Execute a market buy order on Bithumb cryptocurrency exchange to purchase specified cryptocurrency units at current market prices.
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)Core handler function implementing the market buy logic by preparing parameters and calling the Bithumb trade API endpoint 'market_buy'.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-247 (registration)Registers the 'post_market_buy' tool in the MCP server's tools list, including name, description, and input schema.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)MCP server handler that dispatches 'post_market_buy' tool calls to the underlying 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 response structure for the post market buy operation.export interface IPostMarketBuy extends IBithumbResponse { order_id: string; }