> 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/integration-guides/useful-queries-for-your-integration/money-streaming-events.md).

# Money Streaming Events

Query CFA Data

## CFA Events (For Money Streaming)

`flowUpdated`: emits any time there is a creation, update, or deletion event of a stream. Note that “type” will represent the type of update:

0 = creation event

1 = update event

2 = deletion event

[**Solidity Event:**](https://github.com/superfluid-finance/protocol-monorepo/blob/ace5c3186a8880df0e8d9f99db0d02c6fc941ae1/packages/ethereum-contracts/contracts/interfaces/agreements/IConstantFlowAgreementV1.sol#L399)

<figure><img src="https://422548309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKEcOOf_qoYMObicyRu%2Fuploads%2FGwSJLsk2S6pVCjg0siNM%2FScreen%20Shot%202022-11-29%20at%2010.00.51%20AM.png?alt=media&amp;token=6c0a47b1-a0d2-4b39-a988-05369069c1c9" alt=""><figcaption></figcaption></figure>

**Sample Subgraph Query:**

```graphql
#returns the new netFlowRate along with all flowUpdated events for a user
query MyQuery {
  flowUpdatedEvents(where: {sender: "0xdcb45e4f6762c3d7c61a00e96fb94adb7cf27721"}) {
    timestamp
    token
		type
    totalSenderFlowRate
		totalAmountStreamedUntilTimestamp
		stream {
	      streamedUntilUpdatedAt
	    }
  }
}
```

> **Note** that `totalAmountStreamedUntil` timestamp is useful because it will return the total amount streamed until the state change, and `streamedUntilUpdatedAt` will return the total amount stream since the *previous* state change. Learn more about this [here](https://docs.superfluid.finance/superfluid/developers/subgraph#higher-order-level-entities).
