Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] - Add derivates historical chart #6520

Merged
merged 16 commits into from
Jun 26, 2024

Conversation

IgorWounds
Copy link
Contributor

  1. Why? (1-3 sentences or a bullet point list):

    • The goal is to extend the charting coverage of the OpenBB Platform.
  2. What? (1-3 sentences or a bullet point list):

    • Maps the price_historical charting function to the futures derivatives price data.
  3. Impact (1-2 sentences or a bullet point list):

    • Now users can utilize the charting capabilities for this endpoint.
  4. Testing Done:

    • Ensured that the chart is spawned and working.

@IgorWounds IgorWounds requested a review from deeleeramone June 19, 2024 13:04
@github-actions github-actions bot added enhancement Enhancement platform OpenBB Platform v4 PRs for v4 labels Jun 19, 2024
@IgorWounds IgorWounds removed platform OpenBB Platform v4 PRs for v4 labels Jun 19, 2024
@github-actions github-actions bot added platform OpenBB Platform v4 PRs for v4 labels Jun 19, 2024
Copy link
Contributor

@deeleeramone deeleeramone left a comment

Choose a reason for hiding this comment

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

I think this is in the same category of issue as the Technical router integration tests. Perhaps satisfying issues in one place opened a new one elsewhere?

Screenshot 2024-06-19 at 2 29 04 PM

The code seems to work as expected, but there's an unrelated issue with the communication between some of the internal elements. An unexpected structure or object has been encountered.

Screenshot 2024-06-19 at 2 35 12 PM

@deeleeramone
Copy link
Contributor

deeleeramone commented Jun 20, 2024

@hjoaquim, something weird is happening here, chart=True works in the Fast API but not in the Python interface. However, the same chart, ultimately equity.price.historical, works in the Python interface.

It is mapping correctly in _get_functions():

 'derivatives_futures_historical': <function openbb_derivatives.derivatives_views.DerivativesViews.derivatives_futures_historical(**kwargs) -> Tuple[openbb_charting.core.openbb_figure.OpenBBFigure, Dict[str, Any]]>

Screenshot 2024-06-20 at 12 48 20 PM

INFO:     127.0.0.1:55594 - "GET /api/v1/derivatives/futures/historical?chart=true&provider=yfinance&symbol=ES&interval=1d HTTP/1.1" 200 OK
In [2]: data = obb.derivatives.futures.historical("ES", chart=True)

In [3]: data
Out[3]: 
OBBject

id: 0667486f-2c9e-700d-8000-6d8b77eeb5d9
results: [{'date': datetime.datetime(2000, 9, 18, 0, 0), 'open': 1485.25, 'high': 1...
provider: yfinance
warnings: [{'category': 'OpenBBWarning', 'message': "Parameter 'chart' not found."}...
chart: None
extra: {'metadata': {'arguments': {'provider_choices': {'provider': 'yfinance'}, 's...

@deeleeramone
Copy link
Contributor

Not sure what happened here, but I had uninstalled both derivatives and openbb-charting then reinstalled. A second uninstall/install of openbb-charting seems to have resolved the difference and now chart=True is working.

Now I got a weird glitch:

Screen.Recording.2024-06-20.at.1.43.55.PM.mov

This is a separate issue than the PR, the implementation of the execution seems fine.

@hjoaquim
Copy link
Contributor

Now I got a weird glitch:
Screen.Recording.2024-06-20.at.1.43.55.PM.mov

This is a separate issue than the PR, the implementation of the execution seems fine.

That's new 😲

@deeleeramone
Copy link
Contributor

Now I got a weird glitch:
Screen.Recording.2024-06-20.at.1.43.55.PM.mov
This is a separate issue than the PR, the implementation of the execution seems fine.

That's new 😲

Probably related to some kind of broken syntax in the frontend-components compilation, and it could also be an interaction between that compiled code and the Platform code. It is very difficult to resolve issues related to that because they are not dynamically integrated with the code, but rather frozen forever.

@IgorWounds
Copy link
Contributor Author

@deeleeramone @hjoaquim are there updates regarding the charting? How should I proceed?

Copy link
Contributor

@hjoaquim hjoaquim left a comment

Choose a reason for hiding this comment

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

Let's fix the tests and this is good to go; the fact that the charting is now modular makes this look so good and clean!

@IgorWounds IgorWounds added this pull request to the merge queue Jun 26, 2024
Merged via the queue into develop with commit befdcfc Jun 26, 2024
9 checks passed
@IgorWounds IgorWounds deleted the feature/derivatives-historical-chart branch June 26, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking_change enhancement Enhancement platform OpenBB Platform v4 PRs for v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants