Skip to main content
Glama

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
NameRequiredDescriptionDefault
typeYesOrder type (bid or ask)
orderIdYesOrder ID to cancel
orderCurrencyYesCryptocurrency symbol (e.g. BTC, ETH)

Implementation Reference

  • 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'] } },
  • 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 {}
  • Registration of the listTools handler that exposes the post_cancel tool schema.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zereight/bithumb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server