Market News
Market News · GPT Actions
Stock Market News Bot
API for retrieving the latest market news based on different categories using Finnhub.
GET /newsGet latest market news
原始 API 定义
{
"openapi": "3.1.0",
"info": {
"title": "Stock Market News Bot",
"description": "API for retrieving the latest market news based on different categories using Finnhub.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://finnhub.io/api/v1"
}
],
"paths": {
"/news": {
"get": {
"summary": "Get latest market news",
"operationId": "getMarketNews",
"parameters": [
{
"name": "category",
"in": "query",
"description": "News category such as general, forex, crypto, merger.",
"required": true,
"schema": {
"type": "string",
"enum": [
"general",
"forex",
"crypto",
"merger"
]
}
},
{
"name": "minId",
"in": "query",
"description": "Minimum ID for news articles.",
"required": false,
"schema": {
"type": "integer",
"default": 0
}
}
],
"responses": {
"200": {
"description": "Array of news articles",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"category": {
"type": "string"
},
"datetime": {
"type": "integer"
},
"headline": {
"type": "string"
},
"id": {
"type": "integer"
},
"image": {
"type": "string"
},
"related": {
"type": "string"
},
"source": {
"type": "string"
},
"summary": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {},
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "X-Finnhub-Token"
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}