Deposits & Redemptions
Query transaction history for deposits and redemptions.
Query Structureβ
query GetTransactionHistory($termId: String!, $curveId: numeric!, $limit: Int!) {
deposits(
where: {
term_id: { _eq: $termId }
curve_id: { _eq: $curveId }
}
order_by: { created_at: desc }
limit: $limit
) {
id
sender_id
assets_for_receiver
shares_for_receiver
created_at
}
redemptions(
where: {
term_id: { _eq: $termId }
curve_id: { _eq: $curveId }
}
order_by: { created_at: desc }
limit: $limit
) {
id
receiver_id
assets_for_receiver
shares_from_receiver
created_at
}
}
Best Practicesβ
- Filter by term and curve for specific vault
- Order by created_at for chronological history
- Use limit to paginate results
- Combine deposits and redemptions for full history