Stock Robo 🤖 AI Stock Analyst
Stock Robo 🤖 AI Stock Analyst · GPT-Aktionen
Stock Future Prediction API
API to predict future stock prices based on stock symbol for a specified time range.
GET /stock-forecast/{symbol}Predicts future stock pricesReturns predictions for future prices of a stock identified by its symbol.
Ursprüngliches API-Schema
{
"openapi": "3.1.0",
"info": {
"title": "Stock Future Prediction API",
"version": "1.0.1",
"description": "API to predict future stock prices based on stock symbol for a specified time range."
},
"servers": [
{
"url": "https://api.prod.stockcode.ai",
"description": "Stock Prediction API Server"
}
],
"paths": {
"/stock-forecast/{symbol}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"summary": "Predicts future stock prices",
"operationId": "getStockData",
"description": "Returns predictions for future prices of a stock identified by its symbol.",
"parameters": [
{
"name": "symbol",
"in": "path",
"description": "The unique symbol of the stock.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "before",
"in": "query",
"description": "Specifies the number of months of historical data to retrieve, default is 60.",
"schema": {
"type": "integer",
"default": 60
}
},
{
"name": "after",
"in": "query",
"description": "Specifies the number of months to retrieve data, default is 12.",
"schema": {
"type": "integer",
"default": 12
}
}
],
"responses": {
"200": {
"description": "A list of stock price predictions.",
"content": {
"application/json": {
"schema": {
"$rel": "/components/schemas/StockForecast"
}
}
}
},
"400": {
"description": "Invalid input",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error_message": {
"type": "string"
}
}
}
}
}
},
"404": {
"description": "Stock symbol not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error_message": {
"type": "string"
}
}
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error_message": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "x-api-key"
}
},
"schemas": {
"StockForecast": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the stock."
},
"stock_symbol": {
"type": "string",
"description": "The unique symbol of the stock."
},
"exchange": {
"type": "string",
"description": "The stock exchange where the stock is listed."
},
"company_name": {
"type": "string",
"description": "The name of the company."
},
"company_country": {
"type": "string",
"description": "The country where the company is based."
},
"stock_type": {
"type": "string",
"description": "The type of the stock."
},
"latest_stock_price": {
"type": "number",
"format": "float",
"description": "The latest stock price."
},
"previous_stock_price": {
"type": "number",
"format": "float",
"description": "The previous stock price."
},
"stock_price_two_times_ago": {
"type": "number",
"format": "float"
},
"is_deleted": {
"type": "boolean"
},
"is_exception": {
"type": "boolean"
},
"last_updated": {
"type": "string",
"description": "The date of the last data update."
},
"average_monthly_stock_prices": {
"type": "array",
"description": "Historical stock price data.",
"items": {
"type": "object",
"additionalProperties": {
"type": "number",
"format": "float"
}
}
}
}
}
}
}
}