Core
The Core class provides methods to interact with essential endpoints of the Alphavantage API. It includes methods for fetching global quotes and searching for stock symbols.
Methods
1. Quote Endpoint
Fetches the latest global quote for a given stock symbol.
Signature:
public function quoteEndpoint(string $symbol): arrayParameters:
symbol(string): The stock symbol to fetch the global quote for.
Returns:
array: An array containing the global quote data.
Exceptions:
ApiVolumeReachedConnectionException
2. Search
Searches for stock symbols based on keywords.
Signature:
public function search(string $keywords): arrayParameters:
keywords(string): The keywords to search for stock symbols.
Returns:
array: An array containing the search results.
Exceptions:
ApiVolumeReachedConnectionException
The Core class is designed to provide essential functionalities using the Alphavantage API. The quoteEndpoint method fetches the latest global quote for a given stock symbol, while the search method allows for searching stock symbols based on keywords. Be sure to handle the possible exceptions when using these methods to ensure robust error handling in your application.
Last updated
Was this helpful?