OpenBBTerminal
OpenBBTerminal copied to clipboard
Stock menu refactoring for easier API usage
Description
This pr refactors the stocks menu for easier use of the api and is a part of the general API upgrade in combination of #2097 (and more future prs).
How has this been tested?
Will be tested soon
Checklist:
- [x] Update our Hugo documentation following these guidelines.
- [ ] Update our tests following these guidelines.
- [x] Make sure you are following our CONTRIBUTING guidelines.
- [x] If a feature was added make sure to add it to the corresponding scripts file.
Others
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [x] My code passes all the checks pylint, flake8, black, ... To speed up development you should run
pre-commit install
. - [ ] New and existing unit tests pass locally with my changes. You can test this locally using
pytest tests/...
.
I'm reviewing it. will leave some comments.
Noticed that there are some commands in the stocks menu that's not yet refactored yet, such as candle
or display_news
-
bullbear
,get_dd
,headlines
command still have theticker
argument name.
![image](https://user-images.githubusercontent.com/40023817/181506592-30190f18-ca80-448e-b761-9c28ae673f9a.png)
![image](https://user-images.githubusercontent.com/40023817/181507120-a7f06ab5-110e-45c0-ac31-17f989208a37.png)
![image](https://user-images.githubusercontent.com/40023817/181507293-e89894e8-dfbb-4bad-959c-8636262fc716.png)
bullbear
,get_dd
,headlines
command still have theticker
argument name.
Will do, missed these since they were in the common file directory and not in the stocks directory
@northern-64bit Excellent work! This is a beast of a PR 🚀 ✨
Some commands are missing default arguments, and some have not yet been refactored. I'm leaving it below.
-
api.stocks.ba.mentions
,api.stocks.ba.sentiment
,api.stocks.ba.watchlist
,api.stocks.ba.trend
,api.stocks.ins.act
,api.stocks.ins.print_insider_data
missing default value arguments
![image](https://user-images.githubusercontent.com/40023817/182722675-a5c00519-3e9d-4933-85d0-409e38d332d6.png)
![image](https://user-images.githubusercontent.com/40023817/182722943-641e8de5-5ab0-4e75-a400-2f1e4660934d.png)
- Commands in the root stocks menu are not yet refactored. Such as
api.stocks.candle
,api.stocks.display_news
,api.stocks.get_news
. Can you have a look?
@montezdesousa Can you take this one over and merge it in? Discussed with @Chavithra and @minhhoang1023.
@montezdesousa Can you take this one over and merge it in? Discussed with @Chavithra and @minhhoang1023.
Ok I'll be on it, as soon as I finish economy menu