fix: upgrade the exists() market data provider method

This commit is contained in:
hackerESQ
2025-01-28 20:32:43 -06:00
parent 0f135f4024
commit 4ece09368e
7 changed files with 49 additions and 42 deletions
@@ -28,15 +28,7 @@ class FinnhubMarketData implements MarketDataInterface
public function exists(string $symbol): bool
{
try {
$this->quote($symbol);
return true;
} catch (\Throwable $e) {
return false;
}
return (bool) $this->quote($symbol);
}
public function quote(string $symbol): Quote