-
Notifications
You must be signed in to change notification settings - Fork 762
Comparing changes
Open a pull request
base repository: Vespa314/chan.py
base: main
head repository: objcCodingTogether/chan.py
compare: main
- 6 commits
- 4 files changed
- 2 contributors
Commits on Oct 21, 2025
-
feat(DataAPI): add AkShareAPI implementation for data interface
Introduce AkShareAPI as a new data source for stock data retrieval to support akshare-based workflows alongside existing BaoStockAPI, following the CCommonStockApi interface. This enables flexibility to use akshare for both minute-level and daily K-lines, selectable by KL_TYPE. Includes robust normalization of data fields and time formats, and is designed to fall back gracefully if akshare API endpoints differ or headers change. - Added DataAPI/AkShareAPI.py with full implementation for get_kl_data, normalization, and initialization routines. - Ensures compatibility with CChan data loading and CKLine_Unit expectations. - Added flexible .gitignore for project hygiene. No breaking changes. akshare must be installed to use this new data source.
Configuration menu - View commit details
-
Copy full SHA for d3a8e2d - Browse repository at this point
Copy the full SHA d3a8e2dView commit details -
Merge pull request #1 from objcCodingTogether/feat-akshare-api-from-b…
…aostock Add AkShareAPI.py: AkShare data interface implementation for unified stock data retrieval
Configuration menu - View commit details
-
Copy full SHA for 5f6ee23 - Browse repository at this point
Copy the full SHA 5f6ee23View commit details -
feat(data): switch default data source to AkShare and use AkShareAPI …
…in CChan This update migrates the CChan main class to use AkShare as its default data source, replacing BaoStock. The internal data source dispatch now directs both DATA_SRC.BAO_STOCK and explicit custom:AkShareAPI.CAkShare selection to AkShare and CAkShareAPI, ensuring data access flows through the AkShare API implementation. - Set default data_src in CChan to custom:AkShareAPI.CAkShare - Updated GetStockAPI method to import and use CAkShare when BAO_STOCK is selected - CChan now calls AkShare, replacing previous BaoStock connections - No changes made to user-facing parameters except the data backend BREAKING CHANGE: Default stock data source is now AkShare instead of BaoStock. Existing scripts relying on BaoStock-specific features may require adaptation.
Configuration menu - View commit details
-
Copy full SHA for d704d73 - Browse repository at this point
Copy the full SHA d704d73View commit details -
Merge pull request #2 from objcCodingTogether/refactor-chan-switch-to…
…-akshare-replace-baostock Switch CChan default data source to AkShare and integrate AkShareAPI
Configuration menu - View commit details
-
Copy full SHA for 111834d - Browse repository at this point
Copy the full SHA 111834dView commit details -
fix(core): prevent IndexError by safeguarding access to last KLine
This change adds a guard to prevent IndexError when accessing the last KLine (`self.lst[-1]`) within the `cal_seg_and_zs` method of `CKLine_List`. The bug occurred when the list was empty, causing a crash. The update ensures that `try_add_virtual_bi` is only called if the list is not empty. - Adds length check for `self.lst` before accessing its last element - Prevents IndexError crash in empty or edge-case data scenarios - Improves stability and robustness No breaking changes introduced.
Configuration menu - View commit details
-
Copy full SHA for 05372f0 - Browse repository at this point
Copy the full SHA 05372f0View commit details -
Merge pull request #3 from objcCodingTogether/bugfix-handle-empty-lst…
…-indexerror-try_add_virtual_bi Fix IndexError in Chan.py by checking KLine list length before accessing last element
Configuration menu - View commit details
-
Copy full SHA for ef2a80d - Browse repository at this point
Copy the full SHA ef2a80dView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...main