mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-18 12:24:18 +01:00
feat: Add stock market endpoints (EOD, IEX, News)
Add OpenAPI specifications for stock market data: - End-of-day prices with metadata - IEX real-time prices, quotes, and historical data - News articles with tags and sources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
191
openapi/paths/end-of-day.yaml
Normal file
191
openapi/paths/end-of-day.yaml
Normal file
@@ -0,0 +1,191 @@
|
||||
# End-of-Day Stock Price API Paths
|
||||
# Reference: https://www.tiingo.com/documentation/end-of-day
|
||||
|
||||
daily-prices: &daily-prices
|
||||
get:
|
||||
summary: Get End-of-Day Stock Prices
|
||||
description: |
|
||||
Returns End-of-Day price data for a given stock ticker.
|
||||
|
||||
Tiingo's End-of-Day prices use a proprietary error checking framework to help clean data feeds
|
||||
and catch missing corporate actions (splits, dividends, and exchange listing changes).
|
||||
|
||||
**Pricing Availability:**
|
||||
- Most US Equity prices are available at 5:30 PM EST
|
||||
- Exchanges may send corrections until 8 PM EST
|
||||
- Mutual Fund NAVs available after 12 AM EST
|
||||
|
||||
**Price Adjustments:**
|
||||
- Both raw and adjusted prices are available
|
||||
- Adjustment methodology follows CRSP (Center for Research in Security Prices) standard
|
||||
- Incorporates both split and dividend adjustments
|
||||
operationId: getEndOfDayPrices
|
||||
tags:
|
||||
- End-of-Day
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TickerPathParam'
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
- $ref: '../parameters/_index.yaml#/StartDateParam'
|
||||
- $ref: '../parameters/_index.yaml#/EndDateParam'
|
||||
- $ref: '../parameters/_index.yaml#/FormatParam'
|
||||
- name: resampleFreq
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- daily
|
||||
- weekly
|
||||
- monthly
|
||||
- annually
|
||||
- 1min
|
||||
- 5min
|
||||
- 15min
|
||||
- 30min
|
||||
- 1hour
|
||||
- 4hour
|
||||
description: Resample frequency for OHLC bars (e.g., daily, monthly, weekly, 5min, 1hour)
|
||||
- name: sort
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- asc
|
||||
- desc
|
||||
default: asc
|
||||
description: Sort order for results (ascending or descending by date)
|
||||
- name: columns
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Comma-separated list of specific columns to return (e.g., "date,close,volume")
|
||||
example: "date,close,volume"
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with price data
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../schemas/eod-schemas.yaml#/PriceData'
|
||||
examples:
|
||||
singleDay:
|
||||
summary: Single day price data
|
||||
value:
|
||||
- date: "2024-01-01"
|
||||
open: 150.25
|
||||
high: 152.50
|
||||
low: 149.75
|
||||
close: 151.80
|
||||
volume: 50000000
|
||||
adjOpen: 150.25
|
||||
adjHigh: 152.50
|
||||
adjLow: 149.75
|
||||
adjClose: 151.80
|
||||
adjVolume: 50000000
|
||||
divCash: 0.0
|
||||
splitFactor: 1.0
|
||||
historicalData:
|
||||
summary: Multiple days historical data
|
||||
value:
|
||||
- date: "2024-01-01"
|
||||
open: 150.25
|
||||
high: 152.50
|
||||
low: 149.75
|
||||
close: 151.80
|
||||
volume: 50000000
|
||||
adjOpen: 150.25
|
||||
adjHigh: 152.50
|
||||
adjLow: 149.75
|
||||
adjClose: 151.80
|
||||
adjVolume: 50000000
|
||||
divCash: 0.0
|
||||
splitFactor: 1.0
|
||||
- date: "2024-01-02"
|
||||
open: 151.90
|
||||
high: 153.20
|
||||
low: 151.50
|
||||
close: 152.40
|
||||
volume: 48000000
|
||||
adjOpen: 151.90
|
||||
adjHigh: 153.20
|
||||
adjLow: 151.50
|
||||
adjClose: 152.40
|
||||
adjVolume: 48000000
|
||||
divCash: 0.0
|
||||
splitFactor: 1.0
|
||||
text/csv:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
example: |
|
||||
date,open,high,low,close,volume,adjOpen,adjHigh,adjLow,adjClose,adjVolume,divCash,splitFactor
|
||||
2024-01-01,150.25,152.50,149.75,151.80,50000000,150.25,152.50,149.75,151.80,50000000,0.0,1.0
|
||||
'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-meta: &daily-meta
|
||||
get:
|
||||
summary: Get Stock Ticker Metadata
|
||||
description: |
|
||||
Returns metadata information about a specific stock ticker.
|
||||
|
||||
Meta information comes from a variety of sources and is used to help communicate
|
||||
details about an asset in the Tiingo database to users.
|
||||
|
||||
**Response Fields:**
|
||||
- Ticker symbol and full name
|
||||
- Exchange where the asset is listed
|
||||
- Description of the company/asset
|
||||
- Date range for available price data
|
||||
operationId: getTickerMetadata
|
||||
tags:
|
||||
- End-of-Day
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TickerPathParam'
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with ticker metadata
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../schemas/eod-schemas.yaml#/TickerMetadata'
|
||||
examples:
|
||||
appleMetadata:
|
||||
summary: Apple Inc metadata
|
||||
value:
|
||||
ticker: "AAPL"
|
||||
name: "Apple Inc"
|
||||
exchangeCode: "NASDAQ"
|
||||
description: "Apple Inc is an American multinational technology company that specializes in consumer electronics, software and online services."
|
||||
startDate: "1990-01-01"
|
||||
endDate: "2024-01-01"
|
||||
noDataTicker:
|
||||
summary: Ticker with no price data
|
||||
value:
|
||||
ticker: "NEWCO"
|
||||
name: "New Company Inc"
|
||||
exchangeCode: "NYSE"
|
||||
description: "A newly listed company"
|
||||
startDate: null
|
||||
endDate: null
|
||||
'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'
|
||||
269
openapi/paths/iex.yaml
Normal file
269
openapi/paths/iex.yaml
Normal file
@@ -0,0 +1,269 @@
|
||||
# IEX Exchange API Endpoints
|
||||
# Reference: https://api.tiingo.com/documentation/iex
|
||||
|
||||
iex-all: &iex-all
|
||||
get:
|
||||
summary: Get current top-of-book and last price for all or multiple tickers
|
||||
description: |
|
||||
Retrieve current top-of-book (bid/ask) and last price data for all available tickers or a specified list of tickers.
|
||||
Returns real-time reference prices or full TOPS feed data (requires IEX Exchange registration).
|
||||
|
||||
This endpoint provides:
|
||||
- Top-of-Book (Bid/Ask) data
|
||||
- Last Sale (trade) data
|
||||
- Tiingo-enriched convenience fields (tngoLast, mid, open, high, low)
|
||||
- Volume data (IEX only during trading, all exchanges after close)
|
||||
operationId: getAllIEXQuotes
|
||||
tags:
|
||||
- IEX
|
||||
parameters:
|
||||
- name: tickers
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
pattern: '^[A-Z0-9]+(,[A-Z0-9]+)*$'
|
||||
description: |
|
||||
Comma-separated list of ticker symbols. If omitted, returns data for all available tickers.
|
||||
example: 'AAPL,SPY,QQQ'
|
||||
- $ref: '../parameters/_index.yaml#/FormatParam'
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with top-of-book and last price data
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/iex-schemas.yaml#/IEXTopOfBook'
|
||||
examples:
|
||||
multiple-tickers:
|
||||
summary: Multiple tickers response
|
||||
value:
|
||||
- ticker: 'AAPL'
|
||||
timestamp: '2019-01-30T10:33:38.186520297-05:00'
|
||||
quoteTimestamp: '2019-01-30T10:33:38.186520297-05:00'
|
||||
lastSaleTimeStamp: '2019-01-30T10:33:34.176037579-05:00'
|
||||
last: 162.37
|
||||
lastSize: 100
|
||||
tngoLast: 162.33
|
||||
prevClose: 154.68
|
||||
open: 161.83
|
||||
high: 163.25
|
||||
low: 160.38
|
||||
mid: 162.67
|
||||
volume: 0
|
||||
bidSize: 100
|
||||
bidPrice: 162.34
|
||||
askSize: 100
|
||||
askPrice: 163.0
|
||||
- ticker: 'SPY'
|
||||
timestamp: '2019-01-30T11:12:29.505261845-05:00'
|
||||
quoteTimestamp: '2019-01-30T11:12:29.505261845-05:00'
|
||||
lastSaleTimeStamp: '2019-01-30T11:12:16.643833612-05:00'
|
||||
last: 265.41
|
||||
lastSize: 617
|
||||
tngoLast: 265.405
|
||||
prevClose: 263.41
|
||||
open: 264.62
|
||||
high: 265.445
|
||||
low: 264.225
|
||||
mid: 265.405
|
||||
volume: 0
|
||||
bidSize: 500
|
||||
bidPrice: 265.39
|
||||
askSize: 100
|
||||
askPrice: 265.42
|
||||
text/csv:
|
||||
schema:
|
||||
type: string
|
||||
'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'
|
||||
|
||||
iex-single: &iex-single
|
||||
get:
|
||||
summary: Get current top-of-book and last price for a specific ticker
|
||||
description: |
|
||||
Retrieve current top-of-book (bid/ask) and last price data for a specific ticker symbol.
|
||||
Returns real-time reference prices or full TOPS feed data (requires IEX Exchange registration).
|
||||
|
||||
This endpoint provides:
|
||||
- Top-of-Book (Bid/Ask) data
|
||||
- Last Sale (trade) data
|
||||
- Tiingo-enriched convenience fields (tngoLast, mid, open, high, low)
|
||||
- Volume data (IEX only during trading, all exchanges after close)
|
||||
- Quotes updated to nanosecond precision
|
||||
operationId: getIEXQuote
|
||||
tags:
|
||||
- IEX
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TickerPathParam'
|
||||
- $ref: '../parameters/_index.yaml#/FormatParam'
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with top-of-book and last price data
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/iex-schemas.yaml#/IEXTopOfBook'
|
||||
minItems: 1
|
||||
maxItems: 1
|
||||
examples:
|
||||
single-ticker:
|
||||
summary: Single ticker response
|
||||
value:
|
||||
- ticker: 'AAPL'
|
||||
timestamp: '2019-01-30T10:33:38.186520297-05:00'
|
||||
quoteTimestamp: '2019-01-30T10:33:38.186520297-05:00'
|
||||
lastSaleTimeStamp: '2019-01-30T10:33:34.176037579-05:00'
|
||||
last: 162.37
|
||||
lastSize: 100
|
||||
tngoLast: 162.33
|
||||
prevClose: 154.68
|
||||
open: 161.83
|
||||
high: 163.25
|
||||
low: 160.38
|
||||
mid: 162.67
|
||||
volume: 0
|
||||
bidSize: 100
|
||||
bidPrice: 162.34
|
||||
askSize: 100
|
||||
askPrice: 163.0
|
||||
text/csv:
|
||||
schema:
|
||||
type: string
|
||||
'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'
|
||||
|
||||
iex-prices: &iex-prices
|
||||
get:
|
||||
summary: Get historical intraday prices
|
||||
description: |
|
||||
Retrieve historical intraday prices for a stock in OHLC format. Supports various resampling frequencies
|
||||
from 1-minute to daily bars.
|
||||
|
||||
Features:
|
||||
- OHLC (Open, High, Low, Close) data
|
||||
- Configurable time intervals (1min to daily)
|
||||
- Optional after-hours data inclusion
|
||||
- Force-fill option for gaps in data
|
||||
- IEX-only volume data (available with explicit columns parameter)
|
||||
|
||||
Example use cases:
|
||||
- Current day OHLC: `resampleFreq=1day`
|
||||
- 5-minute bars: `startDate=2019-01-02&resampleFreq=5min`
|
||||
- Hourly bars with gaps filled: `startDate=2025-12-01&resampleFreq=1hour&forceFill=true`
|
||||
operationId: getIEXHistoricalPrices
|
||||
tags:
|
||||
- IEX
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TickerPathParam'
|
||||
- $ref: '../parameters/_index.yaml#/StartDateParam'
|
||||
- $ref: '../parameters/_index.yaml#/EndDateParam'
|
||||
- name: resampleFreq
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
pattern: '^\d+(min|hour|day)$'
|
||||
default: '5min'
|
||||
description: |
|
||||
Frequency for resampling OHLC data. Format: number + unit (min/hour/day).
|
||||
Minimum value is 1min.
|
||||
Examples: '1min', '5min', '15min', '1hour', '4hour', '1day'
|
||||
example: '5min'
|
||||
- name: afterHours
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
description: If true, includes pre-market and post-market data if available
|
||||
- name: forceFill
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
description: |
|
||||
If true, fills gaps in data by using the previous OHLC values when no trade/quote update
|
||||
occurred for a given time period
|
||||
- name: columns
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
pattern: '^[a-z]+(,[a-z]+)*$'
|
||||
description: |
|
||||
Comma-separated list of columns to include in response.
|
||||
Available columns: open, high, low, close, volume.
|
||||
Note: Volume data is only exposed if explicitly requested.
|
||||
example: 'open,high,low,close,volume'
|
||||
- $ref: '../parameters/_index.yaml#/FormatParam'
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with historical intraday price data
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/iex-schemas.yaml#/IEXPrice'
|
||||
examples:
|
||||
five-minute-bars:
|
||||
summary: 5-minute OHLC bars
|
||||
value:
|
||||
- date: '2019-01-02T14:30:00.000Z'
|
||||
open: 154.74
|
||||
high: 155.52
|
||||
low: 154.58
|
||||
close: 154.76
|
||||
volume: 16102
|
||||
- date: '2019-01-02T14:35:00.000Z'
|
||||
open: 154.8
|
||||
high: 155.0
|
||||
low: 154.31
|
||||
close: 154.645
|
||||
volume: 19127
|
||||
daily-bar:
|
||||
summary: Daily OHLC bar
|
||||
value:
|
||||
- date: '2019-01-02T00:00:00.000Z'
|
||||
open: 154.89
|
||||
high: 158.85
|
||||
low: 154.23
|
||||
close: 157.92
|
||||
text/csv:
|
||||
schema:
|
||||
type: string
|
||||
'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'
|
||||
212
openapi/paths/news.yaml
Normal file
212
openapi/paths/news.yaml
Normal file
@@ -0,0 +1,212 @@
|
||||
# News API Path Definitions
|
||||
# Reference these using: $ref: '../paths/news.yaml#/PathName'
|
||||
|
||||
news: &news
|
||||
get:
|
||||
summary: Get latest news articles
|
||||
description: |
|
||||
Retrieves the latest news articles from Tiingo's comprehensive news feeds.
|
||||
Tiingo incorporates financial news sites as well as financial blogs and tags them using proprietary algorithms.
|
||||
On a typical day, Tiingo adds over 8,000-12,000 articles.
|
||||
|
||||
This endpoint supports filtering by tickers, tags, source domains, and date ranges.
|
||||
Results can be sorted by either publishedDate or crawlDate in descending order.
|
||||
operationId: getNews
|
||||
tags:
|
||||
- News
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
- name: tickers
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
pattern: '^[A-Z0-9]+$'
|
||||
style: form
|
||||
explode: false
|
||||
description: Comma-separated list of ticker symbols to filter news articles
|
||||
example: ["AAPL", "GOOGL"]
|
||||
- name: tags
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
style: form
|
||||
explode: false
|
||||
description: Comma-separated list of tags/countries/topics to filter news articles
|
||||
example: ["election", "argentina"]
|
||||
- name: source
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
format: hostname
|
||||
style: form
|
||||
explode: false
|
||||
description: Comma-separated list of source domains to filter news articles
|
||||
example: ["bloomberg.com", "reuters.com"]
|
||||
- $ref: '../parameters/_index.yaml#/StartDateParam'
|
||||
- $ref: '../parameters/_index.yaml#/EndDateParam'
|
||||
- name: limit
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 1
|
||||
maximum: 1000
|
||||
default: 100
|
||||
description: Maximum number of news objects to return. Default is 100, max is 1000. Contact support@tiingo.com for adjustments.
|
||||
- name: offset
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
default: 0
|
||||
description: Pagination variable used alongside limit. Returns results shifted by offset. Example - limit=100, offset=2 returns results 2-102 instead of 0-99.
|
||||
- name: sortBy
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- publishedDate
|
||||
- crawlDate
|
||||
default: publishedDate
|
||||
description: The date field to sort results by in descending order. Defaults to publishedDate.
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with news articles
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/news-schemas.yaml#/NewsArticle'
|
||||
examples:
|
||||
singleArticle:
|
||||
summary: Example news article
|
||||
value:
|
||||
- source: "cnbc.com"
|
||||
crawlDate: "2019-01-29T22:20:01.696871Z"
|
||||
description: "Apple CEO Tim Cook told CNBC that trade tensions between the U.S. and China have improved since late December."
|
||||
url: "https://www.cnbc.com/2019/01/29/apples-ceo-sees-optimism-as-trade-tension-between-us-and-china-lessens.html"
|
||||
publishedDate: "2019-01-29T22:17:00Z"
|
||||
tags: ["China", "Economic Measures", "Economics", "Markets", "Stock", "Technology"]
|
||||
tickers: ["AAPL"]
|
||||
title: "Apple's CEO sees optimism as trade tension between U.S. and China lessens"
|
||||
id: 28515261
|
||||
'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'
|
||||
|
||||
bulk-list: &bulk-list
|
||||
get:
|
||||
summary: List available bulk download files
|
||||
description: |
|
||||
Returns a list of all available bulk download files for the entire news database.
|
||||
An "incremental" batchType file is added every evening. At 12am EST, a batch process
|
||||
runs saving all news articles for the past 24 hours.
|
||||
|
||||
**Note:** Bulk Download is only available to institutional clients.
|
||||
operationId: listBulkDownloadFiles
|
||||
tags:
|
||||
- News
|
||||
parameters:
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with list of bulk download files
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/news-schemas.yaml#/BulkDownloadFile'
|
||||
examples:
|
||||
bulkFileList:
|
||||
summary: Example list of bulk download files
|
||||
value:
|
||||
- id: 755
|
||||
filename: "bulkfile_2019-01-28_2019-01-29.tar.gz"
|
||||
batchType: "incremental"
|
||||
startDate: "2019-01-28T05:00:00Z"
|
||||
endDate: "2019-01-29T05:00:00Z"
|
||||
url: "https://api.tiingo.com/tiingo/news/bulk_download/755?token=YOUR_API_TOKEN"
|
||||
fileSizeUncompressed: 10385878
|
||||
fileSizeCompressed: 3018550
|
||||
- id: 754
|
||||
filename: "bulkfile_2019-01-27_2019-01-28.tar.gz"
|
||||
batchType: "incremental"
|
||||
startDate: "2019-01-27T05:00:00Z"
|
||||
endDate: "2019-01-28T05:00:00Z"
|
||||
url: "https://api.tiingo.com/tiingo/news/bulk_download/754?token=YOUR_API_TOKEN"
|
||||
fileSizeUncompressed: 9854321
|
||||
fileSizeCompressed: 2945678
|
||||
'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'
|
||||
|
||||
bulk-download: &bulk-download
|
||||
get:
|
||||
summary: Download a specific bulk news file
|
||||
description: |
|
||||
Downloads a specific batch file by ID. The file contains news articles in compressed format (gzip).
|
||||
Use the bulk-list endpoint to get the list of available files and their IDs.
|
||||
|
||||
The downloaded file is in tar.gz format and contains news articles for the specified date range.
|
||||
|
||||
**Note:** Bulk Download is only available to institutional clients.
|
||||
operationId: downloadBulkFile
|
||||
tags:
|
||||
- News
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
description: The unique ID that corresponds to the batch file you would like to download
|
||||
example: 755
|
||||
- $ref: '../parameters/_index.yaml#/TokenParam'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response with bulk download file (binary tar.gz)
|
||||
content:
|
||||
application/gzip:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
'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'
|
||||
119
openapi/schemas/eod-schemas.yaml
Normal file
119
openapi/schemas/eod-schemas.yaml
Normal file
@@ -0,0 +1,119 @@
|
||||
# End-of-Day Stock Price API Schemas
|
||||
# Reference: https://www.tiingo.com/documentation/end-of-day
|
||||
|
||||
PriceData: &PriceData
|
||||
type: array
|
||||
description: Array of End-of-Day price data objects with OHLCV (Open, High, Low, Close, Volume) data
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
date:
|
||||
$ref: '../schemas/common.yaml#/Date'
|
||||
description: The date this data pertains to
|
||||
open:
|
||||
type: number
|
||||
format: float
|
||||
description: The opening price for the asset on the given date
|
||||
example: 150.25
|
||||
high:
|
||||
type: number
|
||||
format: float
|
||||
description: The high price for the asset on the given date
|
||||
example: 152.50
|
||||
low:
|
||||
type: number
|
||||
format: float
|
||||
description: The low price for the asset on the given date
|
||||
example: 149.75
|
||||
close:
|
||||
type: number
|
||||
format: float
|
||||
description: The closing price for the asset on the given date
|
||||
example: 151.80
|
||||
volume:
|
||||
type: integer
|
||||
format: int64
|
||||
description: The number of shares traded for the asset
|
||||
example: 50000000
|
||||
adjOpen:
|
||||
type: number
|
||||
format: float
|
||||
description: The adjusted opening price for the asset on the given date (includes splits and dividends)
|
||||
example: 150.25
|
||||
adjHigh:
|
||||
type: number
|
||||
format: float
|
||||
description: The adjusted high price for the asset on the given date (includes splits and dividends)
|
||||
example: 152.50
|
||||
adjLow:
|
||||
type: number
|
||||
format: float
|
||||
description: The adjusted low price for the asset on the given date (includes splits and dividends)
|
||||
example: 149.75
|
||||
adjClose:
|
||||
type: number
|
||||
format: float
|
||||
description: The adjusted closing price for the asset on the given date (includes splits and dividends)
|
||||
example: 151.80
|
||||
adjVolume:
|
||||
type: integer
|
||||
format: int64
|
||||
description: The number of shares traded for the asset (adjusted for splits)
|
||||
example: 50000000
|
||||
divCash:
|
||||
type: number
|
||||
format: float
|
||||
description: The dividend paid out on the given date (note that date will be the exDate for the dividend)
|
||||
example: 0.0
|
||||
splitFactor:
|
||||
type: number
|
||||
format: float
|
||||
description: The factor used to adjust prices when a company splits, reverse splits, or pays a distribution
|
||||
example: 1.0
|
||||
required:
|
||||
- date
|
||||
- close
|
||||
- volume
|
||||
|
||||
TickerMetadata: &TickerMetadata
|
||||
type: object
|
||||
description: Metadata information about a stock ticker
|
||||
properties:
|
||||
ticker:
|
||||
$ref: '../schemas/common.yaml#/Ticker'
|
||||
description: Ticker related to the asset
|
||||
name:
|
||||
type: string
|
||||
description: Full-length name of the asset
|
||||
example: "Apple Inc"
|
||||
exchangeCode:
|
||||
type: string
|
||||
description: An identifier that maps which Exchange this asset is listed on
|
||||
enum:
|
||||
- NASDAQ
|
||||
- NYSE
|
||||
- AMEX
|
||||
- OTC
|
||||
- BATS
|
||||
- IEX
|
||||
example: "NASDAQ"
|
||||
description:
|
||||
type: string
|
||||
description: Long-form description of the asset
|
||||
example: "Apple Inc is an American multinational technology company that specializes in consumer electronics, software and online services."
|
||||
startDate:
|
||||
type: string
|
||||
format: date
|
||||
nullable: true
|
||||
description: The earliest date we have price data available for the asset. When null, no price data is available
|
||||
example: "1990-01-01"
|
||||
endDate:
|
||||
type: string
|
||||
format: date
|
||||
nullable: true
|
||||
description: The latest date we have price data available for the asset. When null, no price data is available
|
||||
example: "2024-01-01"
|
||||
required:
|
||||
- ticker
|
||||
- name
|
||||
- exchangeCode
|
||||
220
openapi/schemas/iex-schemas.yaml
Normal file
220
openapi/schemas/iex-schemas.yaml
Normal file
@@ -0,0 +1,220 @@
|
||||
# IEX Exchange API Response Schemas
|
||||
# Reference: https://api.tiingo.com/documentation/iex
|
||||
|
||||
IEXTopOfBook: &IEXTopOfBook
|
||||
type: object
|
||||
description: |
|
||||
Top-of-book and last price data for a stock on IEX Exchange.
|
||||
|
||||
Note: Fields marked with "*IEX entitlement required*" will return null unless you are
|
||||
registered with the IEX Exchange and have a market data policy in place. These fields
|
||||
provide full TOPS feed data including direct bid/ask/last data from IEX.
|
||||
|
||||
Tiingo-enriched fields (tngoLast, mid, open, high, low) are calculated by Tiingo
|
||||
and do not require IEX entitlement.
|
||||
properties:
|
||||
ticker:
|
||||
$ref: '../schemas/common.yaml#/Ticker'
|
||||
description: Ticker symbol for the asset
|
||||
timestamp:
|
||||
$ref: '../schemas/common.yaml#/DateTime'
|
||||
description: Timestamp when the data was last refreshed
|
||||
quoteTimestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
description: |
|
||||
Timestamp when the last quote (bid/ask) data was received from IEX.
|
||||
Requires IEX entitlement. Null if not entitled.
|
||||
lastSaleTimeStamp:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
description: |
|
||||
Timestamp when the last trade (last/lastSize) data was received from IEX.
|
||||
Requires IEX entitlement. Null if not entitled.
|
||||
last:
|
||||
type: number
|
||||
format: double
|
||||
nullable: true
|
||||
description: |
|
||||
Last trade price executed on IEX.
|
||||
Requires IEX entitlement. Null if not entitled.
|
||||
example: 162.37
|
||||
lastSize:
|
||||
type: integer
|
||||
format: int32
|
||||
nullable: true
|
||||
description: |
|
||||
Number of shares traded at the last price on IEX.
|
||||
Requires IEX entitlement. Null if not entitled.
|
||||
example: 100
|
||||
tngoLast:
|
||||
type: number
|
||||
format: double
|
||||
description: |
|
||||
Tiingo-calculated last price. Either the last trade price or mid price.
|
||||
The mid price is only used if the spread is not considered too wide by Tiingo's algorithm.
|
||||
After the official exchange print comes in, this value changes to that value.
|
||||
This is a Tiingo-enriched field and does not require IEX entitlement.
|
||||
example: 162.33
|
||||
prevClose:
|
||||
type: number
|
||||
format: double
|
||||
description: |
|
||||
Previous day's closing price of the security.
|
||||
Can be from any exchange (NYSE, NASDAQ, IEX, etc.)
|
||||
example: 154.68
|
||||
open:
|
||||
type: number
|
||||
format: double
|
||||
nullable: true
|
||||
description: |
|
||||
Opening price of the asset on the current day.
|
||||
Tiingo-calculated field, does not require IEX entitlement.
|
||||
example: 161.83
|
||||
high:
|
||||
type: number
|
||||
format: double
|
||||
nullable: true
|
||||
description: |
|
||||
High price of the asset on the current day.
|
||||
Tiingo-calculated field, does not require IEX entitlement.
|
||||
example: 163.25
|
||||
low:
|
||||
type: number
|
||||
format: double
|
||||
nullable: true
|
||||
description: |
|
||||
Low price of the asset on the current day.
|
||||
Tiingo-calculated field, does not require IEX entitlement.
|
||||
example: 160.38
|
||||
mid:
|
||||
type: number
|
||||
format: double
|
||||
nullable: true
|
||||
description: |
|
||||
Mid price at current timestamp when both bidPrice and askPrice are not null.
|
||||
Formula: mid = (bidPrice + askPrice) / 2.0
|
||||
Tiingo-calculated field, does not require IEX entitlement.
|
||||
example: 162.67
|
||||
volume:
|
||||
type: integer
|
||||
format: int64
|
||||
description: |
|
||||
Volume data. IEX volume throughout the trading day.
|
||||
Once the official closing price is received, reflects total volume across all exchanges.
|
||||
This field is provided for convenience.
|
||||
example: 0
|
||||
bidSize:
|
||||
type: number
|
||||
format: double
|
||||
nullable: true
|
||||
description: |
|
||||
Number of shares available at the bid price.
|
||||
Requires IEX entitlement. Null if not entitled.
|
||||
example: 100
|
||||
bidPrice:
|
||||
type: number
|
||||
format: double
|
||||
nullable: true
|
||||
description: |
|
||||
Current bid price.
|
||||
Requires IEX entitlement. Null if not entitled.
|
||||
example: 162.34
|
||||
askSize:
|
||||
type: number
|
||||
format: double
|
||||
nullable: true
|
||||
description: |
|
||||
Number of shares available at the ask price.
|
||||
Requires IEX entitlement. Null if not entitled.
|
||||
example: 100
|
||||
askPrice:
|
||||
type: number
|
||||
format: double
|
||||
nullable: true
|
||||
description: |
|
||||
Current ask price.
|
||||
Requires IEX entitlement. Null if not entitled.
|
||||
example: 163.0
|
||||
required:
|
||||
- ticker
|
||||
- timestamp
|
||||
- tngoLast
|
||||
- prevClose
|
||||
- volume
|
||||
example:
|
||||
ticker: 'AAPL'
|
||||
timestamp: '2019-01-30T10:33:38.186520297-05:00'
|
||||
quoteTimestamp: '2019-01-30T10:33:38.186520297-05:00'
|
||||
lastSaleTimeStamp: '2019-01-30T10:33:34.176037579-05:00'
|
||||
last: 162.37
|
||||
lastSize: 100
|
||||
tngoLast: 162.33
|
||||
prevClose: 154.68
|
||||
open: 161.83
|
||||
high: 163.25
|
||||
low: 160.38
|
||||
mid: 162.67
|
||||
volume: 0
|
||||
bidSize: 100
|
||||
bidPrice: 162.34
|
||||
askSize: 100
|
||||
askPrice: 163.0
|
||||
|
||||
IEXPrice: &IEXPrice
|
||||
type: object
|
||||
description: |
|
||||
Historical intraday price data in OHLC format from IEX Exchange.
|
||||
|
||||
The time period covered by each bar is determined by the resampleFreq parameter.
|
||||
Volume data is IEX-only and must be explicitly requested using the columns parameter.
|
||||
properties:
|
||||
date:
|
||||
$ref: '../schemas/common.yaml#/DateTime'
|
||||
description: |
|
||||
Timestamp for this OHLC bar. Marks the beginning of the time period.
|
||||
Format: ISO 8601 (RFC 3339)
|
||||
open:
|
||||
type: number
|
||||
format: double
|
||||
description: Opening price for the time period
|
||||
example: 154.74
|
||||
high:
|
||||
type: number
|
||||
format: double
|
||||
description: Highest price during the time period
|
||||
example: 155.52
|
||||
low:
|
||||
type: number
|
||||
format: double
|
||||
description: Lowest price during the time period
|
||||
example: 154.58
|
||||
close:
|
||||
type: number
|
||||
format: double
|
||||
description: Closing price for the time period
|
||||
example: 154.76
|
||||
volume:
|
||||
type: integer
|
||||
format: int64
|
||||
nullable: true
|
||||
description: |
|
||||
Number of shares traded on IEX only during the time period.
|
||||
This field is only included if explicitly requested via the columns parameter
|
||||
(e.g., ?columns=open,high,low,close,volume)
|
||||
example: 16102
|
||||
required:
|
||||
- date
|
||||
- open
|
||||
- high
|
||||
- low
|
||||
- close
|
||||
example:
|
||||
date: '2019-01-02T14:30:00.000Z'
|
||||
open: 154.74
|
||||
high: 155.52
|
||||
low: 154.58
|
||||
close: 154.76
|
||||
volume: 16102
|
||||
114
openapi/schemas/news-schemas.yaml
Normal file
114
openapi/schemas/news-schemas.yaml
Normal file
@@ -0,0 +1,114 @@
|
||||
# News API Schema Definitions
|
||||
# Reference these using: $ref: '../schemas/news-schemas.yaml#/SchemaName'
|
||||
|
||||
NewsArticle: &NewsArticle
|
||||
type: object
|
||||
description: A news article with ticker and tag associations
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int32
|
||||
description: Unique identifier specific to the news article
|
||||
example: 28515261
|
||||
title:
|
||||
type: string
|
||||
description: Title of the news article
|
||||
example: "Apple's CEO sees optimism as trade tension between U.S. and China lessens"
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
description: URL of the news article
|
||||
example: "https://www.cnbc.com/2019/01/29/apples-ceo-sees-optimism-as-trade-tension-between-us-and-china-lessens.html"
|
||||
description:
|
||||
type: string
|
||||
description: Long-form description of the news story
|
||||
example: "Apple CEO Tim Cook told CNBC that trade tensions between the U.S. and China have improved since late December."
|
||||
publishedDate:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The datetime the news story was published in UTC. Usually reported by the news source, or the time discovered by Tiingo's crawler if not declared.
|
||||
example: "2019-01-29T22:17:00Z"
|
||||
crawlDate:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The datetime the news story was added to the database in UTC. Always recorded by Tiingo. Large gaps between crawlDate and publishedDate indicate backfilled articles.
|
||||
example: "2019-01-29T22:20:01.696871Z"
|
||||
source:
|
||||
type: string
|
||||
description: The domain the news source is from
|
||||
example: "cnbc.com"
|
||||
tickers:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
pattern: '^[A-Z0-9]+$'
|
||||
description: Tickers mentioned in the news story using Tiingo's proprietary tagging algorithm
|
||||
example: ["AAPL"]
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Tags mapped and discovered by Tiingo using Tiingo's proprietary tagging algorithm
|
||||
example: ["China", "Economic Measures", "Economics", "Markets", "Stock", "Technology"]
|
||||
required:
|
||||
- id
|
||||
- title
|
||||
- url
|
||||
- publishedDate
|
||||
- crawlDate
|
||||
- source
|
||||
|
||||
BulkDownloadFile: &BulkDownloadFile
|
||||
type: object
|
||||
description: Metadata for a bulk news download file (institutional clients only)
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int32
|
||||
description: Unique identifier specific to the bulk download file. Used to select which file to download.
|
||||
example: 755
|
||||
filename:
|
||||
type: string
|
||||
description: The filename of the batch file
|
||||
example: "bulkfile_2019-01-28_2019-01-29.tar.gz"
|
||||
batchType:
|
||||
type: string
|
||||
enum:
|
||||
- base
|
||||
- incremental
|
||||
description: "Describes what kind of batch file this is: 'base' is an entire dump of the data, 'incremental' is a partial dump of the data"
|
||||
example: "incremental"
|
||||
startDate:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The start date used to select the News objects to generate the batch file. This is inclusive (publishedDate >= startDate).
|
||||
example: "2019-01-28T05:00:00Z"
|
||||
endDate:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The end date used to select the News objects to generate the batch file. This is not inclusive (publishedDate < endDate).
|
||||
example: "2019-01-29T05:00:00Z"
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
description: A url to directly download the batch file. NOTE - This url contains your Auth Token and is meant to be a copy/paste url for convenience.
|
||||
example: "https://api.tiingo.com/tiingo/news/bulk_download/755?token=YOUR_API_TOKEN"
|
||||
fileSizeUncompressed:
|
||||
type: integer
|
||||
format: int64
|
||||
description: The size of the file in bytes uncompressed
|
||||
example: 10385878
|
||||
fileSizeCompressed:
|
||||
type: integer
|
||||
format: int64
|
||||
description: The size of the file in bytes compressed using gzip
|
||||
example: 3018550
|
||||
required:
|
||||
- id
|
||||
- filename
|
||||
- batchType
|
||||
- startDate
|
||||
- endDate
|
||||
- url
|
||||
- fileSizeUncompressed
|
||||
- fileSizeCompressed
|
||||
Reference in New Issue
Block a user