-
Notifications
You must be signed in to change notification settings - Fork 3
Implement price-feed feature #49
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
034c236 to
6f0ec87
Compare
6f0ec87 to
cccac84
Compare
|
@greptile review the PR according to the CONTRIBUTION.md |
Greptile SummaryAdds a new Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CLI
participant PriceModule as price::run_price_feed()
participant Fetcher as CoingeckoPriceFetcher
participant API as CoinGecko API
User->>CLI: cargo run -p cli-client price-feed
CLI->>PriceModule: Command::PriceFeed
PriceModule->>Fetcher: new()
PriceModule->>PriceModule: spawn_blocking()
activate PriceModule
PriceModule->>Fetcher: fetch_price()
Fetcher->>API: GET /api/v3/simple/price?ids=bitcoin&vs_currencies=usd
API-->>Fetcher: {"bitcoin": {"usd": 95234.56}}
Fetcher-->>PriceModule: Ok(PriceMap)
deactivate PriceModule
PriceModule->>PriceModule: Extract bitcoin/usd from response
PriceModule->>User: println!("1 BTC = $95234.56")
|
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.
6 files reviewed, 3 comments
Greptile's behavior is changing!From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
Usage: cargo run -p cli-client price-feed
Fix: #40