Add investor API endpoints for portfolio, position, and security management#75
Merged
Add investor API endpoints for portfolio, position, and security management#75
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/)create_portfolio,get_portfolio,list_portfolios,update_portfolio,delete_portfoliocreate_position,get_position,list_positions,update_position,delete_positioncreate_security,get_security,list_securities,update_security,delete_securitylist_holdingsNew Data Models (
robosystems_client/models/)CreatePortfolioRequest,CreatePositionRequest,CreateSecurityRequest,UpdatePortfolioRequest,UpdatePositionRequest,UpdateSecurityRequestPortfolioResponse,PositionResponse,SecurityResponse,HoldingResponse,HoldingSecuritySummaryPortfolioListResponse,PositionListResponse,SecurityListResponse,HoldingsListResponseCreateSecurityRequestTerms,SecurityResponseTerms,UpdateSecurityRequestTermsType0Modified Files
robosystems_client/models/__init__.py: Updated to export all new model classesrobosystems_client/api/subgraphs/create_subgraph.py: Minor modifications (likely import or structural alignment)Scope
Breaking Changes
None expected. This is a purely additive feature introducing a new
investorAPI module alongside existing modules (e.g.,subgraphs). The minor modification tocreate_subgraph.pyshould be reviewed to confirm backward compatibility.Testing Notes
create_subgraphmodification does not regress existing subgraph functionalityInfrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
feature/roboinvestor-coremainCo-Authored-By: Claude noreply@anthropic.com