Name: marketdata-getter
Owner: FT Interactive News
Description: null
Created: 2017-03-15 11:13:56.0
Updated: 2017-03-15 11:14:01.0
Pushed: 2017-03-24 16:39:44.0
Homepage: null
Size: 8
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
For getting data from FT market data in interactive graphics apps
usage
getter = marketdata.marketdata(process.env.MARKETKEY)
.callback(function(d){
console.log(d.data.items[0].basic.name + ' stock price');
console.log(d.data.items[0].quote.lastPrice);
});
er('AAPL');
er('AAPL,XOM', true); //the true switch is a sets the getter to request performance metrics (market cap etc) rathert than current quote
This isnt in npm yet but you can install it in you npm/yarn by adding the foolowing line to your depndencies
ketdata-getter": "git+https://github.com/ft-interactive/marketdata-getter.git"
TODO:
Be a bit smarter about dealing with multi symbol requests
i.e. at that moment using the symbol AAPL,XOM
will return an set of set of results and will be hashed as AAPL,XOM
as distinct from XOM,AAPL
so a request for the latter will result in a new http request. I don't think this is what we want tot happen
have a better way of differntiating requests for performance metrics