cancelBatchOrders
Cancel multiple cryptocurrency trading orders simultaneously on Aster Finance Futures by specifying order IDs or client order IDs for a given trading symbol.
Instructions
Cancel multiple orders.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderIdList | No | ||
| origClientOrderIdList | No | ||
| symbol | Yes |
Implementation Reference
- src/index.ts:641-652 (handler)The core handler for the 'cancelBatchOrders' tool. Validates input parameters, stringifies array parameters (orderIdList or origClientOrderIdList) as required by the API, and delegates to the shared makeRequest helper to perform a signed DELETE request to the '/fapi/v1/batchOrders' endpoint.case 'cancelBatchOrders': if (!args || (!args.orderIdList && !args.origClientOrderIdList)) { throw new McpError(ErrorCode.InvalidParams, 'Either orderIdList or origClientOrderIdList is required.'); } const params = { ...args }; if (params.orderIdList) { params.orderIdList = JSON.stringify(params.orderIdList); } if (params.origClientOrderIdList) { params.origClientOrderIdList = JSON.stringify(params.origClientOrderIdList); } return makeRequest('DELETE', '/fapi/v1/batchOrders', params, true);
- src/index.ts:336-344 (schema)Input schema definition for the 'cancelBatchOrders' tool, specifying parameters like symbol (required), orderIdList (array of numbers), and origClientOrderIdList (array of strings). Used for validation in MCP tool calls.inputSchema: { type: 'object', properties: { symbol: { type: 'string' }, orderIdList: { type: 'array', items: { type: 'number' } }, origClientOrderIdList: { type: 'array', items: { type: 'string' } }, }, required: ['symbol'], },
- src/index.ts:333-345 (registration)Registration of the 'cancelBatchOrders' tool in the ListTools response, including its name, description, and input schema. This makes the tool discoverable by MCP clients.{ name: 'cancelBatchOrders', description: 'Cancel multiple orders.', inputSchema: { type: 'object', properties: { symbol: { type: 'string' }, orderIdList: { type: 'array', items: { type: 'number' } }, origClientOrderIdList: { type: 'array', items: { type: 'string' } }, }, required: ['symbol'], }, },