-
Notifications
You must be signed in to change notification settings - Fork 262
feat: add Rust client for Hermes price service #2686
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
base: main
Are you sure you want to change the base?
Conversation
Co-Authored-By: Tejas Badadare <[email protected]>
…ices Co-Authored-By: Tejas Badadare <[email protected]>
Co-Authored-By: Tejas Badadare <[email protected]>
Co-Authored-By: Tejas Badadare <[email protected]>
Co-Authored-By: Tejas Badadare <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Closing due to inactivity for more than 7 days. |
} | ||
|
||
/// **Deprecated: use /v2/updates/price/latest instead** Get the latest price updates by price feed id. Given a collection of price feed ids, retrieve the latest Pyth price for each price feed. | ||
pub async fn latest_price_feeds(configuration: &configuration::Configuration, ids_left_square_bracket_right_square_bracket: Vec<String>, verbose: Option<bool>, binary: Option<bool>) -> Result<Vec<models::RpcPriceFeed>, Error<LatestPriceFeedsError>> { |
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.
ids_left_square_bracket_right_square_bracket
lool
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.
Please rename it to ids
apps/hermes/client/rust/Cargo.toml
Outdated
[[example]] | ||
name = "sse_price_stream" | ||
path = "examples/sse_price_stream.rs" |
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.
this doesn't exist.
Co-Authored-By: Tejas Badadare <[email protected]>
Co-Authored-By: Tejas Badadare <[email protected]>
Devin, add a CI to build and test the code like |
Co-Authored-By: Tejas Badadare <[email protected]>
Co-Authored-By: Tejas Badadare <[email protected]>
Co-Authored-By: Tejas Badadare <[email protected]>
--additional-properties=packageName=hermes-client,packageVersion=0.1.0 | ||
``` | ||
|
||
3. Manually update dependencies in Cargo.toml and version number if necessary. |
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.
add the other step you took here,
- a separate streaming code
- renaming field names to be more intuitive
- fixing format and clippy
Co-Authored-By: Tejas Badadare <[email protected]>
Hermes Rust Client
This PR adds a Rust client for the Hermes price service, similar to the existing JavaScript client. The client allows users to interact with the Hermes API to fetch price data and stream real-time price updates.
Implementation Details
eventsource-stream
crate to handle Server-Sent Events properlyFeatures
Testing
The implementation has been tested with example code that:
Link to Devin run: https://app.devin.ai/sessions/68823d31375f4cb9bd88f8d362148446
Requested by: Tejas Badadare