-
Notifications
You must be signed in to change notification settings - Fork 308
add /v2/updates/price/latest endpoint #1225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
| #[schema(value_type = Option<u64>, example=85480034)] | ||
| pub slot: Option<Slot>, | ||
| #[schema(value_type = Option<i64>, example=doc_examples::timestamp_example)] | ||
| pub proof_available_time: Option<UnixTimestamp>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the future: can we make this a ms-resolution timestamp?
ali-behjati
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I left a comment on changing the proof_available_timestamp to have millisecond resolution which can be done in subsequent PRs.
implement new v2 endpoint for /updates/price/latest which is a merge of the existing endpoints as follow:
/api/latest_price_feeds?ids[]=<price_feed_id>&ids[]=<price_feed_id_2>&..(&verbose=true)(&binary=true)/api/latest_vaas?ids[]=<price_feed_id>&ids[]=<price_feed_id_2>&...the proposed v2 endpoint is as follow:
/v2/updates/price/latest?ids[]=<price_feed_id>&ids[]=<price_feed_id_2>&..(&encoding=hex|base64)(&parsed=false)encodingdefaults tohexandparseddefaults totrueas per design guidelinethis PR serves at an initial stab at the endpoint, will follow up with a separate PR for the tests