You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Change to Function Signature
`GetQuotes` now returns `(Results, error)`. The error here should either be `nil` or `fmt.Errorf("error failed to generate rows from quote KVP map")`.
`Results` is constructed as `Results{Data: *dataframe.DataFrame, Warnings: []Warning, Errors: []Error}`. As follows:
- `Data` is the previously returned DataFrame
- `Warnings` is a slice of new `Warning` structs. An example `Warning` is given by `Warning{Ticker: "INVALID", Error: fmt.Errorf("resource not found")}`. Right now, warnings only indicate that Finviz does not support the given ticker.
- `Errors` is a slice of new `Error` structs. An example `Error` is given by `Error{Ticker: "SNAP", Error: fmt.Errorf(...)}`. Errors could occur if Finviz has placed you on a block list (usually done via Cloudflare) or could be an internal library error.
If a Warning or Error exists for a Ticker, then the returned DataFrame will not have a row for that Ticker. The three sets, i.e., Data, Warnings, and Errors, are mutually exclusive.
### Other Changes
- Added `Exchange` column to returned DataFrame.
- Fixed a bug that sometimes returned `S&P,500` as a stock's Index; now returns `S&P500`.
- Added data cleaning to DataFrame results, i.e., most columns should now correspond to their actual data type.
- Added support for backoff algorithm on request frequency.
Closes#78, #79
Refactor
CleanScreenerDataFrame
to support both Screener df's and Quote df's.The text was updated successfully, but these errors were encountered: