Skip to content

Conversation

@ppmina
Copy link
Owner

@ppmina ppmina commented Oct 13, 2025

No description provided.

@ppmina ppmina merged commit d7bd6e7 into main Oct 13, 2025
3 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

klines_type: HistoricalKlinesType = HistoricalKlinesType.SPOT,
) -> list[KlineMarketTicker]:
"""获取历史行情数据."""
) -> list["SpotKlineTicker"] | list["FuturesKlineTicker"]:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: API Method Signature Change Causes Errors

The get_historical_klines method signature changed, making interval a required parameter and shifting its position. This breaks existing calls using positional arguments, as end_time may now be incorrectly passed as interval, leading to runtime errors.

Fix in Cursor Fix in Web

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 152 to 157
self,
symbol: str,
start_time: str | datetime,
interval: Freq,
end_time: str | datetime | None = None,
interval: Freq = Freq.h1,
klines_type: HistoricalKlinesType = HistoricalKlinesType.SPOT,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid breaking positional callers of get_historical_klines

The new signature of MarketDataService.get_historical_klines moves interval ahead of end_time but still accepts both positionally. Any existing code that called the API with the previous order—get_historical_klines(symbol, start, end, interval)—will now pass a string (the former end_time) where a Freq is expected, causing an AttributeError when .value is accessed. This is a silent backward‑incompatible change for a public method and will fail at runtime for consumers that relied on the old positional order. Consider preserving the original parameter order or making the new parameters keyword-only to avoid unexpected breakages.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants