Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Vespa314/chan.py
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
Loading
...
head repository: objcCodingTogether/chan.py
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Checking mergeability… Don’t worry, you can still create the pull request.
  • 6 commits
  • 4 files changed
  • 2 contributors

Commits on Oct 21, 2025

  1. 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.
    cto-new[bot] committed Oct 21, 2025
    Configuration menu
    Copy the full SHA
    d3a8e2d View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1 from objcCodingTogether/feat-akshare-api-from-b…

    …aostock
    
    Add AkShareAPI.py: AkShare data interface implementation for unified stock data retrieval
    cto-new[bot] authored Oct 21, 2025
    Configuration menu
    Copy the full SHA
    5f6ee23 View commit details
    Browse the repository at this point in the history
  3. 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.
    cto-new[bot] committed Oct 21, 2025
    Configuration menu
    Copy the full SHA
    d704d73 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2 from objcCodingTogether/refactor-chan-switch-to…

    …-akshare-replace-baostock
    
    Switch CChan default data source to AkShare and integrate AkShareAPI
    cto-new[bot] authored Oct 21, 2025
    Configuration menu
    Copy the full SHA
    111834d View commit details
    Browse the repository at this point in the history
  5. 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.
    cto-new[bot] committed Oct 21, 2025
    Configuration menu
    Copy the full SHA
    05372f0 View commit details
    Browse the repository at this point in the history
  6. 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
    cto-new[bot] authored Oct 21, 2025
    Configuration menu
    Copy the full SHA
    ef2a80d View commit details
    Browse the repository at this point in the history
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.