mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2026-01-11 23:34:47 +01:00
feat: Add financial analysis endpoints (Fundamentals, Funds)
Add OpenAPI specifications for fundamental data: - Company fundamentals with financial statements and metrics - Mutual fund and ETF fees, holdings, and analytics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
360
openapi/paths/fundamentals.yaml
Normal file
360
openapi/paths/fundamentals.yaml
Normal file
@@ -0,0 +1,360 @@
|
||||
# Tiingo Fundamentals API Endpoints
|
||||
# Reference these using: $ref: './fundamentals.yaml#/definitions'
|
||||
|
||||
definitions: &definitions
|
||||
get:
|
||||
summary: Get Fundamental Definitions
|
||||
description: |
|
||||
Returns available fundamental metrics and their metadata. Use this endpoint to discover
|
||||
which fields are available and what they represent.
|
||||
operationId: getFundamentalDefinitions
|
||||
tags:
|
||||
- Fundamentals
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
- name: tickers
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
description: |
|
||||
Specific tickers to return meta data for. If no string passed, will return meta data
|
||||
for all available tickers. Can either be a single ticker, a comma-separated list of tickers,
|
||||
or an array of strings (string[]).
|
||||
examples:
|
||||
single:
|
||||
value: "AAPL"
|
||||
summary: Single ticker
|
||||
multiple:
|
||||
value: "AAPL,GOOGL,MSFT"
|
||||
summary: Multiple tickers (comma-separated)
|
||||
array:
|
||||
value: ["AAPL", "GOOGL", "MSFT"]
|
||||
summary: Array of tickers
|
||||
- $ref: '../parameters/_index.yaml#/FormatParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with fundamental definitions
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/fundamentals-schemas.yaml#/FundamentalDefinition'
|
||||
examples:
|
||||
definitions:
|
||||
summary: Example fundamental definitions
|
||||
value:
|
||||
- dataCode: "peRatio"
|
||||
name: "Price/Earnings Ratio"
|
||||
description: "The price to earnings ratio of the company"
|
||||
statementType: "overview"
|
||||
units: ""
|
||||
- dataCode: "netIncome"
|
||||
name: "Net Income"
|
||||
description: "The net income of the company"
|
||||
statementType: "incomeStatement"
|
||||
units: "$"
|
||||
text/csv:
|
||||
schema:
|
||||
type: string
|
||||
description: CSV formatted data
|
||||
'400':
|
||||
$ref: '../responses/_index.yaml#/BadRequest'
|
||||
'401':
|
||||
$ref: '../responses/_index.yaml#/Unauthorized'
|
||||
'404':
|
||||
$ref: '../responses/_index.yaml#/NotFound'
|
||||
'429':
|
||||
$ref: '../responses/_index.yaml#/TooManyRequests'
|
||||
'500':
|
||||
$ref: '../responses/_index.yaml#/InternalServerError'
|
||||
|
||||
statements: &statements
|
||||
get:
|
||||
summary: Get Financial Statements
|
||||
description: |
|
||||
Returns historical statement data extracted from quarterly and annual statements
|
||||
(Balance Sheet, Income Statement, Cash Flow, and Overview metrics). Data is updated
|
||||
usually within 12-24 hours of being made available by the SEC.
|
||||
|
||||
The `asReported` parameter controls whether you get the most recent revised data
|
||||
(false, default) or the data as it was originally reported (true).
|
||||
operationId: getFinancialStatements
|
||||
tags:
|
||||
- Fundamentals
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TickerPathParam'
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
- name: asReported
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
description: |
|
||||
When false (default), returns the most recent data including any revisions for the reporting period.
|
||||
The dates will correspond to the fiscal end of the quarter or year.
|
||||
When true, returns the data as it was reported on the release date.
|
||||
The date will correspond to the date the filings were posted on the SEC.
|
||||
- $ref: '../parameters/_index.yaml#/StartDateParam'
|
||||
- $ref: '../parameters/_index.yaml#/EndDateParam'
|
||||
- name: sort
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- date
|
||||
- -date
|
||||
default: date
|
||||
description: |
|
||||
Sort direction and column to sort by. Prepend "-" for descending order,
|
||||
otherwise ascending. For Fundamentals statements, only the "date" field may be sorted upon.
|
||||
examples:
|
||||
ascending:
|
||||
value: "date"
|
||||
summary: Sort by date ascending
|
||||
descending:
|
||||
value: "-date"
|
||||
summary: Sort by date descending
|
||||
- $ref: '../parameters/_index.yaml#/FormatParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with financial statements
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/fundamentals-schemas.yaml#/FinancialStatement'
|
||||
examples:
|
||||
statements:
|
||||
summary: Example financial statement
|
||||
value:
|
||||
- date: "2023-12-29T00:00:00.000Z"
|
||||
quarter: 1
|
||||
year: 2024
|
||||
statementData:
|
||||
balanceSheet:
|
||||
- dataCode: "totalAssets"
|
||||
value: 352755000000
|
||||
incomeStatement:
|
||||
- dataCode: "revenue"
|
||||
value: 383285000000
|
||||
- dataCode: "netIncome"
|
||||
value: 96995000000
|
||||
cashFlow:
|
||||
- dataCode: "operatingCashFlow"
|
||||
value: 110543000000
|
||||
overview:
|
||||
- dataCode: "peRatio"
|
||||
value: 29.45
|
||||
text/csv:
|
||||
schema:
|
||||
type: string
|
||||
description: CSV formatted data (flat/2-D structure for spreadsheet compatibility)
|
||||
'400':
|
||||
$ref: '../responses/_index.yaml#/BadRequest'
|
||||
'401':
|
||||
$ref: '../responses/_index.yaml#/Unauthorized'
|
||||
'404':
|
||||
$ref: '../responses/_index.yaml#/NotFound'
|
||||
'429':
|
||||
$ref: '../responses/_index.yaml#/TooManyRequests'
|
||||
'500':
|
||||
$ref: '../responses/_index.yaml#/InternalServerError'
|
||||
|
||||
daily: &daily
|
||||
get:
|
||||
summary: Get Daily Fundamentals
|
||||
description: |
|
||||
Returns daily fundamental metrics that rely on price data and update daily
|
||||
(Market Capitalization, P/E Ratios, P/B Ratios, etc.).
|
||||
|
||||
IMPORTANT: New daily metrics are continuously added, so fields will change over time.
|
||||
Use the `columns` parameter if you require specific columns in a particular order.
|
||||
operationId: getDailyFundamentals
|
||||
tags:
|
||||
- Fundamentals
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TickerPathParam'
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
- $ref: '../parameters/_index.yaml#/StartDateParam'
|
||||
- $ref: '../parameters/_index.yaml#/EndDateParam'
|
||||
- name: sort
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
pattern: '^-?[a-zA-Z]+$'
|
||||
description: |
|
||||
Sort direction and column to sort by. Prepend "-" for descending order,
|
||||
otherwise ascending. E.g. sort=date (ascending) or sort=-date (descending).
|
||||
examples:
|
||||
ascending:
|
||||
value: "date"
|
||||
summary: Sort by date ascending
|
||||
descending:
|
||||
value: "-date"
|
||||
summary: Sort by date descending
|
||||
- name: columns
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
pattern: '^[a-zA-Z]+(,[a-zA-Z]+)*$'
|
||||
description: |
|
||||
Comma-separated list of columns to return. Ensures consistent output even as
|
||||
new metrics are added. E.g. columns=date,marketCap,peRatio will always return
|
||||
only those columns in that exact order.
|
||||
examples:
|
||||
basic:
|
||||
value: "date,marketCap,peRatio"
|
||||
summary: Basic metrics
|
||||
extended:
|
||||
value: "date,marketCap,enterpriseVal,peRatio,pbRatio,trailingPEG1Y"
|
||||
summary: Extended metrics
|
||||
- $ref: '../parameters/_index.yaml#/FormatParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with daily fundamental metrics
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/fundamentals-schemas.yaml#/DailyMetric'
|
||||
examples:
|
||||
daily:
|
||||
summary: Example daily fundamentals
|
||||
value:
|
||||
- date: "2023-12-29T00:00:00.000Z"
|
||||
marketCap: 3050000000000
|
||||
enterpriseVal: 2950000000000
|
||||
peRatio: 29.45
|
||||
pbRatio: 48.32
|
||||
trailingPEG1Y: 2.15
|
||||
- date: "2023-12-28T00:00:00.000Z"
|
||||
marketCap: 3040000000000
|
||||
enterpriseVal: 2940000000000
|
||||
peRatio: 29.38
|
||||
pbRatio: 48.20
|
||||
trailingPEG1Y: 2.14
|
||||
text/csv:
|
||||
schema:
|
||||
type: string
|
||||
description: CSV formatted data
|
||||
'400':
|
||||
$ref: '../responses/_index.yaml#/BadRequest'
|
||||
'401':
|
||||
$ref: '../responses/_index.yaml#/Unauthorized'
|
||||
'404':
|
||||
$ref: '../responses/_index.yaml#/NotFound'
|
||||
'429':
|
||||
$ref: '../responses/_index.yaml#/TooManyRequests'
|
||||
'500':
|
||||
$ref: '../responses/_index.yaml#/InternalServerError'
|
||||
|
||||
meta: &meta
|
||||
get:
|
||||
summary: Get Fundamentals Metadata
|
||||
description: |
|
||||
Returns company metadata and information about when data was last updated.
|
||||
|
||||
IMPORTANT: As new meta data about companies and their fundamentals is added,
|
||||
the endpoint output will change. Use the `columns` parameter if you require
|
||||
specific columns in a particular order.
|
||||
operationId: getFundamentalsMeta
|
||||
tags:
|
||||
- Fundamentals
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
- name: tickers
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
description: |
|
||||
Specific tickers to return meta data for. If no string passed, will return meta data
|
||||
for all available tickers. Can either be a single ticker, a comma-separated list of tickers,
|
||||
or an array of strings (string[]).
|
||||
examples:
|
||||
single:
|
||||
value: "AAPL"
|
||||
summary: Single ticker
|
||||
multiple:
|
||||
value: "AAPL,GOOGL"
|
||||
summary: Multiple tickers (comma-separated)
|
||||
array:
|
||||
value: ["AAPL", "GOOGL"]
|
||||
summary: Array of tickers
|
||||
- name: columns
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
pattern: '^[a-zA-Z]+(,[a-zA-Z]+)*$'
|
||||
description: |
|
||||
Comma-separated list of columns to return. Ensures consistent output even as
|
||||
new metadata is added. E.g. columns=ticker,name will always return only those
|
||||
columns in that exact order.
|
||||
examples:
|
||||
basic:
|
||||
value: "ticker,name"
|
||||
summary: Basic info
|
||||
extended:
|
||||
value: "ticker,name,sector,industry,isActive"
|
||||
summary: Extended info
|
||||
- $ref: '../parameters/_index.yaml#/FormatParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with company metadata
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/fundamentals-schemas.yaml#/FundamentalMeta'
|
||||
examples:
|
||||
meta:
|
||||
summary: Example company metadata
|
||||
value:
|
||||
- permaTicker: "AAPL"
|
||||
ticker: "AAPL"
|
||||
name: "Apple Inc."
|
||||
isActive: true
|
||||
isADR: false
|
||||
sector: "Technology"
|
||||
industry: "Consumer Electronics"
|
||||
sicCode: 3571
|
||||
sicSector: "Industrial and Commercial Machinery and Computer Equipment"
|
||||
sicIndustry: "Electronic Computers"
|
||||
reportingCurrency: "USD"
|
||||
location: "California"
|
||||
companyWebsite: "https://www.apple.com"
|
||||
secFilingWebsite: "https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0000320193&type=&dateb=&owner=exclude&count=100"
|
||||
statementLastUpdated: "2024-01-15T10:30:00.000Z"
|
||||
dailyLastUpdated: "2024-01-15T08:00:00.000Z"
|
||||
text/csv:
|
||||
schema:
|
||||
type: string
|
||||
description: CSV formatted data
|
||||
'400':
|
||||
$ref: '../responses/_index.yaml#/BadRequest'
|
||||
'401':
|
||||
$ref: '../responses/_index.yaml#/Unauthorized'
|
||||
'404':
|
||||
$ref: '../responses/_index.yaml#/NotFound'
|
||||
'429':
|
||||
$ref: '../responses/_index.yaml#/TooManyRequests'
|
||||
'500':
|
||||
$ref: '../responses/_index.yaml#/InternalServerError'
|
||||
132
openapi/paths/funds.yaml
Normal file
132
openapi/paths/funds.yaml
Normal file
@@ -0,0 +1,132 @@
|
||||
# Tiingo Mutual Fund and ETF Fees API Endpoints
|
||||
# Reference: /docs/api_extracted/mutual-fund-etf-fees.md
|
||||
|
||||
fund-overview: &fund-overview
|
||||
get:
|
||||
summary: Get Fund Overview
|
||||
description: |
|
||||
Obtain top-level fund data, including description and share classes.
|
||||
|
||||
This endpoint provides comprehensive information about a mutual fund or ETF,
|
||||
including its full name, description, share class, net expense ratio, and
|
||||
related share classes with their respective expense ratios.
|
||||
|
||||
**Note:** This endpoint is available for enterprise and institutional clients only.
|
||||
Contact Sales@tiingo.com for licensing and pricing.
|
||||
operationId: getFundOverview
|
||||
tags:
|
||||
- Funds
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TickerPathParam'
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with fund overview data
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../schemas/funds-schemas.yaml#/FundOverview'
|
||||
examples:
|
||||
vtsax:
|
||||
summary: Vanguard Total Stock Market Index Fund
|
||||
value:
|
||||
ticker: "VTSAX"
|
||||
name: "Vanguard Total Stock Market Index Fund"
|
||||
description: "Long description of the fund..."
|
||||
shareClass: "Admiral Shares"
|
||||
netExpense: 0.0035
|
||||
otherShareClasses:
|
||||
- ticker: "VTSMX"
|
||||
name: "Vanguard Total Stock Market Index Fund"
|
||||
shareClass: "Investor Shares"
|
||||
netExpense: 0.0055
|
||||
- ticker: "VTSIX"
|
||||
name: "Vanguard Total Stock Market Index Fund"
|
||||
shareClass: "Institutional Shares"
|
||||
netExpense: 0.0020
|
||||
'400':
|
||||
$ref: '../responses/_index.yaml#/BadRequest'
|
||||
'401':
|
||||
$ref: '../responses/_index.yaml#/Unauthorized'
|
||||
'404':
|
||||
$ref: '../responses/_index.yaml#/NotFound'
|
||||
'429':
|
||||
$ref: '../responses/_index.yaml#/TooManyRequests'
|
||||
'500':
|
||||
$ref: '../responses/_index.yaml#/InternalServerError'
|
||||
|
||||
fund-metrics: &fund-metrics
|
||||
get:
|
||||
summary: Get Fund Fee Metrics
|
||||
description: |
|
||||
Obtain detailed current and historical fee data for a mutual fund or ETF.
|
||||
|
||||
This endpoint provides comprehensive fee information including net and gross expense ratios,
|
||||
management fees, 12b-1 fees, load fees, redemption fees, and custom fees. The data includes
|
||||
both current and historical fee information with prospectus dates.
|
||||
|
||||
Fee data covers:
|
||||
- Expense ratios (net/gross)
|
||||
- Management and distribution fees
|
||||
- Load fees (front/back/dividend)
|
||||
- Shareholder and account fees
|
||||
- Redemption and exchange fees
|
||||
- Custom fees (e.g., check processing fees)
|
||||
|
||||
All fee values are expressed as decimals (e.g., 0.0035 = 0.35%).
|
||||
|
||||
**Note:** This endpoint is available for enterprise and institutional clients only.
|
||||
Contact Sales@tiingo.com for licensing and pricing.
|
||||
operationId: getFundMetrics
|
||||
tags:
|
||||
- Funds
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TickerPathParam'
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with detailed fund fee metrics
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../schemas/funds-schemas.yaml#/FundMetrics'
|
||||
examples:
|
||||
vtsax:
|
||||
summary: Vanguard Total Stock Market Index Fund Fees
|
||||
value:
|
||||
prospectusDate: "2024-01-15"
|
||||
netExpense: 0.0035
|
||||
grossExpense: 0.0040
|
||||
managementFee: 0.0025
|
||||
12b1: 0.0000
|
||||
non12b1: 0.0000
|
||||
otherExpenses: 0.0015
|
||||
acquiredFundFees: 0.0000
|
||||
feeWaiver: 0.0005
|
||||
exchangeFeeUSD: 0.0000
|
||||
exchangeFeePercent: 0.0000
|
||||
frontLoad: 0.0000
|
||||
backLoad: 0.0000
|
||||
dividendLoad: 0.0000
|
||||
shareholderFee: 0.0000
|
||||
accountFeeUSD: 0.0000
|
||||
accountFeePercent: 0.0000
|
||||
redemptionFeeUSD: 0.0000
|
||||
redemptionFeePercent: 0.0000
|
||||
portfolioTurnover: 0.05
|
||||
miscFees: 0.0000
|
||||
customFees:
|
||||
- label: "Check Processing Fee"
|
||||
value: 0.0000
|
||||
units: "$"
|
||||
parentFee: "shareholderFee"
|
||||
'400':
|
||||
$ref: '../responses/_index.yaml#/BadRequest'
|
||||
'401':
|
||||
$ref: '../responses/_index.yaml#/Unauthorized'
|
||||
'404':
|
||||
$ref: '../responses/_index.yaml#/NotFound'
|
||||
'429':
|
||||
$ref: '../responses/_index.yaml#/TooManyRequests'
|
||||
'500':
|
||||
$ref: '../responses/_index.yaml#/InternalServerError'
|
||||
255
openapi/schemas/fundamentals-schemas.yaml
Normal file
255
openapi/schemas/fundamentals-schemas.yaml
Normal file
@@ -0,0 +1,255 @@
|
||||
# Tiingo Fundamentals API Schemas
|
||||
# Reference these using: $ref: '../schemas/fundamentals-schemas.yaml#/SchemaName'
|
||||
|
||||
FundamentalDefinition: &FundamentalDefinition
|
||||
type: object
|
||||
description: Definition of a fundamental metric field
|
||||
properties:
|
||||
dataCode:
|
||||
type: string
|
||||
description: An identifier representing the fundamentals field the value belongs to (e.g., "peRatio")
|
||||
example: "peRatio"
|
||||
name:
|
||||
type: string
|
||||
description: A human-friendly readable name of the field
|
||||
example: "Price/Earnings Ratio"
|
||||
description:
|
||||
type: string
|
||||
description: A description of the field
|
||||
example: "The price to earnings ratio of the company"
|
||||
statementType:
|
||||
type: string
|
||||
description: Which statement this value belongs to
|
||||
enum:
|
||||
- balanceSheet
|
||||
- incomeStatement
|
||||
- cashFlow
|
||||
- overview
|
||||
example: "overview"
|
||||
units:
|
||||
type: string
|
||||
description: The unit the field value is in. Value is either "$", "%" or blank. If blank, value may either be an integer (like shares outstanding) or a ratio
|
||||
enum:
|
||||
- "$"
|
||||
- "%"
|
||||
- ""
|
||||
example: ""
|
||||
required:
|
||||
- dataCode
|
||||
- name
|
||||
- description
|
||||
- statementType
|
||||
- units
|
||||
|
||||
DataPoint: &DataPoint
|
||||
type: object
|
||||
description: A single data point with a code and value
|
||||
properties:
|
||||
dataCode:
|
||||
type: string
|
||||
description: An identifier representing the fundamentals field the value belongs to (e.g., "peRatio")
|
||||
example: "totalAssets"
|
||||
value:
|
||||
type: number
|
||||
format: float
|
||||
description: The value of the field corresponding to the dataCode
|
||||
example: 352755000000
|
||||
required:
|
||||
- dataCode
|
||||
- value
|
||||
|
||||
StatementData: &StatementData
|
||||
type: object
|
||||
description: Statement data broken out by four different statement types
|
||||
properties:
|
||||
balanceSheet:
|
||||
type: array
|
||||
description: Balance sheet data (assets, liabilities, equity)
|
||||
items:
|
||||
$ref: '#/DataPoint'
|
||||
incomeStatement:
|
||||
type: array
|
||||
description: Income statement data (revenue, expenses, income)
|
||||
items:
|
||||
$ref: '#/DataPoint'
|
||||
cashFlow:
|
||||
type: array
|
||||
description: Cash flow statement data (operating, investing, financing activities)
|
||||
items:
|
||||
$ref: '#/DataPoint'
|
||||
overview:
|
||||
type: array
|
||||
description: Metrics and ratios that may be a combination of fields from various statements
|
||||
items:
|
||||
$ref: '#/DataPoint'
|
||||
required:
|
||||
- balanceSheet
|
||||
- incomeStatement
|
||||
- cashFlow
|
||||
- overview
|
||||
|
||||
FinancialStatement: &FinancialStatement
|
||||
type: object
|
||||
description: Historical quarterly or annual financial statement
|
||||
properties:
|
||||
date:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The date the statement data was released to the public
|
||||
example: "2023-12-29T00:00:00.000Z"
|
||||
quarter:
|
||||
type: integer
|
||||
format: int32
|
||||
description: An integer corresponding to the fiscal quarter reported. A value of "0" means this is an Annual Report. A value of "1" through "4" corresponds to the respective fiscal quarter
|
||||
minimum: 0
|
||||
maximum: 4
|
||||
example: 1
|
||||
year:
|
||||
type: integer
|
||||
format: int32
|
||||
description: An integer corresponding to the fiscal year reported
|
||||
example: 2024
|
||||
statementData:
|
||||
$ref: '#/StatementData'
|
||||
required:
|
||||
- date
|
||||
- quarter
|
||||
- year
|
||||
- statementData
|
||||
|
||||
DailyMetric: &DailyMetric
|
||||
type: object
|
||||
description: Daily fundamental metrics that rely on price data and update daily
|
||||
properties:
|
||||
date:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The date the daily data corresponds to
|
||||
example: "2023-12-29T00:00:00.000Z"
|
||||
marketCap:
|
||||
type: number
|
||||
format: float
|
||||
description: The value of the field corresponding to the market capitalization
|
||||
example: 3050000000000
|
||||
nullable: true
|
||||
enterpriseVal:
|
||||
type: number
|
||||
format: float
|
||||
description: The value of the field corresponding to the enterprise value
|
||||
example: 2950000000000
|
||||
nullable: true
|
||||
peRatio:
|
||||
type: number
|
||||
format: float
|
||||
description: The value of the field corresponding to the price/earnings ratio
|
||||
example: 29.45
|
||||
nullable: true
|
||||
pbRatio:
|
||||
type: number
|
||||
format: float
|
||||
description: The value of the field corresponding to the price/book ratio
|
||||
example: 48.32
|
||||
nullable: true
|
||||
trailingPEG1Y:
|
||||
type: number
|
||||
format: float
|
||||
description: The value of the field corresponding to the trailing 1 year PEG Ratio
|
||||
example: 2.15
|
||||
nullable: true
|
||||
required:
|
||||
- date
|
||||
additionalProperties: true
|
||||
x-note: "New daily metrics are continuously added, so fields will change over time. Use the 'columns' parameter to ensure consistent output."
|
||||
|
||||
FundamentalMeta: &FundamentalMeta
|
||||
type: object
|
||||
description: Company metadata and information about when data was last updated
|
||||
properties:
|
||||
permaTicker:
|
||||
type: string
|
||||
description: Permanent Tiingo Ticker mapping to the security. Can be used as a primary key
|
||||
example: "AAPL"
|
||||
ticker:
|
||||
type: string
|
||||
description: Ticker related to the asset
|
||||
example: "AAPL"
|
||||
name:
|
||||
type: string
|
||||
description: Full-length name of the asset
|
||||
example: "Apple Inc."
|
||||
isActive:
|
||||
type: boolean
|
||||
description: Boolean describing whether or not the ticker is still actively traded. If false, this ticker is delisted
|
||||
example: true
|
||||
isADR:
|
||||
type: boolean
|
||||
description: Boolean describing whether or not the ticker is an ADR. Value is true if listed ticker is an ADR
|
||||
example: false
|
||||
sector:
|
||||
type: string
|
||||
description: Sector information that is derived from sicSector and is meant to approximate GICS
|
||||
example: "Technology"
|
||||
nullable: true
|
||||
industry:
|
||||
type: string
|
||||
description: Industry information that is derived from sicIndustry and is meant to approximate GICS
|
||||
example: "Consumer Electronics"
|
||||
nullable: true
|
||||
sicCode:
|
||||
type: integer
|
||||
format: int32
|
||||
description: SIC Code that represents company's business activities
|
||||
example: 3571
|
||||
nullable: true
|
||||
sicSector:
|
||||
type: string
|
||||
description: Sector as determined by the SIC Code
|
||||
example: "Industrial and Commercial Machinery and Computer Equipment"
|
||||
nullable: true
|
||||
sicIndustry:
|
||||
type: string
|
||||
description: Industry as determined by the SIC Code
|
||||
example: "Electronic Computers"
|
||||
nullable: true
|
||||
reportingCurrency:
|
||||
type: string
|
||||
description: The currency the company reports their SEC statement filings in
|
||||
example: "USD"
|
||||
nullable: true
|
||||
location:
|
||||
type: string
|
||||
description: Location/domicile of the company. States are included for U.S. companies, otherwise countries for non-US companies
|
||||
example: "California"
|
||||
nullable: true
|
||||
companyWebsite:
|
||||
type: string
|
||||
format: uri
|
||||
description: The website of the company when available
|
||||
example: "https://www.apple.com"
|
||||
nullable: true
|
||||
secFilingWebsite:
|
||||
type: string
|
||||
format: uri
|
||||
description: A URL to where you can find the company's SEC filings directly on the SEC website
|
||||
example: "https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0000320193&type=&dateb=&owner=exclude&count=100"
|
||||
nullable: true
|
||||
statementLastUpdated:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The timestamp the statement data/endpoint was last updated for the ticker
|
||||
example: "2024-01-15T10:30:00.000Z"
|
||||
nullable: true
|
||||
dailyLastUpdated:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The timestamp the daily data/endpoint was last updated for the ticker
|
||||
example: "2024-01-15T08:00:00.000Z"
|
||||
nullable: true
|
||||
required:
|
||||
- permaTicker
|
||||
- ticker
|
||||
- name
|
||||
- isActive
|
||||
- isADR
|
||||
additionalProperties: true
|
||||
x-note: "As new meta data about companies and their fundamentals is added, the endpoint output will change. Use the 'columns' parameter to ensure consistent output."
|
||||
235
openapi/schemas/funds-schemas.yaml
Normal file
235
openapi/schemas/funds-schemas.yaml
Normal file
@@ -0,0 +1,235 @@
|
||||
# Tiingo Mutual Fund and ETF Fees API Schemas
|
||||
# Reference: /docs/api_extracted/mutual-fund-etf-fees.md
|
||||
|
||||
OtherShareClass: &OtherShareClass
|
||||
type: object
|
||||
description: Information about a related share class of the fund
|
||||
properties:
|
||||
ticker:
|
||||
type: string
|
||||
description: Ticker related to the fund
|
||||
example: "VTSMX"
|
||||
name:
|
||||
type: string
|
||||
description: Full-length name of the fund
|
||||
example: "Vanguard Total Stock Market Index Fund"
|
||||
shareClass:
|
||||
type: string
|
||||
description: Share class of the fund as described by the parent fund company
|
||||
example: "Investor Shares"
|
||||
netExpense:
|
||||
type: number
|
||||
format: float
|
||||
description: The top-level net expense ratio for the fund (expressed as decimal, e.g., 0.0055 = 0.55%)
|
||||
example: 0.0055
|
||||
required:
|
||||
- ticker
|
||||
- name
|
||||
- shareClass
|
||||
- netExpense
|
||||
|
||||
FundOverview: &FundOverview
|
||||
type: object
|
||||
description: Top-level fund data including description and share classes
|
||||
properties:
|
||||
ticker:
|
||||
type: string
|
||||
description: Ticker related to the fund
|
||||
example: "VTSAX"
|
||||
name:
|
||||
type: string
|
||||
description: Full-length name of the fund
|
||||
example: "Vanguard Total Stock Market Index Fund"
|
||||
description:
|
||||
type: string
|
||||
description: Long-form description of the fund
|
||||
example: "Long description of the fund..."
|
||||
shareClass:
|
||||
type: string
|
||||
description: Share class of the fund as described by the parent fund company
|
||||
example: "Admiral Shares"
|
||||
netExpense:
|
||||
type: number
|
||||
format: float
|
||||
description: The top-level net expense ratio for the fund (expressed as decimal, e.g., 0.0035 = 0.35%)
|
||||
example: 0.0035
|
||||
otherShareClasses:
|
||||
type: array
|
||||
description: An array of objects representing related share classes of the given fund
|
||||
items:
|
||||
$ref: '#/OtherShareClass'
|
||||
required:
|
||||
- ticker
|
||||
- name
|
||||
- description
|
||||
- shareClass
|
||||
- netExpense
|
||||
- otherShareClasses
|
||||
|
||||
CustomFee: &CustomFee
|
||||
type: object
|
||||
description: Custom fee charged by the fund (e.g., check processing fee)
|
||||
properties:
|
||||
label:
|
||||
type: string
|
||||
description: Label related to the custom fee
|
||||
example: "Check Processing Fee"
|
||||
value:
|
||||
type: number
|
||||
format: float
|
||||
description: Value of the custom fee field
|
||||
example: 0.0000
|
||||
units:
|
||||
type: string
|
||||
description: '"$" if the value is in dollars or "%" if the value is in percentage terms'
|
||||
enum:
|
||||
- "$"
|
||||
- "%"
|
||||
example: "$"
|
||||
parentFee:
|
||||
type: string
|
||||
description: The parent fee the custom fee belongs under
|
||||
example: "shareholderFee"
|
||||
required:
|
||||
- label
|
||||
- value
|
||||
- units
|
||||
- parentFee
|
||||
|
||||
FundMetrics: &FundMetrics
|
||||
type: object
|
||||
description: Detailed current and historical fee data for a mutual fund or ETF
|
||||
properties:
|
||||
prospectusDate:
|
||||
allOf:
|
||||
- $ref: './common.yaml#/Date'
|
||||
description: The prospectus date when the corresponding fund expense data was published
|
||||
example: "2024-01-15"
|
||||
netExpense:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's net expense ratio, or the net expenses related to the fund (expressed as decimal)
|
||||
example: 0.0035
|
||||
grossExpense:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's gross expense ratio, or the expenses related to running the fund (expressed as decimal)
|
||||
example: 0.0040
|
||||
managementFee:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's management fee, or the fees paid to the manager and/or advisors (expressed as decimal)
|
||||
example: 0.0025
|
||||
12b1:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's fee related to marketing expenses (expressed as decimal)
|
||||
example: 0.0000
|
||||
non12b1:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's fee related to distribution and similar non-12b-1 fees (expressed as decimal)
|
||||
example: 0.0000
|
||||
otherExpenses:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's other expenses, or expenses related to legal, administrative, custodial, etc. (expressed as decimal)
|
||||
example: 0.0015
|
||||
acquiredFundFees:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's acquired fund fees, or expenses related to underlying businesses or funds (expressed as decimal)
|
||||
example: 0.0000
|
||||
feeWaiver:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's fee waiver, or discount on fees (expressed as decimal)
|
||||
example: 0.0005
|
||||
exchangeFeeUSD:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's exchange fee if charged in USD, or expenses related to exchanging or transferring funds to another fund in the fund's family
|
||||
example: 0.0000
|
||||
exchangeFeePercent:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's exchange fee if charged as a percentage, or expenses related to exchanging or transferring funds to another fund in the fund's family (expressed as decimal)
|
||||
example: 0.0000
|
||||
frontLoad:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's front load fee, or the upfront fee charged when investing in the fund (expressed as decimal)
|
||||
example: 0.0000
|
||||
backLoad:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's back load fee, or the back-end fee charged when redeeming from the fund (expressed as decimal)
|
||||
example: 0.0000
|
||||
dividendLoad:
|
||||
type: number
|
||||
format: float
|
||||
description: Dividend load fee, or charges on reinvested dividends (expressed as decimal)
|
||||
example: 0.0000
|
||||
shareholderFee:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's shareholder fees, or the potential fees when buying/selling a fund (expressed as decimal)
|
||||
example: 0.0000
|
||||
accountFeeUSD:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's account fees if charged in USD, or the fee required to maintain your account in USD
|
||||
example: 0.0000
|
||||
accountFeePercent:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's account fees if charged as a percentage, or the fee required to maintain your account in percentage terms (expressed as decimal)
|
||||
example: 0.0000
|
||||
redemptionFeeUSD:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's redemption fees if charged in USD, or the fee charged if funds are redeemed early (as defined by the fund company)
|
||||
example: 0.0000
|
||||
redemptionFeePercent:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's redemption fees as a percentage, or the fee charged if funds are redeemed early (as defined by the fund company) (expressed as decimal)
|
||||
example: 0.0000
|
||||
portfolioTurnover:
|
||||
type: number
|
||||
format: float
|
||||
description: Portfolio turnover (expressed as decimal)
|
||||
example: 0.05
|
||||
miscFees:
|
||||
type: number
|
||||
format: float
|
||||
description: Fund's miscellaneous fees (expressed as decimal)
|
||||
example: 0.0000
|
||||
customFees:
|
||||
type: array
|
||||
description: Fund's custom fees. Array of custom fee objects
|
||||
items:
|
||||
$ref: '#/CustomFee'
|
||||
required:
|
||||
- prospectusDate
|
||||
- netExpense
|
||||
- grossExpense
|
||||
- managementFee
|
||||
- 12b1
|
||||
- non12b1
|
||||
- otherExpenses
|
||||
- acquiredFundFees
|
||||
- feeWaiver
|
||||
- exchangeFeeUSD
|
||||
- exchangeFeePercent
|
||||
- frontLoad
|
||||
- backLoad
|
||||
- dividendLoad
|
||||
- shareholderFee
|
||||
- accountFeeUSD
|
||||
- accountFeePercent
|
||||
- redemptionFeeUSD
|
||||
- redemptionFeePercent
|
||||
- portfolioTurnover
|
||||
- miscFees
|
||||
- customFees
|
||||
Reference in New Issue
Block a user