docs: simplify and restructure docs site (37 → 22 pages)#62
docs: simplify and restructure docs site (37 → 22 pages)#62Apurv-Salunke wants to merge 1 commit intomainfrom
Conversation
Merge overlapping content (auth, portfolio, websocket, errors), make all examples broker-agnostic with dual sync/async tabs, switch to Material for MkDocs theme, and delete 20 obsolete files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR restructures the documentation for Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs_site/recipes/stream-and-store-live-ticks.md (1)
19-27:⚠️ Potential issue | 🟡 MinorUndefined
broker_idvariable.The
broker_idvariable at line 26 is not defined in this example. Since this is a complete, runnable recipe, users will encounter aNameError.📝 Suggested fix
async def main() -> None: config = {"api_key": "...", "access_token": "..."} + broker_id = "zerodha" # or "angelone" watch = [ Equity(exchange=Exchange.NSE, symbol="RELIANCE"), Equity(exchange=Exchange.NSE, symbol="SBIN"), ] async with AsyncTTConnect(broker_id, config) as broker:🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs_site/recipes/stream-and-store-live-ticks.md` around lines 19 - 27, The example calls AsyncTTConnect(broker_id, config) but broker_id is not defined, causing a NameError; update the example in main to define a broker_id variable (e.g., broker_id = "<your_broker_id>" or broker_id = "demo") before the async with line or pass the intended literal string directly to AsyncTTConnect; ensure the symbol broker_id is declared in the same scope as main() so AsyncTTConnect and the await broker.subscribe(watch, on_tick) call use a valid identifier.
🧹 Nitpick comments (3)
pyproject.toml (1)
28-28: Inconsistent version constraint style.All other dev dependencies use
>=constraints, butmkdocs-materialuses^. Consider using>=9.7.6for consistency, or confirm the stricter caret constraint is intentional to avoid major version upgrades.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pyproject.toml` at line 28, The mkdocs-material dependency uses a caret constraint (^9.7.6) which is inconsistent with other dev dependencies that use >= style; update the mkdocs-material entry (the dependency named "mkdocs-material" and its version string "^9.7.6") to use the same constraint style by changing the version to ">=9.7.6", or if you intend to lock to caret semantics, add a comment in the PR explaining why the stricter ^9.7.6 constraint is required so reviewers know the deviation is intentional.docs_site/troubleshooting/auth-failures.md (1)
11-14: Optional: Consider varying the sentence structure.The checklist uses "Confirm" to start three consecutive items (lines 11-14). While functionally clear, varying the sentence structure could improve readability. For example:
- Line 11: "Verify the broker ID is correct"
- Line 12: "Ensure required config keys are present..."
- Line 13: "Check that token/session is still valid..."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs_site/troubleshooting/auth-failures.md` around lines 11 - 14, The three consecutive checklist items that all start with the word "Confirm" should be rewritten to vary sentence structure for readability: change the first "Confirm broker ID is correct" to "Verify the broker ID is correct", change the second "Confirm required config keys are present for your broker and auth mode" to "Ensure required config keys are present for your broker and auth mode", and change the third "Confirm token/session is still valid (tokens expire daily per SEBI rules)" to "Check that the token/session is still valid (tokens expire daily per SEBI rules)"; leave the fourth item unchanged.docs_site/authentication.md (1)
14-24: Consider definingbroker_idplaceholder explicitly.The code examples use
broker_idwithout defining it, which may confuse readers. Consider adding a comment or assignment to make the placeholder explicit.📝 Suggested improvement
=== "Sync" ```python from tt_connect import TTConnect + broker_id = "zerodha" # or "angelone" config = { "api_key": "YOUR_API_KEY", "access_token": "YOUR_ACCESS_TOKEN", } with TTConnect(broker_id, config) as broker: print(broker.get_profile().name) ```🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs_site/authentication.md` around lines 14 - 24, The example uses an undefined broker_id which can confuse readers; add an explicit placeholder assignment or comment before using TTConnect (e.g., set broker_id = "zerodha" or similar) so the TTConnect(broker_id, config) call is clear; update the snippet near the TTConnect import and config to define broker_id and/or add an inline comment indicating acceptable values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs_site/instruments.md`:
- Around line 50-59: The async example in the docs uses undefined broker_id and
config; add definitions before using AsyncTTConnect: declare a broker_id (e.g.
"zerodha" or "angelone") and a config dict with the required keys (e.g.
"api_key" and "access_token") so AsyncTTConnect(broker_id, config) and the
subsequent call to search_instruments(...) work; update the snippet around
AsyncTTConnect, broker_id, and config to mirror the sync example's setup.
In `@docs_site/portfolio.md`:
- Around line 25-30: The example uses an undefined variable broker_id causing a
NameError; update the snippet around TTConnect(...) to either declare broker_id
(e.g., set to an example string or show how to obtain it) or add a clear inline
comment explaining where to get/replace broker_id (reference TTConnect and
broker.get_positions() so readers know which examples rely on it); ensure the
change is minimal and preserves the example flow.
In `@docs_site/recipes/cancel-all-open-orders.md`:
- Around line 7-16: The example uses an undefined broker_id when constructing
TTConnect; define broker_id before the with-block (e.g., broker_id =
"<your_broker_id>" or obtain it via environment/config) or add a one-line
comment referencing the getting-started guide for where to get the broker ID so
the TTConnect(...) call and subsequent broker.cancel_all_orders() call work
as-is.
In `@docs_site/reference/models.md`:
- Around line 52-65: Documentation claims FeedState can be imported from
tt_connect.enums but FeedState is not exported there (it's defined in
tt_connect.core.models.enums), so either add "FeedState" to the __all__ list in
tt_connect/enums.py so consumers can import FeedState from tt_connect.enums, or
update docs_site/reference/models.md and docs_site/websocket.md to reference
tt_connect.core.models.enums.FeedState; locate the enum symbol FeedState and the
export list __all__ in tt_connect/enums.py (and the original definition in
tt_connect/core/models/enums.py) and apply one consistent fix across code/docs.
In `@docs_site/troubleshooting/instrument-not-found.md`:
- Around line 17-30: The examples call TTConnect(broker_id, config) but never
define broker_id; add a clear definition (e.g., broker_id = "<your_broker_id>"
or an integer ID) before using TTConnect in both the sync and the other example
so TTConnect and broker_id are defined (look for TTConnect(...) usages and
define broker_id above them).
In `@docs_site/websocket.md`:
- Around line 57-65: The docs example imports FeedState from tt_connect.enums
but that symbol isn't exported there; update the import to the module that
actually exports FeedState (e.g., change the import line to use the module that
exposes FeedState as noted in models.md) so the example works; ensure the
example keeps using FeedState and broker.feed_state as shown and adjust the
import path to the correct public export (or re-export FeedState from
tt_connect.enums and then keep the existing import).
In `@mkdocs.yml`:
- Around line 1-2: Add an entry to CHANGELOG.md documenting the documentation
restructure: mention that site_name "tt-connect" docs were simplified (pages
reduced from 37 to 22) and include a short note about what changed (docs
consolidation/reorganization) and the PR/author reference; update the Unreleased
section (or create one) with this concise changelog line so the CI
changelog-check passes.
---
Outside diff comments:
In `@docs_site/recipes/stream-and-store-live-ticks.md`:
- Around line 19-27: The example calls AsyncTTConnect(broker_id, config) but
broker_id is not defined, causing a NameError; update the example in main to
define a broker_id variable (e.g., broker_id = "<your_broker_id>" or broker_id =
"demo") before the async with line or pass the intended literal string directly
to AsyncTTConnect; ensure the symbol broker_id is declared in the same scope as
main() so AsyncTTConnect and the await broker.subscribe(watch, on_tick) call use
a valid identifier.
---
Nitpick comments:
In `@docs_site/authentication.md`:
- Around line 14-24: The example uses an undefined broker_id which can confuse
readers; add an explicit placeholder assignment or comment before using
TTConnect (e.g., set broker_id = "zerodha" or similar) so the
TTConnect(broker_id, config) call is clear; update the snippet near the
TTConnect import and config to define broker_id and/or add an inline comment
indicating acceptable values.
In `@docs_site/troubleshooting/auth-failures.md`:
- Around line 11-14: The three consecutive checklist items that all start with
the word "Confirm" should be rewritten to vary sentence structure for
readability: change the first "Confirm broker ID is correct" to "Verify the
broker ID is correct", change the second "Confirm required config keys are
present for your broker and auth mode" to "Ensure required config keys are
present for your broker and auth mode", and change the third "Confirm
token/session is still valid (tokens expire daily per SEBI rules)" to "Check
that the token/session is still valid (tokens expire daily per SEBI rules)";
leave the fourth item unchanged.
In `@pyproject.toml`:
- Line 28: The mkdocs-material dependency uses a caret constraint (^9.7.6) which
is inconsistent with other dev dependencies that use >= style; update the
mkdocs-material entry (the dependency named "mkdocs-material" and its version
string "^9.7.6") to use the same constraint style by changing the version to
">=9.7.6", or if you intend to lock to caret semantics, add a comment in the PR
explaining why the stricter ^9.7.6 constraint is required so reviewers know the
deviation is intentional.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c0aa3076-2ac4-499a-9226-761107afca7c
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (44)
docs_site/authentication.mddocs_site/basics.mddocs_site/broker-differences.mddocs_site/config-and-env.mddocs_site/error-handling.mddocs_site/errors-and-retries.mddocs_site/getting-started.mddocs_site/glossary.mddocs_site/gtt.mddocs_site/holdings-and-funds.mddocs_site/index.mddocs_site/instruments.mddocs_site/login-and-session.mddocs_site/market-data.mddocs_site/orders.mddocs_site/portfolio.mddocs_site/positions.mddocs_site/realtime-websocket.mddocs_site/recipes/cancel-all-open-orders.mddocs_site/recipes/close-all-open-positions.mddocs_site/recipes/first-order.mddocs_site/recipes/index.mddocs_site/recipes/recover-from-reconnect.mddocs_site/recipes/stream-and-store-live-ticks.mddocs_site/reference/capabilities.mddocs_site/reference/clients.mddocs_site/reference/enums.mddocs_site/reference/exceptions.mddocs_site/reference/index.mddocs_site/reference/instrument-store.mddocs_site/reference/models.mddocs_site/reference/operation-notes.mddocs_site/safety-and-good-practices.mddocs_site/start-here.mddocs_site/trades.mddocs_site/troubleshooting/auth-failures.mddocs_site/troubleshooting/duplicate-orders.mddocs_site/troubleshooting/index.mddocs_site/troubleshooting/instrument-not-found.mddocs_site/troubleshooting/order-rejected.mddocs_site/troubleshooting/websocket-reconnect.mddocs_site/websocket.mdmkdocs.ymlpyproject.toml
💤 Files with no reviewable changes (20)
- docs_site/glossary.md
- docs_site/start-here.md
- docs_site/reference/capabilities.md
- docs_site/positions.md
- docs_site/troubleshooting/index.md
- docs_site/config-and-env.md
- docs_site/reference/index.md
- docs_site/recipes/index.md
- docs_site/reference/enums.md
- docs_site/login-and-session.md
- docs_site/errors-and-retries.md
- docs_site/holdings-and-funds.md
- docs_site/basics.md
- docs_site/reference/instrument-store.md
- docs_site/realtime-websocket.md
- docs_site/trades.md
- docs_site/troubleshooting/websocket-reconnect.md
- docs_site/safety-and-good-practices.md
- docs_site/reference/operation-notes.md
- docs_site/recipes/recover-from-reconnect.md
| === "Async" | ||
|
|
||
| futures = broker.get_futures(underlying) | ||
| print("Futures count:", len(futures)) | ||
| ```python | ||
| from tt_connect import AsyncTTConnect | ||
|
|
||
| if expiries: | ||
| chain = broker.get_options(underlying, expiry=expiries[0]) | ||
| print("Options for first expiry:", len(chain)) | ||
| ``` | ||
| async with AsyncTTConnect(broker_id, config) as broker: | ||
| results = await broker.search_instruments("RELIANCE", exchange="NSE") | ||
| for i in results: | ||
| print(i.exchange, i.symbol) | ||
| ``` |
There was a problem hiding this comment.
Missing config definition in async example.
The async "Search instruments" example at lines 50-59 uses broker_id and config but neither is defined, unlike the sync example which at least shows the config dictionary. This inconsistency will confuse users.
📝 Suggested fix
=== "Async"
```python
from tt_connect import AsyncTTConnect
+ config = {"api_key": "...", "access_token": "..."}
+ broker_id = "zerodha" # or "angelone"
+
async with AsyncTTConnect(broker_id, config) as broker:
results = await broker.search_instruments("RELIANCE", exchange="NSE")
for i in results:
print(i.exchange, i.symbol)
```🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 52-52: Code block style
Expected: fenced; Actual: indented
(MD046, code-block-style)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs_site/instruments.md` around lines 50 - 59, The async example in the docs
uses undefined broker_id and config; add definitions before using
AsyncTTConnect: declare a broker_id (e.g. "zerodha" or "angelone") and a config
dict with the required keys (e.g. "api_key" and "access_token") so
AsyncTTConnect(broker_id, config) and the subsequent call to
search_instruments(...) work; update the snippet around AsyncTTConnect,
broker_id, and config to mirror the sync example's setup.
| config = {"api_key": "...", "access_token": "..."} | ||
|
|
||
| with TTConnect(broker_id, config) as broker: | ||
| for p in broker.get_positions(): | ||
| print(p.instrument.symbol, "qty=", p.qty, "pnl=", p.pnl) | ||
| ``` |
There was a problem hiding this comment.
Undefined broker_id variable in code examples.
The broker_id variable is used throughout the examples but never defined. Users copying these snippets will encounter a NameError. Consider adding a definition or a comment showing expected usage:
📝 Suggested fix
config = {"api_key": "...", "access_token": "..."}
+ broker_id = "zerodha" # or "angelone", etc.
with TTConnect(broker_id, config) as broker:Alternatively, add a note at the top of the page directing users to see the getting-started guide for broker_id setup.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| config = {"api_key": "...", "access_token": "..."} | |
| with TTConnect(broker_id, config) as broker: | |
| for p in broker.get_positions(): | |
| print(p.instrument.symbol, "qty=", p.qty, "pnl=", p.pnl) | |
| ``` | |
| config = {"api_key": "...", "access_token": "..."} | |
| broker_id = "zerodha" # or "angelone", etc. | |
| with TTConnect(broker_id, config) as broker: | |
| for p in broker.get_positions(): | |
| print(p.instrument.symbol, "qty=", p.qty, "pnl=", p.pnl) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs_site/portfolio.md` around lines 25 - 30, The example uses an undefined
variable broker_id causing a NameError; update the snippet around TTConnect(...)
to either declare broker_id (e.g., set to an example string or show how to
obtain it) or add a clear inline comment explaining where to get/replace
broker_id (reference TTConnect and broker.get_positions() so readers know which
examples rely on it); ensure the change is minimal and preserves the example
flow.
| ```python | ||
| from tt_connect import TTConnect | ||
|
|
||
| with TTConnect("zerodha", config) as broker: | ||
| cancelled, failed = broker.cancel_all_orders() | ||
| print("Cancelled:", cancelled) | ||
| print("Failed:", failed) | ||
| ``` | ||
| config = {"api_key": "...", "access_token": "..."} | ||
|
|
||
| with TTConnect(broker_id, config) as broker: | ||
| cancelled, failed = broker.cancel_all_orders() | ||
| print("Cancelled:", cancelled) | ||
| print("Failed:", failed) | ||
| ``` |
There was a problem hiding this comment.
Undefined broker_id variable in examples.
Same issue as other updated docs - broker_id is used but not defined. Consider adding a definition or a cross-reference to getting-started docs.
📝 Suggested fix
from tt_connect import TTConnect
config = {"api_key": "...", "access_token": "..."}
+ broker_id = "zerodha" # or "angelone"
with TTConnect(broker_id, config) as broker:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```python | |
| from tt_connect import TTConnect | |
| with TTConnect("zerodha", config) as broker: | |
| cancelled, failed = broker.cancel_all_orders() | |
| print("Cancelled:", cancelled) | |
| print("Failed:", failed) | |
| ``` | |
| config = {"api_key": "...", "access_token": "..."} | |
| with TTConnect(broker_id, config) as broker: | |
| cancelled, failed = broker.cancel_all_orders() | |
| print("Cancelled:", cancelled) | |
| print("Failed:", failed) | |
| ``` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs_site/recipes/cancel-all-open-orders.md` around lines 7 - 16, The example
uses an undefined broker_id when constructing TTConnect; define broker_id before
the with-block (e.g., broker_id = "<your_broker_id>" or obtain it via
environment/config) or add a one-line comment referencing the getting-started
guide for where to get the broker ID so the TTConnect(...) call and subsequent
broker.cancel_all_orders() call work as-is.
| ## Public enums | ||
|
|
||
| ## Related guides | ||
| - [Instruments](../instruments.md) | ||
| - [Orders](../orders.md) | ||
| - [Market Data](../market-data.md) | ||
| - [GTT](../gtt.md) | ||
| Import from `tt_connect.enums`: | ||
|
|
||
| | Enum | Values | Typical usage | | ||
| |---|---|---| | ||
| | `Exchange` | `NSE`, `BSE`, `NFO`, `BFO`, `CDS`, `MCX` | Instrument exchange/segment | | ||
| | `OptionType` | `CE`, `PE` | Option side | | ||
| | `ProductType` | `CNC`, `MIS`, `NRML` | Order product/margin type | | ||
| | `OrderType` | `MARKET`, `LIMIT`, `SL`, `SL_M` | Order execution style | | ||
| | `Side` | `BUY`, `SELL` | Order direction | | ||
| | `OrderStatus` | `PENDING`, `OPEN`, `COMPLETE`, `CANCELLED`, `REJECTED` | Normalized order state | | ||
| | `FeedState` | `connecting`, `connected`, `reconnecting`, `stale`, `closed` | WebSocket feed health | | ||
| | `CandleInterval` | `1minute`, `3minute`, `5minute`, `10minute`, `15minute`, `30minute`, `60minute`, `day` | Historical candle interval | |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify FeedState export status
echo "=== Checking tt_connect/enums.py __all__ ==="
cat tt_connect/enums.py | grep -A 15 "__all__"
echo ""
echo "=== Checking if FeedState is re-exported anywhere ==="
rg -n "FeedState" tt_connect/__init__.py tt_connect/enums.py 2>/dev/null || echo "No re-export found"Repository: Tiny-Trader/connect
Length of output: 579
🏁 Script executed:
# Check where FeedState is defined and if it's used elsewhere
echo "=== Finding FeedState definition ==="
rg -n "class FeedState\|FeedState\s*=" --type py 2>/dev/null | head -20
echo ""
echo "=== Checking for FeedState imports in codebase ==="
rg -n "from.*FeedState\|import.*FeedState" --type py 2>/dev/null | head -10
echo ""
echo "=== Checking if FeedState is referenced in docs ==="
rg -n "FeedState" docs_site/reference/models.mdRepository: Tiny-Trader/connect
Length of output: 310
🏁 Script executed:
# Broader search for FeedState in all files
echo "=== Searching for FeedState in all files ==="
rg "FeedState" --type py --type md 2>/dev/null
echo ""
echo "=== Check if FeedState ever existed in git history (recent commits only) ==="
git log --oneline -20 -- "*enums*" 2>/dev/null | head -10
echo ""
echo "=== List all Python files that might contain enum definitions ==="
fd -e py "enums|enum" tt_connect 2>/dev/nullRepository: Tiny-Trader/connect
Length of output: 2810
FeedState is not exported from tt_connect.enums.
Line 64 documents FeedState as importable from tt_connect.enums, but the __all__ list in tt_connect/enums.py only exports 7 enums and FeedState is not among them. Users following this documentation will get an ImportError. Additionally, docs_site/websocket.md contains the same incorrect import statement. The enum is defined in tt_connect/core/models/enums.py and used internally throughout the codebase.
Either:
- Add
FeedStateto the__all__export list intt_connect/enums.py, or - Update all documentation to reference the correct internal import path:
tt_connect.core.models.enums
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs_site/reference/models.md` around lines 52 - 65, Documentation claims
FeedState can be imported from tt_connect.enums but FeedState is not exported
there (it's defined in tt_connect.core.models.enums), so either add "FeedState"
to the __all__ list in tt_connect/enums.py so consumers can import FeedState
from tt_connect.enums, or update docs_site/reference/models.md and
docs_site/websocket.md to reference tt_connect.core.models.enums.FeedState;
locate the enum symbol FeedState and the export list __all__ in
tt_connect/enums.py (and the original definition in
tt_connect/core/models/enums.py) and apply one consistent fix across code/docs.
| === "Sync" | ||
|
|
||
| ```python | ||
| from tt_connect import TTConnect | ||
| from tt_connect.instruments import Equity | ||
| from tt_connect.enums import Exchange | ||
|
|
||
| config = {"api_key": "...", "access_token": "..."} | ||
|
|
||
| with TTConnect(broker_id, config) as broker: | ||
| print(broker.search_instruments("SBIN", exchange="NSE")) | ||
| underlying = Equity(exchange=Exchange.NSE, symbol="SBIN") | ||
| print(broker.get_expiries(underlying)) | ||
| ``` |
There was a problem hiding this comment.
Undefined broker_id variable.
The broker_id variable is used at lines 26 and 41 but not defined in either example.
📝 Suggested fix for sync example
config = {"api_key": "...", "access_token": "..."}
+ broker_id = "zerodha" # or "angelone"
with TTConnect(broker_id, config) as broker:🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs_site/troubleshooting/instrument-not-found.md` around lines 17 - 30, The
examples call TTConnect(broker_id, config) but never define broker_id; add a
clear definition (e.g., broker_id = "<your_broker_id>" or an integer ID) before
using TTConnect in both the sync and the other example so TTConnect and
broker_id are defined (look for TTConnect(...) usages and define broker_id above
them).
| ```python | ||
| from tt_connect.enums import FeedState | ||
|
|
||
| if broker.feed_state == FeedState.STALE: | ||
| print("No data — market may be closed or connection degraded") | ||
|
|
||
| if broker.feed_state == FeedState.CONNECTED: | ||
| print("Stream is healthy") | ||
| ``` |
There was a problem hiding this comment.
Import path inconsistency with models.md.
Line 58 shows importing FeedState from tt_connect.enums, but as noted in the models.md review, FeedState is not currently exported from that module. This example will fail with an ImportError.
Once the FeedState export issue is resolved (either by adding it to tt_connect.enums or by documenting the correct internal path), update this import accordingly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs_site/websocket.md` around lines 57 - 65, The docs example imports
FeedState from tt_connect.enums but that symbol isn't exported there; update the
import to the module that actually exports FeedState (e.g., change the import
line to use the module that exposes FeedState as noted in models.md) so the
example works; ensure the example keeps using FeedState and broker.feed_state as
shown and adjust the import path to the correct public export (or re-export
FeedState from tt_connect.enums and then keep the existing import).
| site_name: tt-connect | ||
| site_description: Unified broker API for Indian markets |
There was a problem hiding this comment.
Pipeline failure: CHANGELOG.md not updated.
The CI changelog-check failed because CHANGELOG.md was not updated for this documentation restructuring PR. Consider adding an entry documenting the docs simplification from 37 to 22 pages.
🧰 Tools
🪛 GitHub Actions: changelog-check
[error] 1-1: Documentation-related files and changelog requirement triggered failure because CHANGELOG.md was not updated.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@mkdocs.yml` around lines 1 - 2, Add an entry to CHANGELOG.md documenting the
documentation restructure: mention that site_name "tt-connect" docs were
simplified (pages reduced from 37 to 22) and include a short note about what
changed (docs consolidation/reorganization) and the PR/author reference; update
the Unreleased section (or create one) with this concise changelog line so the
CI changelog-check passes.
Summary
"zerodha"/"angelone"with genericbroker_idvariable; broker-specific notes use collapsible admonitionsTTConnectandAsyncTTConnectusage viapymdownx.tabbedTest plan
poetry run mkdocs build --strictpasses (no broken links)localhost:8002🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores