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
| Name | Required | Description | Default |
|---|---|---|---|
| order_currency | Yes | Order currency symbol | |
| orderId | No | Order ID (optional) | |
| type | No | Order type (bid or ask) (optional) | |
| count | No | Number of orders to retrieve (optional, default: 100) | |
| after | No | Retrieve orders after this timestamp (optional) |
Implementation Reference
- src/index.ts:331-351 (handler)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;
- src/bitThumb/index.ts:194-200 (handler)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; }