Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ History
=======
0.15.0 (2021-XX - Unreleased)
--------------------------------

* Feature: Added method get_fundamentals_meta to query the tiingo/fundamentals/meta endpoint
* Documentation: Add crypto endpoint examples (#621)

0.14.0 (2021-03-06)
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ for each function for details.).
# Get Ticker
ticker_metadata = client.get_ticker_metadata("GOOGL")

# Additional metadata is available
ticker_extra_metadata = client.get_fundamentals_metadata("GOOGL")

# Get latest prices, based on 3+ sources as JSON, sampled weekly
ticker_price = client.get_ticker_price("GOOGL", frequency="weekly")

Expand Down
10 changes: 5 additions & 5 deletions tests/fixtures/fundamentals_daily.yaml

Large diffs are not rendered by default.

138 changes: 68 additions & 70 deletions tests/fixtures/fundamentals_daily_csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,151 +13,149 @@ interactions:
Content-Type:
- application/json
User-Agent:
- tiingo-python-client 0.13.0
- tiingo-python-client 0.14.0
method: GET
uri: https://api.tiingo.com/tiingo/fundamentals/GOOGL/daily?startDate=2020-1-1&endDate=2020-4-1&format=csv
uri: https://api.tiingo.com/tiingo/fundamentals/PG/daily?startDate=2020-1-1&endDate=2020-4-1&format=csv
response:
body:
string: 'date,marketCap,enterpriseVal,peRatio,pbRatio,trailingPEG1Y

2019-12-31,923760472316.11,920030472316.11,27.0147236789028,4.58573918207776,1.34343490727517
2020-01-02,307761344843.68,329620344843.68,67.8076923076923,6.7038717618646,3.85270979020979

2020-01-02,943961417697.32,940231417697.32,27.605486083098,4.68602087795653,1.37281336197028
2020-01-03,305691480843.84,327550480843.84,67.3516483516483,6.658784543954,3.8267982017982

2020-01-03,939023255562.48,935293255562.48,27.4610730133118,4.66150681368572,1.36563173904037
2020-01-06,306115428892.0,327974428892.0,67.4450549450549,6.66801927533328,3.83210539460539

2020-01-06,964052013086.69,960322013086.69,28.1930213795885,4.78575477351639,1.40203133347143
2020-01-07,304220131735.52,326079131735.52,67.0274725274725,6.62673459387296,3.80837912087912

2020-01-07,962189856974.39,958459856974.39,28.1385639370714,4.77651064313494,1.39932317957328
2020-01-08,305516914000.48,327375914000.48,67.3131868131868,6.65498200750371,3.82461288711289

2020-01-08,969038453342.96,965308453342.96,28.3388463089956,4.81050850042671,1.4092831677987
2020-01-09,308858622144.8,330717622144.8,68.0494505494505,6.72777341955215,3.86644605394605

2020-01-09,979211343215.71,975481343215.71,28.6363453005244,4.86100884232538,1.4240777122423
2020-01-10,309157879590.56,331016879590.56,68.1153846153846,6.73429205346694,3.87019230769231

2020-01-10,985535777123.04,981805777123.04,28.8212989108512,4.89240464810237,1.43327540529638
2020-01-13,311427248554.24,333286248554.24,68.6153846153846,6.78372502732073,3.8986013986014

2020-01-13,993170617183.47,989440617183.47,29.0445744251714,4.93030558266632,1.4443788362788
2020-01-14,310953424265.12,332812424265.12,68.510989010989,6.77340385695565,3.89266983016983

2020-01-14,986659967664.91,982929967664.91,28.854175070593,4.89798536385117,1.4349103278349
2020-01-15,314120565566.08,335979565566.08,69.2087912087912,6.8423927325538,3.93231768231768

2020-01-15,992598176600.8,988868176600.8,29.0278338039532,4.92746386851202,1.44354632971011
2020-01-16,314394884891.36,336253884891.36,69.2692307692308,6.84836814697569,3.93575174825175

2020-01-16,1000157151041.84,996427151041.84,29.2488906817265,4.96498819035672,1.45453942849667
2020-01-17,315242780987.68,337101780987.68,69.4560439560439,6.86683760973425,3.94636613386613

2020-01-17,1020406374544.48,1016676374544.48,29.8410649455426,5.065509548875,1.48398809458915
2020-01-21,314444761132.32,336303761132.32,69.2802197802198,6.84945458596149,3.93637612387613

2020-01-21,1022289221280.25,1018559221280.25,29.8961274707543,5.07485639181625,1.48672633908616
2020-01-22,314993399782.88,336852399782.88,69.4010989010989,6.86140541480527,3.94324425574426

2020-01-22,1023613421182.33,1019883421182.33,29.934852763211,5.08142999564306,1.48865213741374
2020-01-23,308656915971.16,330515915971.16,68.6758241758242,6.78970044174262,3.90203546453547

2020-01-23,1023972058655.81,1020242058655.81,29.9453408632513,5.08321034667948,1.48917370779412
2020-01-24,309027333903.76,330886333903.76,68.7582417582418,6.7978487341361,3.90671828171828

2020-01-24,1011199047100.33,1007469047100.33,29.57180314643,5.01980245976672,1.47059777809274
2020-01-27,310385532989.96,332244532989.96,69.0604395604395,6.82772580624554,3.92388861138861

2020-01-27,987446211356.77,983716211356.77,28.8771682129891,4.90188844112334,1.43605377059189
2020-01-28,311225146970.52,333084146970.52,69.2472527472527,6.8461952690041,3.93450299700299

2020-01-28,1000391644774.5,996661644774.5,29.255748285599,4.96615226603438,1.45488045528384
2020-01-29,308829777673.04,330688777673.04,68.7142857142857,6.79350297819291,3.90422077922078

2020-01-29,1004667706958.3,1000937706958.3,29.3807987091569,4.98737952839179,1.46109917904997
2020-01-30,311027590739.8,332886590739.8,69.2032967032967,6.84184951306091,3.93200549450549

2020-01-30,1002977972708.25,999247972708.25,29.3313836224284,4.97899133600862,1.45864178014239
2020-01-31,307743218404.08,329602218404.08,68.4725274725275,6.76960132050536,3.89048451548452

2020-01-31,988170383178.22,984440383178.22,28.8983461073013,4.90548338071613,1.43710694155228
2020-02-03,308953250317.24,330812250317.24,68.7417582417582,6.7962190756574,3.90578171828172

2020-02-03,1022530611887.4,1018800611887.4,29.9031867688584,5.07605470501384,1.48707739607296
2020-02-04,310311449403.44,332170449403.44,69.043956043956,6.82609614776684,3.92295204795205

2020-02-04,993410187346.9,989680187346.9,29.1530859217426,4.94872536838935,1.44977508367585
2020-02-05,313151320220.04,335010320220.04,69.6758241758242,6.88856638945021,3.95885364635365

2020-02-05,993850050444.5,990120050444.5,29.1659943525615,4.95091656966496,1.45041701645171
2020-02-06,313966239671.76,335825239671.76,69.8571428571428,6.90649263271587,3.96915584415584

2020-02-06,1014413650257.3,1010683650257.3,29.7694634933441,5.05335522929939,1.48042737372306
2020-02-07,311348619614.72,333207619614.72,69.2747252747253,6.84891136646859,3.93606393606394

2020-02-07,1016571728579.9,1012841728579.9,29.8327954820492,5.06410581055782,1.48357685640461
2020-02-10,311570870374.28,333429870374.28,69.3241758241758,6.85380034190468,3.93887362637363

2020-02-10,1036881032539.4,1033151032539.4,30.4288019362646,5.1652776819548,1.51321609628992
2020-02-11,306607270077.44,328466270077.44,68.2197802197802,6.74461322383201,3.87612387612388

2020-02-11,1037843233065.4,1034113233065.4,30.4570391286809,5.17007093474518,1.51462032423711
2020-02-12,304853958529.8,326712958529.8,67.8296703296703,6.7060446398362,3.85395854145854

2020-02-12,1043733274856.7,1040003274856.7,30.629891085115,5.1994124893263,1.52321620531383
2020-02-13,308582832384.64,330441832384.64,68.6593406593406,6.78807078326392,3.9010989010989

2020-02-13,1040131895745.1,1036401895745.1,30.5242033077854,5.1814720288823,1.51796038071149
2020-02-14,311496786787.76,333355786787.76,69.3076923076923,6.85217068342598,3.93793706293706

2020-02-14,1043802003465.7,1040072003465.7,30.6319080274304,5.19975486452561,1.52331650731005
2020-02-18,308360581625.08,330219581625.08,68.6098901098901,6.78318180782783,3.89828921078921

2020-02-18,1044289976589.6,1040559976589.6,30.6462283178701,5.20218572844073,1.52402865148327
2020-02-19,309768169768.96,331627169768.96,68.9230769230769,6.81414531892307,3.91608391608392

2020-02-19,1048021940058.3,1044291940058.3,30.755748285599,5.22077670176343,1.52947504987844
2020-02-20,312583346056.72,334442346056.72,69.5494505494505,6.87607234111353,3.95167332667332

2020-02-20,1042606125669.1,1038876125669.1,30.5968132311416,5.19379753605757,1.52157125257569
2020-02-21,312879680402.8,334738680402.8,69.6153846153846,6.88259097502832,3.95541958041958

2020-02-21,1019561423071.4,1015831423071.4,29.9205324727713,5.07899913172793,1.48793999324052
2020-02-24,304483540597.2,326342540597.2,67.7472527472527,6.69789634744271,3.84927572427572

2020-02-24,975850027747.4,972120027747.4,28.6377571601452,4.86124850496489,1.42414792363965
2020-02-25,299865663704.12,321724663704.12,66.7197802197802,6.59631430227063,3.7908966033966

2020-02-25,952798452288.8,949068452288.8,27.9612747075434,4.74641586311533,1.39050663410486
2020-02-26,296729458541.44,318588458541.44,66.021978021978,6.52732542667248,3.75124875124875

2020-02-26,955650689562.3,951920689562.3,28.0449778136345,4.76062443388682,1.39466916694831
2020-02-27,280282902334.0,302141902334.0,62.3626373626374,6.16554124440185,3.54333166833167

2020-02-27,903746844045.5,900016844045.5,26.5217829770069,4.50206268336568,1.3189210993971
2020-02-28,279616150055.32,301475150055.32,62.2142857142857,6.15087431809358,3.5349025974026

2020-02-28,920447896032.5,916717896032.5,27.0118999596612,4.58525985679872,1.34329448448045
2020-03-02,295247786811.04,317106786811.04,65.6923076923077,6.49473225709855,3.73251748251748

2020-03-02,952798452288.8,949068452288.8,27.9612747075434,4.74641586311533,1.39050663410486
2020-03-03,291815247302.28,313674247302.28,64.9285714285714,6.41922474758561,3.68912337662338

2020-03-03,919396348314.8,915666348314.8,26.9810407422348,4.58002151624923,1.34175986393816
2020-03-04,307446884058.0,329305884058.0,68.4065934065934,6.76308268659057,3.88673826173826

2020-03-04,949554461944.0,945824461944.0,27.8660750302541,4.73025575370776,1.38577237988291
2020-03-05,300359554280.92,322218554280.92,66.8296703296703,6.60717869212861,3.79714035964036

2020-03-05,903616259688.4,899886259688.4,26.5179507866075,4.50141217048698,1.31873052560427
2020-03-06,300433637867.44,322292637867.44,66.8461538461538,6.6088083506073,3.79807692307692

2020-03-06,890544078256.6,886814078256.6,26.134328358209,4.43629240757766,1.29965308592175
2020-03-09,286604701717.04,308463701717.04,63.7692307692308,6.30460543458395,3.62325174825175

2020-03-09,835595555361.1,831865555361.1,24.5217829770069,4.16256343572695,1.21946163993764
2020-03-10,297692545166.2,319551545166.2,66.2362637362637,6.54851098689553,3.76342407592407

2020-03-10,876406603385.3,872676603385.3,25.7194433239209,4.36586582907898,1.27902096529769
2020-03-11,275566247325.56,297425247325.56,61.3131868131868,6.06178632125817,3.4837037962038

2020-03-11,832234726381.0,828504726381.0,24.4231544977814,4.14582128848055,1.2145568723221
2020-03-12,251489081706.56,273348081706.56,55.9560439560439,5.5321473156818,3.17932067932068

2020-03-12,763952853339.5,760222853339.5,22.419322307382,3.80567152796313,1.11490683906981
2020-03-13,281690490477.88,303549490477.88,62.6758241758242,6.19650475549708,3.56112637362638

2020-03-13,834550880504.3,830820880504.3,24.491125453812,4.15735933269739,1.21793704959498
2020-03-16,267935637914.0,289794637914.0,59.6153846153846,5.89393149795243,3.38723776223776

2020-03-16,737457974570.0,733727974570.0,21.6417910447761,3.67368588862799,1.076240419524
2020-03-17,291988109004.16,313847109004.16,64.9670329670329,6.4230272840359,3.69130869130869

2020-03-17,768427085785.4,764697085785.4,22.5506252521178,3.8279601534384,1.12143649902424
2020-03-18,290037241225.8,311896241225.8,64.532967032967,6.38011294409689,3.66664585414585

2020-03-18,749959708547.1,746229708547.1,22.0086728519564,3.73596393738301,1.09448535263783
2020-03-19,273689463133.72,295548463133.72,60.8956043956044,6.02050163979786,3.45997752247752

2020-03-19,764035327670.3,760305327670.3,22.4217426381606,3.8060823782023,1.11502720146528
2020-03-20,252946058908.12,274805058908.12,56.2802197802198,5.56419726576283,3.19773976023976

2020-03-20,734165874198.9,730435874198.9,21.5451795078661,3.6572861165809,1.07143595390469
2020-03-23,241265546766.8,263124546766.8,53.6813186813187,5.30725444562168,3.05007492507493

2020-03-23,724488886051.7,720758886051.7,21.2611940298507,3.60907968851763,1.05731343283582
2020-03-24,255020399330.68,276879399330.68,56.7417582417582,5.60982770316633,3.22396353646353

2020-03-24,776640154560.9,772910154560.9,22.791649858814,3.8688739897563,1.13342258757345
2020-03-25,249217185053.28,271076185053.28,55.4505494505494,5.48217112233511,3.1505994005994

2020-03-25,757128102465.8,753398102465.8,22.2190399354578,3.77167367067135,1.10494685084439
2020-03-26,265169850683.92,287028850683.92,59.0,5.83309091474776,3.35227272727273

2020-03-26,799258739782.8,795528739782.8,23.4554255748286,3.98154966785019,1.16643197453202
2020-03-27,272059624230.28,293918624230.28,60.532967032967,5.98464915326653,3.43937312687313

2020-03-27,763066254283.4,759336254283.4,22.3933037515127,3.80125488789199,1.11361294331847
2020-03-30,283987081660.0,305846081660.0,63.1868131868132,6.24702416833667,3.59015984015984

2020-03-30,787842917827.9,784112917827.9,23.1204114562324,3.92468114724431,1.14977181295858
2020-03-31,271639817240.0,292257817240.0,57.8947368421053,5.91279722339521,7.74342105263161

2020-03-31,798592072275.5,794440072275.5,23.2576060848679,3.92122161198621,5.86336490244826
2020-04-01,269985283807.72,290603283807.72,57.5421052631579,5.87678291303453,7.69625657894739

2020-04-01,757457999789.0,753305999789.0,22.0596477181745,3.7192463863075,5.56135329316082

'
'
headers:
allow:
- GET, HEAD, OPTIONS
content-length:
- '5994'
- '5918'
content-type:
- text/csv
date:
- Sat, 06 Feb 2021 16:23:38 GMT
- Wed, 28 Apr 2021 17:14:16 GMT
server:
- nginx/1.14.0 (Ubuntu)
vary:
Expand Down
10 changes: 5 additions & 5 deletions tests/fixtures/fundamentals_definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- tiingo-python-client 0.13.0
- tiingo-python-client 0.14.0
method: GET
uri: https://api.tiingo.com/tiingo/fundamentals/definitions?tickers=GOOGL&format=json
uri: https://api.tiingo.com/tiingo/fundamentals/definitions?tickers=PG&format=json
response:
body:
string: '[{"dataCode":"rps","name":"Revenue Per Share","description":"Revenue
Expand Down Expand Up @@ -189,11 +189,11 @@ interactions:
content-type:
- application/json
date:
- Sat, 06 Feb 2021 16:23:39 GMT
- Wed, 28 Apr 2021 17:14:16 GMT
server:
- nginx/1.14.0 (Ubuntu)
- nginx/1.16.1
vary:
- Accept, Cookie, Origin
- Accept, Cookie
x-frame-options:
- SAMEORIGIN
status:
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/fundamentals_definitions_csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- tiingo-python-client 0.13.0
- tiingo-python-client 0.14.0
method: GET
uri: https://api.tiingo.com/tiingo/fundamentals/definitions?tickers=GOOGL&format=csv
uri: https://api.tiingo.com/tiingo/fundamentals/definitions?tickers=PG&format=csv
response:
body:
string: 'dataCode,name,description,statementType,units
Expand Down Expand Up @@ -275,7 +275,7 @@ interactions:
trailingPEG1Y,PEG Ratio,PEG ratio using the trailing 1 year EPS growth rate
in the denominator,overview,

'
'
headers:
allow:
- GET, HEAD, OPTIONS
Expand All @@ -284,7 +284,7 @@ interactions:
content-type:
- text/csv
date:
- Sat, 06 Feb 2021 16:34:49 GMT
- Wed, 28 Apr 2021 17:14:16 GMT
server:
- nginx/1.14.0 (Ubuntu)
vary:
Expand Down
44 changes: 44 additions & 0 deletions tests/fixtures/fundamentals_meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- Token 0000000000000000000000000000000000000000
Connection:
- keep-alive
Content-Type:
- application/json
User-Agent:
- tiingo-python-client 0.14.0
method: GET
uri: https://api.tiingo.com/tiingo/fundamentals/meta?format=json&tickers=PG
response:
body:
string: '[{"permaTicker":"US000000000309","ticker":"pg","name":"Procter & Gamble
Company","isActive":true,"isADR":false,"sector":"Consumer Defensive","industry":"Household
& Personal Products","sicCode":2840,"sicSector":"Manufacturing","sicIndustry":"Soap
Detergents Cleang Preparations Perfumes Cosmetics","reportingCurrency":"usd","location":"Ohio,
USA","companyWebsite":"http:\/\/www.pginvestor.com","secFilingWebsite":"https:\/\/www.sec.gov\/cgi-bin\/browse-edgar?action=getcompany&CIK=0000080424","statementLastUpdated":"2021-04-24T00:19:24.681Z","dailyLastUpdated":"2021-04-27T21:07:49.725Z"}]'
headers:
allow:
- GET, HEAD, OPTIONS
content-length:
- '590'
content-type:
- application/json
date:
- Wed, 28 Apr 2021 17:14:16 GMT
server:
- nginx/1.14.0 (Ubuntu)
vary:
- Accept, Cookie, Origin
x-frame-options:
- SAMEORIGIN
status:
code: 200
message: OK
version: 1
52 changes: 52 additions & 0 deletions tests/fixtures/fundamentals_meta_csv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- Token 0000000000000000000000000000000000000000
Connection:
- keep-alive
Content-Type:
- application/json
User-Agent:
- tiingo-python-client 0.14.0
method: GET
uri: https://api.tiingo.com/tiingo/fundamentals/meta?format=csv&tickers=PG%2CCAT
response:
body:
string: 'permaTicker,ticker,name,isActive,isADR,sector,industry,sicCode,sicSector,sicIndustry,reportingCurrency,location,companyWebsite,secFilingWebsite,statementLastUpdated,dailyLastUpdated

US000000000140,cat,Caterpillar Inc,True,False,Industrials,Farm & Heavy Construction
Machinery,3531,Manufacturing,Construction Machinery & Equip,usd,"Illinois,
USA",http://www.caterpillar.com,https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0000018230,2021-02-23
00:06:46.211656+00:00,2021-04-27 20:52:44.524200+00:00

US000000000309,pg,Procter & Gamble Company,True,False,Consumer Defensive,Household
& Personal Products,2840,Manufacturing,Soap Detergents Cleang Preparations
Perfumes Cosmetics,usd,"Ohio, USA",http://www.pginvestor.com,https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0000080424,2021-04-24
00:19:24.681664+00:00,2021-04-27 21:07:49.725202+00:00

'
headers:
allow:
- GET, HEAD, OPTIONS
content-length:
- '872'
content-type:
- text/csv
date:
- Wed, 28 Apr 2021 17:14:17 GMT
server:
- nginx/1.14.0 (Ubuntu)
vary:
- Accept, Cookie, Origin
x-frame-options:
- SAMEORIGIN
status:
code: 200
message: OK
version: 1
Loading