awesomebot-fmp
Advanced tools
Comparing version 1.2.5 to 1.2.6
@@ -14,2 +14,3 @@ 'use strict' | ||
current_price: () => makeRequest('stock/real-time-price', generateJson(stock)), | ||
recent_histroy: ({ time_range } = {}) => makeRequest('historical-chart/'+time_range, generateJson(stock)), | ||
@@ -16,0 +17,0 @@ history: ({ start_date, end_date, data_type, limit } = {}) => makeRequest('historical-price-full', generateJson(stock, { from: start_date, to: end_date, serietype: data_type, timeseries: limit })), |
{ | ||
"name": "awesomebot-fmp", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -40,2 +40,16 @@ 'use strict' | ||
it('Apple stock should return valid data in past 10 minutes', (done) => { | ||
chai.request('https://financialmodelingprep.com/api/v3') | ||
.get('/historical-chart/15min/AAPL?&apikey=d4266e03ec14c5ad6c6d8886d2956980') | ||
.end((err, res) => { | ||
stock('AAPL').recent_histroy({'time_range':'15min'}) | ||
.then((response) => { | ||
expect(res.body).to.eql(response); | ||
done(); | ||
}) | ||
.catch(done); | ||
}) | ||
}); | ||
it('\'aapl\' in lowercase should return valid data', (done) => { | ||
@@ -42,0 +56,0 @@ chai.request('https://financialmodelingprep.com/api/v3') |
173450
3609