fix: add exception for 404
This commit is contained in:
@@ -45,6 +45,10 @@ class AlpacaMarketData implements MarketDataInterface
|
|||||||
|
|
||||||
$quote = $response->json('trade');
|
$quote = $response->json('trade');
|
||||||
|
|
||||||
|
if (is_null(Arr::get($quote, 'p'))) {
|
||||||
|
throw new \Exception('Could not find ticker on Alpaca');
|
||||||
|
}
|
||||||
|
|
||||||
$fundamental = cache()->remember(
|
$fundamental = cache()->remember(
|
||||||
'ap-symbol-'.$symbol,
|
'ap-symbol-'.$symbol,
|
||||||
1440,
|
1440,
|
||||||
|
|||||||
Reference in New Issue
Block a user