-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly decode empty bar responses
As it turns out the Alpaca Data API does not strictly adhere to always returning an array of bars in the response to a bars request. Rather, if no data is returned it will just set the member to null. This value currently causes a decode error, as serde_json does not treat that as a valid variant for an array. With this change we fix the problem by explicitly using the vec_from_str function for decoding purposes. This function correctly handles such upstream values.
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters