Signals Queries
Signals represent deposit and redemption events in the Intuition protocol. Unlike raw blockchain events, signals include enriched context such as account labels, atom metadata, and related positions.
Available Queriesβ
| Query | Description |
|---|---|
signals | Query signals with filtering and pagination |
signals_aggregate | Aggregate statistics for signals |
signals_from_following | Query signals from followed accounts |
What Are Signals?β
Signals are contextual representations of position changes:
- Deposits: When an account stakes ETH on an atom or triple
- Redemptions: When an account withdraws from a position
Each signal includes:
- The account that made the action
- The target atom or triple
- Amount and shares involved
- Timestamp and block information
- Full context of related entities
Quick Startβ
import { GraphQLClient } from 'graphql-request'
import { API_URL_PROD } from '@0xintuition/graphql'
const client = new GraphQLClient(API_URL_PROD)
// Get recent signals
const query = `
query GetSignals($limit: Int!) {
signals(limit: $limit, order_by: { created_at: desc }) {
id
delta
account {
label
image
}
term {
atom {
label
}
}
deposit_id
redemption_id
created_at
}
}
`
const data = await client.request(query, { limit: 20 })
Signal Typesβ
Signals don't have an explicit type field. Instead, distinguish deposits from redemptions by checking which ID is present:
| Condition | Meaning |
|---|---|
deposit_id is not null | Deposit β staking ETH on a position |
redemption_id is not null | Redemption β withdrawing from a position |
Common Filtersβ
# Filter for deposits only
signals(where: { deposit_id: { _is_null: false } })
# Filter for redemptions only
signals(where: { redemption_id: { _is_null: false } })
# Filter by account
signals(where: { account_id: { _eq: "0x..." } })
# Filter by atom
signals(where: { atom_id: { _eq: "0x..." } })
# Filter by date range
signals(where: {
created_at: {
_gte: "2024-01-01T00:00:00Z",
_lte: "2024-01-31T23:59:59Z"
}
})
Related Documentationβ
- List Signals - Query signals with filters
- Aggregate Signals - Signal statistics
- Signals from Following - Social signal feed
- Activity Feed Example - Building activity feeds