Portfolio Rebalancer API
The Portfolio Rebalancer API allows you to rebalance your portfolio to target allocations specified as percentages. Simply provide the desired allocation percentages for each ticker, and the API will initiate a rebalancing operation to match those target allocations.
Endpoint
POST /user/portfolios/{portfolioId}/rebalanceAuthentication
All requests require the IdToken obtained from the authentication flow:
Authorization: Bearer <ID_TOKEN>
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| portfolioId | string | Yes | The portfolio ID to rebalance (e.g., "default") |
Important Note
⚠️ Important: The Portfolio Rebalancer only supports fractionable tickers. Non-fractionable stocks cannot be included in rebalancing operations. The exchange market determines whether a stock is fractionable.
Request Format
Request Fields:
| Field | Type | Required | Description |
|---|---|---|---|
| allocations | object | Yes | Object with ticker symbols as keys and allocation percentages as values |
Allocation Details:
- Keys: Stock ticker symbols (e.g., "AAPL", "MSFT") - must be fractionable tickers
- Values: Allocation percentages in base 100 (must total 100 or less)
- Range: Each allocation should be between 0 and 100å
- Precision: Supports decimal values (e.g., 25.5 for 25.5%)
Response Format
| Field | Type | Optional | Description |
|---|---|---|---|
| message | string | No | Confirmation message |
| rebalanceId | string | No | Unique identifier for this rebalancing operation |
| status | string | No | Current status of the rebalancing: PENDING or SCHEDULED |
| executionMode | string | No | How the rebalancing will execute: IMMEDIATE or SCHEDULED |
| scheduledFor | string | Yes | ISO date string if execution is scheduled for future |
Status Values:
| Status | Description |
|---|---|
| PENDING | Rebalancing is queued for immediate execution |
| SCHEDULED | Rebalancing is scheduled for a future date/time |
**Execution Modes
| Mode | Description |
|---|---|
| IMMEDIATE | Rebalancing will execute immediately |
| SCHEDULED | Rebalancing will execute at a scheduled time |