upgrade_to_margin
Convert a standard portfolio to a margin account on Paper MCP Server by submitting portfolio ID and agreeing to margin terms for enhanced trading flexibility.
Instructions
Upgrade portfolio to margin account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| marginAgreement | Yes | User agrees to margin terms | |
| portfolioId | Yes | Portfolio ID |
Implementation Reference
- src/index.ts:536-540 (handler)Handler implementation for the 'upgrade_to_margin' tool. Sends a PUT request to upgrade the specified portfolio to a margin account, requiring user agreement to margin terms.case 'upgrade_to_margin': response = await api.put(`/accounts/portfolios/${args.portfolioId}/margin-upgrade`, { marginAgreement: args.marginAgreement }); break;
- src/index.ts:373-384 (schema)Schema definition for the 'upgrade_to_margin' tool, specifying required input parameters: portfolioId (string) and marginAgreement (boolean). This is returned in the listTools response for tool discovery.{ name: 'upgrade_to_margin', description: 'Upgrade portfolio to margin account', inputSchema: { type: 'object', properties: { portfolioId: { type: 'string', description: 'Portfolio ID' }, marginAgreement: { type: 'boolean', description: 'User agrees to margin terms' } }, required: ['portfolioId', 'marginAgreement'] } }