Skip to main content
Glama
zereight

Bithumb MCP Server

post_orders

Retrieve detailed order information for a specific cryptocurrency on Bithumb exchange, including order status, type, and transaction history.

Instructions

Get member's order details (Private)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_currencyYesOrder currency symbol
orderIdNoOrder ID (optional)
typeNoOrder type (bid or ask) (optional)
countNoNumber of orders to retrieve (optional, default: 100)
afterNoRetrieve orders after this timestamp (optional)

Implementation Reference

  • MCP server handler for the 'post_orders' tool: constructs IPostOrdersParams from request arguments and calls bithumbApi.postOrders.
    case 'post_orders':
       // Construct params object safely using if checks
       const orderParams: IPostOrdersParams = {
          order_currency: args.order_currency as string,
          // payment_currency removed
       };
       if (args.orderId) orderParams.orderId = args.orderId as string; // Corrected name
       if (args.type) orderParams.type = args.type as tradeType;
       if (args.count) orderParams.count = args.count as number;
       // Correctly handle 'after' as a number
       if (args.after !== undefined && args.after !== null) {
           const afterNum = Number(args.after); // Convert to number
           if (!isNaN(afterNum)) {
               orderParams.after = afterNum;
           } else {
               // Handle error: 'after' argument is not a valid number
               throw new McpError(ErrorCode.InvalidParams, "'after' argument must be a number.");
           }
       }
      result = await this.bithumbApi.postOrders(orderParams);
      break;
  • ApiBithumb class method that implements the postOrders API call to Bithumb's info/endpoint/orders using requestInfo.
    public async postOrders(params: IPostOrdersParams): Promise<IPostOrders> {
      const param = {
        ...params,
      };
      const res = <IPostOrders>await this.requestInfo('orders', param);
      return res;
    }
  • src/index.ts:167-181 (registration)
    Registers the 'post_orders' tool in the MCP server's tools list with name, description, and input schema.
    {
      name: 'post_orders',
      description: 'Get member\'s order details (Private)',
      inputSchema: {
        type: 'object',
        properties: {
          order_currency: { type: 'string', description: 'Order currency symbol' },
          // payment_currency removed as it's not in IPostOrdersParams
          orderId: { type: 'string', description: 'Order ID (optional)' }, // Corrected name
          type: { type: 'string', enum: ['bid', 'ask'], description: 'Order type (bid or ask) (optional)' },
          count: { type: 'number', description: 'Number of orders to retrieve (optional, default: 100)' },
          after: { type: 'number', description: 'Retrieve orders after this timestamp (optional)' } // Corrected type and description
        },
        required: ['order_currency'] // Only require order_currency now
      }
  • TypeScript interface defining the parameters for the postOrders tool (IPostOrdersParams).
    export interface IPostOrdersParams {
      orderId?: string;
      type?: 'bid' | 'ask';
      count?: number;
      after?: number;
      order_currency: string;
    }

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