Skip to content

Add investor API endpoints for portfolio, position, and security management#75

Merged
jfrench9 merged 1 commit intomainfrom
feature/roboinvestor-core
Apr 1, 2026
Merged

Add investor API endpoints for portfolio, position, and security management#75
jfrench9 merged 1 commit intomainfrom
feature/roboinvestor-core

Conversation

@jfrench9
Copy link
Copy Markdown
Member

@jfrench9 jfrench9 commented Apr 1, 2026

Summary

Introduces the core RoboInvestor client module, adding a complete set of investor API endpoints and corresponding data models for managing portfolios, positions, securities, and holdings. This is a foundational feature that enables programmatic interaction with the investor service.

Key Accomplishments

New API Endpoints (robosystems_client/api/investor/)

  • Portfolios: Full CRUD operations — create_portfolio, get_portfolio, list_portfolios, update_portfolio, delete_portfolio
  • Positions: Full CRUD operations — create_position, get_position, list_positions, update_position, delete_position
  • Securities: Full CRUD operations — create_security, get_security, list_securities, update_security, delete_security
  • Holdings: Read support via list_holdings

New Data Models (robosystems_client/models/)

  • Request models: CreatePortfolioRequest, CreatePositionRequest, CreateSecurityRequest, UpdatePortfolioRequest, UpdatePositionRequest, UpdateSecurityRequest
  • Response models: PortfolioResponse, PositionResponse, SecurityResponse, HoldingResponse, HoldingSecuritySummary
  • List response models: PortfolioListResponse, PositionListResponse, SecurityListResponse, HoldingsListResponse
  • Supporting models: CreateSecurityRequestTerms, SecurityResponseTerms, UpdateSecurityRequestTermsType0

Modified Files

  • robosystems_client/models/__init__.py: Updated to export all new model classes
  • robosystems_client/api/subgraphs/create_subgraph.py: Minor modifications (likely import or structural alignment)

Scope

  • 37 files changed across API endpoints and models
  • ~5,840 lines added, representing a comprehensive, auto-generated (or consistently structured) client SDK layer
  • List endpoints for positions and securities include filtering/query parameter support (~256 lines each), suggesting rich querying capabilities

Breaking Changes

None expected. This is a purely additive feature introducing a new investor API module alongside existing modules (e.g., subgraphs). The minor modification to create_subgraph.py should be reviewed to confirm backward compatibility.

Testing Notes

  • Verify each endpoint (create, get, list, update, delete) for portfolios, positions, and securities against a running investor API service
  • Validate request/response serialization and deserialization for all new models
  • Confirm list endpoints correctly handle pagination and filtering parameters
  • Test error handling and edge cases (e.g., missing required fields, invalid IDs)
  • Ensure the create_subgraph modification does not regress existing subgraph functionality

Infrastructure Considerations

  • The investor API service must be available and configured for client connectivity
  • Environment or client configuration may need to be updated to include investor service base URLs or authentication credentials
  • Consider API versioning strategy as this represents a significant new surface area

🤖 Generated with Claude Code

Branch Info:

  • Source: feature/roboinvestor-core
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

…gement

## Summary

This commit introduces a comprehensive set of new API endpoints for managing investor portfolios, positions, and securities within the `robosystems_client`. The new functionality includes creating, retrieving, deleting, and listing portfolios, positions, and securities.

## Key Changes

### New API Endpoints
- **Portfolio Management**:
  - `create_portfolio`: Create a new portfolio.
  - `get_portfolio`: Retrieve a specific portfolio by ID.
  - `delete_portfolio`: Remove an existing portfolio.
  - `list_portfolios`: List all portfolios associated with an investor.

- **Position Management**:
  - `create_position`: Create a new position within a portfolio.
  - `get_position`: Retrieve a specific position by ID.
  - `delete_position`: Remove an existing position.

- **Security Management**:
  - `create_security`: Create a new security.
  - `get_security`: Retrieve a specific security by ID.
  - `delete_security`: Remove an existing security.

### New Data Models
- Introduced models for request and response handling, including `CreatePortfolioRequest`, `PortfolioResponse`, `CreatePositionRequest`, `PositionResponse`, `CreateSecurityRequest`, and `SecurityResponse`.

## Testing Notes
- Verify that all new API endpoints handle both synchronous and asynchronous invocation patterns consistently.
- Ensure that the new models serialize and deserialize correctly.

## Infrastructure Considerations
- No breaking changes introduced; existing functionality remains intact.
@jfrench9 jfrench9 merged commit 0e5a800 into main Apr 1, 2026
1 check passed
@jfrench9 jfrench9 deleted the feature/roboinvestor-core branch April 1, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant