Skip to main content
Glama
paperinvest

Paper MCP Server

by paperinvest

create_batch_orders

Streamline trading by generating multiple orders simultaneously in the Paper trading platform using a single request, enabling efficient portfolio management and trade execution.

Instructions

Create multiple orders at once

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ordersYesArray of order objects

Implementation Reference

  • Handler implementation for the 'create_batch_orders' tool. It extracts the 'orders' array from input arguments and sends a POST request to the '/orders/batch' API endpoint.
    case 'create_batch_orders': response = await api.post('/orders/batch', args.orders); break;
  • Schema definition for the 'create_batch_orders' tool, including input validation for an array of order objects requiring portfolioId, symbol, quantity, side, and type.
    { name: 'create_batch_orders', description: 'Create multiple orders at once', inputSchema: { type: 'object', properties: { orders: { type: 'array', items: { type: 'object', properties: { portfolioId: { type: 'string' }, symbol: { type: 'string' }, quantity: { type: 'number' }, side: { type: 'string' }, type: { type: 'string' } } }, description: 'Array of order objects' } }, required: ['orders'] } },
  • src/index.ts:388-392 (registration)
    Registration of all tools, including 'create_batch_orders', via the ListToolsRequestSchema handler which returns the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/paperinvest/mcp-server'

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