Stocks
Endpoints
Get

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

ParameterTypeDescription
stockstrTicker symbol of the desired stock (e.g., "MSFT", "AAPL")

Return Value

TypeDescription
ggStockA 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 epoch

Notes

  • The returned ggStock object 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