Skip to main content

GraphQL examples

Use one of the official endpoints from Streams Indexers. Address filter inputs must be lowercase.

Get recent streams for a wallet

This query returns recent Lockup and Flow streams where the wallet is one of the stream parties.

query getStreamsForWallet($wallet: Bytes!, $first: Int = 10) {
lockupStreams(
first: $first
orderBy: timestamp
orderDirection: desc
where: { or: [{ sender: $wallet }, { proxender: $wallet }, { recipient: $wallet }] }
) {
id
alias
chainId
contract
tokenId
sender
proxender
recipient
depositAmount
intactAmount
withdrawnAmount
asset {
address
symbol
decimals
}
}
flowStreams(
first: $first
orderBy: timestamp
orderDirection: desc
where: { or: [{ sender: $wallet }, { recipient: $wallet }] }
) {
id
alias
chainId
contract
tokenId
sender
recipient
depositedAmount
withdrawnAmount
snapshotAmount
availableAmount
ratePerSecond
asset {
address
symbol
decimals
}
}
}

For larger maintained fixtures, see the Indexers equivalence queries. Schema source: src/schemas/streams.graphql.