List Signals
Query deposit and redemption signals with rich filtering, sorting, and pagination capabilities.
Query Structureβ
query GetSignals(
$where: signals_bool_exp
$order_by: [signals_order_by!]
$limit: Int
$offset: Int
) {
signals(
where: $where
order_by: $order_by
limit: $limit
offset: $offset
) {
id
delta
account_id
account {
id
label
image
}
atom_id
term {
atom {
term_id
label
image
}
}
triple_id
block_number
created_at
transaction_hash
}
}
Variablesβ
| Variable | Type | Description |
|---|---|---|
where | signals_bool_exp | Filter conditions |
order_by | [signals_order_by!] | Sort order |
limit | Int | Maximum results (default: 20) |
offset | Int | Pagination offset |
{
"order_by": [{ "created_at": "desc" }],
"limit": 20,
"offset": 0
}
Response Fieldsβ
| Field | Type | Description |
|---|---|---|
id | String | Unique signal identifier |
delta | String | Amount in wei |
account_id | String | Account address |
account | Account | Account details with label/image |
atom_id | String | Related atom ID (if atom signal) |
term | Term | Related term (contains nested atom with label/image) |
triple_id | String | Related triple ID (if triple signal) |
block_number | Int | Block number |
created_at | DateTime | Event timestamp |
transaction_hash | String | Transaction hash |
Expected Responseβ
{
"data": {
"signals": [
{
"id": "0x123...-1",
"delta": "1000000000000000000",
"account_id": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"account": {
"id": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"label": "vitalik.eth",
"image": "ipfs://Qm..."
},
"atom_id": "0x57d94c116a33bb...",
"term": {
"atom": {
"id": "0x57d94c116a33bb...",
"label": "Ethereum",
"image": "ipfs://Qm..."
}
},
"triple_id": null,
"block_number": 12345678,
"created_at": "2024-01-15T10:30:00Z",
"transaction_hash": "0xabc..."
}
]
}
}
Interactive Exampleβ
Query
query GetSignals($limit: Int!) {
signals(limit: $limit, order_by: { created_at: desc }) {
id
delta
account {
label
image
}
term {
atom {
label
}
}
created_at
}
}Variables
Click "Run Query" to execute the GraphQL query and see results
Use Casesβ
Activity Feedβ
Build a real-time activity feed:
async function getActivityFeed(limit: number = 50) {
const query = `
query GetActivityFeed($limit: Int!) {
signals(
order_by: { created_at: desc }
limit: $limit
) {
id
delta
account {
id
label
image
}
term {
atom {
label
image
}
}
triple_id
created_at
}
}
`
const data = await client.request(query, { limit })
return data.signals.map(signal => ({
...signal,
message: formatSignalMessage(signal)
}))
}
function formatSignalMessage(signal: Signal): string {
const target = signal.term?.atom?.label ?? `Triple ${signal.triple_id}`
return `${signal.account.label} signaled on ${target}`
}
Account Historyβ
Get complete signal history for an account:
async function getAccountHistory(
accountId: string,
options: { limit?: number; offset?: number } = {}
) {
const query = `
query GetAccountHistory(
$account_id: String!
$limit: Int!
$offset: Int!
) {
signals(
where: { account_id: { _eq: $account_id } }
order_by: { created_at: desc }
limit: $limit
offset: $offset
) {
id
delta
term {
atom { label }
}
triple_id
created_at
transaction_hash
}
signals_aggregate(where: { account_id: { _eq: $account_id } }) {
aggregate {
count
}
}
}
`
const data = await client.request(query, {
account_id: accountId,
limit: options.limit || 20,
offset: options.offset || 0
})
return {
signals: data.signals,
total: data.signals_aggregate.aggregate.count
}
}
Filter by Date Rangeβ
async function getSignalsByDateRange(
startDate: Date,
endDate: Date
) {
const query = `
query GetSignalsByDate($start: timestamptz!, $end: timestamptz!) {
signals(
where: {
created_at: { _gte: $start, _lte: $end }
}
order_by: { created_at: desc }
) {
id
delta
account { label }
created_at
}
}
`
return client.request(query, {
start: startDate.toISOString(),
end: endDate.toISOString()
})
}
Filtering Optionsβ
By Amountβ
# Large signals (> 1 ETH)
signals(where: {
delta: { _gt: "1000000000000000000" }
})
By Atom or Tripleβ
# Signals for specific atom
signals(where: { atom_id: { _eq: "0x..." } })
# Signals for specific triple
signals(where: { triple_id: { _eq: "0x..." } })
Best Practicesβ
- Use pagination - Always limit results for large datasets
- Order by timestamp - Most recent signals are usually most relevant
- Include context - Fetch account and atom labels for display
- Cache appropriately - Signals are immutable once created
Relatedβ
- Aggregate Signals - Signal statistics
- Signals from Following - Social feed
- Subscriptions - Real-time signals