Skip to main content
GET
/
forecast
/
{symbol}
Get stock forecast
curl --request GET \
  --url https://api.fcontext.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"
        }
      ]
    }
  },
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 100,
    "hasNext": true
  },
  "message": "<string>",
  "timestamp": "<string>",
  "meta": {
    "pagination": {
      "page": 1,
      "limit": 10,
      "total": 100,
      "hasNext": true
    }
  }
}

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
required

ISO 8601 timestamp of the response

pagination
object

Pagination information for paginated responses

message
string

Optional success message

meta
object

Optional metadata including pagination, statistics, and additional context