> For the complete documentation index, see [llms.txt](https://superfluid.gitbook.io/superfluid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://superfluid.gitbook.io/superfluid/developers/automations/automation-subgraphs/stream-scheduler-subgraph.md).

# Stream Scheduler Subgraph

## Repo

{% embed url="<https://github.com/superfluid-finance/platform-monorepo/tree/master/packages/subgraph/flow-scheduler>" %}

## Subgraph Explorers

**Mainnets**

[Ethereum Mainnet](https://thegraph.com/hosted-service/subgraph/superfluid-finance/scheduling-v1-eth-mainnet)

[Polygon](https://thegraph.com/hosted-service/subgraph/superfluid-finance/scheduling-v1-polygon-mainnet)

[Gnosis (xDAI)](https://thegraph.com/hosted-service/subgraph/superfluid-finance/scheduling-v1-xdai-mainnet)

[Avalanche](https://thegraph.com/hosted-service/subgraph/superfluid-finance/scheduling-v1-avalanche-c)

[Arbitrum](https://thegraph.com/hosted-service/subgraph/superfluid-finance/vesting-v1-arbitrum-one)

[Optimism](https://thegraph.com/hosted-service/subgraph/superfluid-finance/scheduling-v1-optimism-mainnet)

[Binance Smart Chain (BSC)](https://thegraph.com/hosted-service/subgraph/superfluid-finance/scheduling-v1-bsc-mainnet)

**Testnets**

[Polygon Mumbai](https://thegraph.com/hosted-service/subgraph/superfluid-finance/scheduling-v1-polygon-mumbai)

[Ethereum Goerli](https://thegraph.com/hosted-service/subgraph/superfluid-finance/scheduling-v1-eth-goerli)

## Basic Example Queries

You can test these out in the [Ethereum Mainnet](https://thegraph.com/hosted-service/subgraph/superfluid-finance/scheduling-v1-eth-mainnet) sandbox.

{% hint style="info" %}
Remember that subgraph queries expect all letters within provided addresses to be in full lowercase.
{% endhint %}

#### Fetching all Flow Schedules for a certain sender

```javascript
{
  flowScheduleCreatedEvents(where: {sender: "0xbd5a76f59df49527e47df66d7d7b5590a237871d"}) {
    id
    order
    sender
    receiver
    startAmount
    startDate
    startDateMaxDelay
    superToken
    flowRate
  }
}
```

{% hint style="info" %}
Note that that the `id` attribute is formatted as "{Event Name}-{Transaction Hash}-{Log Index}". Log index is provided as it's possible that multiple of the same event occur in the same transaction, so with the log index gives unique identification.<br>

`id:` `"FlowScheduleCreated-0x04ca752e609289f6144df3e0096ccb9772ba4923781612096ec5582f62c3ff46-171"`

\
indicates...<br>

*Event Name*: FlowScheduleCreated

*Transaction Hash*: [`0x04ca752e609289f6144df3e0096ccb9772ba4923781612096ec5582f62c3ff46`](https://etherscan.io/tx/0x04ca752e609289f6144df3e0096ccb9772ba4923781612096ec5582f62c3ff46)

*Log Index*: 171
{% endhint %}

#### Fetching all Flow Deletion tasks executed before a certain time

```
{
  deleteTasks(where: {executedAt_lt: "1688457635"}) {
    sender
    receiver
    superToken
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://superfluid.gitbook.io/superfluid/developers/automations/automation-subgraphs/stream-scheduler-subgraph.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
