GET
/
forecast
/
{symbol}
Get stock forecast
curl --request GET \
  --url https://api.financialcontext.com/forecast/{symbol} \
  --header 'X-API-Key: <api-key>'
{
  "success": true,
  "data": {
    "symbol": "AAPL",
    "type": "all",
    "data": {
      "ratings": [
        {
          "buy": "15",
          "over": "8",
          "hold": "12",
          "under": "3",
          "sell": "1",
          "total": "39",
          "no_opinion": "2",
          "date": "1704067200"
        }
      ],
      "prices": [
        {
          "date": "1704067200",
          "close": "185.64",
          "high_price": "220.00",
          "low_price": "160.00"
        }
      ]
    }
  },
  "message": "<string>",
  "timestamp": "2023-11-07T05:31:56Z",
  "meta": {
    "pagination": {
      "currentPage": 1,
      "pageSize": 20,
      "totalItems": 150,
      "totalPages": 8,
      "hasMore": true,
      "hasPrevious": false
    }
  }
}

Authorizations

X-API-Key
string
header
required

Path Parameters

symbol
string
required

Stock symbol (e.g., AAPL, NASDAQ:AAPL)

Required string length: 1 - 20
Example:

"AAPL"

Query Parameters

page
integer
default:1

Page number, starting from 1

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

page_size
integer
default:10

Number of items per page, range 1-100

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

10

symbol
string
required

Stock symbol (e.g., AAPL, NASDAQ:AAPL)

Required string length: 1 - 20
Example:

"AAPL"

type
enum<string>
default:all

Type of forecast data to retrieve: ratings, prices, or all

Available options:
ratings,
prices,
all
Example:

"all"

Response

Forecast data retrieved successfully

Successful response for forecast API endpoints

success
boolean
required

Indicates successful API response

data
object
required
timestamp
string<date-time>
required

ISO 8601 timestamp of the response

message
string

Optional success message

meta
object

Optional metadata including pagination, statistics, and additional context