mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2026-01-31 08:34:20 +01:00
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>
115 lines
4.0 KiB
YAML
115 lines
4.0 KiB
YAML
# 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
|