post_cancel
Cancel cryptocurrency orders on Bithumb exchange by specifying order type, ID, and currency symbol to manage trading positions.
Instructions
Cancel an order (Private)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Order type (bid or ask) | |
| orderId | Yes | Order ID to cancel | |
| orderCurrency | Yes | Cryptocurrency symbol (e.g. BTC, ETH) |
Implementation Reference
- src/bitThumb/index.ts:264-276 (handler)The main handler function postCancel that executes the tool logic by preparing parameters and calling requestTrade('cancel', param) to cancel the order via Bithumb API.public async postCancel( type: tradeType, orderId: string, orderCurrency: string, ): Promise<IPostCancel> { const param = { type, order_id: orderId, order_currency: orderCurrency, }; const res = <IPostCancel>await this.requestTrade('cancel', param); return res; }
- src/index.ts:223-235 (registration)Tool registration in the tools array, including name, description, and input schema.{ name: 'post_cancel', description: 'Cancel an order (Private)', inputSchema: { type: 'object', properties: { type: { type: 'string', enum: ['bid', 'ask'], description: 'Order type (bid or ask)' }, orderId: { type: 'string', description: 'Order ID to cancel' }, orderCurrency: { type: 'string', description: 'Cryptocurrency symbol (e.g. BTC, ETH)' } }, required: ['type', 'orderId', 'orderCurrency'] } },
- src/index.ts:371-377 (handler)MCP tool dispatcher that calls the bithumbApi.postCancel handler with parsed arguments.case 'post_cancel': result = await this.bithumbApi.postCancel( args.type as tradeType, // Cast to expected type args.orderId as string, args.orderCurrency as string ); break;
- Type definition for the response of postCancel (IPostCancel interface).import { IBithumbResponse } from './bithumb-response.interface.js'; export interface IPostCancel extends IBithumbResponse {}
- src/index.ts:289-290 (schema)Registration of the listTools handler that exposes the post_cancel tool schema.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));