Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

vmware-archive/quote-service

part2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 4 commits ahead, 29 commits behind master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

quote-service

Quotes microservice refactored from the SpringTrader application, as described in Part 2 of the Refactoring a Monolith into a Cloud-Native Application blog series.

This is a simple REST service that provides real-time-ish (15 minute delayed) market data. It uses the public Yahoo Finance APIs. For more information on the underlying API, please refer to the documentation here.

Results are cached to improve response times, and due to the daily query limitations that Yahoo places on on its APIs.

Additionally, the universe of supported securities is limited to those listed in the symbols.json file. This is because of the way SpringTrader currently tracks market data. The existing service API needs a way to get "all quotes" in one call: not practical with a universe of thousands of securities.

To get the source code, run the following from a clean directory:

git clone git@github.com:cf-platform-eng/quote-service.git
cd quote-service
git checkout part2

Build the service using the maven conventions (from the root directory of the project):

mvn clean install

To run the service locally you can take advantage of the maven spring-boot plugin:

mvn spring-boot:run

Once it's running locally, try out some operations:

http://localhost:8080/quotes/

http://localhost:8080/quotes/GOOG

http://localhost:8080/quotes/marketSummary

http://localhost:8080/quotes/topGainers

http://localhost:8080/quotes/topLosers

http://localhost:8080/quotes/symbols

To deploy to cloud foundry, edit the manifest.yml file to give the app a unique name, and then perform a cf push.

About

Quotes microservice refactored from Spring Trader app.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published