placeBatchOrders
Execute multiple cryptocurrency trading orders simultaneously on Aster Finance to manage portfolio positions efficiently and save time on manual order placement.
Instructions
Place multiple orders.
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": {
"batchOrders": "<batchOrders>"
},
"name": "placeBatchOrders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batchOrders | Yes |
Implementation Reference
- src/index.ts:627-632 (handler)Executes the placeBatchOrders tool by validating the presence of batchOrders, stringifying it for the API, and making a signed POST request to the Aster futures batchOrders endpoint.
case 'placeBatchOrders': if (!args || !args.batchOrders) { throw new McpError(ErrorCode.InvalidParams, 'batchOrders is required.'); } const batchOrdersStr = JSON.stringify(args.batchOrders); return makeRequest('POST', '/fapi/v1/batchOrders', { ...args, batchOrders: batchOrdersStr }, true); - src/index.ts:258-281 (schema)Defines the input schema and registers the placeBatchOrders tool in the listTools response, requiring a batchOrders array of order objects with symbol, side, type, and quantity.
{ name: 'placeBatchOrders', description: 'Place multiple orders.', inputSchema: { type: 'object', properties: { batchOrders: { type: 'array', items: { type: 'object', properties: { symbol: { type: 'string' }, side: { type: 'string', enum: ['BUY', 'SELL'] }, type: { type: 'string' }, quantity: { type: 'number' }, price: { type: 'number' }, }, required: ['symbol', 'side', 'type', 'quantity'], }, }, }, required: ['batchOrders'], }, },