Share Price Changes
Track how share prices change over time.
Query Structureβ
query GetPriceHistory($termId: String!, $curveId: numeric!, $limit: Int!) {
share_price_changes(
where: {
term_id: { _eq: $termId }
curve_id: { _eq: $curveId }
}
order_by: { created_at: desc }
limit: $limit
) {
old_price
new_price
price_change
created_at
}
}
Best Practicesβ
- Use time-series tables for aggregated data
- Filter by term and curve for specific vault
- Calculate percentage change from old and new price
- Use daily/hourly stats for charts