Add inventory-backed endpoint execution#9
Merged
Conversation
Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Summary
This PR successfully adds inventory-backed endpoint execution to the KIS SDK. The implementation is well-structured with proper validation, error handling, and comprehensive test coverage.
Key Changes:
- Added
execute_inventoryAPI to call any of the 338 captured KIS endpoints by stable operation ID - Implemented
InventoryCatalogwith validation for required query/body/header fields before network I/O - Refactored execution logic into shared
execute_preparedmethod for code reuse - Added comprehensive tests covering validation, fallback, and environment constraints
Security & Safety:
- Real trading mutations remain blocked locally by
KisError::LiveTradingDisabled✅ - Real-only endpoints are rejected in mock environment ✅
- Fallback credentials are properly isolated (no credential leakage) ✅
- Input validation happens before network I/O ✅
The code is production-ready with no blocking issues identified.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
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
InventoryCatalog,InventoryRequest, andKisClient::execute_inventoryso the SDK can call every bundled official KIS inventory endpoint by stable operation id.kindand path semantics so non-trading POST endpoints such as realtime/websocket calls are not blocked by the live trading guard, while order mutations remain protected.Commits
6321964-feat: add inventory-backed endpoint execution8c0289d-docs: clarify inventory execution API scope8939795-fix: classify inventory operations by contract kindVerification
cargo fmt --all --checkgit diff --checkcargo test --lockedtests/mock_server_contract.rs: 4 passedtests/sdk_core.rs: 15 passedcargo test --locked inventory_operation_kind_uses_contract_kind_not_http_method_onlycargo test --locked inventory_real_non_trading_post_is_not_blocked_by_live_trading_guardcargo test --locked real_cash_order_is_blocked_before_network_without_live_trading_guardPackage validation: successPublish action dry run: successPublish to crates.io: skippedReview evidence
8939795.Safety and limits
KisError::LiveTradingDisabled.Environment::MockwithKisError::UnsupportedEnvironment.TradingMutation.Related