---
title: "init(options:range:granularity:flowDirection:)"
framework: energykit
role: symbol
role_heading: Initializer
path: "energykit/electricityinsightquery/init(options:range:granularity:flowdirection:)"
---

# init(options:range:granularity:flowDirection:)

Creates an electricity insight query request.

## Declaration

```swift
init(options: ElectricityInsightQuery.Options, range: DateInterval, granularity: ElectricityInsightQuery.Granularity, flowDirection: ElectricityFlowDirection)
```

## Parameters

- `options`: The optional information included when the system returns electricity insight records.
- `range`: The requested date range.
- `granularity`: The temporal granularity for returned electricity insight records.
- `flowDirection`: The direction of the flow of electricity.
