mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-17 20:04:19 +01:00
issue #82
This commit is contained in:
10
tests/fixtures/ticker_price.yaml
vendored
10
tests/fixtures/ticker_price.yaml
vendored
@@ -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]
|
||||
|
||||
6
tests/fixtures/ticker_price_with_date.yaml
vendored
6
tests/fixtures/ticker_price_with_date.yaml
vendored
@@ -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]
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user