Skip to content

Get Realtime Stock Market Data Using the Alpha Vantage or Questrade APIs

License

Notifications You must be signed in to change notification settings

shanebarnes/stocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stocker

Practice rebalancing your financial assets with realtime stock market data acquired on demand from Alpha Vantage or Questrade APIs. For example, get the latest stock prices or foreign exchange rates.

Please note that this project is not production ready and should only be used with practice portfolios where no real money is at risk.

build workflow

Build Instructions

$ git clone https://github.com/shanebarnes/stocker.git
$ cd stocker
$ ./build/build.sh

Examples

Try rebalancing a sample portfolio!

Alpha Vantage

An Alpha Vantage API key is required. A free API key can be claimed here.

$ # Pass API key on command line
$ ./bin/stocker-darwin -apiKey <your_api_key> -apiServer alphavantage.co -rebalance ./examples/portfolio.json
$
$ # Alternatively, load API key from environment
$ STOCKER_API_KEY=<your_api_key> STOCKER_API_SERVER=alphavantage.co ./stocker -debug -rebalance ./examples/portfolio.json

Questrade

The stocker app must be registered with Questrade. Here is an example of using OAuth credentials with refresh for use with Questrade APIs.

$ ./bin/stocker-darwin -apiServer questrade.com -credentials ./examples/credentials.json -rebalance ./examples/portfolio.json -refresh

Miscellaneous

Here is an example of currency conversion.

$ STOCKER_API_KEY=<your_api_key> STOCKER_API_SERVER=alphavantage.co ./bin/stocker-darwin -rebalance ./examples/currency_conversion.json -currency EUR

Here is an example of stock portfolio rebalancing in Canadian dollars.

$ STOCKER_API_KEY=<your_api_key> STOCKER_API_SERVER=alphavantage.co ./bin/stocker-darwin -rebalance ./examples/portfolio.json -currency CAD

About

Get Realtime Stock Market Data Using the Alpha Vantage or Questrade APIs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages