You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add aggregate_price_status which takes care of becoming stale (#21)
Adds `aggregate_price_status` property in Price Account which returns the aggregate price status considering the latest fetch slot to make sure price is not stale. `get_aggregate_price_status_with_slot` is also added so users can give latest solana slot for checking that price is not stale.
Additional Changes:
- Price Info `slot` field is renamed to `pub_slot`: `slot` is used in other objects within the pyth client with a different meaning (fetch slot). `pub_slot` is also consistent with other clients.
- `aggregate_price` and `aggregate_price_confidence_interval` will use status and return None if price is not available (status != trading). Comments have been added to guide how to get these values if needed regardless of availability. This is more consistent with our Rust client api and will prevent incautious users to rely on price if it's not available.
- In solana module `get_commitment_slot` is renamed to `get_slot` to be more consistent with the rest of its interface. Also the return type is updated.
- Also fixes a small bug in dump example by indenting back the `break` on ws update handling logic.
0 commit comments