Open mapelo opened 4 hours ago
This error occurs when I call the api with
$historicalData = $client->getHistoricalQuoteData(
$symbol,
"1d",
new \DateTime("-1 months"),
new \DateTime("today")
);
but not with:
$historicalData = $client->getHistoricalQuoteData(
$symbol,
"1d",
new \DateTime("-1 months"),
new \DateTime("yesterday")
);
notice today versus yesterday
Package version: 4.x-dev
Fatal error: Uncaught Scheb\YahooFinanceApi\Exception\ApiException: Not a number in column "open": open in [...]/vendor/scheb/yahoo-finance-api/src/ResultDecoder.php:232 Stack trace: #0 [...]/vendor/scheb/yahoo-finance-api/src/ResultDecoder.php(214): Scheb\YahooFinanceApi\ResultDecoder->createHistoricalData() #1 [...]/vendor/scheb/yahoo-finance-api/src/ApiClient.php(107): Scheb\YahooFinanceApi\ResultDecoder->transformHistoricalDataResult() #2 [...]/myfile.php(271): Scheb\YahooFinanceApi\ApiClient->getHistoricalQuoteData() #3 {main} thrown in [...]/vendor/scheb/yahoo-finance-api/src/ResultDecoder.php on line 232
inside that expection code (line 232, ResultDecoder.php), I added the print_r($json) command, and this was the result: