Closed Cfomodz closed 3 months ago
Here's the code health analysis summary for commits d32b69d..5bda787
. View details on DeepSource ↗.
Analyzer | Status | Summary | Link |
---|---|---|---|
Python | ✅ Success | View Check ↗ |
💡 If you’re a repository administrator, you can configure the quality gates from the settings.
Thanks for the PR! Your two functions look great, I just have a few requests/suggestions:
place_order
function has a section that can be replaced by your get_stock_quote
function, it would be great if you could replace that.place_order
function. That is because I've found that Fennel will return a 200 code even when searching for a stock that doesn't exist, it just won't return any info in the returned list. Adding the length check to your get_stock_quote
would protect against that. Then if it occurs you could return 0 or None in the get_stock_price
function.Hope this makes sense, and feel free to suggest other ways/ideas if you find come up with something better!
Great thoughts! I also realized I forgot to include the modified endpoint, so I will make the suggested changes and push that
I just tested this out and it works great! Thanks so much for the contribution!
Get stock "quote"/query results and a helper function to just directly return price from that same search