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)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"orderId": "<orderId>",
"orderCurrency": "<orderCurrency>"
},
"name": "post_cancel"
}
}Input 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)Core handler function that executes the order cancellation logic by preparing parameters and calling the Bithumb trade API's 'cancel' endpoint.
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)Registers the 'post_cancel' tool with the MCP server, defining its name, description, and input schema for validation.
{ 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 server request handler that dispatches the 'post_cancel' tool call to the underlying Bithumb API method.
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; - TypeScript interface defining the expected response structure for the post_cancel operation, extending the base Bithumb response.
import { IBithumbResponse } from './bithumb-response.interface.js'; export interface IPostCancel extends IBithumbResponse {}