Function: list()
Overview
The list() function provides a comprehensive inventory of all stock symbols available through the GoldenGoose API.
Syntax
list()Parameters
This function does not accept any parameters.
Return Value
| Type | Description |
|---|---|
list[str] | A list of strings where each string represents a stock ticker symbol available in the GoldenGoose database |
Usage Example
import goldengoose
# Retrieve all available stock symbols
symbols = goldengoose.stocks.list()
# Display all available symbols
for symbol in symbols:
print(symbol)
# Check if a specific symbol is available
if "AAPL" in symbols:
apple_data = goldengoose.stocks.get("AAPL")Notes
- Use this function to discover what stock data is available in the current GoldenGoose instance
- The returned list can be used to validate stock symbols before making calls to
get() - The symbols are returned in alphabetical order for convenient reference