Function: get()
Overview
The get() function serves as the primary entry point for retrieving 1-minute and 5-minute aggregate data for any specified stock ticker.
Syntax
get(stock)Parameters
| Parameter | Type | Description |
|---|---|---|
stock | str | Ticker symbol of the desired stock (e.g., "MSFT", "AAPL") |
Return Value
| Type | Description |
|---|---|
ggStock | A GoldenGoose stock object containing the requested ticker's data |
Usage Example
import goldengoose
# Retrieve Microsoft stock data
msft = goldengoose.stocks.get("MSFT")
# Access data for the current time period
epoch = goldengoose.get_current_epoch()
candle = msft[epoch]
# The candle object now contains OHLC data for the specified epochNotes
- The returned
ggStockobject allows index-based access to candlestick data using epoch timestamps as keys - Use
goldengoose.get_current_epoch()to obtain the timestamp for the current time period - Each candle contains aggregated price data for the specified stock at the given time interval