PolygonAggregatesSchema#

class langchain_community.tools.polygon.aggregates.PolygonAggregatesSchema[source]#

Bases: BaseModel

Input for PolygonAggregates.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

param from_date: str [Required]#

The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.

param ticker: str [Required]#

The ticker symbol to fetch aggregates for.

param timespan: str [Required]#

The size of the time window. Possible values are: second, minute, hour, day, week, month, quarter, year. Default is ‘day’

param timespan_multiplier: int [Required]#

The number of timespans to aggregate. For example, if timespan is ‘day’ and timespan_multiplier is 1, the result will be daily bars. If timespan is ‘day’ and timespan_multiplier is 5, the result will be weekly bars. Default is 1.

param to_date: str [Required]#

The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.