From 47014cf62f97b605b5fcf29fb757229f5c1b1325 Mon Sep 17 00:00:00 2001
From: Davis Thames
Date: Thu, 12 Apr 2018 21:46:51 -0500
Subject: [PATCH] issue #82
---
tests/fixtures/ticker_price.yaml | 10 +++++-----
tests/fixtures/ticker_price_with_date.yaml | 6 +++---
tests/fixtures/ticker_price_with_date_csv.yaml | 8 ++++----
tiingo/api.py | 2 +-
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/tests/fixtures/ticker_price.yaml b/tests/fixtures/ticker_price.yaml
index a69a2ff..aa3a353 100644
--- a/tests/fixtures/ticker_price.yaml
+++ b/tests/fixtures/ticker_price.yaml
@@ -7,16 +7,16 @@ interactions:
Authorization: [Token 0000000000000000000000000000000000000000]
Connection: [keep-alive]
Content-Type: [application/json]
- User-Agent: [tiingo-python-client 0.3.2]
+ User-Agent: [tiingo-python-client 0.5.0]
method: GET
- uri: https://api.tiingo.com/tiingo/daily/GOOGL/prices?format=json&frequency=daily
+ uri: https://api.tiingo.com/tiingo/daily/GOOGL/prices?format=json&resampleFreq=daily
response:
- body: {string: '[{"adjClose":993.64,"adjHigh":994.26,"adjLow":978.51,"adjOpen":980.0,"adjVolume":1490744,"close":993.64,"date":"2017-10-06T00:00:00+00:00","divCash":0.0,"high":994.26,"low":978.51,"open":980.0,"splitFactor":1.0,"volume":1490744}]'}
+ body: {string: '[{"adjClose":1037.29,"adjHigh":1044.65,"adjLow":1026.05,"adjOpen":1031.47,"adjVolume":1644794,"close":1037.29,"date":"2018-04-12T00:00:00+00:00","divCash":0.0,"high":1044.65,"low":1026.05,"open":1031.47,"splitFactor":1.0,"volume":1644794}]'}
headers:
Allow: ['GET, HEAD, OPTIONS']
- Content-Length: ['229']
+ Content-Length: ['239']
Content-Type: [application/json]
- Date: ['Sun, 08 Oct 2017 10:17:18 GMT']
+ Date: ['Fri, 13 Apr 2018 02:42:05 GMT']
Server: [nginx/1.10.1]
Vary: ['Accept, Cookie']
X-Frame-Options: [SAMEORIGIN]
diff --git a/tests/fixtures/ticker_price_with_date.yaml b/tests/fixtures/ticker_price_with_date.yaml
index 0af3fef..f526609 100644
--- a/tests/fixtures/ticker_price_with_date.yaml
+++ b/tests/fixtures/ticker_price_with_date.yaml
@@ -7,16 +7,16 @@ interactions:
Authorization: [Token 0000000000000000000000000000000000000000]
Connection: [keep-alive]
Content-Type: [application/json]
- User-Agent: [tiingo-python-client 0.3.2]
+ User-Agent: [tiingo-python-client 0.5.0]
method: GET
- uri: https://api.tiingo.com/tiingo/daily/GOOGL/prices?format=json&frequency=daily&startDate=2015-01-01&endDate=2015-01-05
+ uri: https://api.tiingo.com/tiingo/daily/GOOGL/prices?format=json&resampleFreq=daily&startDate=2015-01-01&endDate=2015-01-05
response:
body: {string: '[{"date":"2015-01-02T00:00:00.000Z","close":529.55,"high":535.8,"low":527.88,"open":532.6,"volume":1327870,"adjClose":529.55,"adjHigh":535.8,"adjLow":527.88,"adjOpen":532.6,"adjVolume":1327870,"divCash":0.0,"splitFactor":1.0},{"date":"2015-01-05T00:00:00.000Z","close":519.46,"high":527.9899,"low":517.75,"open":527.15,"volume":2059119,"adjClose":519.46,"adjHigh":527.9899,"adjLow":517.75,"adjOpen":527.15,"adjVolume":2059119,"divCash":0.0,"splitFactor":1.0}]'}
headers:
Allow: ['GET, HEAD, OPTIONS']
Content-Length: ['459']
Content-Type: [application/json]
- Date: ['Sun, 08 Oct 2017 10:17:25 GMT']
+ Date: ['Fri, 13 Apr 2018 02:42:06 GMT']
Server: [nginx/1.10.1]
Vary: ['Accept, Cookie']
X-Frame-Options: [SAMEORIGIN]
diff --git a/tests/fixtures/ticker_price_with_date_csv.yaml b/tests/fixtures/ticker_price_with_date_csv.yaml
index b91d0a6..86ca379 100644
--- a/tests/fixtures/ticker_price_with_date_csv.yaml
+++ b/tests/fixtures/ticker_price_with_date_csv.yaml
@@ -7,9 +7,9 @@ interactions:
Authorization: [Token 0000000000000000000000000000000000000000]
Connection: [keep-alive]
Content-Type: [application/json]
- User-Agent: [tiingo-python-client 0.3.2]
+ User-Agent: [tiingo-python-client 0.5.0]
method: GET
- uri: https://api.tiingo.com/tiingo/daily/GOOGL/prices?format=csv&frequency=daily&startDate=2015-01-01&endDate=2015-01-05
+ uri: https://api.tiingo.com/tiingo/daily/GOOGL/prices?format=csv&resampleFreq=daily&startDate=2015-01-01&endDate=2015-01-05
response:
body: {string: 'date,close,high,low,open,volume,adjClose,adjHigh,adjLow,adjOpen,adjVolume,divCash,splitFactor
@@ -17,12 +17,12 @@ interactions:
2015-01-05,519.46,527.9899,517.75,527.15,2059119,519.46,527.9899,517.75,527.15,2059119,0.0,1.0
-'}
+ '}
headers:
Allow: ['GET, HEAD, OPTIONS']
Content-Length: ['276']
Content-Type: [text/csv]
- Date: ['Sun, 08 Oct 2017 10:17:24 GMT']
+ Date: ['Fri, 13 Apr 2018 02:42:06 GMT']
Server: [nginx/1.10.1]
Vary: ['Accept, Cookie']
X-Frame-Options: [SAMEORIGIN]
diff --git a/tiingo/api.py b/tiingo/api.py
index 6f69ffb..697fd47 100644
--- a/tiingo/api.py
+++ b/tiingo/api.py
@@ -136,7 +136,7 @@ class TiingoClient(RestClient):
url = "tiingo/daily/{}/prices".format(ticker)
params = {
'format': fmt if fmt != "object" else 'json', # conversion local
- 'frequency': frequency
+ 'resampleFreq': frequency
}
if startDate: