feat: Add tag parameter support to GTT orders #208
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.
Issue
Resolves: #207 - GTT orders missing tag parameter support
Problem
Placing regular orders supports the
tagparameter, but theplace_gtt()method in the Python client does not expose it. This forces users to maintain external mapping to trace GTT-triggered orders back to their strategies.Solution
Extended
place_gtt()andmodify_gtt()methods to include an optionaltagparameter and forward it to the API request.Changes Made
Core Implementation (
kiteconnect/connect.py)_get_gtt_payload()to accept optionaltagparameterplace_gtt()method signature to includetag=Nonemodify_gtt()method signature to includetag=NoneTesting (
tests/unit/test_connect.py)test_place_gtt_with_tag()test casetest_modify_gtt_with_tag()test caseDocumentation (
examples/gtt_order.py)"my_strategy_1","my_strategy_2") are example placeholdersUsage Examples
Single GTT with tag
Backward Compatibility
Testing
Impact